1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

City name change upon conquest

Discussion in 'Civ4 - Creation & Customization' started by Civciv5, Mar 24, 2016.

Thread Status:
Not open for further replies.
  1. Civciv5

    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?
     
  2. Leoreth

    Leoreth Prince of Blood Moderator

    Joined:
    Aug 23, 2009
    Messages:
    34,953
    Gender:
    Male
    Location:
    House of Hades
    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.
     
Thread Status:
Not open for further replies.

Share This Page