function IsXP2()
if ( GameInfo.Units_XP2 ~= nil ) then
--print("Expansion 2 detected");
return true;
end
--print("Expansion 1/none detected");
return false;
end
I know about criterias in the modinfo file but this is not the case. I have one script for all expansions but inside I decide which parameter to use when calling the appropriate functions. I've used this code:
Code:function IsXP2() if ( GameInfo.Units_XP2 ~= nil ) then --print("Expansion 2 detected"); return true; end --print("Expansion 1/none detected"); return false; end
But it looks like something isn't right because I've got this report from the user: "I cannot select 1 in the combobox and I cannot input any value there. I currently have R&F expansion but no GS." Combobox is hidden based on the IsXP2() return value.
-- Expansions check
local bIsRiseAndFall:boolean = Modding.IsModActive("1B28771A-C749-434B-9053-D1380C553DE9"); -- Rise & Fall
print("Rise & Fall :", (bIsRiseAndFall and "YES" or "no"));
local bIsGatheringStorm:boolean = Modding.IsModActive("4873eb62-8ccc-4574-b784-dda455e74e68"); -- Gathering Storm
print("Gathering Storm:", (bIsGatheringStorm and "YES" or "no"));
-- Expansions check
local bIsRiseFall:boolean = (Game.ChangePlayerEraScore ~= nil); -- Rise & Fall
print("Rise & Fall", (bIsRiseFall and "YES" or "no"));
local bIsGatheringStorm:boolean = (GameClimate ~= nil); -- Gathering Storm
print("Gathering Storm:", (bIsGatheringStorm and "YES" or "no"));
I would think 'CITY_FOLLOWS_PANTHEON_REQUIREMENTS' would require the captured city follows the 'OP_ARES' pantheon
This is probably a detailed enough question you'd likely have better luck asking it as a help request thread
INSERT INTO BeliefModifiers (BeliefType, ModifierID) VALUES
('OP_ARES', 'OP_ARES_ON_CITY_CAPTURE') ;
INSERT INTO Modifiers (ModifierId, ModifierType) VALUES
('OP_ARES_ON_CITY_CAPTURE', 'MODIFIER_PLAYER_CAPTURED_CITY_ATTACH_MODIFIER') ;
INSERT INTO ModifierArguments (ModifierId, Name, Value) VALUES
('OP_ARES_ON_CITY_CAPTURE', 'ModifierId', 'OP_ARES_FAITH_FROM_CAPTURE') ;
INSERT INTO Modifiers (ModifierId, ModifierType, RunOnce, Permanent) VALUES
('OP_ARES_FAITH_FROM_CAPTURE', 'MODIFIER_PLAYER_GRANT_YIELD', 1, 1) ;
INSERT INTO ModifierArguments (ModifierId, Name, Value) VALUES
('OP_ARES_FAITH_FROM_CAPTURE', 'Amount', 100),
('OP_ARES_FAITH_FROM_CAPTURE', 'Scale', 1),
('OP_ARES_FAITH_FROM_CAPTURE', 'YieldType', 'YIELD_FAITH') ;
Player:GetProperty(sPropertyName)
Player:SetProperty(sPropertyName, Value)
<GameInfo>
<Units>
<Update>
<Where UnitType="UNIT_BUILDER"/>
<set>
<BuildCharges>7</BuildCharges>
</set>
</Update>
<Update>
<Where UnitType="UNIT_MODERN_ARMOR"/>
<Set StrategicResource="RESOURCE_OIL"/>
</Update>
</Units>
</GameInfo>