Any way to check what ModifierArguments are legal for a given EffectType?

Mettpawwz

Chieftain
Joined
Feb 4, 2017
Messages
73
So far I've just been cross-referencing the values and combinations used in the base game, but there are an insane number of Effect Types (some of which seem like exactly what I want to use) which are never used in the base game.

Is there any way to actually check for a given Effect Type just which ModifierArgument Name values can be used with it?
 
Unfortunately, I believe Infixo is right. Its been driving me insane when the examples aren't comprehensive enough. Like what else can I use besides "Liberation" and "War_Declaration_Received" and "Surprise_War_Initiated" for Diplomatic Triggers?
 
I've just found recently one thing that can be of great help. In GameEffects.log, when you set it to Diagnostics, it will tell you specifically if the arguments are wrong. There will be a message and info in it <InvalidArguments>. Basically you don't need to check in-game results to know if it's ok. You can quickly define several modifiers with different arguments and see which one was recognized.
 
Huh, you recently told me about the GameEffects.log Infixo but it hadn't really occurred to me to make a "troubleshooting template mod" of sorts that you can use to test every argument at once and see which is recognized.

One thing could potentially complicate it though. Do you know if it throws a <InvalidArguments> error only if an incompatible argument is provided, or does it also write that into the log if you don't have an entire set of connected arguments all present? (e.g. only have Amount='10' but not YieldType='YIELD_PRODUCTION')

That could make troubleshooting it a lot more difficult.
 
Awe, I wish Firaxis were a bit nicer to their modding community and made a list of stuff like that available. It seems insane that we're expected to figure things like that out by trial and error when they literally have defined what arguments go with what EffectType and could just tell us :(
 
Huh, could that be why this isn't working?

Code:
--+10000000000000% [ICON_Production]Production towards all military units.
        -- PolicyModifiers Table entry
        INSERT INTO PolicyModifiers     (PolicyType, ModifierID)
        VALUES                             ('POLICY_GOD_KING', 'GOD_KING_MILITARY_PRODUCTION');
        -- Modifiers Table entry
        INSERT INTO Modifiers     (ModifierID, ModifierType)
        VALUES                     ('GOD_KING_MILITARY_PRODUCTION', 'MODIFIER_PLAYER_CITIES_ADJUST_MILITARY_UNITS_PRODUCTION');
        -- ModifierArguments Table entries
        INSERT INTO ModifierArguments     (ModifierID, Name, Value)
        VALUES                             ('GOD_KING_MILITARY_PRODUCTION', 'Amount', '10000000000000');

I'm testing a military production PolicyModifier by attaching it to God King and giving it a really large value but warriors and slingers still take the same amount of time to build. Could that be because the EffectType EFFECT_ADJUST_CITY_ALL_MILITARY_UNITS_PRODUCTION (which belongs to MODIFIER_PLAYER_CITIES_ADJUST_MILITARY_UNITS_PRODUCTION) is not valid if its owner is a Policy?

I should mention that GameEffects.log on diagnostic says that it is valid and that it gets applied to my capital.
 
Last edited:
I like looking at strange cases, always something new to learn.
This time I've learned that a modifier can have more that one set of parameters. The one you are trying to use, it either has 'Amount' only and then modifies all units for the entire game, but also can have 3 parameters, 'Amount', 'StartEra', 'EndEra' that allows to apply it only to a given era range. Amazing.

Now, if I understand correctly, you want to create a Policy that changes unit production, right?
It seems that it's ok. The only problem is the Value - it's too big. Not sure if game can even handle such a value. Use 1000 and check results.
 
Wow, that's actually all it was, too large of a value. That's really good to know. Thanks a bunch!
 
This wasn't your actual question, but to see the values that Firaxis used at least once, you can do this:

Code:
SELECT DISTINCT dynamicmodifiers.EffectType,
                modifierarguments.Name
  FROM dynamicmodifiers
       LEFT JOIN
       modifiers ON modifiers.ModifierType = dynamicmodifiers.ModifierType
       LEFT JOIN
       modifierarguments ON modifierarguments.ModifierId = modifiers.ModifierId;

upload_2017-4-21_14-42-50.png



It's not as perfect as actual documentation, but it provides a ton of info at a glance. You can modify the query (e.g. add a WHERE clause) to help quickly search for specific stuff.


You can also do this to see a list of every single ModifierArgument that is possible (there are 168 total, unless some were created and just never used):

Code:
SELECT DISTINCT name
  FROM modifierarguments;

upload_2017-4-21_14-42-32.png
 
Oh, there is also this to grab every unique combo of a ModifierArgument Name and Value out there. Can be useful when you want to see every way Firaxis combined the two.

Code:
SELECT distinct modifierarguments.Name, modifierarguments.Value
from modifierarguments
order by modifierarguments.name

upload_2017-4-21_14-48-34.png
 
Back
Top Bottom