My first attempt at Python, strange results... Help?

Noxic

Chieftain
Joined
Aug 22, 2013
Messages
5
I recently started playing Rise from Erebus and really liked LPlate's Unexplore module (release here, helpthread here) but I wanted to add more depth to it and ended up rewriting pretty much the whole script. When I finally finished it and tried it out, there were strange results...

On the first turn, I was getting -1243108 gold/turn and I could research a tech that was unique to another Civ (who starts with it).
On the next turn, Sabathiel (the leader of a Civ that is anti-armageddon) won Gone To Hell victory (he contributed the most to armageddon), my units had gotten (practically?) infinite XP, and I had GAINED some ridiculous number of gold rather than lost it.
This time when I ended the turn, the game wouldn't stop loading and I had to reboot.

You can look at the code here.
A large portion is the declaration of dictionaries whose purpose is explained in comments in the function "forgetPlots". You'll find the actual functions near the bottom of the script.

Apart from making dictionaries rather than putting it in an XML file, what am I doing wrong?
 
Back
Top Bottom