Notepad++What text editor are you using?
Notepad++What text editor are you using?
OK, done that, i'll go do some testing again.Go to the format menu and select "Encode in UTF-8" or possibly "UTF-8 (without BOM)". Then save the module.
I missed your post.Anyway, this can be used in the original game, right? I understand that, for example, some of the code has to go in CvEvents.py (if that exists even) instead of in CvFinalFrontierEvents.py, but, besides such things, the code is compatible with normal BTS (and, in extension, RevDCM), right?
Me too, I'll try again.Its the same thing as before - delete the colon at the end of this line:
I thought you already fixed this?Code:eUnitCombat = self.unitCombatDict.get(eUnitType, None)[COLOR="Red"]:[/COLOR]
I can encode in either of these, which should i use? Currently using UTF-8 (without BOM)"Encode in UTF-8" or possibly "UTF-8 (without BOM)"
I missed your post.
The code posted in this thread can also be used in a standard BtS setup, but beware of the syntactical errors that we are clearing up. And the other file (besides CvGameUtils) you need to edit is called CvEventManager by default. The code basically goes into the same places.
RevDCM and other mods might be built around the BUG infrastructure and I can't say for sure that it will work. It would be possible to use the BUG methodology for enabling the same code. (There is a BUG modding tutorial for this.)
The link for the mod is in my signature (The Babylon Project one).Ok, this is my fault for supplying you with code I never tested myself. It shouldn't be hard at all to sort this out and there is no reason for you to do the debugging. Just give me a download link to where I can get the mod, and also attach the files you edited as a result of this discussion, and I'll sort it out for you.
As it's late and i need some sleep, i'll have a go at this in the morning and post the results.edit: This is what I think: The .py files should use BOM and the .xml files shouldn't. So select "without BOM" for the XML only. If this fails, then I can have a look at the whole mess.
OK, just to confirm how i'm going to try this out the .py files should be encoded with UTF-8 and the .xml files with UTF-8 without BOM?edit: This is what I think: The .py files should use BOM and the .xml files shouldn't. So select "without BOM" for the XML only. If this fails, then I can have a look at the whole mess.
I guess you haven't seen this one before since you probably haven't enabled exception pop-ups, but it caused me to lose the game before it even started. Its basically this line in CvAI.py:Traceback (most recent call last):
File "CvEventInterface", line 19, in onEvent
File "CvEventManager", line 187, in handleEvent
File "CvFinalFrontierEvents", line 167, in onGameStart
File "CvAI", line 120, in doCityAIUpdate
AttributeError: 'NoneType' object has no attribute 'getPopulationLimit'
ERR: Python function onEvent failed, module CvEventInterface
iMaxSupportablePop = [B]pSystem[/B].getPopulationLimit(true)
pSystem = FinalFrontier.getSystemAt(pCity.getX(), pCity.getY())
[B] if pSystem == None: return[/B]
iOwner = pCity.getOwner()
iMaxSupportablePop = pSystem.getPopulationLimit(true)