Bug Reports

Alright, the first one I figured out ... the code wasn't hardened against a civ having no unit type defined for a certain class. If that sounds familiar, I fixed this same thing in RevUtils a month or so ago ... should have brought the change over to here as well :blush:

The second one I don't understand ... there was a logic bug there, but not one that would cause an error. The code tried to look up what was stored under "SpawnFromRevolt" in the "Revolution" dictionary held using SdToolKitCustom ... this item doesn't exist, it should have read "SpawnList", the other key is never set by anything. My custom version of the SdToolKit always returns None when the key isn't found and None is checked for on that line. I've fixed the logic bug, but I can't see why this would cause an error.

Caesium: Are you using my copy of SdToolKitCustom.py or perhaps another one some how? That's the only thing I can see which could cause an error.

Here's what the sdObjectGetVal function should look like:

Code:
def sdObjectGetVal( ModID, object, var ):
    cyTable = sdLoad(object)
    try:
        mTable = cyTable[ModID]
        if( var in mTable ) :
            return mTable[var]
        else :
            return None
    except:
        print "Error: initialize object first (getval)!"
        #assert False
        return None

A file fixing the first bug and the logic bug at the 2nd bug location is attached, I'll re-upload the mod once the cause of the second crash is sorted out.
 

Attachments

Thx jdog. Is the first bug the one I mentioned or were you not able to reproduce my crash (when it seems too many civs were popping up late game)

I started a pure rev mod with 1.65 to get a save for you. first time the AI crushed me :( :lol: the second time I've gone through its gone better but I'm not at the point where it starts crashing.
 
Very rarely, I think python will behave illogically of itself, with no help from the programmer. I know that sounds impossible, but I remember a few months ago someone posted here a crash with my foreign advisor python code which just didn't make any sense.
Cheers.
 
I'm getting a very strange bug when I try to start a new revolutions game. The RevIndex isn't appearing in cities and the RevWatch button isn't there. The start as minor civs option and Dynamic civs aren't working either. This probably means that the rest of the modpack isn't working as well, but I haven't played one of these games long enough to tell.

This happened to me after I had just finished a game that was working fine. I changed the config settings and then this happened. I changed them back, but I'm still getting the same problem, so they might not be causing it. I'm stumped.

EDIT: I've just tried loading SAVED games, and Revolutions won't even work then!
 
Yeah, something is definitely going wrong ... based on the symptoms it sounds to me like something is screwed up with Python and is causing an error. Turn off HidePythonErrors (or something like that) in your CivilizationIV.ini file in My Game/Beyond the Sword/ and I think you'll see some errors!

Hope that helps.
 
@Caesium
Out of interest, what options are you playing under like map and initial player numbers? How often are you getting this error? At this point, I am not reproducing it and have not heard any other error reports of it yet.
Cheers.
I cannot answer this question, because I'm just posting bugs, which my beta testers had while testing my mod.
Alright, the first one I figured out ... the code wasn't hardened against a civ having no unit type defined for a certain class. If that sounds familiar, I fixed this same thing in RevUtils a month or so ago ... should have brought the change over to here as well :blush:
:) Thanks a lot :)
The second one I don't understand ... there was a logic bug there, but not one that would cause an error. The code tried to look up what was stored under "SpawnFromRevolt" in the "Revolution" dictionary held using SdToolKitCustom ... this item doesn't exist, it should have read "SpawnList", the other key is never set by anything. My custom version of the SdToolKit always returns None when the key isn't found and None is checked for on that line. I've fixed the logic bug, but I can't see why this would cause an error.

Caesium: Are you using my copy of SdToolKitCustom.py or perhaps another one some how? That's the only thing I can see which could cause an error.

Here's what the sdObjectGetVal function should look like:

Code:
def sdObjectGetVal( ModID, object, var ):
    cyTable = sdLoad(object)
    try:
        mTable = cyTable[ModID]
        if( var in mTable ) :
            return mTable[var]
        else :
            return None
    except:
        print "Error: initialize object first (getval)!"
        #assert False
        return None

A file fixing the first bug and the logic bug at the 2nd bug location is attached, I'll re-upload the mod once the cause of the second crash is sorted out.
I'm using your code, but with a growing number of .py files things like this will happen much more often, I think.
 
Yeah, something is definitely going wrong ... based on the symptoms it sounds to me like something is screwed up with Python and is causing an error. Turn off HidePythonErrors (or something like that) in your CivilizationIV.ini file in My Game/Beyond the Sword/ and I think you'll see some errors!

Hope that helps.

Is it this line? I think I had already set it to 1 though.
; Set to 1 for no python exception popups
HidePythonExceptions

I set it to both 0 and 1, but still no errors showed up. (They show up on the normal interface as a message, right?)
 
After some experimentation, I just figured out what was causing the problem. I had used the .ini file I had used from Rev 1.63, though I didn't expect any problem because the config files looked like they were exact same format when I looked at them line by line. I guess they weren't :mischief: (and now that I look at it they had different file sizes too; I should have noticed that).

So apparently that's what caused those symptoms, keeping revolutions from fully working without causing any visible python errors.
 
Has anyone else seen a weirdness where the distance modifier doesn't seem to be scaling properly? On one game with a huge map, a city at three diagonals and one over from the capital is getting Distant Location penalties and the same situation in a tiny map isn't! :crazyeye:
 
Has anyone else seen a weirdness where the distance modifier doesn't seem to be scaling properly? On one game with a huge map, a city at three diagonals and one over from the capital is getting Distant Location penalties and the same situation in a tiny map isn't! :crazyeye:

Do you have a save game of this? It would help. Otherwise we can test it using world builder under the conditions you describe.

@smeagolheart
A question regarding the "txt_key_rev_watch_city_size4" error. You have straight Revolutions installed latest version no other mods or changes? I've done a search for this text key in the Revolutions XML, Python and SDK and cannot find mention of it. Hmmm.

Cheers.
 
I do have other mods installed. Wolfrevolution is my base. Did some winmerge comparisons on gametext and appears identical to vanilla revolution.

To get this message, I used worldbuilder to give myself a bunch of techs (all ancient - industrial for example). Then a bunch of religions were founded. And get this:
1112.jpg


edit: looks like theres a space there maybe at the end : "txt_key_rev_watch_city_size 4"?
 
That one was my bad, slipped through the WolfRev 1.2.1 build. That cause was previously not showed, not sure what it means actually. Anyway I got it to show, but forgot to add in the text reference in that build, 1.2.2 is updated. Though it just says "crime" because I couldn't figure out anything better to put, but like I said, I'm not exactly sure what that rev idx penalty is caused by.
 
I think there might be small glitch with random events - one that might be hard to notice with just regular BtS events. I've added bunch of new random events to my mod Rise of Mankind and some of them are activated immediately after the requirements are met and in most cases those are also global one time events. Now when revolutions occur (and spawn new civs) or minor civs turn into full civs, for these civs it seems that none of the random events have not yet occurred even though some of those same events have already happen to civs that were present at the game start. I've noticed this only because of those new events that I had added - the event messages popped on screen right after a new civ appeared. For example first civ who founds Archery tech gets 1 free archer unit and with revolution & barbarian civ components on every new civs gets 1 free archer unit even though the event is set to happen only once (not recurring and is global event). I'd suspect also that new civs might be able to get quests again which have been completed before.
 
Just noticed in Better BtS AI 0.50 changelog this:

- Created CvPlayer::initInGame to fix several problems with using CvPlayer::init in CvGame::addPlayer, including global event triggers reseting for new player and city culture, revealed plots, plus other data not reseting when overwriting old player

I guess my problem goes away once I include v0.50 Better BtS AI to my mod (it currently has v0.45h)?
 
Back
Top Bottom