• Civilization 7 has been announced. For more info please check the forum here .

HELP adding a python wonder to my mod!

You could try replacing all of those with NONE to see if it fixes the assertion error, but do some thorough testing to make sure that works. Or you could just remove that resource that you aren't using.

I'll try both options there, the only thing that is concerning me about this though is that I didn't write this code. It is straight from Cultural Citystyles, which I know a lot of mods use. And I'm sure a lot of those mods don't use Tobacco so I guess I'm wondering why, if that is what is causing this, has nobody complained about it before? And also, I've had CC in my mod since I started working on it (basically) and didn't get this problem until I added Machu Picchu.

I'm not sure if you know this or not, but Machu Picchu does add a new improvement to the game (i.e. the "Machu Picchu improvement" that shows up on one of the peaks), GIR didn't have any CIV4PlotLSystem.xml file in his mod, so I assume it isn't necessary to edit that, but perhaps that could be the cause. I'll let you know what happens...

EDIT: Actually wait, since I get four or five (I think it is five) of those pop-ups, should I see if there are five resources I am not using?

EDIT 2: I just quickly looked and I see Olives, Tobacco, and Cotton, which I know are not standard civ resources. I'l look some more, you think maybe it is because of these extra resources? I'm thinking people probably didn't mention it because they probably didn't check it out, nor did the creator, and I may have started getting this assert after I enabled the debugging, so that could be what's going on here.
 
I removed all of the references to those resources, and still got the assert failure, so I'm going to try changing all the NO_IMPROVEMENT tags to NONE and see if that does anything.
 
You see the assert failures because you are running a debug DLL. Anyone running the normal DLL or a custom DLL compiled with debugging turned off won't see them. They are indicative of a possible problem, but many times I have seen assert checks that are no longer valid: failing doesn't indicate a problem anymore and you have to just ignore them until the author removes them.

In this case the asserts is saying that some code somewhere is asking for the unique identifier for the NO_IMPROVEMENT improvement which is not allowed. After the message it returns -1 to signify that it didn't find a match, but since NO_IMPROVEMENT is defined as -1 in the code, it ends up working as long as the code asking for the identifier is written to handle NO_IMPROVEMENT.
 
I would try that one last thing I suggested: replacing those NO_IMPROVEMENTs with NONE. If that doesn't solve it, move on (and probably revert the NONE changes just to be safe).
 
Top Bottom