-
February 05, 2016, 01:59 PM
#1
Laetus
Unexpected issues in triggering effects
Since i don't really know where else i should bump my head, I have come here to share with you a situation.
I have written a script that updates a global variable (named trust) as a consequence to some player's actions. When this variable hits some edges, at faction start and at every turn, it triggers an effect, coded into the database, showing, as a normal effect of the db coding, a label "Trust" in the summary screen, under the imperium one.
It worked properly at the beginning of my functional tests.
I'm not sure what's going on in my installation files or whatever but it seems that since 2 days ago i just can't see this label anymore.
I tried other authors' mods with similar behaviours and discovered that neither "Prominent Faction leader" or "War Weariness" show that label anymore (they always worked well).
The following is a simple extract of my LUA.
local function Prime_FactionStartTurn(context)
local n = context:faction():name()
Prime_ResetEffects(n);
Prime_ApplyEffects(n);
end
prime_script.AddEventCallBack("FactionTurnStart", Prime_FactionStartTurn);
where :
function Prime_ResetEffects(faction_name)
prime_script.game_interface:remove_effect_bundle("prime_trust_1", faction_name);
...
end
function Prime_ApplyEffects(faction_name)
if trust >= 0 and trust < 20 then
prime_script.game_interface:apply_effect_bundle("prime_trust_1", faction_name, 1);
...
end
It looks like nothing is displayed anymore in the summary panel.
Any eventual help would be appreciated.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules