First of: Thanks for considering to put some brain juice into this.
Some backstory:
I have a Skill that is an Avalanche in theme. That Skill repeats it self again with the use of "earth tokens". (as more rocks means more Avalanche). The Actor has a lot of skills that after use give him "earth tokens" to boost the skill. In reality the Earth Tokens are the Variable 51.
The Problem:
I had the great idea to add a piece of armor that passively, every turn, Ups the Variable by 1.
But no success in making it.
The solution:
The most promessing thing i could try was what google spat out~
which i just now fund in the RPG MZ script call Library as Add to variable
$gameVariables.setValue(variableId,
$gameVariables.value(variableId) + value);
But as i have no knowledge of JS Script, i don´t know how to use it or where to put it.
My first guess was to put it in the Notes.
and Yes i´ve put a 51 where the ? was. I also tried it as a state that is given passivly by wereing the Armor or geting the state via using a skill. Since using <Passive State: xxx> sometimes does not work.
And sorry for the long text. I feel like I´m realy bad at discribing what my problem is~
There is a way because the game tracks it.
Yeah, all i did was ask google "RPG MZ Up a variable by one each turn in battle passivly" or something and got the JS code from the first post 😅 which obviously did not work so I was wandering if there is a way of making the Idea work without using Troop Events. I mean ~ i tried to reserch how google thought it could work and tried to figure out if that it was even a thing but it is too far out of my wheelhouse so i posted a thread in here if someone with exp. had a quick idea how to make the Idea work.
EDIT: I mean there are a lot of great tutorials and examples here (like "how-to-implement-every-possible-yanfly-tips-tricks-effect-in-mz-with-visustella") that got me wondering if i could do it with JS code but as i don´t have the knowledge, all i could try was find something adjacent -> rewrite it for my purpose and be happy with the result and what i learned from it... Buuuuut i found no such thing... exept the "$gameVariables.setValue(variableId, value);" from a script calls library google doc and the knowledge something like <JS Post-Damage> </JS Post-Damage> exists.
reading nowadays are hard....
but reading carefully or check demo (if exist) is finding the key of your mistake ^^