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 ).
Cheers!
Description of AI files
Moderator: Mod Contributor
-
- Merchant
- Posts: 32
- Joined: Sun Aug 10, 2008 10:31 pm
- Location: Zürich, Switzerland
-
- Elite
- Posts: 7243
- Joined: Mon Apr 18, 2005 2:40 pm
- Location: LS87, Buenos Aires, República Argentina
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.
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.
-
- The Shepherd
- Posts: 5841
- Joined: Fri May 13, 2005 8:37 pm
- Location: Ottawa
- Contact:
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 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 and your explanation makes some senses
Enjoy the Choice
Edit klauss you beat me too this one 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
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
-
- Merchant
- Posts: 32
- Joined: Sun Aug 10, 2008 10:31 pm
- Location: Zürich, Switzerland