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

How do I know what arguments a modifier takes?

Discussion in 'Mod Creation Help' started by rattatatouille, Mar 16, 2018.

  1. rattatatouille

    rattatatouille Warlord

    Joined:
    Jan 26, 2018
    Messages:
    140
    Gender:
    Male
    As the tin says, I want to know what arguments have to be passed to a modifier so that it takes effect.

    Example, I have this modifier found in Expansion1_Modifiers.xml

    Code:
    MODIFIER_SINGLE_CITY_ADJUST_UNIT_PRODUCTION_MODIFIER
    but I haven't found where it is used.

    Since I don't know how the modifier is used, how can I see what arguments it takes?
     
  2. Philasimes

    Philasimes Chieftain

    Joined:
    Oct 24, 2014
    Messages:
    19
    Gender:
    Male
    Location:
    Switzerland
    You can look at the database used for civ 6 using a program like SQLite and then look at all the tables inside the database. There is one called modifier arguments.

    There‘s a super useful tutorial on here for doing just that. I’m sure you can find it if you google sqlite tutorial civfanatics or something similar.
     
  3. isau

    isau Deity

    Joined:
    Jan 15, 2007
    Messages:
    3,052
  4. isau

    isau Deity

    Joined:
    Jan 15, 2007
    Messages:
    3,052
    BTW for this specific instance I would probably do this:

    Code:
    SELECT * FROM Modifiers
    LEFT JOIN ModifierArguments on ModifierArguments.ModifierId = Modifiers.ModifierId
    WHERE Modifiers.ModifierType LIKE "%MODIFIER_SINGLE_CITY_ADJUST_UNIT_PRODUCTION_MODIFIER%"
    That's assuming MODIFIER_SINGLE_CITY_ADJUST_UNIT_PRODUCTION_MODIFIER is a ModifierType and not a ModifierId (they are different concepts).

    The reason I'd run that join is so if ModifierArguments is blank for that Modifier, you know the Modifier is simply never used. If you don't do the join and try to query ModifierArguments directly, it will just show nothing at all if it is never used, which is a result I tend not to trust. In any case, if MODIFIER_SINGLE_CITY_ADJUST_UNIT_PRODUCTION_MODIFIER is a ModifierType and not a ModifierId you have to do that join anyway, since the ModifierType is only defined in the Modifiers table.
     

Share This Page