LeeS
Imperator
The only place where EFFECT_GRANT_YIELD is used by Firaxis is with Player-Level ModifierTypes. Gold, Faith, Science, Culture are granted, but not Food.
<GovernorPromotionModifiers>
<Row GovernorPromotionType="GOVERNOR_PROMOTION_WATER_WORKS" ModifierId="SM_TOURISM_BONUS_LIGHTHOUSE"/>
</GovernorPromotionModifiers>
<Modifiers>
<Row ModifierId="SM_TOURISM_BONUS_LIGHTHOUSE" ModifierType="MODIFIER_SINGLE_CITY_ADJUST_TOURISM" SubjectRequirementSetId="SM_CITY_HAS_LIGHTHOUSE_REQ"/>
</Modifiers>
<ModifierArguments>
<Row ModifierId="SM_TOURISM_BONUS_LIGHTHOUSE" Name="Amount" Value="2"/>
</ModifierArguments>
<RequirementSets>
<Row RequirementSetId="SM_CITY_HAS_LIGHTHOUSE_REQ" RequirementSetType="REQUIREMENTSET_TEST_ALL"/>
</RequirementSets>
<RequirementSetRequirements>
<Row RequirementSetId="SM_CITY_HAS_LIGHTHOUSE_REQ" RequirementId="SM_CITY_HAS_LIGHTHOUSE_REQID"/>
</RequirementSetRequirements>
<Requirements>
<Row RequirementId="SM_CITY_HAS_LIGHTHOUSE_REQID" RequirementType="REQUIREMENT_CITY_HAS_BUILDING"/>
</Requirements>
<RequirementArguments>
<Row RequirementId="SM_CITY_HAS_LIGHTHOUSE_REQID" Name="BuildingType" Value="BUILDING_LIGHTHOUSE" />
</RequirementArguments>
function AddRecruit( kData:table, kPerson:table )
local instance :table = m_greatPersonPanelIM:GetInstance();
local classData :table = GameInfo.GreatPersonClasses[kPerson.ClassID];
local individualData:table = GameInfo.GreatPersonIndividuals[kPerson.IndividualID];
if (kPerson.ClassID ~= nil) then
local portrait:string = "ICON_GENERIC_" .. classData.GreatPersonClassType;
portrait = portrait:gsub("_CLASS","_INDIVIDUAL");
instance.Portrait:SetIcon(portrait);
instance.CircleFlare:SetHide(false);
local classText:string = Locale.Lookup(classData.Name);
instance.ClassName:SetText(classText);
instance.ClassName:SetHide(false);
else
instance.CircleFlare:SetHide(true);
instance.ClassName:SetHide(true);
end
if kPerson.IndividualID ~= nil then
local individualName:string = Locale.ToUpper(kPerson.Name);
instance.IndividualName:SetText( individualName );
end
if kPerson.EraID ~= nil then
local eraName:string = Locale.ToUpper(Locale.Lookup(GameInfo.Eras[kPerson.EraID].Name));
instance.EraName:SetText( eraName );
end
if instance["m_EffectsIM"] ~= nil then
instance["m_EffectsIM"]:ResetInstances();
else
instance["m_EffectsIM"] = InstanceManager:new("EffectInstance", "Top", instance.EffectStack);
end
if kPerson.PassiveNameText ~= nil and kPerson.PassiveNameText ~= "" then
local effectInst:table = instance["m_EffectsIM"]:GetInstance();
local effectText:string = kPerson.PassiveEffectText;
local fullText:string = kPerson.PassiveNameText .. "[NEWLINE][NEWLINE]" .. effectText;
effectInst.Text:SetText( effectText );
effectInst.EffectTypeIcon:SetToolTipString( fullText );
effectInst.PassiveAbilityIcon:SetHide(false);
effectInst.ActiveAbilityIcon:SetHide(true);
end
if (kPerson.ActionNameText ~= nil and kPerson.ActionNameText ~= "") then
local effectInst:table = instance["m_EffectsIM"]:GetInstance();
local effectText:string = kPerson.ActionEffectText;
local fullText:string = kPerson.ActionNameText;
if (kPerson.ActionCharges > 0) then
fullText = fullText .. " (" .. Locale.Lookup("LOC_GREATPERSON_ACTION_CHARGES", kPerson.ActionCharges) .. ")";
end
fullText = fullText .. "[NEWLINE]" .. kPerson.ActionUsageText;
fullText = fullText .. "[NEWLINE][NEWLINE]" .. effectText;
effectInst.Text:SetText( effectText );
effectInst.EffectTypeIcon:SetToolTipString( fullText );
local actionIcon:string = classData.ActionIcon;
if actionIcon ~= nil and actionIcon ~= "" then
local textureOffsetX:number, textureOffsetY:number, textureSheet:string = IconManager:FindIconAtlas(actionIcon, SIZE_ACTION_ICON);
if(textureSheet == nil or textureSheet == "") then
UI.DataError("Could not find icon in ViewCurrent: icon=\""..actionIcon.."\", iconSize="..tostring(SIZE_ACTION_ICON) );
else
effectInst.ActiveAbilityIcon:SetTexture(textureOffsetX, textureOffsetY, textureSheet);
effectInst.ActiveAbilityIcon:SetHide(false);
effectInst.PassiveAbilityIcon:SetHide(true);
end
else
effectInst.ActiveAbilityIcon:SetHide(true);
end
end
if instance["m_RecruitIM"] ~= nil then
instance["m_RecruitIM"]:ResetInstances();
else
instance["m_RecruitIM"] = InstanceManager:new("RecruitInstance", "Top", instance.RecruitStack);
end
if instance["m_RecruitExtendedIM"] ~= nil then
instance["m_RecruitExtendedIM"]:ResetInstances();
else
instance["m_RecruitExtendedIM"] = InstanceManager:new("RecruitInstance", "Top", instance.RecruitInfoStack);
end
if kPerson.IndividualID ~= nil and kPerson.ClassID ~= nil then
-- Buy via gold
if (HasCapability("CAPABILITY_GREAT_PEOPLE_RECRUIT_WITH_GOLD") and (not kPerson.CanRecruit and not kPerson.CanReject and kPerson.PatronizeWithGoldCost ~= nil and kPerson.PatronizeWithGoldCost < 1000000)) then
instance.GoldButton:SetText(kPerson.PatronizeWithGoldCost .. "[ICON_Gold]");
instance.GoldButton:SetToolTipString(GetPatronizeWithGoldTT(kPerson));
instance.GoldButton:SetVoid1(kPerson.IndividualID);
instance.GoldButton:RegisterCallback(Mouse.eLClick, OnGoldButtonClick);
instance.GoldButton:SetDisabled((not kPerson.CanPatronizeWithGold) or IsReadOnly());
instance.GoldButton:SetHide(false);
else
instance.GoldButton:SetHide(true);
end
-- Buy via Faith
if (HasCapability("CAPABILITY_GREAT_PEOPLE_RECRUIT_WITH_FAITH") and (not kPerson.CanRecruit and not kPerson.CanReject and kPerson.PatronizeWithFaithCost ~= nil and kPerson.PatronizeWithFaithCost < 1000000)) then
instance.FaithButton:SetText(kPerson.PatronizeWithFaithCost .. "[ICON_Faith]");
instance.FaithButton:SetToolTipString(GetPatronizeWithFaithTT(kPerson));
instance.FaithButton:SetVoid1(kPerson.IndividualID);
instance.FaithButton:RegisterCallback(Mouse.eLClick, OnFaithButtonClick);
instance.FaithButton:SetDisabled((not kPerson.CanPatronizeWithFaith) or IsReadOnly());
instance.FaithButton:SetHide(false);
else
instance.FaithButton:SetHide(true);
end
-- Recruiting
if (HasCapability("CAPABILITY_GREAT_PEOPLE_CAN_RECRUIT") and kPerson.CanRecruit and kPerson.RecruitCost ~= nil) then
instance.RecruitButton:SetToolTipString( Locale.Lookup("LOC_GREAT_PEOPLE_RECRUIT_DETAILS", kPerson.RecruitCost) );
instance.RecruitButton:SetVoid1(kPerson.IndividualID);
instance.RecruitButton:RegisterCallback(Mouse.eLClick, OnRecruitButtonClick);
instance.RecruitButton:SetHide(false);
-- Auto scroll to first recruitable person.
if kInstanceToShow==nil then
kInstanceToShow = instance;
end
else
instance.RecruitButton:SetHide(true);
end
-- Rejecting
if (HasCapability("CAPABILITY_GREAT_PEOPLE_CAN_REJECT") and kPerson.CanReject and kPerson.RejectCost ~= nil) then
instance.RejectButton:SetToolTipString( Locale.Lookup("LOC_GREAT_PEOPLE_PASS_DETAILS", kPerson.RejectCost ) );
instance.RejectButton:SetVoid1(kPerson.IndividualID);
instance.RejectButton:RegisterCallback(Mouse.eLClick, OnRejectButtonClick);
instance.RejectButton:SetHide(false);
else
instance.RejectButton:SetHide(true);
end
-- If Recruit or Reject buttons are shown hide the minimized recruit stack
if not instance.RejectButton:IsHidden() or not instance.RecruitButton:IsHidden() then
instance.RecruitMinimizedStack:SetHide(true);
else
instance.RecruitMinimizedStack:SetHide(false);
end
-- Recruiting standings
-- Let's sort the table first by points total, then by the lower player id (to push yours toward the top of the list for readability)
local recruitTable: table = {};
for i, kPlayerPoints in ipairs(kData.PointsByClass[kPerson.ClassID]) do
-- DB
if (kPlayerPoints.PlayerID == Game.GetLocalPlayer()) then
table.insert(recruitTable,kPlayerPoints);
end
-- /DB
end
table.sort(recruitTable,
function (a,b)
if(a.PointsTotal == b.PointsTotal) then
return a.PlayerID < b.PlayerID;
else
return a.PointsTotal > b.PointsTotal;
end
end);
for i, kPlayerPoints in ipairs(recruitTable) do
if (kPlayerPoints.PlayerID == Game.GetLocalPlayer()) then
FillRecruitInstance(instance.LocalPlayerRecruitInstance, kPlayerPoints, kPerson, classData);
else
local recruitInst:table = instance["m_RecruitIM"]:GetInstance();
FillRecruitInstance(recruitInst, kPlayerPoints, kPerson, classData);
end
local recruitExtendedInst:table = instance["m_RecruitExtendedIM"]:GetInstance();
FillRecruitInstance(recruitExtendedInst, kPlayerPoints, kPerson, classData);
end
if (kPerson.EarnConditions ~= nil and kPerson.EarnConditions ~= "") then
instance.RecruitInfo:SetText("[COLOR_Civ6Red]" .. Locale.Lookup("LOC_GREAT_PEOPLE_CANNOT_EARN_PERSON") .. "[ENDCOLOR]");
instance.RecruitInfo:SetToolTipString("[COLOR_Civ6Red]" .. kPerson.EarnConditions .. "[ENDCOLOR]");
instance.RecruitInfo:SetHide(false);
else
instance.RecruitInfo:SetHide(true);
end
instance.RecruitScroll:CalculateSize();
end
if kPerson.IndividualID ~= nil then
-- Set the biography buttons
instance.BiographyBackButton:SetVoid1( kPerson.IndividualID );
instance.BiographyBackButton:RegisterCallback( Mouse.eLClick, OnBiographyClick );
instance.BiographyOpenButton:SetVoid1( kPerson.IndividualID );
instance.BiographyOpenButton:RegisterCallback( Mouse.eLClick, OnBiographyClick );
-- Setup extended recruit info buttons
instance.RecruitInfoOpenButton:SetVoid1( kPerson.IndividualID );
instance.RecruitInfoOpenButton:RegisterCallback( Mouse.eLClick, OnRecruitInfoClick );
-- DB
instance.RecruitInfoOpenButton:SetHide(true) ;
-- /DB
instance.RecruitInfoBackButton:SetVoid1( kPerson.IndividualID );
instance.RecruitInfoBackButton:RegisterCallback( Mouse.eLClick, OnRecruitInfoClick );
m_kGreatPeople[kPerson.IndividualID] = instance; -- Store instance for later look up
end
local noneAvailable :boolean = (kPerson.IndividualID == nil);
instance.IndividualName:SetHide( noneAvailable );
instance.EraName:SetHide( noneAvailable );
instance.MainInfo:SetHide( noneAvailable );
instance.BiographyBackButton:SetHide( noneAvailable );
instance.ClaimedLabel:SetHide( not noneAvailable );
instance.BiographyArea:SetHide( true );
instance.RecruitInfoArea:SetHide( true );
instance.FadedBackground:SetHide( true );
instance.BiographyOpenButton:SetHide( noneAvailable );
instance.EffectStack:CalculateSize();
instance.EffectStackScroller:CalculateSize();
end
include('GreatPeoplePopup')
function AddRecruit( kData:table, kPerson:table )
...
<my version of the function here>
...
end
<ReplaceUIScript id="DB_GreatPeoplePopup">
<Properties>
<LoadOrder>9999999</LoadOrder>
<LuaContext>GreatPeoplePopup</LuaContext>
<LuaReplace>DB_GreatPeoplePopup.lua</LuaReplace>
</Properties>
</ReplaceUIScript>
include('GreatPeoplePopup')
PRIOR_AddRecruit = AddRecruit
function AddRecruit( kData:table, kPerson:table )
PRIOR_AddRecruit(kData, kPerson)
end
include('GreatPeoplePopup')
PRIOR_AddRecruit = AddRecruit
function AddRecruit( kData:table, kPerson:table )
local ReturnedInstance = PRIOR_AddRecruit(kData, kPerson)
ReturnedInstance.RecruitInfoOpenButton:SetHide(true)
end
Your problem would appear to be in how you are attempting to use MODIFIER_SINGLE_CITY_ADJUST_TOURISM.I'm trying to make a Governor promotion give Tourism to a building:
No working. At first, I tried "MODIFIER_PLAYER_DISTRICTS_ADJUST_TOURISM_CHANGE", and that didn't work either. I'd rather the Tourism be generated from the district, rather than the City Center. Any ideas?Code:<GovernorPromotionModifiers> <Row GovernorPromotionType="GOVERNOR_PROMOTION_WATER_WORKS" ModifierId="SM_TOURISM_BONUS_LIGHTHOUSE"/> </GovernorPromotionModifiers> <Modifiers> <Row ModifierId="SM_TOURISM_BONUS_LIGHTHOUSE" ModifierType="MODIFIER_SINGLE_CITY_ADJUST_TOURISM" SubjectRequirementSetId="SM_CITY_HAS_LIGHTHOUSE_REQ"/> </Modifiers> <ModifierArguments> <Row ModifierId="SM_TOURISM_BONUS_LIGHTHOUSE" Name="Amount" Value="2"/> </ModifierArguments> <RequirementSets> <Row RequirementSetId="SM_CITY_HAS_LIGHTHOUSE_REQ" RequirementSetType="REQUIREMENTSET_TEST_ALL"/> </RequirementSets> <RequirementSetRequirements> <Row RequirementSetId="SM_CITY_HAS_LIGHTHOUSE_REQ" RequirementId="SM_CITY_HAS_LIGHTHOUSE_REQID"/> </RequirementSetRequirements> <Requirements> <Row RequirementId="SM_CITY_HAS_LIGHTHOUSE_REQID" RequirementType="REQUIREMENT_CITY_HAS_BUILDING"/> </Requirements> <RequirementArguments> <Row RequirementId="SM_CITY_HAS_LIGHTHOUSE_REQID" Name="BuildingType" Value="BUILDING_LIGHTHOUSE" /> </RequirementArguments>
"DynamicModifiers"
ModifierType CollectionType EffectType
MODIFIER_SINGLE_CITY_ADJUST_TOURISM COLLECTION_OWNER EFFECT_ADJUST_CITY_TOURISM
"Modifiers"
ModifierId ModifierType
RELIQUARIES_RELIC_TOURISM_MODIFIER MODIFIER_SINGLE_CITY_ADJUST_TOURISM
STBASILS_ADDRELIGIOUSTOURISM MODIFIER_SINGLE_CITY_ADJUST_TOURISM
CURATOR_DOUBLE_SCULPTURE_TOURISM MODIFIER_SINGLE_CITY_ADJUST_TOURISM
CURATOR_DOUBLE_PORTRAIT_TOURISM MODIFIER_SINGLE_CITY_ADJUST_TOURISM
CURATOR_DOUBLE_LANDSCAPE_TOURISM MODIFIER_SINGLE_CITY_ADJUST_TOURISM
CURATOR_DOUBLE_RELIGIOUS_TOURISM MODIFIER_SINGLE_CITY_ADJUST_TOURISM
CURATOR_DOUBLE_WRITING_TOURISM MODIFIER_SINGLE_CITY_ADJUST_TOURISM
CURATOR_DOUBLE_MUSIC_TOURISM MODIFIER_SINGLE_CITY_ADJUST_TOURISM
"ModifierArguments"
ModifierId Name Value
RELIQUARIES_RELIC_TOURISM_MODIFIER GreatWorkObjectType GREATWORKOBJECT_RELIC
RELIQUARIES_RELIC_TOURISM_MODIFIER ScalingFactor 300
STBASILS_ADDRELIGIOUSTOURISM Religious 1
STBASILS_ADDRELIGIOUSTOURISM ScalingFactor 200
CURATOR_DOUBLE_LANDSCAPE_TOURISM GreatWorkObjectType GREATWORKOBJECT_LANDSCAPE
CURATOR_DOUBLE_LANDSCAPE_TOURISM ScalingFactor 200
CURATOR_DOUBLE_MUSIC_TOURISM GreatWorkObjectType GREATWORKOBJECT_MUSIC
CURATOR_DOUBLE_MUSIC_TOURISM ScalingFactor 200
CURATOR_DOUBLE_PORTRAIT_TOURISM GreatWorkObjectType GREATWORKOBJECT_PORTRAIT
CURATOR_DOUBLE_PORTRAIT_TOURISM ScalingFactor 200
CURATOR_DOUBLE_RELIGIOUS_TOURISM GreatWorkObjectType GREATWORKOBJECT_RELIGIOUS
CURATOR_DOUBLE_RELIGIOUS_TOURISM ScalingFactor 200
CURATOR_DOUBLE_SCULPTURE_TOURISM GreatWorkObjectType GREATWORKOBJECT_SCULPTURE
CURATOR_DOUBLE_SCULPTURE_TOURISM ScalingFactor 200
CURATOR_DOUBLE_WRITING_TOURISM GreatWorkObjectType GREATWORKOBJECT_WRITING
CURATOR_DOUBLE_WRITING_TOURISM ScalingFactor 200
Hmmm... I see. Are you aware of a modifier that would work with what I'm trying to do then? I can't seem to find one. I think I've tried 4 different modifier types by now.Your problem would appear to be in how you are attempting to use MODIFIER_SINGLE_CITY_ADJUST_TOURISM.
Each instance where "MODIFIER_SINGLE_CITY_ADJUST_TOURISM" is used in table ModifierArguments there is a source and a scaling factor. None use an "amount" argument.Code:"DynamicModifiers" ModifierType CollectionType EffectType MODIFIER_SINGLE_CITY_ADJUST_TOURISM COLLECTION_OWNER EFFECT_ADJUST_CITY_TOURISM "Modifiers" ModifierId ModifierType RELIQUARIES_RELIC_TOURISM_MODIFIER MODIFIER_SINGLE_CITY_ADJUST_TOURISM STBASILS_ADDRELIGIOUSTOURISM MODIFIER_SINGLE_CITY_ADJUST_TOURISM CURATOR_DOUBLE_SCULPTURE_TOURISM MODIFIER_SINGLE_CITY_ADJUST_TOURISM CURATOR_DOUBLE_PORTRAIT_TOURISM MODIFIER_SINGLE_CITY_ADJUST_TOURISM CURATOR_DOUBLE_LANDSCAPE_TOURISM MODIFIER_SINGLE_CITY_ADJUST_TOURISM CURATOR_DOUBLE_RELIGIOUS_TOURISM MODIFIER_SINGLE_CITY_ADJUST_TOURISM CURATOR_DOUBLE_WRITING_TOURISM MODIFIER_SINGLE_CITY_ADJUST_TOURISM CURATOR_DOUBLE_MUSIC_TOURISM MODIFIER_SINGLE_CITY_ADJUST_TOURISM "ModifierArguments" ModifierId Name Value RELIQUARIES_RELIC_TOURISM_MODIFIER GreatWorkObjectType GREATWORKOBJECT_RELIC RELIQUARIES_RELIC_TOURISM_MODIFIER ScalingFactor 300 STBASILS_ADDRELIGIOUSTOURISM Religious 1 STBASILS_ADDRELIGIOUSTOURISM ScalingFactor 200 CURATOR_DOUBLE_LANDSCAPE_TOURISM GreatWorkObjectType GREATWORKOBJECT_LANDSCAPE CURATOR_DOUBLE_LANDSCAPE_TOURISM ScalingFactor 200 CURATOR_DOUBLE_MUSIC_TOURISM GreatWorkObjectType GREATWORKOBJECT_MUSIC CURATOR_DOUBLE_MUSIC_TOURISM ScalingFactor 200 CURATOR_DOUBLE_PORTRAIT_TOURISM GreatWorkObjectType GREATWORKOBJECT_PORTRAIT CURATOR_DOUBLE_PORTRAIT_TOURISM ScalingFactor 200 CURATOR_DOUBLE_RELIGIOUS_TOURISM GreatWorkObjectType GREATWORKOBJECT_RELIGIOUS CURATOR_DOUBLE_RELIGIOUS_TOURISM ScalingFactor 200 CURATOR_DOUBLE_SCULPTURE_TOURISM GreatWorkObjectType GREATWORKOBJECT_SCULPTURE CURATOR_DOUBLE_SCULPTURE_TOURISM ScalingFactor 200 CURATOR_DOUBLE_WRITING_TOURISM GreatWorkObjectType GREATWORKOBJECT_WRITING CURATOR_DOUBLE_WRITING_TOURISM ScalingFactor 200
MARAE_TOURISM_FEATURES uses an "Amount" argument but in that case the ModifierType is MODIFIER_SINGLE_CITY_ADJUST_TOURISM_PER_FEATURE in which case the "source" and "scaling factor" are implied in the type of modifier.
So far as I am aware the xml context file is all or none. They are each their own "animal" and there's no equivalent to the "include" command available in an lua script.
You can use "MODIFIER_PLAYER_DISTRICT_ADJUST_TOURISM_CHANGE" with single ModifierArgument "Amount". Many Buildings, such as The Ferris Wheel and Shopping Mall are using it to grant a fixed Tourism Amount for the District they are built in.Hmmm... I see. Are you aware of a modifier that would work with what I'm trying to do then? I can't seem to find one. I think I've tried 4 different modifier types by now.
Is there a way to add a modifier to a district so it provides default Tourism, but set a requirement so that the Tourism doesn't kick in until, A) The building is built and B) The governor with the promotion is in the city? I know I can create to requirements to the same requirement_id and I can set it to require the building, but can it be set to require the governor to be IN THE CITY with that particular promotion? I see that there is a "REQUIREMENT_CITY_HAS_SPECIFIC_GOVERNOR_PROMOTION_TYPE" but I'm not sure if that's what I'm looking for.
I think overwriting the Lua file would be the optimal choice, since there are more Mods that change the GP database than the GP Lua file. And I don't think that there is going to be a lot of Firaxis rework of the GP Screen. You could just comment with your initials above the functions you made, so you could easily find them when Firaxis change somthing, and you just have to replace their functions with yours.And if that's the case, then my little project requires either overwriting the whole lua file or overwriting the whole xml file. Neither is ideal, but I suppose the latter is more maintainable.
<BuildingModifiers>
<Row BuildingType="BUILDING_LIGHTHOUSE" ModifierId="SM_BUILDING_TOURISM_BONUS"/>
<Row BuildingType="BUILDING_SHIPYARD" ModifierId="SM_BUILDING_TOURISM_BONUS"/>
<Row BuildingType="BUILDING_SEAPORT" ModifierId="SM_BUILDING_TOURISM_BONUS"/>
<Row BuildingType="BUILDING_FERRIS_WHEEL" ModifierId="SM_BUILDING_TOURISM_BONUS"/>
<Row BuildingType="BUILDING_AQUARIUM" ModifierId="SM_BUILDING_TOURISM_BONUS"/>
<Row BuildingType="BUILDING_AQUATICS_CENTER" ModifierId="SM_BUILDING_TOURISM_BONUS"/>
</BuildingModifiers>
<Modifiers>
<Row ModifierId="SM_BUILDING_TOURISM_BONUS" ModifierType="MODIFIER_PLAYER_DISTRICT_ADJUST_TOURISM_CHANGE" SubjectRequirementSetId="SM_CITY_HAS_GOVERNOR_PROMO_REQ"/>
</Modifiers>
<ModifierArguments>
<Row ModifierId="SM_BUILDING_TOURISM_BONUS" Name="Amount" Value="2"/>
</ModifierArguments>
<RequirementSets>
<Row RequirementSetId="SM_CITY_HAS_GOVERNOR_PROMO_REQ" RequirementSetType="REQUIREMENTSET_TEST_ALL"/>
</RequirementSets>
<RequirementSetRequirements>
<Row RequirementSetId="SM_CITY_HAS_GOVERNOR_PROMO_REQ" RequirementId="SM_CITY_HAS_GOVERNOR_PROMO_REQID"/>
</RequirementSetRequirements>
<Requirements>
<Row RequirementId="SM_CITY_HAS_GOVERNOR_PROMO_REQID" RequirementType="REQUIREMENT_CITY_HAS_SPECIFIC_GOVERNOR_PROMOTION_TYPE"/>
</Requirements>
<RequirementArguments>
<Row RequirementId="SM_CITY_HAS_GOVERNOR_PROMO_REQID" Name="GovernorPromotionType" Value="GOVERNOR_PROMOTION_WATER_WORKS" />
</RequirementArguments>
<Include File="TechTreeNode"/>
So I guess you can. But then you would need a custom version of one or the other anyway even if you imported your own custom context.xml type of file and then "included" that within the Great People Context xml file. All the context files do is create the "shape" of the panel and where the icons, buttons, and whatnot are displayed rather than the actual functions that are executed within the lua file.Code:<Include File="TechTreeNode"/>
That depends on the coding. Database updates don't have any effect on saved Games (maybe modifiers and requirements only, but those could break the Game sometimes), Lua Gameplay Scripts only work if you reload the Game and Lua UI Scripts can have either immediate effect (during the Game) or till you save and progress to the next turn.Hi!
Quick question on how to "debug" a mod...
When I want to try one of my mods, I always have to create a new game. I tried saving a game I created with my mod loaded, exit Civ. Then I change and update the mod, open Civ VI, load my game and the changes are not there...
Is there a way for my mod to update in the saved game when I change/update it?
Thanks a lot in advance!
Have a great modding!
I think overwriting the Lua file would be the optimal choice, since there are more Mods that change the GP database than the GP Lua file.
That's why I like a Concept such of the "UI Plugins Framework" Mod that makes it easier for Modders to make compatible Mods, unfortunately not many Modders use that (tbh I don't know a single one with a Popular Mod).
-- This file is being included into the base GreatWorksOverview file using the wildcard include setup in GreatWorksOverview.lua
-- Refer to the bottom of GreatWorksOverview.lua to see how that's happening
-- DO NOT include any GreatWorksOverview files here or it will cause problems
-- include("GreatWorksOverview");
-- This wildcard include will include all loaded files beginning with "GreatWorksOverview_"
-- This method replaces the uses of include("GreatWorksOverview") in files that want to override
-- functions from this file. If you're implementing a new "GreatWorksOverview_" file DO NOT include this file.
include("GreatWorksOverview_", true);