Windows Taking Perks messes with scripted variables

flogi

Refugee
Version
2.1
Platform
Windows
So it seems the 2.0 update and subsequently updates have broken variables when perks are taken.
I have made a mod that introduces learn by doing experience gain by counting up variables and giving out levels when variables are reached.
2.0 and upwards broke my mod without apparent reason, it was all working fine before.

Now my learn by doing perks get random XP added (=the variable is counted upwards) with no reason for it I could find in the files (both mod and game) when they shouldnt obviously.

I assume there is something broken either with the triggers here. This could cause tons of vanilla issues as well with variables.
Take a look at the youtube vid to reproduce the issue.
 
Reproduction Steps
Ideally take a look through this mod that has been working since it got released with that method.

1) Start a frest game
2) Observe that experience on the "Leadership" Learn by doing perk is 0 at game start as it should
3) Cheat yourself some xp
4) Observe that after you level up and buy a random (vanilla, whatever) perk, that you just got XP
--> random variable is changed even though it shouldnt have been changed
Link to Logs
https://pastebin.com/cqxPHXc4
Link to Screenshot/Video
https://www.youtube.com/watch?v=5H79pjPcBWk
I bet the first question from QA would be: Without your mod, does vanilla have the same behaviour?
No it does not, cause vanilla does not do variable calculations in the progression file.
But as it was working before and I have not changed anything it has to be some game bug and I doubt that this was intentional.

But even If something was fishy with my code, how would be taking vanilla perks, totally unchanged by my mod also change a variable added by me?

Taking perks does not seem to change vanilla variables though.
 
I think I figured out what the bug exactly is:
It seems like "onPerkLevelChanged" triggered effects are called everywhere in the progression file regardless of which perk is interacted with and where they actually are, as soon as their general requirements are met.

<effect_group>
<requirement name="ProgressionLevel" progression_name="flogi_perk_20" operation="LT" value="100"/>
<triggered_effect trigger="onPerkLevelChanged" action="ModifyCVar" cvar="$flogi_perk_20_XP" operation="add" value="@$flogi_perk_20_LvlNextAdd"/>
<triggered_effect trigger="onPerkLevelChanged" action="ModifyCVar" cvar="$flogi_perk_20_LvlNextAdd" operation="multiply" value="@$AS_XP_Mult"/>
<triggered_effect trigger="onPerkLevelChanged" action="ModifyCVar" cvar="$flogi_perk_20_LvlNextTotal" operation="add" value="@$flogi_perk_20_LvlNextAdd"/>
<triggered_effect trigger="onPerkLevelChanged" action="ModifyCVar" cvar="$flogi_perk_20_Lvl" operation="add" value="1"/>
</effect_group>

This was the part of code that was called from every single perk, whenever a different perk was taken, thus changing my variables.

EDIT: Looks like I cannot edit my previous report.


So the bug actually is as described in this post!
 
I think I figured out what the bug exactly is:
It seems like "onPerkLevelChanged" triggered effects are called everywhere in the progression file regardless of which perk is interacted with and where they actually are, as soon as their general requirements are met.
Did you try moving the requirement into the triggered_effect? It might be a deliberate change.
 
What bug is there to solve then? Or are you asking to "fix" your mod? Again, i doubt any time and resources will be put into fixing a mod.

Well the "onPerkLevelChanged" trigger being triggered for all the perks once you take a random one is surely a bug that should be fixed.

Did you try moving the requirement into the triggered_effect? It might be a deliberate change

No I fixed it differently by removing the code blocks that were triggered falsely and handling it via buffs.
 
Back
Top