Things i learned about scripts and testing them... |
For quite a while, i was frustrated just how many script bugs i was running into and were taking forever to get fixed. I was trying over and over to find it and fix it, but would always bet there the next time i ran the game. But i found the reason. It was because i was testing with only one race file instead of them all. If i fixed a bug, but it was still in some other race files, the bug could still occur. That's why i lost many hours in bug hunting for silly bugs that should have taken a few minutes to fix. Trying to save time by not compiling the whole set of race files just made me waste a lot of time needlessly...
How i found this? One ship design i had rename still showed up in my list. Since it was nowhere in my script files, i figured it was because some of the race scripts had not been updated. This also mean that you can't compile the race with different core files (like research or settings). If you have done it, don't do it again, you will save yourself a lot of pain...




AI Tips
Are you using the makefile option? If not, choose that and select "All Races Makefile" and it will automatically compile all the main/setup files for each race.
Also if you're not doing it already, for most direct testing you should just compile the default main script. As the player race setting all ministers on will use this script and you can observe first hand what it's doing.
Lastly, using debugsettings.txt can be very helpful for diagnosing script errors. You can set it to print out each race's script execution during a turn line by line. Note that debugsettings.txt will not work in the mod folder, but only the default data folder. The dumps are saved in the backup folder.
-----
Space Empires Depot | SE:V Balance Mod