Flat stat bonus states (R2 24/11)

Astfgl66

Veteran
Veteran
Joined
Jan 5, 2016
Messages
703
Reaction score
549
First Language
French
Primarily Uses

Astfgl's Flat stat bonus states:
This is a small plugin that allows you to use notetags to give flat stats bonuses using states (instead of percentage based).

Version2: Added possibilty to refer to the affected character's own parameters when making a notetag.

Features:
  • Use notetags to give flat stat boosts to actors or enemies
  • The stat boosts can be fixed, variable based, or based on the affected's own parameters.
Compatible with Yanfly passive states, other state modifying plugins not tested, use at your own risk.

Notetag list:

<atkB:>
<defB:>
<mhpB:>
<mmpB:>
<defB:>
<mdefB:>
<agiB:>
<lckB:>

To refer to the user parameters:

user.hp //current hp
user.mhp //maximum hp
user.mp //current mp
user.mmp //maximum mp
user.tp //current tp
user.atk //attack
user.mat //magic attack
user.def //defense
user.mdf //magic defense
user.agi //agility
user.luk //luck

Examples:
  • <mhpB: 1000> in the state 4 (poison) notebox will make anyone affected by poison have 1000 more maxHP.
  • <atkB: 10 * v(1)>, will boost the affected charachters atk by 10 times the value of variable 1.
  • <lckB: 10*v(1) - 50> will boost luck by 10 times variable 1 - 50.
  • <mhpB: 10 * user.mmp> will boost hp by 10 times max mp. !NEW!
  • NOT A BUG: You can't use the same parameters you're boosting in the formula or you'll get an error. So you can't have <mhpB: user.mhp> That would be silly anyway because you can do that already in editor by using a 100% max hp boost.

The bonus is removed with the state.
You can, of course, use a negative value to reduce the parameter.
For those with some javascript knowledge: the notetags are evaled and user refers to the actor or enemy object so you can grab everything, not just parameters if you want. Have fun!

Pictures for clarification:
Variable based boost:


1- First event, setting the state on actor 1 and variable 10 to 0
2- Setting variable 10 to 10
3- State 4 (poison) notebox
4-Menu before speaking to event 1
5-Menu after speaking to event 1 but before speaking to event 2
6-Menu after speaking with event 1 and 2.

In this example I used the full "$gameVariables.value(10)" command, but you can use "v(10") for the same effect.

How to use:
Plug and play. There is no configuration necessary, no parameters to set.

Download: here on pastebin

Terms of use:
Can be found inside the script file for reference.

Free for commercial and non commercial use. Credits not required.
Free to edit and repost as long as it is kept under the same terms of use.
Do not claim as your own.

Known Bugs:
None.
Post in the thread or send me a PM if you have any trouble using this plugin.
Concerning incompatibility issues: I might release further compatibilty patches if asked, but no promises.


As always, I am open to suggestions for improvement.
Have a nice day and happy game making!


Author: Astfgl
Date: 24/11/2016
Version: RC2
Original request topic for reference:

 
Last edited:

Astfgl66

Veteran
Veteran
Joined
Jan 5, 2016
Messages
703
Reaction score
549
First Language
French
Primarily Uses
Hi everyone! Just to let you know that I made a small update for this plugin: you can now make the bonuses based on the affected's own parameters. So you can now have a state that boosts atk by the value of agi, or a state that boosts max Hp by the current mp if you want.


Just don't use the same parameter you're boosting in there or you'll get a crash. No boosting max hp by the value of max hp in the notetags. Just use the editor's hp boost trait.


Thanks to @Doktor_Q for the idea!
 

CrappyName

Villager
Member
Joined
Jul 7, 2016
Messages
25
Reaction score
2
First Language
English
Primarily Uses
I'm using your plugin because I think it is simple yet awesome. I noticed that you use "matk" and "mdef" for magic attack and magic defense. It confused me at first why "mat" and "mdf" weren't working. Just pointing that out for anyone else who might use this.

Thanks for the cool plugin! I'm using it to make my 4 actors have unique stats bonuses that scale with their level and stay with them no matter what class they change to. That way the player has to think about which actor they want to be which class. If all 4 actors are a Warrior, they will all have different stats.
 

Astfgl66

Veteran
Veteran
Joined
Jan 5, 2016
Messages
703
Reaction score
549
First Language
French
Primarily Uses
Thanks for letting me know!
It's always nice to know someone else uses your work.

Have a nice day and happy game making!
 

Alphaistimz

AlphaDio Production
Veteran
Joined
Jul 19, 2018
Messages
88
Reaction score
6
First Language
Indonesian
Primarily Uses
RMMV
just find this awesome feature
but what I need is flat HIT bonus on weapons... which is ex-parameter
also I have SKILL instead of MP will this work with that?
(I don't understand coding except I get the format, so I will get confused with editing it)
 

Astfgl66

Veteran
Veteran
Joined
Jan 5, 2016
Messages
703
Reaction score
549
First Language
French
Primarily Uses
It doesn't matter how you name your parameters, in engine they are always registered under the same thing: mp, hp, etc...
So to give a skill flat boost, assuming it's renamed mp, use the mp notetag.

Unless I'm mistaken hit rate is already a flat boost, so you'd just have to use the trait field. Note that default hit formula is unintuitive anyway and a flat 5% hit rate boost will not amount to a 5% increase in successfull casts.
 

Alphaistimz

AlphaDio Production
Veteran
Joined
Jul 19, 2018
Messages
88
Reaction score
6
First Language
Indonesian
Primarily Uses
RMMV
I'm using Yanfly's plugins to have custom ex and sp parameters.
Sorry for not being clear, but SKILL is completely new parameter I have, and I remove MP completely because it's unneeded.
I'm currently making fire emblem-like game for reference...
 

Astfgl66

Veteran
Veteran
Joined
Jan 5, 2016
Messages
703
Reaction score
549
First Language
French
Primarily Uses
Then you're out of luck with this plugin, it doesn't support anything but default regular parameters.
I'd check the plugin you use for extra parameters, it's likely they have a way to add to it manually in game. Then you just have to use yanfly's buffs and states core to add to the param when the state is applied and remove to it when it's removed.
 

pasunna

Veteran
Veteran
Joined
Feb 3, 2019
Messages
509
Reaction score
197
First Language
thai
Primarily Uses
RMMV
sorry I misunderstanding
the yanfly plugin already do what I want
 
Last edited:

Astfgl66

Veteran
Veteran
Joined
Jan 5, 2016
Messages
703
Reaction score
549
First Language
French
Primarily Uses
I don't understand what you want to do at all.
Could you rephrase that ?
 

pasunna

Veteran
Veteran
Joined
Feb 3, 2019
Messages
509
Reaction score
197
First Language
thai
Primarily Uses
RMMV
sorry I misunderstanding
the yanfly plugin already do what I want
 
Last edited:

Astfgl66

Veteran
Veteran
Joined
Jan 5, 2016
Messages
703
Reaction score
549
First Language
French
Primarily Uses
Where did you get the mhp Plus notetag from?
The correct notetag is <mhpB:>.
 

pasunna

Veteran
Veteran
Joined
Feb 3, 2019
Messages
509
Reaction score
197
First Language
thai
Primarily Uses
RMMV
sorry I misunderstanding
the yanfly plugin already do what I want
 
Last edited:

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

Latest Threads

Latest Profile Posts

Hi, there.
I'm Creta Park, as Software engineer and Indie game developer.

Profile : creft.me/cretapark
GitHub : github.com/creta5164
Blog : creta5164.tumblr.com


My stuff

Who shares/sells their scripts/plugins on itch.io? Can I pick your brain?
If you ever need fantasy names and you're bored, make a fictional alphabet. Switch around the letters and see what you get :p
I JUST GOT PROMOTED TO 9TH GRADE BOIS!

Forum statistics

Threads
98,168
Messages
949,923
Members
129,455
Latest member
DeathByPiercing
Top