Code fuer Inca UP

Rod

King
Joined
Sep 22, 2004
Messages
754
Location
Munich / Germany
Hello,

just out of curiosity has anybody checked where is the code for the Incas to gain +2 F , +1 H (I think these were the stats) from peaks ?
 
It's in the DLL, in CvCity.cpp (I think...possibly CvPlot.cpp). It's some function that calculates yield (calculateYield? calculatePlotYield?). I don't know off the top of my head, and I don't have it on me, but there's a condition that reads something like this:
Code:
if (getCiv() == INCA)
{
  iFood += 2;
  iHammers += 1;
}
(Note that the code above was made up off the top of my head, but the actual thing looks similar. If you just search for "INCA", you'll find it.)
 
How about the code the lets ships sail faster in the ocean?
 
thanks a lot !
 
I don't want to start a new thread so I'll ask it here: How do I need to alter the Python so I can set a civ to have -50 distance maintenance cost (or mnt. cost in general) as a UP?
 
I don't want to start a new thread so I'll ask it here: How do I need to alter the Python so I can set a civ to have -50 distance maintenance cost (or mnt. cost in general) as a UP?
That would be in the DLL, not the Python. :( As a hack, you could give them the "Organized" trait in the XML, which does the same thing (although you'd need to also change Courthouses and Jails to not construct faster under that trait).
 
That would be in the DLL, not the Python. :( As a hack, you could give them the "Organized" trait in the XML, which does the same thing (although you'd need to also change Courthouses and Jails to not construct faster under that trait).
Ah, shoot. And so eagerly I was looking for "Power of the Endless Land" for Russia. :( As far as I know, it's still not implemented succesfully in RFCE and I decided to give it a hand myself.

Well, under this light I can't. Thanks, though.
 
I cannot find the bit about movement. Perhaps only the great god Rhye Himself knows the answer.
 
I think an easy way to simulate this effect could be to use only the xml file for terrain definitions and there the tag terrainmovementcosts. Coast could be 2 and Ocean 1, then you double the movement of all ships.

The effect would be that ships would sail twice as fast on oceans than in coastal areas.
 
I want to remove the Greek UP. After looking at the "UniquePowers" python I thought it was in CvCity, but nothing happens when I remove "greece" from the bit of code below:
Spoiler :
//Rhye - start switch
int baseValue = (getBaseGreatPeopleRate() * getTotalGreatPeopleRateModifier()) / 100;
int result = baseValue;

if (getOwnerINLINE() == GREECE) {
//Rhye - start UP
if (GET_PLAYER(getOwnerINLINE()).getCurrentEra() <= 2)
result = (baseValue*250/100);
//Rhye - end UP
}
//switch used to be here, now in CvPlayer::greatPeopleThreshold()

return result;

//return ((getBaseGreatPeopleRate() * getTotalGreatPeopleRateModifier()) / 100);
//Rhye - end
What am I doing wrong here?
 
I want to remove the Greek UP. After looking at the "UniquePowers" python I thought it was in CvCity, but nothing happens when I remove "greece" from the bit of code below:

Did you remove the word GREECE from the code or did you remove the entire code?

I don't know much about editing the DLL but try removing this:
Code:
if (getOwnerINLINE() == GREECE) {
//Rhye - start UP
if (GET_PLAYER(getOwnerINLINE()).getCurrentEra() <= 2)
result = (baseValue*250/100);
//Rhye - end UP
}

That seems to be the part which gives Greece the bonus. Also remember to backup the file if you ever want to change it back.
 
That would be in the DLL, not the Python. :( As a hack, you could give them the "Organized" trait in the XML, which does the same thing (although you'd need to also change Courthouses and Jails to not construct faster under that trait).
Is it possible to add traits like that? Any idea how?

TDK
 
Is it possible to add traits like that? Any idea how?

TDK

It would be a very simple XML edit in CIV4LeaderheadInfos.xml. In RFC leaders don't have traits, but I would guess that Rhye still left the ability to add them. Either way the organized trait reduces only civic maintenance.

An easier way to implement the -50% maintenance without changing DLL might be to make a new building that you can't construct that gives -50% maintenance. A simple python edit could give this building free to any city founded by a certain civ. Another edit in python could delete/construct the building if the city changes owners from/to that civ. Note that the -50% bonus would stack with courthouses so perhaps a -20% or even -10% would be more balanced.
 
Top Bottom