szBuffer = gDLL->getText("TXT_KEY_MISC_SOMEONE_DECLARED_WAR", getName().GetCString(), GET_TEAM(eTeam).getName().GetCString());
swprintf(szBuffer, gDLL->getText("TXT_KEY_MISC_CITY_HAS_BEEN_RAZED_BY", pCity->getNameKey(), getCivilizationDescriptionKey()).GetCString());
I think you would have to modify CvCity::canConstruct(). It looks like it calls canConstruct in python as well. You would also have to either hardcode which buildings are AI only or add a bool to XML.Would it be possible to make a building buildable by the AI only?
In that case the answer lies in CIV4HandicapInfo.xml in GameInfo. iResearchPercent is a modifier for AI research. If it for some reason produce way too little, you can increase this number and it will research faster, though it allows the AI to cheat. The real solution is to change the priorities of the AI and make it value research higher. However that can't be done by changing a single number like this.Well the AI seems to research techs very slow in my mod, even the ones that have many cities. So I'd like to give them some boost to help them research techs faster. A building that gives a science boost should be available to the AI only, because human players are very capable of producing techs fast enough. If a human players captures a city with the building, it just disappears (conquestprob set to zero).
%s1_civ_adjective Chose: To Kill Him
I think this might be the one you want.. I can't remember what it puts out though exactly..
@ DiMarzio: I think that you need to change the code in the dll to have a different text:
- TXT_KEY_MISC_SOMEONE_DECLARED_WAR comes from CvTeam.cpp:
Code:szBuffer = gDLL->getText("TXT_KEY_MISC_SOMEONE_DECLARED_WAR", getName().GetCString(), GET_TEAM(eTeam).getName().GetCString());
- TXT_KEY_MISC_CITY_HAS_BEEN_RAZED_BY comes from CvPlayer.cpp:
Code:swprintf(szBuffer, gDLL->getText("TXT_KEY_MISC_CITY_HAS_BEEN_RAZED_BY", pCity->getNameKey(), getCivilizationDescriptionKey()).GetCString());
1 and 2 come from the order of declaration.
Really? The modiki says that it just increases the technology cost for the human player. That is not what I want, I want the human player to advance normally, but the AI to advance faster.In that case the answer lies in CIV4HandicapInfo.xml in GameInfo. iResearchPercent is a modifier for AI research. If it for some reason produce way too little, you can increase this number and it will research faster, though it allows the AI to cheat. The real solution is to change the priorities of the AI and make it value research higher. However that can't be done by changing a single number like this.
Thanks, but I don't feel that being the right way to do it. Those two are not the only ones I want to change, they were just examples. I would want to change almost every instance of leader name to civ name. So I would have to find all of their codes and change them. Not good. It isn't a good practice to change the code when you can just change the parameters.
If I really have to touch the code I could simply add the keyword for civ's short description. No need to take the detour.
I didn't think this through. I thought you could make human research slow through the Handicap XML, and global research fast through the World XML, so that it would even out for the human player. However, the real problem is how to change the AI research speed (or cost) independently of the human.I'm confused now. Won't setting the global research speed help the human player, because if so I can't use that? Also, my mod works with just one (or a few more) maps. The difficult level set for the AI is always noble in the world builder file, will be creating a new handicap called "AI" with a faster research be enough? Also, can't the human player just select that handicap to just advance even faster?
I haven't thought about it, but I like this idea. The code you want to look at is CvGame::doTurn(). It contains the lineHas anyone looked at how to make autosaves happen at the end-of-turn rather than the beginning-of-turn (which imho is rather useless)? I think the current method is really a bad design, i would rather save all the moves i've done for a turn than none of them each turn, any thoughts, does a mod exist, can this be modded?
gDLL->getEngineIFace()->AutoSave();
When does that compile?I haven't thought about it, but I like this idea. The code you want to look at is CvGame::doTurn(). It contains the lineMaybe all you have to do is to move it to the right location. Moving it from the end to the start of that function might be enough.PHP:gDLL->getEngineIFace()->AutoSave();
When does that compile?