Logo Platform
logo amplifiers simplified

Hiding a City Improvement From the AI

Reply
Copied to clipboard!
9 years ago
Jan 28, 2016, 4:45:13 AM
I have a city improvement, and the code looks like this:



[CODE]





100

../EmpireTypeMajor,FactionTraitCultists9

../ClassCity/TalesOfAurigaOutpost

../ClassCity/TalesOfAurigaOutpostKingdom

[/CODE]





Is there a PathPrerequisite that I can use to get the AI to ignore the improvement? Something like this but that specifies any enemy AI?



[CODE] ../EmpireTypeMajor,FactionTraitCultists9 [/CODE]
0Send private message
9 years ago
Jan 28, 2016, 6:11:22 PM
If you name it Geomic Labs the AI will never build it /s



Serious answer: Simulation debug mode says my faction has the descriptor GameDifficultyHardHumanMajorEmpire. There's one for every difficulty for humans (the AI have some too) in SimulationDescriptors[GameDifficultyBonus].

I'd try something like this:



[CODE]$Path(.../EmpireTypeMajor,GameDifficultyNewbieHumanMajorEmpire) or $Path(.../EmpireTypeMajor,GameDifficultyEasyHumanMajorEmpire) or $Path(.../EmpireTypeMajor,GameDifficultyNormalHumanMajorEmpire) or $Path(.../EmpireTypeMajor,GameDifficultyHardHumanMajorEmpire) or $Path(.../EmpireTypeMajor,GameDifficultySeriousHumanMajorEmpire) or $Path(.../EmpireTypeMajor,GameDifficultyImpossibleHumanMajorEmpire) or $Path(.../EmpireTypeMajor,GameDifficultyEndlessHumanMajorEmpire)[/CODE]



Of course this wouldn't work with a mod that adds custom difficulties but I'm not sure where else to go.
0Send private message
9 years ago
Jan 28, 2016, 6:23:15 PM
Okay, KBS, thank you. I'll go ahead an try that and see if it works.



I know there's a lot of definitions in the xml (like EmpireTypeMinor) and I was hoping there would just be a simple EmpireTypeEnemy or something that I could plug in there.



My other idea is to add the improvements to the AI datatables and just set everything to 0 or negative, and hopefully the AI would decide it wasn't worth building.



But I'll give this a try first. Thank you so much for taking the time to offer help & advice. Really grateful!
0Send private message
9 years ago
Jan 28, 2016, 7:54:14 PM
I tried both:



[CODE]$Path(.../EmpireTypeMajor,GameDifficultyNewbieHumanMajorEmpire) or $Path(.../EmpireTypeMajor,GameDifficultyEasyHumanMajorEmpire) or $Path(.../EmpireTypeMajor,GameDifficultyNormalHumanMajorEmpire) or $Path(.../EmpireTypeMajor,GameDifficultyHardHumanMajorEmpire) or $Path(.../EmpireTypeMajor,GameDifficultySeriousHumanMajorEmpire) or $Path(.../EmpireTypeMajor,GameDifficultyImpossibleHumanMajorEmpire) or $Path(.../EmpireTypeMajor,GameDifficultyEndlessHumanMajorEmpire)[/CODE]



and



[CODE] ../EmpireTypeMajor,GameDifficultyNewbieAIMajorEmpire

../EmpireTypeMajor,GameDifficultyEasyAIMajorEmpire

../EmpireTypeMajor,GameDifficultyNormalAIMajorEmpire

../EmpireTypeMajor,GameDifficultySeriousAIMajorEmpire

../EmpireTypeMajor,GameDifficultyImpossibleAIMajorEmpire

../EmpireTypeMajor,GameDifficultyEndlessAIMajorEmpire -->[/CODE]



...but I can't see anything when I switch empires via the modding tools (maybe because each empire becomes a human player while I'm controlling them)? I'll go ahead and play a game later and see if the AI builds them or not.



I'm kind of confused why the AI would even build them without having an entry in the AIParamteres(CityImprovement).xml file



I imagined that the improvement would be invisible (or have no value) to the AI without an entry there.
0Send private message
9 years ago
Jan 29, 2016, 4:47:50 AM
In my most recent game, the city improvement did indeed disappear using the code you provided, KBS. You are so my hero. That's two really helpful problems you've solved for me. Thank you, thank you, thank you! <3



For future reference (for anyone else with the same problem), this code seems to have worked to hide a city improvement from the AI:



[CODE]$Path(.../EmpireTypeMajor,GameDifficultyNewbieHumanMajorEmpire) or $Path(.../EmpireTypeMajor,GameDifficultyEasyHumanMajorEmpire) or $Path(.../EmpireTypeMajor,GameDifficultyNormalHumanMajorEmpire) or $Path(.../EmpireTypeMajor,GameDifficultyHardHumanMajorEmpire) or $Path(.../EmpireTypeMajor,GameDifficultySeriousHumanMajorEmpire) or $Path(.../EmpireTypeMajor,GameDifficultyImpossibleHumanMajorEmpire) or $Path(.../EmpireTypeMajor,GameDifficultyEndlessHumanMajorEmpire)[/CODE]
0Send private message
?

Click here to login

Reply
Comment