I have gone now and tried to do the impossible: to actually add another civilization, without having to erase another.
In a first run, I have tried now to add the Koreans.
I have done an extensive search of the C++ and the Python and the XML files in order not to miss any bit of code that has to be altered to allow a new civilization. And I have used the RFCMarathon files to do so.
Nevertheless, after adding all that seemed necessary, it still isn't working, so I'm posting now all the files I have changed, and I hope that someone can see what more has to be done to make the whole thing work:
In the game's XML:
In Python:
In C++
In the WBS:
Now, there is no problem with the dll compilation (which makes me sure that there is no syntax error), and the game notes no problem with the XML. I am able to start the mod, select a scenario, and even to choose the new Koreans, which show all the newly added corresponding text, but when the game begins, every civilisation starts dead, and the game is lost in the first round.
So, if anyone has an idea what might be wrong, or what is still missing, please tell me.
In a first run, I have tried now to add the Koreans.
I have done an extensive search of the C++ and the Python and the XML files in order not to miss any bit of code that has to be altered to allow a new civilization. And I have used the RFCMarathon files to do so.
Nevertheless, after adding all that seemed necessary, it still isn't working, so I'm posting now all the files I have changed, and I hope that someone can see what more has to be done to make the whole thing work:
In the game's XML:
- Civ4ArtDefines_Building: added a Korean embassy
- Civ4ArtDefines_Civilization: added Korean civ button
- Civ4BuildingClassInfos: added the Korean embassy
- Civ4BuildingInfos: added the Korean embassy
- Civ4CivilizationInfos: modified the Korean civilization (removed cities that were to appear in their citymap, removed their free techs)
- Civ4LeaderHeadInfos: made Wang-Kon their leader again (in RFC he is another Chinese leader)
- In the text directory, the Koreans had to be added in almost every file, and a dynamic civ names file for the Koreans had to be created. However, they all work fine.
In Python:
- CvPediaBuilding.py: unique building added
- CvPediaMain.py: the other Korean-specific entries
- AIWars.py: added Korean war map
- Barbs.py: removed the spawning of the independant city Hanseong in Korea
- CityNameManager.py: added Korean citymap, added necessary name conversions
- Communications.py: added Korea to the various pools
- Constants.py: changed virtually everything, Korea was sorted between Ethiopia and the Maya, which means that all civs coming after Korea have been assigned a new number, and the NumMaxPlayers is now 32
- RiseAndFall.py: added Korea in the three lists (iCivilization, player, team), and the array below, in the setup for both and early start, added the Hwacha instead of the catapult to their "on first contact" units, added starting units and additional starting units, starting workers, 600AD starting units, 4000BC starting units, 600AD techs, and early start techs
- Stability.py: added the Korean UP (less of a stability hit when losing cities)
- Stored data.py: modified or added arrays to be able to store data on the Koreans
- Victory.py: Added the Korean UHVs, all of them copied in a way or other from other civilizations.
In C++
- CvCity.cpp: added Korean era modifier, added Korean culture modifier
- CvCityAI.cpp: added Korean "favourite" units and wonders, and their willingness to build embassies
- Defines.h: increased the number of max players by 1
- CvGame.cpp: added updating for Koreans
- CvInfos.cpp: added unit cost percents, research percent, distance maintenance percent, cities maintenance, civic upkeep percent, and health bonus for Koreans
- CvPlayer.cpp: added starting era and max starting era for Koreans, how much production is needed by Koreans for wonders and regular stuff, Korean inflation rate, great people threshold, start era switch, growth threshold
- CvPlayerAI.cpp: added Korean taken tiles switch , city values, compact empire modifier, values (distance for war), values (techs)
- CvRhye.cpp: again, almost everything: modified arrays or added arrays, especially settler maps
- CvRhye.h: added Korea in the civ definitions, and moved the later civs up one step consequently
- CvTeamsAI.cpp: added Korea into an array in regard to defensive pacts
- CvUnit.cpp: added Korean work rate
In the WBS:
- added the Koreans (and empty EndTeam - BeginTeam tag, and a BeginPlayer - EndPlayer tag with the usual information).
Now, there is no problem with the dll compilation (which makes me sure that there is no syntax error), and the game notes no problem with the XML. I am able to start the mod, select a scenario, and even to choose the new Koreans, which show all the newly added corresponding text, but when the game begins, every civilisation starts dead, and the game is lost in the first round.
So, if anyone has an idea what might be wrong, or what is still missing, please tell me.