Log in

View Full Version : AI scripts



foxtacles
01-12-2013, 09:28 PM
They need to be polished and reworked a bit, but it has the important stuff in it.
(note: doesn't work with gary 2.6, only with repository version)

Silentfood
01-13-2013, 08:25 PM
Very nice, but wouldn't it be a good idea to replicate real NPC scripts through simulating the Fallout logic on the closest player? Previous work with networking allowed me to simulate physics on the closest client and sync it to the server and the connected clients. When a new player would be closer, the previous syncing player would pass the details over and so forth. This would reduce stress on my server and allowed me to create a sub-network of clients processing various objects.

Would be nice to have identical NPC logic from the core game, though replicating the logic is a possibility.

StarshipGhost
01-13-2013, 09:35 PM
I agree it would be great to have the replicated single player NPC AI for VaultMP... but no idea how hard that would be.

roby65
01-13-2013, 09:42 PM
First rule in multiplayer games: never, ever, trust a client. Never.

What when lamers will find out? They will simply teleport near npcs and manipate their behaviour ruining server for all the players.
This is not a viable option, ai will be server-side.

Volumed
01-13-2013, 09:48 PM
First rule in multiplayer games: never, ever, trust a client. Never.

What when lamers will find out? They will simply teleport near npcs and manipate their behaviour ruining server for all the players.
This is not a viable option, ai will be server-side.

Arma 2 trust clients.. Biggest fail ever. Cheeeaaaaatttteeeerrssss.

Smoria
01-13-2013, 10:12 PM
Arma 2 trust clients.. Biggest fail ever. Cheeeaaaaatttteeeerrssss.
Hey, i saw you on Namalsk)

Volumed
01-13-2013, 10:15 PM
Hey, i saw you on Namalsk)

Hehe cool, we're hosting a Dayz+ server now it's pretty fun.
Still Dayz is a good example why you should not trust clients.

Smoria
01-13-2013, 10:17 PM
*You should not trust anyone

Volumed
01-13-2013, 10:19 PM
*You should not trust anyone

Yeah, I should ban everyone! x'D

Waiting for Dayz standalone. (A)

Xolitude
01-14-2013, 01:26 AM
AI scripts, Very nice :) Downloaded it, and had a look. Might try to use them myself some time. And DayZ standalone, I cannot wait!

Silentfood
01-14-2013, 02:26 AM
First rule in multiplayer games: never, ever, trust a client. Never.

What when lamers will find out? They will simply teleport near npcs and manipate their behaviour ruining server for all the players.
This is not a viable option, ai will be server-side.

I can see where you are coming from, and I can fully understand the trust issues with players.

StarshipGhost
01-17-2013, 10:52 PM
I didn't realize all of that about the cheating and stuff, I just hope people are good enough to program AI to where it's not much different than single player AI.

foxtacles
01-19-2013, 12:22 AM
Added carter.cpp script, which spawns a Carter NPC who will go and pickup any items in his area.

zamp
01-20-2013, 11:00 PM
Hurr durr derp herp. (post deleted)

Silentfood
01-22-2013, 09:27 PM
Could you post compiled versions of these scripts? Thanks.

Volumed
01-23-2013, 08:50 AM
Could you post compiled versions of these scripts? Thanks.

You got enough time to learn and compile the script yourself in the mean time, AI is not supported in Gary 2.6.

foxtacles
05-03-2013, 09:38 PM
https://codepad.org/vJ9Sjtmo

The script (a modified version of the mutant and some minor other stuff) from this video:

https://www.youtube.com/watch?v=kJJnm8Li1nU

(hacked together, not clean, may be buggy, just as an example)

ThatOneDude
08-02-2013, 09:48 PM
When I try to build any of these, I get several errors, most notably:

error: 'F3' has not been declared

I extracted these to my cloned git vaultscript folder, then copied and edited makefile, changing all instances of "vaultscript" to "ant"/"carter"/"mutant"

vaultscript does compile normally.

Ubuntu server 64 bit, build-essential, gcc-multilib, and g++-multilib installed.

foxtacles
08-02-2013, 10:35 PM
Several (minor) things have changed (namespace F3 has been dropped because there is no more New Vegas support, ActorValues are predefined, GetName function has been renamed to GetBaseName). I updated the scripts in the first post, they should compile fine now.

ThatOneDude
08-02-2013, 11:38 PM
Thanks much. I'll have another go at it when I get home.

And success, ant.so, carter.so, and mutant.so built. Will test next time the Windows computer is up.

ThatOneDude
08-04-2013, 10:10 PM
And server crashes with "Segmentation fault (core dumped)" when an ant is spawned. Should I be running this on a server/client newer than Gary2.8?

foxtacles
08-04-2013, 10:21 PM
No, it should work fine. I just tested it on my linux box and it doesn't crash. Are you using vaultserver or vaultserverd? Can you send me the core dump?

EDIT:
I can confirm it crashes when using vaultserver. vaultserverd works fine. I already know the source of the bug, should be fixed in the next release

ThatOneDude
08-05-2013, 07:21 PM
Thanks I'll keep that in mind until next release.