I have been messing with Minor Faction AI, among other things, in my personalized version of this mod, and I believe I finally got it working..
Things you must realize:
- Minor Factions DO NOT gain credits like playable factions. Either its in the Base Code or its some flag I havent set (or anyone has) in the Factions.XML. But not to worry, I found a very easy way of doing it in the GameScoring.LUA script. I wrote a function that spawns a thread at game start, that every weeks does a check of minor faction planets and rewards the minor faction AI with money commensurate to its planetary holdings and based on the presence of Tax or Mining Facilities. Its not perfect but it pretty freaking close.
- The above is not and SHOULD NOT be needed for Empire/Rebel/Underworld factions. They gain credits fine the normal way.
Perceptual Equations:
- Woah, wasted alot of time on these and was ready to give up but read up on a German mod and figured out (through translation) how to do it.
- All XML in the XML/AI folders can be edited in the Imperial_Civil_War directory structure, EXCEPT for the PERCEPTUALEQUATIONS directory. You can make edits to those files, yes, BUT it wont take affect in game. The ONLY way to get perceptual equations edits to work is to have the files in the base FOC/Data/XML/AI/PERCEPTUALEQUATIONS directory. And you need to be very careful of your edits.
- Why are these equation edits necessary? Well because there are a bunch of places where it hardcodes the equations to only work if the calling faction is one of the majors. I edited mine to take into account minor factions as well. For instance, one function tries to determine if a target planet is connected to "me", whoever the calling faction is. Well in it the only faction values that will allow the function to return a 1 (TRUE) are "REBEL", "EMPIRE", or "UNDERWORLD"
# of planets/ # of Trade Routes:
- came across a big error that was not allowing me to add in more planets to the GC. What i found out is, and this is across the entire XML directory, but you cannot have a field with more than around 3500 characters in it. Given the Thrawn's Revenge names of their routes, it could only hold around 160 trade routes in it before it would not load. Well, just rename the routes to abbreviations like instead of "All_Coruscant_Byss" change to "CorBys" and you can fit tons more. As a result, more trade-routes = MORE PLANETS.
The Result:
- My GC has 150 planets, and SEVENTEEN independent factions all acting with full AI, and the game is as stable as ever. I even run it off of a work laptop, so lag is not an issue.
Anyway, credits go to Corey and the team for the awesome mod, and I hope this info is useful to other modders and to the team. Figured all the banging my head against the wall should do someone some good. Hopefully y'all can use this info.
Thanks