Page 1 of 1

Description of AI files

Posted: Sun Aug 10, 2008 10:38 pm
by Sindwiller
Hello there! I wasn't sure whether I should post this question here or in the "General Modding" subsection. Well, anyway, my question is about the scripts inside the ai/ folder. Their function is clear, but their contents isn't very self-explanatory and that's why I'm asking if somebody could, you know, briefly explain how they work, for the sake of experimenting and in case somebody would like to hack in different game mechanics along with a changed AI. They do look pretty weird to the normal eye (and I thought X's scripting was weird :roll: ).

Cheers!

Posted: Mon Aug 11, 2008 12:49 am
by klauss
The files are state machine descriptions. Each node there is a transition event that tells the AI how to react to certain situations. Like... if you have an enemy closer than 3000 meters, fire all weapons, when it's closer than 200 meters, turn away, etc, etc...

The idea is easy to grasp I believe, but the organization of those files as you said isn't, and I don't really understand them.

So... until someone else gives you more useful information, I just wanted to describe the intended meaning of the files in case it helps you figure them out.

Posted: Mon Aug 11, 2008 12:50 am
by loki1950
Welcome Sindwiller not sure how they work either :? we have been wanting to fiddle with them for a while now and i gather that only one or two people really understand them which is not a good thing one of the devs may be by and cast some light on the subject and if not in a reasonable time frame i can poke one or two :wink: but i think that the two csv files define base behaviour and the scripts call the specific comand in commond.cpp but how it all is tied together is where most of the confusion lies i believe.
Edit klauss you beat me too this one :lol: :wink: and your explanation makes some senses

Enjoy the Choice :)

Posted: Mon Aug 11, 2008 10:40 am
by Sindwiller
Thanks guys, you're being really helpful! :D I will take another look on them and try to understand them a bit better. And there is still hope that an expert could enlighten us at last ;)