Modmodding Q&A Thread

Okay now I do have a question: Environmentalism allegedly gives no stability penalty for economic stagnation, but I can't find anything like that in Stability.py. Am I correct to suppose that this effect is handled in the DLL, and thus will always be granted by the last civic in the economy category as long as neither the relevant code nor the 6x6 nature of the civics roster changes?
 
Speaking of Environmentalism, in Assets\Python\EntryPoints\CvRandomEventInterface.py there are two mentions of CIVIC_ENVIRONMENTALISM, but since the entire file seems to be about interacting with the DLL I don't know if this is referring to the CIVIC_ENVIRONMENTALISM in the XML or a variable of the same name in the DLL. Which one is it?
 
Okay now I do have a question: Environmentalism allegedly gives no stability penalty for economic stagnation, but I can't find anything like that in Stability.py. Am I correct to suppose that this effect is handled in the DLL, and thus will always be granted by the last civic in the economy category as long as neither the relevant code nor the 6x6 nature of the civics roster changes?
That effect seems to no longer apply, and the documentation on it is outdated. All stability code is in Python.

Speaking of Environmentalism, in Assets\Python\EntryPoints\CvRandomEventInterface.py there are two mentions of CIVIC_ENVIRONMENTALISM, but since the entire file seems to be about interacting with the DLL I don't know if this is referring to the CIVIC_ENVIRONMENTALISM in the XML or a variable of the same name in the DLL. Which one is it?
It's the XML variable. The Python module also isn't for DLL interfacing, it's used to determine if events can be triggered and which options are available.
 
Is there any reason for a lot of the scenario information to be done in python rather than the scenario file?

For instance, the settled great people in the 1700 AD scenario could be done in the scenario file rather than python.

I'm pointing this out because, if you would like, I'm happy to move most of the python information to the scenario file. I know some couldn't be (Harappan units in 3000 BC scenario, great wall formation) but most could.

Do you prefer?:
Mongols or Mongolia
Harappans or Harappa
Ottomans or Turkey
Celts or Celtia
 
Is there any reason for a lot of the scenario information to be done in python rather than the scenario file?

For instance, the settled great people in the 1700 AD scenario could be done in the scenario file rather than python.

I'm pointing this out because, if you would like, I'm happy to move most of the python information to the scenario file. I know some couldn't be (Harappan units in 3000 BC scenario, great wall formation) but most could.
Yeah, some things need to be in Python, I also halfheartedly tried to do 600 AD Byzantium in a similar way to how the 1700 AD scenario is set up but ran into crashes and dropped it. I think having things in the scenario file is generally preferable because you do not run into problems when editing in WB and saving the file again, so move over what you can.

Do you prefer?:
Mongols or Mongolia
Harappans or Harappa
Ottomans or Turkey
Celts or Celtia
XML keys or game text?
 
Yeah, some things need to be in Python, I also halfheartedly tried to do 600 AD Byzantium in a similar way to how the 1700 AD scenario is set up but ran into crashes and dropped it. I think having things in the scenario file is generally preferable because you do not run into problems when editing in WB and saving the file again, so move over what you can.

Is there anything that you want in python but doesn't have to be? i.e. Do you want all 3000 BC units in python or only harappa's units. Should technologies be done through the scenario file? Should 1700 AD starting armies be in the scenario file or python? Should gold be given via python or the scenario file.

XML keys or game text?

XML and Python
 
Mongols, Harappa, Turkey, Celts.
 
Yeah, some things need to be in Python, I also halfheartedly tried to do 600 AD Byzantium in a similar way to how the 1700 AD scenario is set up but ran into crashes and dropped it. I think having things in the scenario file is generally preferable because you do not run into problems when editing in WB and saving the file again, so move over what you can.
Addendum: not sure if you want to do that as well, but techs should stay in Python.

If I wanted to merge in BUG to SoI, how would I go about that?
That requires pretty advanced understanding of all aspects of BtS modding (Python, DLL and how it's all wired together). I wouldn't want to do it again, so I suggest starting with something easier.
 
Addendum: not sure if you want to do that as well, but techs should stay in Python.

Yup :). While moving gold over to the scenario files, I noticed that the Seljuks get 250 gold only in the 600 AD scenario. Can they get that 250 gold in the 3000 BC scenario as well.
 
Yeah, that should be consistent between scenarios if they do not start alive in either of them.
 
The Forbidden Palace reduces civic upkeep, but I can find no XML tag for that. Is that a Python or DLL effect?
 
DLL, in CvPlayer::getCivicUpkeep().
 
Do you get some sort of sick kick out of hardcoding things that would work just as well as XML tags?
 
Adding an XML tag requires:
- a schema entry
- reading the tag in the info class
- creating a field to in the info class + setter and getter
- persisting the field into the byte stream
- reading the field from the byte stream (i.e. breaking save compatibility)
- often propagating the effect from the info class to another game class, like a city or player, sometimes both, which requires all the above changes again

A one off effect that applies to only one XML entry and might not even stick does not justify that effort.
 
But now you ruined my plans I had for making Jails ludicrously overpowered! D:
 
L2C++
 
I'm still traumatized from the last time I tried compiling DoC's DLL.
 
As someone who will probably have to compile SoI's DLL this summer, I must ask:
What was that like?
What happened?

:)

I can't remember the details, but it just threw cryptic error messages, I'll try again soon anyway. One problem I remember was that Leoreth is using Microsoft Visual Studio 2010 while I'm using 2008.
 
Back
Top Bottom