Why does WorldBuilder keep crashing???

Bad Player

Deity
Joined
Oct 31, 2005
Messages
3,534
Location
(Bris)Vegas!
Hi guys, I wasn't sure where to ask this but I'm trying to make my scenario and WB keeps crashing after I try changing all the plot tiles. I've modified (added code) the CvEventManager.py file and slightly modified a couple of .xml files. I did a clean install as well because it kept crashing in the same way and I was worried that maybe I accidentally modified something, but this clean install and my coding additions are still causing WB problems changing tiles.

I've managed to make the whole map grassland by adding tiles one at a time. Are there any quirks or bugs in WB that I should know of?
 
Is this a problem with worldbuilder as it exists in base FfH2, or is this in a modmod using a version of worldbuilder I made (based on Platyping's work) for MNAI? If it is a problem on my end, I'd certainly like to know and fix it in time for the corrections to be included in the MNAI v2.60 release.


Could you post the code you altered, so we can see if it might be relevant?


Of course, it is possible that the code is all ok but you computer just lacks the processing power to handle whatever it has to do when looping through the whole map. I know that my old laptop tended to crash when it the Deepening ritual or the AC100 event was triggered.
 
Hi MC - my computer is pretty good. The windows scores are:
Processor = 7.7
RAM = 7.7
Graphics = 7.9
Gaming Graphics = 7.9
Primary HD = 5.9


I use FFH2 MNAI 2.53. The CvEventManager.py code is here: http://pastebin.com/FGEa0PYg

Lines 45-48, 495-645, 662-669, 712-1142.

Not all coding is put in yet and the ritual isn't working for some reason...


The .xml files altered were just some values and text for the intro pop-up.
 
Well, those scores are better than mine:
Spoiler :
Processor = 7.0
RAM = 5.9
Graphics = 4.5
Gaming Graphics = 6.1
Primary HD = 5.7


When you say FFH2 MNAI 2.53, I assume that you have not updated it to include World Builder updates I have released since then. I think there may have been a few bugs which I found in that version and have already corrected.

Why don't you try copying the latest World Builder version over your copy of MNAI? It can be found attached to this post.

Note that it does include changes to CvEventManager.py, so be careful about overwriting changes you made and would want to keep. You'll have to copy those changes into the new version to test them.


Edit: Ah, I see you updated your post to share your code changes.

I don't see how any of these changes could be causing your problem though.


I'd normally recommend putting scenario-specific code in ScenarioFunctions.py instead of CvEventManager.py, so as not to interfere with normal games. It is probably best to use a format like other scenarios do, putting the custom code for this specific scenario within conditionals like if gc.getGame().isOption(GameOptionTypes.GAMEOPTION_WB_EXTRA): so it only triggers for your scenario. (That game option is the only one Kael made for scenario-makers to use, so if you have multiple scenarios it might be used for a different one already. In my modmod even this is not available, as I use it to disable the Children of The One. Unfortunately, more game options cannot be added without compiling a new DLL.)

I don't see much point in including the 495-645, as the global counter, contact between civs, war or peace between civs, and permanent war between civs status can all be set in the scenario's CivBeyondSwordWBSave file. Only the popup need be triggered in python. (I remember trying to find a way to save the text and image for those popups in the scenario file too, but not being able to find a way.) I suppose that if you don't want to edit the scenario files directly though, it may be easier to let that code run once before saving the scenario and then be able to delete it before loading it to play.


I'm really not familiar with python pickles (I've been meaning to learn as I was told that it would be a better way to handle resurrection that sluagh dummy units, but have not gotten around to it), so I can't really comment on your lines 45-48 and 712-1142 changes.



I'm not getting any crashes in worldbuilder, but I notice that Platyping does seem to have removed the ability to actually change all plots at once from the main world builder screen, and used "Change All Plots" to label a button which would be better called "Plot Type." I just brought this to his attention, and am hoping that he releases an update to address it in time for me to merge with MNAI in time for Tholal to include it in MNAI v2.60.

In the mean time, you should use the Plot Data screen. The third drop down box on the left side of that screen lets you choose between editing a Single Plot, Area Plots, or All Plots. You will want to use All Plots. This is more useful than the "Change All Plots" button from vanilla civ, as it does not only modify Plot Types but also Terrains, Features, Improvements, Routes, and Bonuses. It does check for prereqs for things though, which include distance from others of the same kind, unlike when you edit one plot as a time, so changing "All Plots" to have a bonus might not actually ad ay.
 
Top Bottom