Character Synergy Boosts? Or variable based on stats?

RMVNex

Some guy from the internet...
Veteran
Joined
Nov 26, 2016
Messages
56
Reaction score
8
First Language
FR (Perfect EN)
Primarily Uses
N/A
Bold blue part is why I want to do this, and then the bold green part is just the question itself. Just skip to the question if you don't care.

My game has 16 different characters (planned, might be more, might be less).

I'm using many different ways to encourage players to use different characters, but for the most part players will only use these characters when it gives them a major benefit, big enough for them to temporarily drop their super-upgraded characters for these maybe less-upgraded characters. So it's nothing long-term. I was thinking one way to really make players use these other characters for a long-term amount of time would be this "synergy" system. It would boost one character's stat by an amount based off another character's stat. I know how to do most of this, however the only big thing I'm missing is...


How would I do that a stat increases a variable by a certain amount? For example, one character's luck would increase this variable by 1 for each 4 luck. Or would it at least be possible increase this variable by 1 for each luck point. I have an alternative, that would completely change how this "synergy" system would work, but it wouldn't be as good as this one in my opinion. The rest I know how to do.
 

Aloe Guvner

Walrus
Veteran
Joined
Sep 28, 2017
Messages
1,628
Reaction score
1,115
First Language
English
Primarily Uses
RMMV
You sound like you've already thought about this a bit so I'll give you some Script calls to try without too much explanation. In any Event (map, troop, or common) you can try these to see if it will help.

Code:
var x = 1; //Variable number you wish to set
var a = 2; //Actor number to use
var d = 4; //Denominator of the fraction where every 4 luck is 1 value

$gameVariables.setValue(x, $gameActors.actor(a).luk/d);
//"Sets" the value of Variable 'x' to the Luck of Actor 'a' divided by 'd'
Code:
var x = 1; //Variable number you wish to set
var a = 2; //Actor number to use
var d = 4; //Denominator of the fraction where every 4 luck is 1 value

var val = $gameVariables.value(x);
$gameVariables.setValue(x, val + $gameActors.actor(a).luk/d);
//"Adds" the Luck of Actor 'a' divided by 'd' to the value of Variable 'x'
I believe that by default it rounds down any fractions.
 

RMVNex

Some guy from the internet...
Veteran
Joined
Nov 26, 2016
Messages
56
Reaction score
8
First Language
FR (Perfect EN)
Primarily Uses
N/A
You sound like you've already thought about this a bit so I'll give you some Script calls to try without too much explanation. In any Event (map, troop, or common) you can try these to see if it will help.

Code:
var x = 1; //Variable number you wish to set
var a = 2; //Actor number to use
var d = 4; //Denominator of the fraction where every 4 luck is 1 value

$gameVariables.setValue(x, $gameActors.actor(a).luk/d);
//"Sets" the value of Variable 'x' to the Luck of Actor 'a' divided by 'd'
Code:
var x = 1; //Variable number you wish to set
var a = 2; //Actor number to use
var d = 4; //Denominator of the fraction where every 4 luck is 1 value

var val = $gameVariables.value(x);
$gameVariables.setValue(x, val + $gameActors.actor(a).luk/d);
//"Adds" the Luck of Actor 'a' divided by 'd' to the value of Variable 'x'
I believe that by default it rounds down any fractions.
Seems like it'd do exactly what I want. This is to control the variable, correct? Thank you very much for your help though, I really do appreciate it!
 

Aloe Guvner

Walrus
Veteran
Joined
Sep 28, 2017
Messages
1,628
Reaction score
1,115
First Language
English
Primarily Uses
RMMV
Yes, doing it the way above will set or add value for whichever game variable you wish. Then, you can read/check/control the variable just like usual in event commands.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,865
Messages
1,017,059
Members
137,575
Latest member
akekaphol101
Top