Modmodding Q&A Thread

I haven't looked at the mod, but is it actually modular in the way that it adds a new folder to the modules folder? Look at the VD module for example.

The way it works is that every path in a modules folder that is exactly identical to a path in the main mod will override that path. For instance, if Assets\Art\Flags\England.dds exists in the main mod, Modules\FlagModule\Art\Flags\England.dds will override its content. This way you should be able to modify flags while keeping compatibility with the main mod.
 
If I wanted to add a new scenario would I have to edit the Dll?

IIRC, no. But you have to edit the python to tell there is a new scenario. (Only if you are adding a new starting date. If you edit an already existing one, you don't have to)
 
The DLL technically also needs to be changed. Scenarios are determined as follows:

Egypt is playable: 3000 BC
Byzantium is playable: 600 AD
Otherwise: 1700 AD

Depending on the available civilizations in your scenario the game might otherwise treat it as one of those, which can impact some modifiers and display stuff. For instance, in the 1700 AD scenario the starting date for all civs is displayed as 1700 AD if they are already present at the start.
 
All I want to do is change the area that a civilization spawns in, the flip area, the flag, and the spawn date. I have attempted changing numbers but it did absolutely nothing.
 
Spawn plot: Consts.py -> tCapitals
Flip zone: Consts.py -> tSpawnArea
Flag: XML -> Art -> CivilizationArtDefines.xml
Spawn date: Consts.py -> tBirth and CvRhyes.cpp -> birthYear (don't forget to recompile)
 
So another question, how are the coordinates based? Where is (0,0)? Thank you a bunch.
 
Note sure if you need chipotle for that, but holding Ctrl while hovering over a tile should display the coordinates in the tooltip.
 
Is there any particular reason why the following piece of python code is causing my game to crash?

Spoiler :
Code:
from CvPythonExtensions import *
import CvUtil
import PyHelpers        # LOQ
import RFCUtils
import Consts as con
from StoredData import sd

def checkTurn(self, iGameTurn):
   if (iGameTurn >= getTurnForYear(620)):
      pAmsterdam = gc.getMap().plot(57, 53)
      pAmsterdam.getPlotCity().setHasRealBuilding(con.iBank, True)

edit: never mind, turns out I was just having a problem with indentations.
 
Still you should be careful, the tile in question does not actually have to have a city.
 
I'm changing XML files for Australia modmodmod now. It seems like you added new UHV titles in 1.12 version, so how can I add new UHV titles for new civilizations?

++ Please tell me if there was some additional changes that made to each civilizations - so that I also need to change/add them.
 
I think the goal title is automatically something like TXT_KEY_VICTORY_AUS_1_TITLE or something, i.e. the UHV description text key with _TITLE appended. The titles themselves are in one of the victory text XMLs, I think RFCVictory.xml.
 
I found them in VictoryTitles.xml. I scanned XML, Python and Cpp folders with a title tag - no result. Maybe I can just add new titles there and it would work..?
 
Yes! Just make sure they align with whatever the tag for the victory description for Australia is.
 
When I try to compile the DLL, I get this:

Spoiler :
Code:
Error	1	error LNK2019: unresolved external symbol "void __cdecl CyCityPythonInterface2(class boost::python::class_<class CyCity,struct boost::python::detail::not_specified,struct boost::python::detail::not_specified,struct boost::python::detail::not_specified> &)" (?CyCityPythonInterface2@@YAXAAV?$class_@VCyCity@@Unot_specified@detail@python@boost@@U2345@U2345@@python@boost@@@Z) referenced in function "void __cdecl DLLPublishToPython(void)" (?DLLPublishToPython@@YAXXZ)	CvDLLPython.obj
Error	5	error PRJ0019: A tool returned an error code from "Performing Makefile project actions"	CvGameCoreDLL
Error	2	fatal error LNK1120: 1 unresolved externals	Release\CvGameCoreDLL.dll

I assume this is from a screwed up Makefile?
 
Leoreth Leoreth plz tell me you didn't changed this from 1.11v so let me just copy and paste it..

Spoiler :
UNIC.png
 
When I try to compile the DLL, I get this:

Spoiler :
Code:
Error	1	error LNK2019: unresolved external symbol "void __cdecl CyCityPythonInterface2(class boost::python::class_<class CyCity,struct boost::python::detail::not_specified,struct boost::python::detail::not_specified,struct boost::python::detail::not_specified> &)" (?CyCityPythonInterface2@@YAXAAV?$class_@VCyCity@@Unot_specified@detail@python@boost@@U2345@U2345@@python@boost@@@Z) referenced in function "void __cdecl DLLPublishToPython(void)" (?DLLPublishToPython@@YAXXZ)	CvDLLPython.obj
Error	5	error PRJ0019: A tool returned an error code from "Performing Makefile project actions"	CvGameCoreDLL
Error	2	fatal error LNK1120: 1 unresolved externals	Release\CvGameCoreDLL.dll

I assume this is from a screwed up Makefile?
Not necessarily. Did you edit that file? Are you using the build or the rebuild target?

Leoreth Leoreth plz tell me you didn't changed this from 1.11v so let me just copy and paste it..

Spoiler :
UNIC.png
I don't think I did ... but in general I will recommend to use WinMerge for these things.

If you are trying to update one of your mods to 1.12 it is probably a better idea to merge your mod into 1.12 than 1.12 into your mod.
 
What does the onCityAcquired methond in Communications.py works for?

Code:
        def onCityAcquired(self, city):

                for iLoopCiv in range (iNumMajorPlayers):
                        if (city.hasBuilding(iNumBuildingsPlague + iLoopCiv)):
				print "Delete building id: "+str(iNumBuildingsPlague + iLoopCiv)
                                city.setHasRealBuilding(iNumBuildingsPlague + iLoopCiv, False)
				print "Delete building id: "+str(iNumBuildingsPlague + iLoopCiv)+" passed."
                                print ("embassy deleted on city acquired", city.getName())
 
Back
Top Bottom