Description of AI files

For collaboration on developing the mod capabilities of VS; request new features, report bugs, or suggest improvements

Moderator: Mod Contributor

Post Reply
Sindwiller
Merchant
Merchant
Posts: 32
Joined: Sun Aug 10, 2008 10:31 pm
Location: Zürich, Switzerland

Description of AI files

Post 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!
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Post 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.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
loki1950
The Shepherd
Posts: 5841
Joined: Fri May 13, 2005 8:37 pm
Location: Ottawa
Contact:

Post 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 :)
my box::HP Envy i5-6400 @2Q70GHzx4 8 Gb ram/1 Tb(Win10 64)/3 Tb Mint 19.2/GTX745 4Gb acer S243HL K222HQL
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and Lenovo ideapad 320-15ARB Win 10/Mint 19.2
Sindwiller
Merchant
Merchant
Posts: 32
Joined: Sun Aug 10, 2008 10:31 pm
Location: Zürich, Switzerland

Post 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 ;)
Post Reply