RUNNING WITH RIFLES
http://runningwithrifles.com/phpBB3/

Custom AI
http://runningwithrifles.com/phpBB3/viewtopic.php?f=7&t=2390
Page 1 of 1

Author:  Jugz [ Tue Jun 23, 2015 6:30 pm ]
Post subject:  Custom AI

Is there any way to create a completely new soldier AI (not just modify the settings for existing AI)?

Author:  Ramsoos [ Wed Jun 24, 2015 1:26 am ]
Post subject:  Re: Custom AI

How do you mean? You can alter much of the AIs behavior by changing the settings of the default AI file. If you want a completely different AI file, just copy the default, rename it, and change the values as you see fit.

Author:  Jugz [ Wed Jun 24, 2015 3:22 am ]
Post subject:  Re: Custom AI

I guess I worded that poorly. If I wanted to create an attack dog, and turned a faction into dogs, how would I go about making their AI

Author:  pasik [ Wed Jun 24, 2015 9:29 am ]
Post subject:  Re: Custom AI

Jugz wrote:
I guess I worded that poorly. If I wanted to create an attack dog, and turned a faction into dogs, how would I go about making their AI

It is not possible to program completely new AI behavior logic, the game would basically need a C++ API for that, some kind of plugin system I'd say, but you might be able to come up with something by setting up the dog character, AI, its soldier group or faction in a specific manner.

For instance, if you strip the soldier group from any primary weapons (in a faction xml file and/or related resources files), they will only use stabbing functionality to attack and will charge directly against their detected and chosen enemy. I'd suppose that would be a useful starting point.

Making the soldier group use a different default.ai -like file allows you to configure the AI parameters specific to that soldier group, if needed.

You'll probably need a different default_base.character -like file to alter the running speeds and such for the dog steering model. You can also set up things so that the dog "character" won't talk the way other soldiers do.

Potential problems I'd expect there being includes
* dogs driving vehicles; not sure now if there was a suitable parameter to avoid this, one good enough way might be to keep the dog XP level at 0, which would make them always prefer joining a squad rather than lead one, but if one spawns alone somewhere, it'll be a leader anyway and might end up deciding to use a vehicle before it gets to join a squad..
* dogs climbing up ladders; can't think of a good way around this but maybe there's a way by somehow mutilating it in your custom default_base.character file

One uncharted area with dogs in general would be the animations and the skeleton the character uses. I personally haven't tried to make it suit anything else than humanoids, so not sure how well it will work.

Author:  warbrand2 [ Wed Jun 24, 2015 4:08 pm ]
Post subject:  Re: Custom AI

uh dogs can be trained to climb ladders, so that part isn't a problem though the dogs driving part would be a huge problem.... also it is the sort of problem that would need to be figured out for the zombie mode in the future.

Author:  pasik [ Wed Jun 24, 2015 6:25 pm ]
Post subject:  Re: Custom AI

warbrand2 wrote:
uh dogs can be trained to climb ladders, so that part isn't a problem though the dogs driving part would be a huge problem.... also it is the sort of problem that would need to be figured out for the zombie mode in the future.

Could be true, but it also depends on the mode. If it's completely player based on the friendly faction, no bots, then it could be enough to just mark all vehicles as not to be used by the AI, such control exists already too. Zombies would then just ignore all vehicles.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/