So I have finished adding a faction to the game but I really need some help forming their AI. I already tried combing through the AI XML's and Lua files and adding my faction (the old republic) in every place I saw a mention of the Empire or the Empire's buildings, but this didn't work. So my question is this: Will someone guide me through giving an AI to my faction similar to that of the Empire's AI?
New perceptions, or old ones modified, in my experience have to be in the SWFOC\Data\xml\ai folder. It cannot go into a mod folder.
what about changes to the Lua files? can they be in the mod or would they have to be in the game's folder? For the XML's in the AI folder, which I will now be editing into the game's data/xml folder rather than my mod's, would the strategy of going through each xml and adding my new faction everywhere I saw either the empire or rebel faction work?
For the XML's in the AI folder, which I will now be editing into the game's data/xml folder rather than my mod's, would the strategy of going through each xml and adding my new faction everywhere I saw either the empire or rebel faction work?
Yes, you were on the right track. It took me a long time to figure out that changes to the perceptions couldn't be put in the mod path. Some would work, but others would not. It became very frustrating, but in the end put them in the game folder it should work unless there is a syntax error in your coding.
Lua scripts can be put in the mod path. Add your faction where you see perceptions pertaining to faction, but you'll have to add your factions building, and unit variations to some perceptuals as well. Like build barracks, you'll need your factions variant to be added to it. Theres not a whole lot more to it.
Alright, so I think Iv finished adding my faction to the XML files in the AI folder. However, whenever I add the folder to FOC/data/XML and try to start my mod, I get an error saying there are perception parsing errors and my game can not start. What does this error mean and how can it be fixed?
Parsing error is usually a start tag, or end tag. Check those first, then remove all perceptions, and put them back in one at a time. When it crashes then that is the offending perception.