Modmodding Q&A Thread

There are definitely parts for that in the DLL.
 
What is it that allows Secularism to build wonders of any religion and Pantheon to build classical wonders? I couldn't find an XML tag for it.
 
... what's your guess?
 
Edit: Forgot to mention that the problem is that Secularism in my modmod suddenly no longer allows building wonders of any religion. Pantheon is still working as intended.

Something in Python! Because IIRC it worked when I had renamed Secularism to State Ideology but now doesn't after changing it back, so obviously it was a file which I had found and edited to take that change into account and now forgotten about. This means it can't be in the DLL as I never successfully compiled it and I already excluded XML.

Checking the list of the Python files I changed in the version in which I had introduced State Ideology doesn't seem to ring any bells however:

Consts.py
Stability.py
DynamicCivs.py
RiseAndFall.py
RFCUtils.py
Victory.py
EntryPoints\CvRandomEventInterface.py

In fact searching for ideology in any of these files yields exactly 0 results and Secularism several, so either I forgot to record one of the files I changed or it's not in Python after all.

In Consts.py and CIV4CivicInfos.xml Secularism has the exact same name (iCivicSecularism and CIVIC_SECULARISM respectively) and the same relative position in my versions of those files as in yours, so it is very probable that this is due to one instance of me changing Secularism to State Ideology and not changing it back somewhere.

Hmmmmmm.... Hint?
 
It's in the DLL, based on the position in the XML files.
 
It's in the DLL, based on the position in the XML files.

But Secularism is in the position it should be, that is the one it is in regular DoC. :confused:

Edit: Oh and the no economic stability penalty effect for the last economy civic (Environmentalism for you, Public Welfare for me) isn't there either and in fact hasn't been since I made my grand civics reform, but I didn't really care much about that.
 
Code from CvPlayer::canConstruct():
Code:
if (!bStateReligion && !bOrStateReligion && getCivics((CivicOptionTypes)4) != CIVIC_SECULARISM)
{
	return false;
}
 
Code from CvPlayer::canConstruct():
Code:
if (!bStateReligion && !bOrStateReligion && getCivics((CivicOptionTypes)4) != CIVIC_SECULARISM)
{
	return false;
}

Okay so if the civ has no state religion and ??? and the civic it is running in the fourth (counting from zero so actually fifth I assume) category is not Secularism then it can't build whatever.

... I still don't see why it doesn't work in my mod, I haven't made any changes to the DLL myself and I do have a CIVIC_SECULARISM in CIV4CivicInfos.xml as the last option in the fourth (counting from zero) category. :confused:
 
CIVIC_SECULARISM is the DLL constant which matches the ordering of civics in the XML (in DoC). You did not reorder civics or add some in between in the XML right? This applies regardless of how civics are ordered in their category.
 
CIVIC_SECULARISM is the DLL constant which matches the ordering of civics in the XML (in DoC). You did not reorder civics or add some in between in the XML right? This applies regardless of how civics are ordered in their category.

I still have the same formation of 6x6 civics, I neither removed nor added any civics or categories. I mean technically I guess I did remove some civics in that I changed what they were called and what their effects are, but shouldn't that be irrelevant for the DLL if it only cares about relative positions? I think I switched the positions of Agrarianism and Industrialism (and renaming them CIVIC_SERFDOM and CIVIC_CASTE_SYSTEM) and of Fanaticism and Scholasticism (renamed to CIVIC_THEOCRACY and CIVIC_TOLERANCE). For a while the last civic in the religion category was CIVIC_TOLERANCE and the second to last one CIVIC_STATE_IDEOLOGY before I decided to switch them again and rename CIVIC_STATE_IDEOLOGY to CIVIC_SECULARISM, which is now the last civic in the religion category and the 30th civic Type in the XML. My Secularism now has the exact same attributes and position as Secularism in regular DoC except that the build all wonders effect somehow disappeared. :dunno:
 
Then I'm out of ideas. You could look into CvEnums.h with Visual Studio and confirm that the value of CIVIC_SECULARISM (mouse over tooltip) equals the output of GC.getInfoTypeForString("CIVIC_SECULARISM") in the ingame Python console.
 
Then I'm out of ideas. You could look into CvEnums.h with Visual Studio and confirm that the value of CIVIC_SECULARISM (mouse over tooltip) equals the output of GC.getInfoTypeForString("CIVIC_SECULARISM") in the ingame Python console.

Okay, how do I get the output of GC.getInfoTypeForString("CIVIC_SECULARISM") in the ingame Python console? Print doesn't seem to work and I don't know any other commands. :blush:
 
Print should work? I'll give it a try later.
 
Hello,

I know this is not specifically a DoC question, but since this is the most active RFC subforum, I thought I would ask it here

Do I need to modify the DLL to add 11 new civs to SoI?

Spoiler :
The civs are
Saffarids - spawn at Zaranj in 861
Kara Koyunlu - spawn at Tabriz in 1375
Jalayrids - spawn in Hamadan in 1335 (dependent on unstable or collapsed Ilkhanate, and unstable or collapsed Abbasids
Muzzafarids - spawn in Esfahan in 1314
Kartids - spawn in Herat in 1244
Shirvanshah - spawn in Qazvin in 799
Axum/Ethiopia* - spawn in Axum at start (750)
Serbia* - spawn in Stari Ras in 1101
Bulgaria* - spawn in Pliska at start (750)
Crimean Khanate* - spawn in Bakhchiseray in 1441
Ilkhanate - spawn in Maragha in 1256


*-only if I expand the map North and South
 
You do.
 
A lot of things, generally you can follow the old version of the new civ guide for DoC, most of it should apply to SoI as well.
 
No, I know what I am talking about. Just believe me and stop trying to take shortcuts.
 
Back
Top Bottom