if (getOwner() != MYSTERYCIV || GC.getUnitInfo(eUnit).getUnitCombatType() == 4)
if (!(getOwner() == MYSTERYCIV && GC.getUnitInfo(eUnit).getUnitCombatType == 4))
Python and XML files are best edited with Notepad++, which is a better version of the simplistic notepad.Is it okay to edit the python and dll files using notepad?
Plus it has Regular Expressions and the Python Script Plugin (downloaded separately), which are amazing for modifying large amounts of repetitive data.I definitely recommend against using plain Notepad, it has issues with file encoding and handling large files, not to mention lacks tons of conveniences like syntax highlighting etc.
int CvPlayer::unitsRequiredForGoldenAge() const
{
// Pyramid of the Sun: requires 1 less GP for a golden age
if (isHasBuildingEffect((BuildingTypes)PYRAMID_OF_THE_SUN))
{
return (GC.getDefineINT("BASE_GOLDEN_AGE_UNITS") + (getNumUnitGoldenAges() * GC.getDefineINT("GOLDEN_AGE_UNITS_MULTIPLIER")) - 1);
}
return (GC.getDefineINT("BASE_GOLDEN_AGE_UNITS") + (getNumUnitGoldenAges() * GC.getDefineINT("GOLDEN_AGE_UNITS_MULTIPLIER")));
}
Two questions related to Teotihuacan:
1. I gave them a custom Teotl Pagan UHV goal, like the Maya. However, I don't know where to reference the XML text tag for it, and it currently displays the default Aztec one. I couldn't find where the Maya Teotl goal XML tag is referenced. How did you do it?
2. The Pyramid of the Sun is supposed to reduce the number of required Great People for Golden Ages by 1. It doesn't work, although I think it used to before I merged the recent develop updates into the mod (I'm not sure I trust my memory anymore...). Do you think the following code in CvPlayer.cpp should do what I want?
Code:int CvPlayer::unitsRequiredForGoldenAge() const { // Pyramid of the Sun: requires 1 less GP for a golden age if (isHasBuildingEffect((BuildingTypes)PYRAMID_OF_THE_SUN)) { return (GC.getDefineINT("BASE_GOLDEN_AGE_UNITS") + (getNumUnitGoldenAges() * GC.getDefineINT("GOLDEN_AGE_UNITS_MULTIPLIER")) - 1); } return (GC.getDefineINT("BASE_GOLDEN_AGE_UNITS") + (getNumUnitGoldenAges() * GC.getDefineINT("GOLDEN_AGE_UNITS_MULTIPLIER"))); }
Thanks, but this is not what I'm looking for. I should clarify. There are two parts in the victory display: stating the goal, and then displaying the player's progress. I took care of the second part, so it currently says something like:1. In victory.py @getPaganGoalHelp(). Search for "teotl".
i.e. the second line is correct but not the first. For the Maya it saysSacrifice ten slaves
Culture produced: 0/200
Acquire 50 food from combat
Food acquired: 0/50
Yeah, it's probably some sort of off-by-one error in the wonder enumeration... I thought it unlikely because I fixed one such error that made the conquerors spread space elevators to the New World instead of the plague2. I suppose that works. You should test it to be sure though.
Thanks, but this is not what I'm looking for. I should clarify. There are two parts in the victory display: stating the goal, and then displaying the player's progress. I took care of the second part, so it currently says something like:
i.e. the second line is correct but not the first. For the Maya it says
if iVictoryType == iVictoryPaganism and i == 1:
sGoalText += "_" + str(gc.getCivilizationInfo(gc.getPlayer(self.iActivePlayer).getCivilizationType()).getPaganReligionName(0).upper())
if self.iActivePlayer == iMaya and not gc.getPlayer(self.iActivePlayer).isReborn(): sGoalText += "_MAYA"
Yeah, it's probably some sort of off-by-one error in the wonder enumeration... I thought it unlikely because I fixed one such error that made the conquerors spread space elevators to the New World instead of the plague
EDIT: So I tracked the bug and the intended effect was instead associated with the Temple of Kukulkan, which was right before the Pyramid of the Sun in CvRhyes and Consts.py. I tried moving the Pyramid of the Sun to the end of the list in both files, and now the effect is associated with the CN tower. I'm confused because I'm pretty sure I updated the building constants correctly, but let's make sure: I added a normal building (Teotihuacan special building) and a wonder (and therefore a new building class). Thus I should have incremented BEGIN_WONDERS by 1, NUM_BUILDINGS_PLAGUE by 2, and NUM_BUILDINGTYPES_PLAGUE by 1, correct? Is there any other place besides CvRhyes and Consts.py that are sensitive to the ordering of buildings or building classes?