01.09.2015, 15:06
(
Last edited by NaS; 27/03/2020 at 07:51 PM.
Reason: Updated to new FCNPC
)
NPC Drivers (FS Version) v1.2.5 by AIped & NaS
> About
NPC Drivers are NPCs (created with FCNPC), which are driving around San Andreas like the ones you see in Singleplayer.
> Citizen
The crazy citizen just drive around, ignoring everything and everyone trying to stop them. Seriously.
> Taxis
Among the crazy citizen, there are also actual taxis driving around.
If you call one (using /Taxi), a taxi near your position will respond and pick you up.
But if there are no taxis around, you will have to wait.
> Notes
The NPCs still look quite laggy, and there are issues with their movement when they drive up/down steep roads or such.
This cannot be fixed (at least I tested everything I could imagine), it may be a FCNPC or SA-MP bug.
After the start the script needs to calculate new paths for all NPCs, which can take some time. You'll get notified as soon as it has finished.
If you find bugs that I can fix, please post them here. Also every suggestion is welcome!
You may also want to use the JIT Compiler if possible, it reduces the average path calculation time by about 7-10 times, however this may vary for different PCs and settings.
Also note that reloading the FS may lead to a crash, GMX is working well.
> Commands
/Taxi - Calls a taxi
Admin:
/ds [id] - Puts you in the car of a Driver
/DInfo - Prints debug info (containing general info and some data about performance) to the console/server log
> Download
Filterscript + Fixed GPS.dat (GitHub): Click!
Make sure to download the GPS.dat too, this Script uses the Parking Lots added in my version. If you do not do this, the FS may not start properly.
> Install
Click on the above link to GitHub and download the contents as ZIP.
Then open the archive and copy the filterscripts and scriptfiles folders into your SA-MP Server directory, after that compile driverfs.pwn.
Also make sure to download the newest versions of the plugins required (see below).
It's important that your maxnpc is adjusted to at least the total amount of Drivers and other NPCs on your server!
> Dependencies
You will need to download the following plugins:
- Fully Controllable NPC Plugin (2.0.0 RC1-7)
- Modern GPS Plugin (Click)
- Rotations.inc by Nero_3D (v1.2.0) (Click)
- ColAndreas Plugin (Click)
> Changelog
Version 1.2.5
- Switched to kvann's Modern GPS Plugin
- Works with FCNPC 1.7.*
- NPCs can now drive bikes (and also lean left/right in turns) - needs some more work though
- NPCs rotate on all axes now, depending on terrain.
- Taxi call will now be correctly aborted if the called Taxi gets killed by someone
- Adjusted path smoothing to be more lightweight. Needs some more tweaking as well.
- Removed dependancy on QuaternionStuff Plugin
- Now uses Nero_3D's Rotations.inc (see Dependancies)
- Fixed infinite loop when using /ds
- Now using ZCMD for commands
- Works with latest FCNPC Version
- Some small optimizations and bug fixes
- Added support for FCNPC 1.0.4
- Added Cops (count as civilains) - They turn on the sirens sometimes to annoy their surroundings
- Added Skin Arrays for different types (Civ, Cops, Taxis)
- There is a very rough time measurement now when you choose your destination
- Fixed stop'n'go (Using proper math instead of buggy distance checks)
- General performance improvements
- Using ColAndreas for more precise rotations - If you need it to be MapAndreas, PM me for a MapAndreas version
- Using Streamer for its simple and effective Area functions
- Manually fixed hundreds of nodes
- Reduction of path lengths (Node distance are now dynamic)
- Streaming NPC-Movements (NPCs without players around will only calculate very rough movements)
- NPCs brake when another NPC is in front of them (not yet perfect)
- Improved Start- and Endnode calculation
- Shortened paths on recalculations (Improves performance)
- Improved speed calculations, speed changes over time (based on steepness/turning angle)
- Reworked some values (smoothing, paths, ...)
AIped - Help, Support, Ideas, Scripting, ...
Gamer_Z - Testing, RouteConnector Plugin, QuaternionStuff Plugin and great help with some math-problems.
OrMisicL & ZiGGi - FCNPC Plugin
DeathonaStick - Help with quaternions, testing
Pottus, Slice, Chris42O, uint32 - Greatest plugin of all times - ColAndreas
kvann - Modern GPS Plugin
SA-MP Team - SA-MP