NPC Drivers - Citizen & Fully working Taxi script - (FS-Version) -
NaS - 01.09.2015
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
Version 1.2.4
- 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.
Version 1.2.3
- 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
Version 1.2.2
- Some small optimizations and bug fixes
Version 1.2.1
- 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)
Version 1.2
- 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)
Version 1.1
- 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, ...)
> Credits
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
Re: NPC Drivers - Citizen & Fully working Taxi script - (FS-Version) -
Sellize - 01.09.2015
Saw your video, good job mate.
Re: NPC Drivers - Citizen & Fully working Taxi script - (FS-Version) -
Logofero - 01.09.2015
Good work.
Create an extended video. It will be interesting to look at moving in city traffic
Re: NPC Drivers - Citizen & Fully working Taxi script - (FS-Version) -
AIped - 01.09.2015
Yea i think its good finaly seeing this released. Looking forward to see other scripters make some good use of this.
Edit: by the way did our include and FCNPC still work well with sa-mp 0.3.7-R2 ?
AW: Re: NPC Drivers - Citizen & Fully working Taxi script - (FS-Version) -
NaS - 01.09.2015
Quote:
Originally Posted by Sellize
Saw your video, good job mate.
|
Thanks!
Quote:
Originally Posted by Logofero
Good work.
Create an extended video. It will be interesting to look at moving in city traffic
|
I'm currently working on a video showing the whole script
Quote:
Originally Posted by AIped
Yea i think its good finaly seeing this released. Looking forward to see other scripters make some good use of this.
Edit: by the way did our include and FCNPC still work well with sa-mp 0.3.7-R2 ?
|
Seems like I didn't try it with the newest version yet.
I will now and report back.
Edit: It's working without any problems for me.
Re: NPC Drivers - Citizen & Fully working Taxi script - (FS-Version) -
JustinAn - 01.09.2015
Amazing...just amazing
Re: AW: Re: NPC Drivers - Citizen & Fully working Taxi script - (FS-Version) -
AIped - 01.09.2015
Quote:
Originally Posted by NaS
Seems like I didn't try it with the newest version yet.
I will now and report back.
Edit: It's working without any problems for me.
|
Great tellme if you need any help
Re: NPC Drivers - Citizen & Fully working Taxi script - (FS-Version) -
Zues - 01.09.2015
Woa!! That's amazing. Good job!
Re: NPC Drivers - Citizen & Fully working Taxi script - (FS-Version) -
Michael B - 01.09.2015
This is one of the best NPCs filterscripts. It's simply amazing! I can realize how much effort you put in it.
Re: NPC Drivers - Citizen & Fully working Taxi script - (FS-Version) -
GustavoSouza - 01.09.2015
Aparee this in the log: [16:08:29] [sampgdk:error] Too many callback arguments (at most 32 allowed)
Re: NPC Drivers - Citizen & Fully working Taxi script - (FS-Version) -
Admigo - 01.09.2015
Looks interesting, great job. Rep.
AW: Re: NPC Drivers - Citizen & Fully working Taxi script - (FS-Version) -
NaS - 01.09.2015
Quote:
Originally Posted by GustavoSouza
Aparee this in the log: [16:08:29] [sampgdk:error] Too many callback arguments (at most 32 allowed)
|
I never encountered that one. How did it happen?
Quote:
Originally Posted by Michael B
This is one of the best NPCs filterscripts. It\'s simply amazing! I can realize how much effort you put in it.
|
Thanks, and yea, we kinda went through many different versions.
Re: NPC Drivers - Citizen & Fully working Taxi script - (FS-Version) -
Neutralneu - 02.09.2015
Awesome, will test it soon, thank you)
Re: NPC Drivers - Citizen & Fully working Taxi script - (FS-Version) -
n0minal - 02.09.2015
Very nice, just the VehicleZAngle need some more work to be perfect, congrats NaS, +6
Re: NPC Drivers - Citizen & Fully working Taxi script - (FS-Version) -
JJohnson1 - 02.09.2015
Excellent job NaS .`I can see alot of ppl using this.(I know I will).Thanks for the effort. ++Rep\'d.
Re: NPC Drivers - Citizen & Fully working Taxi script - (FS-Version) -
AroseKhanNiazi - 02.09.2015
Great job! +REP!
Re: NPC Drivers - Citizen & Fully working Taxi script - (FS-Version) -
X337 - 02.09.2015
Good Job!
AW: Re: NPC Drivers - Citizen & Fully working Taxi script - (FS-Version) -
NaS - 02.09.2015
Thanks guys!
Updated the code for some performance tweaks.
The calculations should be a bit faster now.
If you want even more performance look for the line "newpath = smooth_path(...)" and change the 0.2 to 0.1, this will make the path less smooth.
Re: NPC Drivers - Citizen & Fully working Taxi script - (FS-Version) -
JustinAn - 02.09.2015
Deleted.
AW: Re: NPC Drivers - Citizen & Fully working Taxi script - (FS-Version) -
NaS - 02.09.2015
Quote:
Originally Posted by JustinAn
For your server package, you\'ve missed the includes. I don\'t know if it\'s on purpose or accident but just a heads up for ya.
|
They are in plugins/plugin_includes
I\'ll move the folder in the next version.