The Modding Q&A Thread

You only need to erase one tab :D and those aren't tabs in Rhye's code, those are actually 8 blank spaces for each level.
 
No, no... It makes perfect sense that it works now. I made a error (I blame the boards) in my initial set of code, and corrected it in the last.

About indentation: Know that it determines flow, so its absolutely key to any script. (Except a PyScenario script ;))
 
[EDIT]:
Code:
		if iBuildingType == CvUtil.findInfoTypeNum(gc.getBuildingInfo, gc.getNumBuildingInfos(), "BUILDING_ARCOLOGY_SHIELDING"):
			pCity.setNumRealBuilding(CvUtil.findInfoTypeNum(gc.getBuildingInfo, gc.getNumBuildingInfos(), "BUILDING_ARCOLOGY"), False)
		elif iBuildingType == CvUtil.findInfoTypeNum(gc.getBuildingInfo, gc.getNumBuildingInfos(), "BUILDING_DEFLECTOR_SHIELDING"):
			pCity.setNumRealBuilding(CvUtil.findInfoTypeNum(gc.getBuildingInfo, gc.getNumBuildingInfos(), "BUILDING_ARCOLOGY_SHIELDING"), False)

Why the above code (below onBuildingBuilt() at CvEventManager) doesn't work? It's copied from Next War but unluckily doesn't remove arcology (shielding).
Well, I looked into it and while I have no idea why you're not getting the results you're expecting from it, the code seems to be somewhat cumbersome and borderline faulty in my view. (The CvUtil.findInfoTypeNum() method is, for example, simply a wrapper for CyGlobalContext.infoTypeForString(). I can of course not even verify that your module is even importing CvUtil, or how its importing it. We don't need it in any case.)

Before I rewrite anything at all: Are you defining these buildings in Consts.py? What are their names then? You're basing your thing on RFC:E/M, right?

Also: What exactly are you expecting the script to do for your mod?
 
It surely makes sense but I corrected it (if I didn't then firing once make no sense).
No, no... It all makes perfect sense in hindsight. You trying to fix the code make it malfunction, so that it would only be run in certain circumstances. Hence it only fired once that time around. Its a matter of logic, this issue. :p
 
I tried to change the DLL for the first time. I follow ASAF's guide and succeeded to change the Vanilla DLL (yay!). Fine so far.
But changing Rhye's DLL doesn't work. I copied all the files into the folder of the Vanilla DLL and replaced all files. Visual Studio knew that Rhyes.cpp was included while compiling although the file isn't included in the solution. Anyway, this is the output:
Spoiler :
1>------ Erstellen gestartet: Projekt: CvGameCoreDLL, Konfiguration: Release Win32 ------
1> "C:\Program Files\Microsoft Visual C++ Toolkit 2003\bin\cl.exe" /nologo /MD /O2 /Oy /Oi /G7 /DNDEBUG /DFINAL_RELEASE /Fp"Release\CvGameCoreDLL.pch" /GR /Gy /W3 /EHsc /Gd /Gm- /DWIN32 /D_WINDOWS /D_USRDLL /DCVGAMECOREDLL_EXPORTS /Yu"CvGameCoreDLL.h" /IBoost-1.32.0/include /IPython24/include /I"C:\Program Files\Microsoft Visual C++ Toolkit 2003/include" /I"C:\Program Files\WindowsSDK/Include" /I"C:\Program Files\WindowsSDK/Include/mfc" /I"C:\Program Files\Civilization IV\Beyond the Sword\CvGameCoreDLL\Boost-1.32.0/include" /I"C:\Program Files\Civilization IV\Beyond the Sword\CvGameCoreDLL\Python24/include" /FoRelease\CvRhyes.obj /c CvRhyes.cpp
1> CvRhyes.cpp
1> "C:\Program Files\Microsoft Visual C++ Toolkit 2003\bin\link.exe" /out:Release\CvGameCoreDLL.dll /INCREMENTAL:NO /OPT:REF /OPT:ICF /PDB:"Release\CvGameCoreDLL.pdb" /DLL /NOLOGO /SUBSYSTEM:WINDOWS /LARGEADDRESSAWARE /TLBID:1 /LIBPATH:python24/libs /LIBPATH:boost-1.32.0/libs/ boost_python-vc71-mt-1_32.lib /LIBPATH:"C:\Program Files\Microsoft Visual C++ Toolkit 2003/lib" /LIBPATH:"C:\Program Files\WindowsSDK/Lib" /LIBPATH:"C:\Program Files\Civilization IV\Beyond the Sword\CvGameCoreDLL\Boost-1.32.0/libs" /LIBPATH:"C:\Program Files\Civilization IV\Beyond the Sword\CvGameCoreDLL\Python24/libs" winmm.lib user32.lib Release\CvArea.obj Release\CvArtFileMgr.obj Release\CvCity.obj Release\CvCityAI.obj Release\CvDeal.obj Release\CvDiploParameters.obj Release\CvDLLButtonPopup.obj Release\CvDLLEntity.obj Release\CvDLLPython.obj Release\CvDllPythonEvents.obj Release\CvDllTranslator.obj Release\CvDLLWidgetData.obj Release\CvEventReporter.obj Release\CvFractal.obj Release\CvGame.obj Release\CvGameAI.obj Release\CvGameCoreDLL.obj Release\CvGameCoreUtils.obj Release\CvGameInterface.obj Release\CvGameTextMgr.obj Release\CvGlobals.obj Release\CvHallOfFameInfo.obj Release\CvInfos.obj Release\CvInfoWater.obj Release\CvInitCore.obj Release\CvMap.obj Release\CvMapGenerator.obj Release\CvMessageControl.obj Release\CvMessageData.obj Release\CvPlayer.obj Release\CvPlayerAI.obj Release\CvPlot.obj Release\CvPlotGroup.obj Release\CvPopupInfo.obj Release\CvPopupReturn.obj Release\CvRandom.obj Release\CvReplayInfo.obj Release\CvReplayMessage.obj Release\CvRhyes.obj Release\CvSelectionGroup.obj Release\CvSelectionGroupAI.obj Release\CvStatistics.obj Release\CvStructs.obj Release\CvTalkingHeadMessage.obj Release\CvTeam.obj Release\CvTeamAI.obj Release\CvTextScreens.obj Release\CvUnit.obj Release\CvUnitAI.obj Release\CvXMLLoadUtility.obj Release\CvXMLLoadUtilityGet.obj Release\CvXMLLoadUtilityInit.obj Release\CvXMLLoadUtilitySet.obj Release\CyArea.obj Release\CyAreaInterface.obj Release\CyArgsList.obj Release\CyArtFileMgr.obj Release\CyArtFileMgrInterface.obj Release\CyCity.obj Release\CyCityInterface1.obj Release\CyDeal.obj Release\CyEnumsInterface.obj Release\CyGame.obj Release\CyGameCoreUtils.obj Release\CyGameCoreUtilsInterface.obj Release\CyGameInterface.obj Release\CyGameTextMgr.obj Release\CyGameTextMgrInterface.obj Release\CyGlobalContext.obj Release\CyGlobalContextInterface1.obj Release\CyGlobalContextInterface2.obj Release\CyGlobalContextInterface3.obj Release\CyGlobalContextInterface4.obj Release\CyHallOfFameInfo.obj Release\CyHallOfFameInterface.obj Release\CyInfoInterface1.obj Release\CyInfoInterface2.obj Release\CyInfoInterface3.obj Release\CyMap.obj Release\CyMapGenerator.obj Release\CyMapGeneratorInterface.obj Release\CyMapInterface.obj Release\CyMessageControl.obj Release\CyMessageControlInterface.obj Release\CyPlayer.obj Release\CyPlayerInterface1.obj Release\CyPlayerInterface2.obj Release\CyPlot.obj Release\CyPlotInterface1.obj Release\CyRandomInterface.obj Release\CyReplayInfo.obj Release\CySelectionGroup.obj Release\CySelectionGroupInterface.obj Release\CyStructsInterface1.obj Release\CyTeam.obj Release\CyTeamInterface.obj Release\CyUnit.obj Release\CyUnitInterface1.obj Release\FAssert.obj Release\FDialogTemplate.obj Release\_precompile.obj Release\CvGameCoreDLL.res
1> Creating library Release\CvGameCoreDLL.lib and object Release\CvGameCoreDLL.exp
1>LINK : warning LNK4089: all references to 'KERNEL32.dll' discarded by /OPT:REF
========== Erstellen: 1 erfolgreich, Fehler bei 0, 0 aktuell, 0 übersprungen ==========
The good thing is that there are no errors, but one single warning.
When starting the mod, i get an python exception that CvEventInterface couldn't be loaded, and the Rhye-specific features like UPs, UHVs and the star rating doesn't show up in the civ-selection screen.
Can somebody help me?
 
Why are you working with Vanilla? Surely you're trying to mod the BtS version of RFC?
 
Why are you working with Vanilla? Surely you're trying to mod the BtS version of RFC?

I meant the "Vanilla" BtS DLL, instead of the RFC DLL:blush:

What i actually meant: I recompiled the "Vanilla" BtS DLL (version 3.19 of course), which worked, but when i copy the Rhye's source code into that very folder and compile it, i get the warning above.
 
Rhye's code isn't just CvRhyes.cpp/h. if you started with vanilla BTS, make sure you copy ALL the cpp/h files from RFC/SoI's CvGameCoreDLL folder.

Re: the question in other thread - I don't have any *.rc files. The only thing you need apart from Asaf's files and the mod's cpp/h files is what Visual Studio creates.

Also, assert messages are not errors. They are just failed asserts, which is debug information and often is completely harmless (RFC fires plenty of them). They won't appear if you compile a Final_Release DLL.
 
Can somebody please take a look at what im doing wrong. Im trying to add the Holy Roman Empire but my game alway crashes and i have a hunch that it has to do with the following code in CvRhyes.cpp
Spoiler :
//Alphabetical order: AME ARA AZT BAB BYZ CAR CHI EGY ENG ETH FRA GER GRE HRE INC IND JAP KHM MAL MAY MON HOL TUR PER POR ROM RUS SPA VIK XXX
char loadingTime[30][4] = { "60", "20", "35", "0", "15", "5", "0", "0", "30", "10", "25", "30", "2", "30", "35", "0", "35", "10", "20", "35", "15", "35", "40", "35", "5", "35", "5", "30", "25", "20", "X"};
char loadingTime600AD[30][4] = { "30", "0", "15", "0", "0", "0", "0", "0", "10", "0", "5", "10", "0", "10", "15", "0", "15", "0", "2", "15", "0", "15", "20", "15", "0", "15", "0", "10", "5", "0", "X"};
char startingYear[30][6] = {"1775 ", "620 ", "1200 ", "3000 ", "330 ", "1200 ", "3000 ", "3000 ", "820 ", "295 ", "750 ", "1600 ", "1600 ", "840 ", "1150 ", "3000 ", "1167 ", "655 ", "660 ", "980 ", "65 ", "1190 ", "1500 ", "1280 ", "850 ", "1130 ", "760 ", "860 ", "720 ", "545 ", "XXX "};
bool startingEra[30] = {true, true, true, false, true, false, false, false, true, false, true, true, false, true, true, false, true, false, true, false, true, true, true, true, false, true, false, true, true, true, false}; //AD or BC
char startingYear600AD[30][6] = {"1775 ", "600 ", "1200 ", "3000 ", "600 ", "1200 ", "600 ", "3000 ", "820 ", "295 ", "750 ", "1600 ", "1600 ", "840 ", "1150 ", "3000 ", "1167 ", "600 ", "660 ", "980 ", "65 ", "1190 ", "1500 ", "1280 ", "850 ", "1130 ", "760 ", "860 ", "720 ", "600 ", "XXX "};
bool startingEra600AD[30] = {true, true, true, false, true, false, true, false, true, false, true, true, false, true, true, false, true, true, true, false, false, true, true, true, false, true, false, true, true, true, false}; //AD or BC

char uniquePower[30][2][16] = {
{"TXT_KEY_UP_AME", "TXT_KEY_UP_AME2"},
{"TXT_KEY_UP_ARA", "TXT_KEY_UP_ARA2"},
{"TXT_KEY_UP_AZT", "TXT_KEY_UP_AZT2"},
{"TXT_KEY_UP_BAB", "TXT_KEY_UP_BAB2"},
{"TXT_KEY_UP_BYZ", "TXT_KEY_UP_BYZ2"},
{"TXT_KEY_UP_CAR", "TXT_KEY_UP_CAR2"},
{"TXT_KEY_UP_CHI", "TXT_KEY_UP_CHI2"},
{"TXT_KEY_UP_EGY", "TXT_KEY_UP_EGY2"},
{"TXT_KEY_UP_ENG", "TXT_KEY_UP_ENG2"},
{"TXT_KEY_UP_ETH", "TXT_KEY_UP_ETH2"},
{"TXT_KEY_UP_FRA", "TXT_KEY_UP_FRA2"},
{"TXT_KEY_UP_GER", "TXT_KEY_UP_GER2"},
{"TXT_KEY_UP_GRE", "TXT_KEY_UP_GRE2"},
{"TXT_KEY_UP_HRE", "TXT_KEY_UP_HRE2"},
{"TXT_KEY_UP_INC", "TXT_KEY_UP_INC2"},
{"TXT_KEY_UP_IND", "TXT_KEY_UP_IND2"},
{"TXT_KEY_UP_ITA", "TXT_KEY_UP_ITA2"},
{"TXT_KEY_UP_JAP", "TXT_KEY_UP_JAP2"},
{"TXT_KEY_UP_KHM", "TXT_KEY_UP_KHM2"},
{"TXT_KEY_UP_MAL", "TXT_KEY_UP_MAL2"},
{"TXT_KEY_UP_MAY", "TXT_KEY_UP_MAY2"},
{"TXT_KEY_UP_MON", "TXT_KEY_UP_MON2"},
{"TXT_KEY_UP_HOL", "TXT_KEY_UP_HOL2"},
{"TXT_KEY_UP_TUR", "TXT_KEY_UP_TUR2"},
{"TXT_KEY_UP_PER", "TXT_KEY_UP_PER2"},
{"TXT_KEY_UP_POR", "TXT_KEY_UP_POR2"},
{"TXT_KEY_UP_ROM", "TXT_KEY_UP_ROM2"},
{"TXT_KEY_UP_RUS", "TXT_KEY_UP_RUS2"},
{"TXT_KEY_UP_SPA", "TXT_KEY_UP_SPA2"},
{"TXT_KEY_UP_VIK", "TXT_KEY_UP_VIK2"},
{"XXX", "XXX"}};


char uniqueGoals[30][3][18] = {
{"TXT_KEY_UHV_AME1", "TXT_KEY_UHV_AME2", "TXT_KEY_UHV_AME3"},
{"TXT_KEY_UHV_ARA1", "TXT_KEY_UHV_ARA2", "TXT_KEY_UHV_ARA3"},
{"TXT_KEY_UHV_AZT1", "TXT_KEY_UHV_AZT2", "TXT_KEY_UHV_AZT3"},
{"TXT_KEY_UHV_BAB1", "TXT_KEY_UHV_BAB2", "TXT_KEY_UHV_BAB3"},
{"TXT_KEY_UHV_BYZ1", "TXT_KEY_UHV_BYZ2", "TXT_KEY_UHV_BYZ3"},
{"TXT_KEY_UHV_CAR1", "TXT_KEY_UHV_CAR2", "TXT_KEY_UHV_CAR3"},
{"TXT_KEY_UHV_CHI1", "TXT_KEY_UHV_CHI2", "TXT_KEY_UHV_CHI3"},
{"TXT_KEY_UHV_EGY1", "TXT_KEY_UHV_EGY2", "TXT_KEY_UHV_EGY3"},
{"TXT_KEY_UHV_ENG1", "TXT_KEY_UHV_ENG2", "TXT_KEY_UHV_ENG3"},
{"TXT_KEY_UHV_ETH1", "TXT_KEY_UHV_ETH2", "TXT_KEY_UHV_ETH3"},
{"TXT_KEY_UHV_FRA1", "TXT_KEY_UHV_FRA2", "TXT_KEY_UHV_FRA3"},
{"TXT_KEY_UHV_GER1", "TXT_KEY_UHV_GER2", "TXT_KEY_UHV_GER3"},
{"TXT_KEY_UHV_GRE1", "TXT_KEY_UHV_GRE2", "TXT_KEY_UHV_GRE3"},
{"TXT_KEY_UHV_HRE1", "TXT_KEY_UHV_HRE2", "TXT_KEY_UHV_HRE3"},
{"TXT_KEY_UHV_INC1", "TXT_KEY_UHV_INC2", "TXT_KEY_UHV_INC3"},
{"TXT_KEY_UHV_IND1", "TXT_KEY_UHV_IND2", "TXT_KEY_UHV_IND3"},
{"TXT_KEY_UHV_ITA1", "TXT_KEY_UHV_ITA2", "TXT_KEY_UHV_ITA3"},
{"TXT_KEY_UHV_JAP1", "TXT_KEY_UHV_JAP2", "TXT_KEY_UHV_JAP3"},
{"TXT_KEY_UHV_KHM1", "TXT_KEY_UHV_KHM2", "TXT_KEY_UHV_KHM3"},
{"TXT_KEY_UHV_MAL1", "TXT_KEY_UHV_MAL2", "TXT_KEY_UHV_MAL3"},
{"TXT_KEY_UHV_MAY1", "TXT_KEY_UHV_MAY2", "TXT_KEY_UHV_MAY3"},
{"TXT_KEY_UHV_MON1", "TXT_KEY_UHV_MON2", "TXT_KEY_UHV_MON3"},
{"TXT_KEY_UHV_HOL1", "TXT_KEY_UHV_HOL2", "TXT_KEY_UHV_HOL3"},
{"TXT_KEY_UHV_TUR1", "TXT_KEY_UHV_TUR2", "TXT_KEY_UHV_TUR3"},
{"TXT_KEY_UHV_PER1", "TXT_KEY_UHV_PER2", "TXT_KEY_UHV_PER3"},
{"TXT_KEY_UHV_POR1", "TXT_KEY_UHV_POR2", "TXT_KEY_UHV_POR3"},
{"TXT_KEY_UHV_ROM1", "TXT_KEY_UHV_ROM2", "TXT_KEY_UHV_ROM3"},
{"TXT_KEY_UHV_RUS1", "TXT_KEY_UHV_RUS2", "TXT_KEY_UHV_RUS3"},
{"TXT_KEY_UHV_SPA1", "TXT_KEY_UHV_SPA2", "TXT_KEY_UHV_SPA3"},
{"TXT_KEY_UHV_VIK1", "TXT_KEY_UHV_VIK2", "TXT_KEY_UHV_VIK3"},
{"XXX", "XXX", "XXX"}};



char rating[30][6][15] = {
// TRA PRO CUL GRO S.S.
//America
{"TXT_KEY_4STARS", "TXT_KEY_5STARS", "TXT_KEY_1STAR", "TXT_KEY_5STARS", "TXT_KEY_1STAR" },
//Arabia
{"TXT_KEY_4STARS", "TXT_KEY_1STAR", "TXT_KEY_5STARS", "TXT_KEY_2STARS", "TXT_KEY_4STARS" },
//Aztec
{"TXT_KEY_2STARS", "TXT_KEY_3STARS", "TXT_KEY_3STARS", "TXT_KEY_4STARS", "TXT_KEY_1STAR" },
//Babylonia
{"TXT_KEY_3STARS", "TXT_KEY_2STARS", "TXT_KEY_4STARS", "TXT_KEY_3STARS", "TXT_KEY_2STARS" },
//Byzantium
{"TXT_KEY_3STARS", "TXT_KEY_3STARS", "TXT_KEY_5STARS", "TXT_KEY_3STARS", "TXT_KEY_2STARS" },
//Carthage
{"TXT_KEY_4STARS", "TXT_KEY_2STARS", "TXT_KEY_2STARS", "TXT_KEY_2STARS", "TXT_KEY_2STARS" },
//China
{"TXT_KEY_3STARS", "TXT_KEY_4STARS", "TXT_KEY_5STARS", "TXT_KEY_2STARS", "TXT_KEY_3STARS" },
//Egypt
{"TXT_KEY_3STARS", "TXT_KEY_1STAR", "TXT_KEY_4STARS", "TXT_KEY_3STARS", "TXT_KEY_3STARS" },
//England
{"TXT_KEY_4STARS", "TXT_KEY_3STARS", "TXT_KEY_3STARS", "TXT_KEY_4STARS", "TXT_KEY_3STARS" },
//Ethiopia
{"TXT_KEY_2STARS", "TXT_KEY_2STARS", "TXT_KEY_3STARS", "TXT_KEY_3STARS", "TXT_KEY_4STARS"},
//France
{"TXT_KEY_3STARS", "TXT_KEY_3STARS", "TXT_KEY_4STARS", "TXT_KEY_4STARS", "TXT_KEY_2STARS" },
//Germany
{"TXT_KEY_2STARS", "TXT_KEY_5STARS", "TXT_KEY_3STARS", "TXT_KEY_5STARS", "TXT_KEY_3STARS" },
//Greece
{"TXT_KEY_3STARS", "TXT_KEY_2STARS", "TXT_KEY_5STARS", "TXT_KEY_2STARS", "TXT_KEY_4STARS" },
//HolyRoman
{"TXT_KEY_2STARS", "TXT_KEY_5STARS", "TXT_KEY_2STARS", "TXT_KEY_5STARS", "TXT_KEY_3STARS" },
//Inca
{"TXT_KEY_4STARS", "TXT_KEY_2STARS", "TXT_KEY_2STARS", "TXT_KEY_4STARS", "TXT_KEY_1STAR" },
//India
{"TXT_KEY_4STARS", "TXT_KEY_1STAR", "TXT_KEY_5STARS", "TXT_KEY_1STAR", "TXT_KEY_4STARS" },
//Italy
{"TXT_KEY_4STARS", "TXT_KEY_3STARS", "TXT_KEY_4STARS", "TXT_KEY_3STARS", "TXT_KEY_2STARS"},
//Japan
{"TXT_KEY_3STARS", "TXT_KEY_3STARS", "TXT_KEY_3STARS", "TXT_KEY_4STARS", "TXT_KEY_4STARS" },
//Khmer
{"TXT_KEY_3STARS", "TXT_KEY_2STARS", "TXT_KEY_4STARS", "TXT_KEY_3STARS", "TXT_KEY_2STARS"},
//Mali
{"TXT_KEY_5STARS", "TXT_KEY_1STAR", "TXT_KEY_3STARS", "TXT_KEY_3STARS", "TXT_KEY_3STARS" },
//Maya
{"TXT_KEY_3STARS", "TXT_KEY_3STARS", "TXT_KEY_3STARS", "TXT_KEY_3STARS", "TXT_KEY_1STAR"},
//Mongolia
{"TXT_KEY_1STAR", "TXT_KEY_4STARS", "TXT_KEY_2STARS", "TXT_KEY_4STARS", "TXT_KEY_4STARS" },
//Netherlands
{"TXT_KEY_4STARS", "TXT_KEY_2STARS", "TXT_KEY_2STARS", "TXT_KEY_5STARS", "TXT_KEY_1STAR"},
//Turkey
{"TXT_KEY_3STARS", "TXT_KEY_3STARS", "TXT_KEY_5STARS", "TXT_KEY_3STARS", "TXT_KEY_2STARS" },
//Persia
{"TXT_KEY_2STARS", "TXT_KEY_3STARS", "TXT_KEY_4STARS", "TXT_KEY_2STARS", "TXT_KEY_4STARS" },
//Portugal
{"TXT_KEY_4STARS", "TXT_KEY_2STARS", "TXT_KEY_2STARS", "TXT_KEY_5STARS", "TXT_KEY_1STAR"},
//Rome
{"TXT_KEY_3STARS", "TXT_KEY_3STARS", "TXT_KEY_4STARS", "TXT_KEY_3STARS", "TXT_KEY_4STARS" },
//Russia
{"TXT_KEY_1STAR", "TXT_KEY_4STARS", "TXT_KEY_2STARS", "TXT_KEY_4STARS", "TXT_KEY_5STARS" },
//Spain
{"TXT_KEY_3STARS", "TXT_KEY_3STARS", "TXT_KEY_3STARS", "TXT_KEY_4STARS", "TXT_KEY_3STARS" },
//Vikings
{"TXT_KEY_2STARS", "TXT_KEY_3STARS", "TXT_KEY_2STARS", "TXT_KEY_3STARS", "TXT_KEY_4STARS" },
//
{"XXX", "XXX", "XXX", "XXX", "XXX"}};



I think the X's in the middle are messing everything up; like some of the civs after the Xs had xxx on their spawn date, ratings etc. So i decided to remove all the XXXs but some civs still have messed up (others civs) spawn dates.
 
This stuff was there on purpose, why would you remove it? Yes, when these arrays are not long enough, it causes crashes.
 
This stuff was there on purpose, why would you remove it? Yes, when these arrays are not long enough, it causes crashes.

Then how should i add the HRE; no matter what i do it doesnt work. Ive tried adding the HRE after Greece and leaving the XXX alone; tried putting HRE after the XXX (the one after greece). Ive tried filling HRE for XXX. Ive even tried putting HRE before Holland.

Heres the most recent thing i tried.
Spoiler :
//Alphabetical order: AME ARA AZT BAB BYZ CAR XXX CHI EGY ENG ETH FRA GER GRE XXX INC IND XXX JAP KHM XXX MAL MAY MON XXX HRE HOL TUR PER POR ROM RUS SPA XXX VIK XXX
char loadingTime[36][4] = { "60", "20", "35", "0", "15", "5", "X", "0", "0", "30", "10", "25", "45", "2", "X", "35", "0", "35", "10", "20", "X", "35", "15", "35", "X", "30", "40", "35", "5", "35", "5", "30", "25", "X", "20", "X"};
char loadingTime600AD[36][4] = { "30", "0", "15", "0", "0", "0", "X", "0", "0", "10", "0", "5", "30", "0", "X", "15", "0", "15", "0", "2", "X", "15", "0", "15", "X", "10", "20", "15", "0", "15", "0", "10", "5", "X", "0", "X"};
char startingYear[36][6] = {"1775 ", "620 ", "1200 ", "3000 ", "330 ", "1200 ", "XXX ", "3000 ", "3000 ", "820 ", "295 ", "750 ", "1600 ", "1600 ", "XXX ", "1150 ", "3000 ", "1167 ", "655 ", "660 ", "XXX ", "980 ", "65 ", "1190 ", "XXX ", "840 ", "1500 ", "1280 ", "850 ", "1130 ", "760 ", "860 ", "720 ", "XXX ", "545 ", "XXX "};
bool startingEra[36] = {true, true, true, false, true, false, false, false, false, true, false, true, true, false, false, true, false, true, false, true, false, true, true, true, false, true, true, false, true, false, true, true, false, true, false}; //AD or BC
char startingYear600AD[36][6] = {"1775 ", "600 ", "1200 ", "3000 ", "600 ", "1200 ", "XXX ", "600 ", "3000 ", "820 ", "295 ", "750 ", "1600 ", "1600 ", "XXX ", "1150 ", "3000 ", "1167 ", "600 ", "660 ", "XXX ", "980 ", "65 ", "1190 ", "XXX ", "840 ", "1500 ", "1280 ", "850 ", "1130 ", "760 ", "860 ", "720 ", "XXX ", "600 ", "XXX "};
bool startingEra600AD[36] = {true, true, true, false, true, false, false, true, false, true, false, true, true, false, false, true, false, true, true, true, false, true, false, true, false, true, true, false, true, false, true, true, false, true, false}; //AD or BC


And here is the original

Spoiler :
//Alphabetical order: AME ARA AZT BAB BYZ CAR XXX CHI EGY ENG ETH FRA GER GRE XXX INC IND XXX JAP KHM XXX MAL MAY MON XXX HOL TUR PER POR ROM RUS SPA XXX VIK XXX
char loadingTime[35][4] = { "60", "20", "35", "0", "15", "5", "X", "0", "0", "30", "10", "25", "30", "2", "X", "35", "0", "35", "10", "20", "X", "35", "15", "35", "X", "40", "35", "5", "35", "5", "30", "25", "X", "20", "X"};
char loadingTime600AD[35][4] = { "30", "0", "15", "0", "0", "0", "X", "0", "0", "10", "0", "5", "10", "0", "X", "15", "0", "15", "0", "2", "X", "15", "0", "15", "X", "20", "15", "0", "15", "0", "10", "5", "X", "0", "X"};
char startingYear[35][6] = {"1775 ", "620 ", "1200 ", "3000 ", "330 ", "1200 ", "XXX ", "3000 ", "3000 ", "820 ", "295 ", "750 ", "840 ", "1600 ", "XXX ", "1150 ", "3000 ", "1167 ", "655 ", "660 ", "XXX ", "980 ", "65 ", "1190 ", "XXX ", "1500 ", "1280 ", "850 ", "1130 ", "760 ", "860 ", "720 ", "XXX ", "545 ", "XXX "};
bool startingEra[35] = {true, true, true, false, true, false, false, false, false, true, false, true, true, false, false, true, false, true, false, true, false, true, true, true, false, true, true, false, true, false, true, true, false, true, false}; //AD or BC
char startingYear600AD[35][6] = {"1775 ", "600 ", "1200 ", "3000 ", "600 ", "1200 ", "XXX ", "600 ", "3000 ", "820 ", "295 ", "750 ", "840 ", "1600 ", "XXX ", "1150 ", "3000 ", "1167 ", "600 ", "660 ", "XXX ", "980 ", "65 ", "1190 ", "XXX ", "1500 ", "1280 ", "850 ", "1130 ", "760 ", "860 ", "720 ", "XXX ", "600 ", "XXX "};
bool startingEra600AD[35] = {true, true, true, false, true, false, false, true, false, true, false, true, true, false, false, true, false, true, true, true, false, true, false, true, false, true, true, false, true, false, true, true, false, true, false}; //AD or BC


Below is the picture of the errors i get on the Scenario screen. Notice how Germany still says 840 ad even after i changed it to 1600 in CvRhyes (and everywhere else). And for the Holy Romans all i get is Xs. Also i get defeated message on spawn. I think that is related to this too. How can i correctly add the HRE here?

Ive added the CvRhyes.cpp for convenience of viewing.
 

Attachments

  • Civ4ScreenShot0035.JPG
    Civ4ScreenShot0035.JPG
    87.6 KB · Views: 70
  • Civ4ScreenShot0034.JPG
    Civ4ScreenShot0034.JPG
    88.1 KB · Views: 78
  • Civ4ScreenShot0033.JPG
    Civ4ScreenShot0033.JPG
    93 KB · Views: 97
  • CvRhyes.zip
    57.3 KB · Views: 73
I guess you could describe the problem like this: Right now the number of players is hard-coded and you adding another causes it to fail. So, firstly you expand the "array" of players, then you add another one.
 
I think that the spawn date is in XML, just as every text you see in the game (the one that shows in menu- if you changed it in dll Germany will spawn at 1600).

Im pretty sure that even though the text and graphics are in the XML; some files and commands are in CvRhyes (like the amount of stars, spawn dates and where the UHV are suppose to go). And there is still the question of where should i add the HRE?
 
If you want, go ahead and add the HRE. Though perhaps you should have the screen say 'the Holy Romans' instead of 'the Holy Roman Empire', if only because that's how every other civ does it.
 
Top Bottom