Experience and Stat Rate Plugin(s)

dombo813

Veteran
Veteran
Joined
May 3, 2014
Messages
42
Reaction score
3
First Language
English
Primarily Uses
Hello kind Javascript knower!


I come to you today with what I think is probably quite a simple problem, so I hope you'll hear me out.


I have two particular plugins I would like made. The objective of these plugins is to make different actors have different specialisations and reasons to use them. The game I'm making lets each actor choose between two classes (which give access to 3 Advanced Classes when the appropriate levels are reached), however, many characters share some classes. Character 2 and Character 4 both have access to Mage, for example. At the moment, Character 2 as a Mage and Character 4 as a Mage both have exactly the same stats and there's no real reason to pick one over the other - they're all too adaptable. I would like Character 2 to be better at being a DPS as a Mage by giving them increased Mat and Agi, while Character 4 would be more of a magical tank Mage with increased Mdf and MHP. The same kind of things would be in place for other characters too, eg 3 and 6. Both have access to Priest, but 3 would be more of a buff-granter (with increased Luck, which affects the likelihood of buffs and debuffs activating) while 6 would make a better Healer with increased MHP (the amount of healing done by most spells is proportional to the user's maximum health).


Since I just realised that in MV, Experience Rate is an SP parameter, most of the Experience Rate plugin is no longer needed. All that's left is the class specific actor-XP-gain.


Experience Rate:


The first is a plugin that modifies the amount of experience a character receives based on a percentage model. This would need to be something I can apply to actors.


For Actors: An actor with the appropriate notetag would have the amount of XP they gain after defeating an enemy modified by a certain percentage, depending on the class they are. The notetag would be formatted as so: <exprate: (class number), +/-X%> For example:


The character Steve has the notetag <exprate: 1, +10%> (or something similar). Steve, when he is class 1, gains 10% extra experience for defeating enemies. Instead of getting 50 points for killing that bat, he would gain 55 points. Steve also has the notetag <exprate: 2, -20%>. When Steve is class 2, he gains 20% less experience, so that same bat would yield only 40 points. 


Stat Rate:


This is likely a more difficult plugin to make, but I have no idea how to make it so I don't know how much more difficult it actually is.


This would function in a similar way to Experience Rate, but would only need to apply to actors. An actor would have their base stats (before equipment) modified by a certain percent or solid value, while in a certain class only. For example:



Fred has the notetags <Statrate: 1, MAT, +10%>, <Statrate: 1, DEF, -20%> and <Statrate: 2, MHP, +30>


<Statrate: 1, MAT, +10%> means that while Fred is Class 1, his base Magic Attack stat is increased by 10% of its total, rounded up. Lets say that Class 1 Fred has 23 MAT at level 5. 10% of 23 is 2.3, rounded up is 3. Fred's base MAT is now 26. After that, Fred's equipment is added, so his +10 MAT tome takes him up to 36. 


<Statrate: 1, DEF, -20%> means that while Fred is Class 1, his base Defense is decreased by 20% of its total. His MAT is still increased by the first tag, since they're both class 1. His 16 defense becomes 12, because 20% of 16 is 3.2, rounded up is 4. After that, his armour brings him up to 20 defense.


<Statrate: 2, MHP, +30> means that while Fred is class 2, his base Maximum Health is increased by a flat 30 points, regardless of its original value. If Level 20 Class 2 Fred has 2000 HP, he instead has 2030 HP. Fred isn't Class 1 anymore, so his MAT boost and DEF reduction do not have any effect anymore. 


Thanks for reading this far, and thanks in advance if you decide to take this project up! You may claim any reward you desire (within reason!) - name a character, write a quest, access the beta versions... (although I don't intend to sell the game so the beta versions really just means being a balance tester :p)
 
Last edited by a moderator:

matthew30903

Veteran
Veteran
Joined
Jun 29, 2014
Messages
83
Reaction score
31
First Language
English
Primarily Uses
The simplest solution would be to make two mage classes for example, but to get the parameters working as desired you could use Yanfly's Base and Extra Parameter Control plugins.


Yanfly even provides an example of the JavaScript needed for the Class Based Parameters Plugin you can get it here:


http://yanfly.moe/2016/04/24/yep-95-class-base-parameters/


So lets say Harold is your tank:


<Custom mdf Formula>
if (this.name() === ‘Harold’) {
value = level * 30 + 300;
} else {
value = level * 25 + 250;
}
</Custom mdf Formula>


Now if the character is named Harold he will will have higher magic defense than others of the same class. You could use actor id or other things for the If statement.


As for stat rates, the base control plugin can help:


http://yanfly.moe/2016/03/25/yep-86-base-parameter-control/


Say put <mat Rate: 10%> tag in actor one should change their stat rate for magic attack.


Hope this helps.
 
Last edited by a moderator:

dombo813

Veteran
Veteran
Joined
May 3, 2014
Messages
42
Reaction score
3
First Language
English
Primarily Uses
The simplest solution would be to make two mage classes for example, but to get the parameters working as desired you could use Yanfly's Base and Extra Parameter Control plugins.


Yanfly even provides an example of the JavaScript needed for the Class Based Parameters Plugin you can get it here:


http://yanfly.moe/2016/04/24/yep-95-class-base-parameters/


So lets say Harold is your tank:



<Custom mdf Formula>
if (this.name() === ‘Harold’) {
value = level * 30 + 300;
} else {
value = level * 25 + 250;
}
</Custom mdf Formula>


Now if the character is named Harold he will will have higher magic defense than others of the same class. You could use actor id or other things for the If statement.


As for stat rates, the base control plugin can help:


http://yanfly.moe/2016/03/25/yep-86-base-parameter-control/


Say put <mat Rate: 10%> tag in actor one should change their stat rate for magic attack.


Hope this helps.
Ah, I see. Yes, that is incredibly helpful, thank you! 


2 things:


1. Do you know if it's possible to replicate the formula used by the original game system in the Class Base Parameters? Or perhaps, a way of using the initial value? so, something like 'value = Original * 1.1;' for a 10% boost?


2. With the Base Parameter Control, is there a way to apply the rate boost only if the actor is a certain class, using Lunatic Mode stuff? 
 

matthew30903

Veteran
Veteran
Joined
Jun 29, 2014
Messages
83
Reaction score
31
First Language
English
Primarily Uses
I do not know of a way to manipulate the stat rate formula, unfortunately it is not in the documentation as far as I can see.


You can try something like this, but I have not tried it myself:


<Custom mdf Formula>
if (this.name() === ‘Harold’) {
value = level * 30 + 300;
value *= 1.1;
} else {
value = level * 25 + 250;
}
</Custom mdf Formula>


This will take the value you set the first time (your vase value) and set value to 10% (value *= 1.1), but I do not know if this is what you want.


So if actor Harold is a level one mage his mdf is 363 (if I did my math right), but others will not get the 10% boost.
 

dombo813

Veteran
Veteran
Joined
May 3, 2014
Messages
42
Reaction score
3
First Language
English
Primarily Uses
Yeah, I got that far. I was just wondering if there was a parameter that denoted the original value or if I'd have to write out the base game's calculation formula again. That's not too hard though. Thanks for your help!
 

matthew30903

Veteran
Veteran
Joined
Jun 29, 2014
Messages
83
Reaction score
31
First Language
English
Primarily Uses
As far as I know, you will have to set the base value each time.


I am glad to be of help.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,849
Messages
1,016,975
Members
137,563
Latest member
cexojow
Top