Someone had linked me with something that was on this page, I accidentally deleted my favorite. But this seems like it can answer a few questions i may have so thanks!!Do you mean this? https://civilization.fandom.com/wiki/Civilization_IV
Someone had linked me with something that was on this page, I accidentally deleted my favorite. But this seems like it can answer a few questions i may have so thanks!!Do you mean this? https://civilization.fandom.com/wiki/Civilization_IV
def aiHandicap():
if (gc.getGame().getGameTurn() == 1):
iUnitWorker = gc.getInfoTypeForString("UNIT_WORKER")
iUnitSettler = gc.getInfoTypeForString("UNIT_SETTLER")
iUnitCeorl = gc.getInfoTypeForString("UNIT_CEORL")
iUnitJavelinman = gc.getInfoTypeForString("UNIT_JAVELINMAN")
iUnitScout = gc.getInfoTypeForString("UNIT_SCOUT")
for iPlayerX in xrange (gc.getMAX_PLAYERS()):
pPlayer = gc.getPlayer(iPlayerX)
if (gc.getGame().getHandicapType()) == gc.getInfoTypeForString("HANDICAP_IMMORTAL"):
if (pPlayer.isHuman() == False):
if (pPlayer.getCapitalCity() != None):
city = pPlayer.getCapitalCity()
pPlayer.initUnit(iUnitWorker, city.getX(), city.getY(), UnitAITypes.UNITAI_WORKER, DirectionTypes.DIRECTION_WEST)
pPlayer.initUnit(iUnitScout, city.getX(), city.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_WEST)
for x in range(2):
pPlayer.initUnit(iUnitCeorl, city.getX(), city.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_WEST)
for x in range(2):
pPlayer.initUnit(iUnitJavelinman, city.getX(), city.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_WEST)
def onEndGameTurn(self, argsList):
'Called at the end of the end of each turn'
iGameTurn = argsList[0]
## RoodEvent Start
RoodEvents.aiHandicap()
Traceback (most recent call last):
File "CvEventInterface", line 30, in onEvent
File "CvCustomEventManager", line 139, in handleEvent
File "CvCustomEventManager", line 150, in _handleDefaultEvent
File "CvEventManager", line 379, in onEndGameTurn
File "RoodEvents", line 37, in aiHandicap
RuntimeError: unidentifiable C++ exception
ERR: Python function onEvent failed, module CvEventInterface
Traceback (most recent call last):
File "CvScreensInterface", line 705, in forceScreenRedraw
File "CvMainInterface", line 742, in redraw
File "CvMainInterface", line 2785, in updateScoreStrings
This is exactly what I needed (although I suspect I am missing some building files as well - I know that it should be caused by a wrong ArtDefines definition, but I copied it straight from Sword of Islam), I have no clue why I can't find these files in so many different versions (downloaded multiple times, too), but thank you for sending them to me!Sorry if I'm misunderstanding the question but I was able to locate both the atlas and the button in my version of SOI. Perhaps you have a corrupted file? I've attached them to this post.
As to your issue with pink shadows/red circles it's hard to diagnose without more details. Usually these happen because of an error/typo in the relevant ART_DEFINES XML but they can be caused by issues with the art itself as well.
For anyone with the same problem I've fixed this issue with updateScoreStrings. Via some debugging I figured out the problem was with gc.getMAX_PLAYERS and substituted gc.getGame().countCivPlayersEverAlive() and this got things working. Not sure on the why.I'm getting a python exception related to updateScoreStrings but I haven't messed with the interface at all so not sure what could be causing it. It appears whenever I run the following code:
Spoiler Custom Python Event :Code:def aiHandicap(): if (gc.getGame().getGameTurn() == 1): iUnitWorker = gc.getInfoTypeForString("UNIT_WORKER") iUnitSettler = gc.getInfoTypeForString("UNIT_SETTLER") iUnitCeorl = gc.getInfoTypeForString("UNIT_CEORL") iUnitJavelinman = gc.getInfoTypeForString("UNIT_JAVELINMAN") iUnitScout = gc.getInfoTypeForString("UNIT_SCOUT") for iPlayerX in xrange (gc.getMAX_PLAYERS()): pPlayer = gc.getPlayer(iPlayerX) if (gc.getGame().getHandicapType()) == gc.getInfoTypeForString("HANDICAP_IMMORTAL"): if (pPlayer.isHuman() == False): if (pPlayer.getCapitalCity() != None): city = pPlayer.getCapitalCity() pPlayer.initUnit(iUnitWorker, city.getX(), city.getY(), UnitAITypes.UNITAI_WORKER, DirectionTypes.DIRECTION_WEST) pPlayer.initUnit(iUnitScout, city.getX(), city.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_WEST) for x in range(2): pPlayer.initUnit(iUnitCeorl, city.getX(), city.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_WEST) for x in range(2): pPlayer.initUnit(iUnitJavelinman, city.getX(), city.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_WEST)
which in turn is called in CvEventManager under onEndGameTurn as so:
Spoiler CvEventManager :
Code:def onEndGameTurn(self, argsList): 'Called at the end of the end of each turn' iGameTurn = argsList[0] ## RoodEvent Start RoodEvents.aiHandicap()
Error does not appear when I comment out RoodEvents.aiHandicap in CvEventManager. The python error it spits back looks like this:
Spoiler PythonErr Log :
Code:Traceback (most recent call last): File "CvEventInterface", line 30, in onEvent File "CvCustomEventManager", line 139, in handleEvent File "CvCustomEventManager", line 150, in _handleDefaultEvent File "CvEventManager", line 379, in onEndGameTurn File "RoodEvents", line 37, in aiHandicap RuntimeError: unidentifiable C++ exception ERR: Python function onEvent failed, module CvEventInterface Traceback (most recent call last): File "CvScreensInterface", line 705, in forceScreenRedraw File "CvMainInterface", line 742, in redraw File "CvMainInterface", line 2785, in updateScoreStrings
The second error repeats endlessly as the game keeps trying to draw the interface screen. I don't think the first error is related to the bigger second error but I don't know what's causing it either. The game does sucessfully spawn units as I want it too. When playing on Immortal the AI recieves units at the end of turn one. But the interface error makes the game unplayable. I'm stumped as to why giving the AI units would cause this to happen and I know very little about the interface python. It is my own mod with many changes made but this issue specifically only arises when the aiHandicap code is called. Has anyone encountered something like this before?
Vassal agreements don't affect team IDs (permanent alliances do, yes). Team IDs can be assigned arbitrarily on the Custom Game screen and in WB save files. I seem to recall that, upon launch, consecutive player and team IDs get assigned (by the EXE I guess), even if e.g. one team ID had been skipped on the Custom Game screen. But I don't know if this reliably results in player IDs being equal to team IDs. (Assuming that every team consists of just one player – if there are multiple players per team, then team IDs will obviously differ from player IDs.)2) In what situations is the player integer and the team integer not the same? If there are no alliances/vassalisation would the player integer also be the team integer?
Maybe fVisibilityPriority (0? -1? no help if it really just sets a priority) in XML\Buildings\Civ4BuildingInfos.xml or (near?) 0 (negative?) scale values in XML\Art\CIV4ArtDefines_Building.xml. If an empty <NIF/> works at all, then it would also remove the 3D model from Civilopedia. Just things to try, perhaps, until someone can hopefully provide an answer. Edit: I assume that by "campaign" you mean on the main map (in the countryside, campaña), but I'm not quite sure. I also don't recall what Civ 5 does with building graphics. If you actually want to hide all building graphics – well, there's a game option (Ctrl+O menu) "Globe View Buildings Disabled", but that's of course only for Globe view.What file do I edit to make buildings not appear in the campaign and remain 'hidden'? Like the Civ5 cities that the buildings do not appear in the city graphics.
Maybe fVisibilityPriority (0? -1? no help if it really just sets a priority) in XML\Buildings\Civ4BuildingInfos.xml or (near?) 0 (negative?) scale values in XML\Art\CIV4ArtDefines_Building.xml. If an empty <NIF/> works at all, then it would also remove the 3D model from Civilopedia. Just things to try, perhaps, until someone can hopefully provide an answer. Edit: I assume that by "campaign" you mean on the main map (in the countryside, campaña), but I'm not quite sure. I also don't recall what Civ 5 does with building graphics. If you actually want to hide all building graphics – well, there's a game option (Ctrl+O menu) "Globe View Buildings Disabled", but that's of course only for Globe view.
Edit2: If you're willing to change (and recompile) the DLL, then it's easy to hide all buildings or specific individual buildings:
CvCity.cpp#L12168
And, no, negative priority is not going to help. Looks like setting GAME_CITY_SIZE_METHOD to METHOD_LINMAP and both GAME_CITY_SIZE_LINMAP_AT_0 and GAME_CITY_SIZE_LINMAP_AT_50 to 0 in GlobalDefines.xml should hide all buildings without the need for a DLL change. Hm, in a quick test, that hides all city graphics, i.e. also the generic residential buildings. Ah, but setting GAME_CITY_SIZE_MAX_PERCENT_UNIQUE to 0 seems to hide only the non-generic buildings.
Understood, I don't intend to exploit this, if the AI doesn't build obsolete units as well then that would be fine to me.There is UNIT_UPGRADE_COST_PER_PRODUCTION (amount ofper 1
difference in production cost) and BASE_UNIT_UPGRADE_COST (fixed
cost added in the end) in GlobalDefines.xml. Setting both to 0 should result in free upgrades. The game should be able to handle that as the Leadership promotion already grants free upgrades. (As for game balance, free upgrades will allow players to train lots of 15
Warriors while researching e.g. Iron Working and, upon finishing that tech, turn them into Swordsmen that would normally cost 40
and immediately start a war.
) The AI already gets a 50% discount on upgrades on all difficulty levels (minus iAIPerEraModifier times the current era number). That discount can be adjusted through iAIUnitUpgradePercent in XML\GameInfo\Civ4HandicapInfos.xml. The upgrade price calculation, based on those XML values, happens here in the DLL.
I've figured out that this can be traced back to e.g. EFFECT_MISSIONARY_ACTIVE_BUDDHISM in Civ4EffectInfos.xml, but I am at a loss how the game knows which effect to use, and thus, how I can restore proper behaviour. Somehow, 'EFFECT_MISSIONARY_ACTIVE_BUDDHISM' is only ever referred to inside Civ4EffectInfos.xml? How can that be?On my PC, where I have been playing Civilization IV for at least a decade, I always heard a religious sound the very moment I let a Missionary spread its religion. Yesterday, I installed Civilization IV on my laptop - and there, I only hear the religious sounds all at once (a cacophony, really) when I start the next turn. Does anyone have any idea what causes this? How does this work for others? Crossposting this between the General and the Creation & Customisation forums because I am not sure if this could be related to (but how?) or fixed with modding.
On my PC, where I have been playing Civilization IV for at least a decade, I always heard a religious sound the very moment I let a Missionary spread its religion. Yesterday, I installed Civilization IV on my laptop - and there, I only hear the religious sounds all at once (a cacophony, really) when I start the next turn. Does anyone have any idea what causes this? How does this work for others? Crossposting this between the General and the Creation & Customisation forums because I am not sure if this could be related to (but how?) or fixed with modding.
I don't think the animation affects what sound is played.I've figured out that this can be traced back to e.g. EFFECT_MISSIONARY_ACTIVE_BUDDHISM in Civ4EffectInfos.xml [...]. EDIT: The answer lies here: [link]
Well, I would like to continue this conversation, because this is very interesting information that may be key to what I am experiencing... Despite having a fresh install and simply copying my mod from my PC to my laptop. Because the current cacophony of all 'religion-has-spread-to-a-city'-sounds playing immediately at once upon ending a turn is very annoying. And indeed, on my PC they play staggered, like what you describe.I don't think the animation affects what sound is played.
The DLL picks the sound in CvCity::setReligion. The addMessage call has a parameter named "bForce". I think the effect of bForce=true is that the EXE will immediately display the message – and play its sound. setReligion uses bForce=false, which, I think, means that the message is still immediately displayed if the recipient's turn is active. Otherwise, it gets displayed at the start of the next turn.
In my experience, non-forced messages are always displayed one at a time, with a delay (of EVENT_MESSAGE_STAGGER_TIME=3 seconds?) in between, so the sounds can't stack up. Messages about declarations of war, infamously, use bForce=true.
So I don't think religion spread sounds should ever stack in unmodified BtS. And the sound of a human missionary should not get delayed until the next turn.