help with features?

Note that using save games from previous versions of the mod with another version may cause unexpected results. Especially if you guys are using scriptData for storing values.
 
nope not doing that I loaded a 1.3 game on 1.3 and it made that error

I don't know what the j is using (probably his own mod, I don't know)
 
Well, the coder in question can most likely fix any exception thrown by his own code. :king:
 
In relation to the most recent code uploaded:

It makes sure that the first city mentioned is then ALWAYS the capital, but the thought just occured to me that I MUST enter Byzantium into the city names... But then when the event happens, it will only flip Constantinople to the ERE not everything past 39,50... So, what I really need is something that defines the capital and it's name change ONLY (making sure that Byzantium is ALWAYS the Capital but doesn't mean that I have to enter every other city name)


For example

Senario 1 (with old code) (numbers next to city names show order in which they were captured)
Rome-------------------Sparta (3)--------------------Byzantium (2)---Nicomedia (1)
------(everything east of sparta is given to the ERE)
In this senario we see Rome with 4 cities; Rome, Sparta, Byzantium and Nicomedia
When the event hits Nicomedia is renamed to Constaninople and both Sparta and Byzantium are also fliped to the new ERE.


Senario 2 (new code) (numbers next to city names show order in which they were captured)
Rome-------------------Sparta (3)--------------------Byzantium (2)---Nicomedia (1)
------(everything east of sparta is given to the ERE)
In this senario we see Rome with the same 4 cities, however with the new code even though byzantium was conquored 2nd it becomes Constaninople and becomes the capital authough the other cities are not affected, why? Because they were not written down in the code, why? Because if I was to do it this way I would need to include around 200 city names so that any city owned by the romans east of 39,50 would be included in the event

Senario 3 (What I am hoping for) (numbers next to city names show order of capture)
Rome-------------------Sparta (3)--------------------Byzantium (2)---Nicomedia (1)
------(everything east of sparta is given to the ERE)
In this final senario we see Rome once again with the same cities, when the event 'hits' Byzantium becomes the capital and is renamed Constaninople regardless of the fact it was conquored 2nd, the other cities are also captured because they are east of sparta (the kill point).

SO really what I need is a code which only allows one city to be named and it defines THIS as the capital but still allows the capture of all other cities past said co-ords with out them having to be named

Hope you understand
Jamie
 
*scratch* er...okay...whatever, i'll just make a completely customized version for this one here, and not something generic, is just easier :D.

@testing: I normally use a completely new mod, so that i don't have any side effects.

ok I got an exception...

Traceback(most recent call last):

File "CvAppInterface", line 56, in onLoad

File "CvEventInterface", line 23, in onEvent

File "CvEventManager", line 187, in handleEvent

File "vEventManager", line 323, in onLoadGame

AttributeError: 'module' object has no attribute
'resetNoLiberateCities'

I got this when loading the game saved on turn 224 when it loaded it popped up with the forementioned... Hope it's helpful


this is with the original code (before you made sure that Byzantium would ALWAYS be the capital

:confused: wtf? That's completely confusing.
Can you give me the changed .py file again?
There has to be something completely wrong with it, i guess it already crashes when the game tries to load it.
 
ok here it is

this is the code for senario 1 btw (the one that has gone wrong)
 

Attachments

  • Python.zip
    18.4 KB · Views: 41
maybee you should refer to the Requesting following features thread in the SDK/Python forum and have a little word with asaf about his DLL which could help you out a little...
 
The 10 pages long thread, which goes to fast for me, you mean :D?
Rather give me a short description what else is needed, so that i can finally fix it.
Sadly i have to say i don't feel like doing anything at the moment (not only related to here, i mean at all).
 
About the exception posted earlier: This should have nothing to do with the CvRandomEventInterface module but rather something in CvAdvisorUtils. This is what should be in CvEventManager:
Code:
	def onLoadGame(self, argsList):
		CvAdvisorUtils.[B]resetNoLiberateCities()[/B]
		return 0
And this needs to be in CvAdvisorUtils:
Code:
def [B]resetNoLiberateCities()[/B]:
	global g_listNoLiberateCities
	g_listNoLiberateCities = []
My guess is that j_mie6 has been editing an outdated version of CvAdvisorUtils - or used an outdated BtS patch. Because the Vanilla version of the module doesn't even have this particular function.

In short - there should be no issue with the code The_J submitted. Any debugging would probably be a huge waste of time.
 
Top Bottom