Firetuner Question: Is there a way to add "complete current civic"

hawkseye17

Chieftain
Joined
Jun 25, 2020
Messages
38
On the "Player" panel of Firetuner, there is a button to "Complete Current Research" but there isn't one for civics. Is there a way to make a similar button but for civics?
 
yes, copy/paste the button, edit it, rename it and change "GetTechs" to "GetCulture" then use GetProgressingCivic and SetCivic functions instead of the techs function.
 
It doesn't seem to be working
Here is the default Research Button

Code:
local playerTechs = Players[g_TunerSelectedPlayer]:GetTechs();

if (playerTechs:GetResearchingTech() ~= -1) then
    playerTechs:ChangeCurrentResearchProgress(playerTechs:GetResearchCost(playerTechs:GetResearchingTech()) - playerTechs:GetResearchProgress());
end

Here is my Civic Button

Code:
local playerCivic = Players[g_TunerSelectedPlayer]:GetCulture();

if (playerCivic:GetProgressingCivic() ~= -1) then
    playerCivic :GetProgressingCivic(playerCivic:GetResearchCost(playerCivic:GetProgressingCivic()) - playerCivic:GetResearchProgress());
end
 
SetCivic is use this way:

Code:
playerCivic:SetCivic (
playerCivic:GetProgressingCivic(), true
);

and would replace the ChangeCurrentResearchProgress line
 
Thank you. It worked using the following

Code:
local playerCivic = Players[g_TunerSelectedPlayer]: GetCulture();

if (playerCivic:GetProgressingCivic() ~= -1) then
playerCivic:SetCivic (
playerCivic:GetProgressingCivic(), true
);
end

unlike techs though, it only seems to do the current civic but then I can't do it again. The current_civic_ID stays the same so I can't do it sequentially unlike with techs. Is there a way to change that or is that just due to AI behaviour?
 
So after all this time I found out why I can't do it sequentially, completely by accident. The AI seems to get stuck on that civic even after you give it to them. I have to manually remove the civic from them with firetuner and give it back for them to start civic researching again
 
Back
Top Bottom