City name change upon conquest

Status
Not open for further replies.

Civciv5

Grand Emperor
Joined
Aug 14, 2011
Messages
2,103
Location
Nergenshuizen, Belgium
The discussion in the Quick Modding Thread seems to have ended without any clear solution, so I'm reposting it here.

Someone posted this code, which I need adjusted so that the city name changes depending on the civilization itself and not the artstyle.

Code:
if pCity.getName() == "Indraprastha": 
    if pNewOwner.getArtStyleType() == gc.getDefineInt("ARTSTYLE_A"): 
        pCity.setName("Delhi");
Would this code work?
Code:
if pCity.getName() == "Indraprastha": 
    if pNewOwner.getCivilizationType() == gc.getDefineInt("CIVILIZATION_DELHI_SULTANATE"): 
        pCity.setName("Delhi");
Also could I just paste this anywhere in the CvEventManager?
 
Moderator Action: Thread closed.

Asking the same question twice in different places is not productive and wastes the time of other forum participants. Repeating a question does address none of the reasons why a question is not answered. Please consider that the discussion of a question might not proceed because it's up to you to continue it, either by following the answers that have already been given, explaining the problems with these answers, or asking follow up questions.

If you want the discussion to continue in a separate thread instead of the general Q&A thread please contact me, and I will split off that thread.
 
Status
Not open for further replies.
Top Bottom