Introduction
This script allows for you to have additional stats for your battler. Those are viewable on the default status screen for your convinece. To use them in damage formulas use xstat.(stat abriviation).
Actor/Class/Weapon/Armor/State/Enemy Notetags
Notetag | Effect |
<state_xstat: stat x%> | Sets the specified stat to be multiplied by x% |
Actor/Class/Enemy Notetags
Notetag | Effect |
<xstat> stat => formula, </xstat_end> |
Sets the xstat formulas up. Actor/Enemy formulas take precidence over the class formula. Be sure to put a collon on the stats. The formula can be any valid ruby exprssion that returns a number. |
Skill/Item Notetags
Notetag | Effect |
<xstat growth: stat x> | Changes the specified stat by x |
Weapon/Armor Notetags
Notetag | Effect |
<weapon_xstat: stat +x> | Sets the specified stat to be modified by x. Can be negative. |
Script Calls
Script Call | Effect |
change_xstat(actor_id, stat, value) | Alter the specified stat by the specifed value. Can be either positive or negative. |
Script Download
Will you marry me?
Lol 🙂
is there a way to use this with yanfly extra param formulas?
Yes, use xstat.(stat). That should work.
Your stat formulas doesn’t work!
What about them doesn’t work?
Can I make these stats a variable?
Never mind with the formulas, but I need to make sure two hits are possible when DEX (dexterity) is 32 or above.
Can you convert this into an RPG Maker MV plugin? Provided you are both willing and able?
what is the specific syntax i should use, this i what i tried and it didnt work.
hit_n_value = (atk + xstat.(per)) / 2
xstat.per is the correct syntax
Noel, RPG Maker MV came out two months ago, so you might be able to convert your scripts to MV Plugins!
Sorry to bother you Crystal Noel,i put and it worked. It increased that stat by 20 points,but it is possible to make that number negative?
Excuse me for my bad English and thanks for this great script.
Yes
Excuse me again Crystal Noel… I Found a little issue,for example if you have 50 of str and have a equipment that reduces that parameter by 60,it shows str-10.
Please take your time,i hate to bother people… I will try to learn scripting in the future…
Fixed, you may also set maxes now.
I’m not sure if it’s possible with this script, or if a modification can be added, but….
Can an addition be made to this script that allows the user to write formulae that determine MaxHP and MaxMP?
use the Stat Formula script that this guy made
Nice script, better than N.A.S.T.Y extra stats n_n Keep working!
when i make more than s new stats, the last three are cutoff at the bottom of the screen.
The script only shows the first six, extra stats.
and i get an error because i might have to many stats.
the error say ‘comparison of fixnum with nil failed.’
One of the formulas must be causing it.
I’m using a script that uses several windows for displaying actor status, how do i render different stats to multiple windows?
Generally, you have to go in an hard code it in place of other pieces of data. Let me see the script you’re using, and I will explain the best way to proceed.
http://www.rpgmakervxace.net/topic/17862-variable-status-menu/
I finished the script yesterday. all i need is to figure out how to render 12 more stats to the second bottom window.
I would think using an formula to determine how many stats fit on window. Then pick up on the next stat in the second window.
Can I at least get a look at the script code, I’ll remember to credit you.
i’m trying to set up the first 6 in a window but how i differentiate between the first 6 and the other 12?
heres what i got for the first 6
6.times {|i| draw_xstat_parameters( 0, 120 + line_height * i, i + 2) }
it seems default parameters are called differently than xstats in Game_BattlerBase
how do i render 18 extra stats to a both windows?
i have 6 stats rendered under the default and i’m trying to add the other 12 to the second window.
I would assume using an algorithm that offsets the first stat displayed in the window so the next window picks up where the last one left off.
Will I be able to create a class similar to the Onion Knight class from FF3? My class like that is called Spiral Knight. Their stats start off relatively low, but once they reach level 80, their stats begin to rise dramatically!
this is the line im trying to use to render stats to the second window
12.times {|i| draw_xstat_parameters(@actor, 0, 0 + line_height * i, i + 2) }
So when you draw it you add the number of stats in the first window to I. That should work, what does it look like in that line!
is there a way to have them show up in the Parameters section of Yanfly’s Status Menu? I’ve been looking over it constantly and i can figure it out
Ah, I meant the General section. I wanted to replace ATK, DEF, MAT, and MDF since they will be determined by weapons, and have the new stats be shown there instead
i cant render stats to the second window in my script at all.
Send the script to me and let me see if I can get it.
http://www.mediafire.com/download/ommrk8gl1xm536n/Variable_Status_Window.rar
Hey, Crystal.
Quick Q.
I know that in order to use formulas for skills that you have to use xstat.x, but I have stats like.
STR,VIT,INT,MND…
Damage dealt is calculated like this: a.atk * 4 + a.xstat.str – b.def + b.xstat.vit.
However, every time I do that, I get a value of zero damage.
If I try only: a.xstat.str or xstat.str, it gives me that value of damage to the foe.
But if I try: b.xstat.str, it still remains 0, I tried changing their stat formulas around, and put their stats in their enemy notebox, but still nothing. So, any help would be greatly appreciated. Thanks.
The formula is spitting out a 0 or lower causing no damage. Check the STR, VIT, ATK, and DEF stats of the battlers. Put the numbers into a calculator and see what you get.
Heh, thanks.
I figured it out, It wasn’t that I was setting up the formula the wrong way, but I guess it’s in the order of where I placed the script.
(I have some Victor Scripts, and the Yanfly limit adjustment thing.)
Thank you so much, though.
can you add a function that allows you to set where the stats cutoff into a new column
here’s an update to my script that combines the the stats columns into one.
it also displays the stats in two rows, but i cant figure out how to split the extra stats.
https://www.mediafire.com/?oqjyu1uxlslc7v5
i trying to make my own stat (DEX) and (AGL)
DEX- hit rate
AGL- evasion rate
is there any way to link the hit rate and evasion rate to DEX and AGL?
http://yanflychannel.wordpress.com/rmvxa/core-scripts/extra-param-formulas/
This should work
every time anyone attacks (that includes enemy), every body could evade the attack…
how do i fix this?
Can I use these stats as variables?
Thanks you very much! I love this script,just a little question… It is posible to make it compatible with Theo Display Parameter Changes? It is workin perfectly,but the xstat changes are not showing. Gracias nuevamente y perdoname si estoy molestando… No es obligacion hacer lo que te estoy pidiendo,pero si lo haces te estare agradecido de por vida. Disculpame por mi mal Ingles,soy Chileno.
http://theolized.blogspot.com.ar/2013/11/theo-display-parameter-change.html
Here try this:
https://docs.google.com/file/d/0ByRLSt9SYFG9MFpmRXA2S0I0UzQ/preview
Thanks you very much,my friend! It is working like a charm,sorry for the late reply. I have conection since a few days… Hope you have a prosperous 2014.
Sorry to bother you again… In a further test i noticed that xparameter value is not updating,for example: I put “” in a weapon,it shows the parameter change (+30) but the xstat continues being 23,but when i remove the moddified Display Parameter Change,the xstat value update,in this case 53. Here is a capture:
http://postimg.org/image/70aoozwyp/
That’s what it’s supposed to do
i have no idea how to split the xstats into two rows
the problem is im trying to add a second draw_actor_xstats, and i’m trying to set it at which number it starts at.
every time anyone attacks (that includes enemy), every body could evade the attack…
how do i fix this?
i used your link that leads to yanfly
http://yanflychannel.wordpress.com/rmvxa/core-scripts/extra-param-formulas/
but i need help
I’ve been trying to get the change_xstat to work. I’ve added it to an event and it does nothing.
Here’s the script call:
change_xstat(1, :str, 1)
The STR stat remains at 23.
Any ideas on why it’s not working?
Never mind. I figured it out. Stupid newbee mistake. I needed to get the id of the appropriate party member.
The script now reads:
temp = $game_party.members[0].id
change_xstat(temp, :str, 1)
Thanks,
Don Tuel
How do you put these stats into skills? Like 10+spi*2-b.mdf*2 or what?
10 + a.xstat.spi*2 – b.mdf*2
I want to know, I want to put a stat like HIT but with magical attacks? is there a way to make this with this script? how? and… Why I can’t see it? D: Thanks if you can solve that
could you take a look at my status window script and help me split the stats between the stat windows?
http://www.mediafire.com/download/pwcs4p29529kvq5/customwindow.rar
How could I assign an actors xstat to a variable or use it in a conditional branch? I have tried $game_actors[1].xstat.acr where acr is my xstat and it always crashes.
I take that back haha, sorry. It was a common event I was overlooking causing issues. Your script works great! Thanks a ton
I want help,
my stat is called effectivity.
I just want a WORKING example of this
stat => formula,
I
I do not understand how I shuld write the formula for my actor.
Hello, I’m having a problem with the script. I was just playing around with it when I discovered a potential problem. I have not seen another person report on this so I thought it might be a good idea if I did.
What I’ve been trying to do in my game is include way to calculate damage and damage resistance, similar to that of the FFRPG table top rules. Basically, I’m using my custom xstat.arm (i.e. armor) to add on the total def points from the armor being worn and then add a formula with that to get a final armor value.
The problem is that it won’t recognize the ‘def’ value in the formula below and it bugs out on me.
:arm => ‘def + ((level * 70) / 128)’,
Strangely if I did this…
:arm => ‘atk + ((level * 70) / 128)’,
… or this…
:arm => ‘mdf + ((level * 70) / 128)’,
… or any of the other main parameters, it accepts their values and works normally. I don’t know if this is a bug or if it’s conflicting with rpg maker vx ace program itself. I might even have just made a mistake somewhere, I don’t know. I do know that It’s not a problem caused by other custom scripts because I’m testing this script out on a testing project with no other custom scripts being used.
When it bugs out, it also give me this message…
Script ‘Crystal Engine’ line 314: SyntaxError occurred.
unexpected ‘*’, expecting ‘)’
def + ((level * 70) / 128)
Some help on trying to fix this issue would be greatly appreciated. Thank you.
Hello.
Two issues:
One: I’m trying to put a stat into a variable, but I keep getting errors.
I tried putting $game_actors[1].xstat.Burn_A into one, but it comes back with an fixnum to string error.
(Burn_A is the name of the stat)
Two: I’m using an instance script and adding upgrade to equips via note editing. However, the stats do not seems to be updating.
Do I need to reinitialize the stats somehow, or am I messing up somewhere?
I append the note with this call:
WEAPON_XSTAT: Burn_A +1 (plus the brackets)
Before adding it, the weapons have no stat related note tags at all.
I suspect it may work, but as I can’t seem to find the right syntax to apply, I won’t know.
As an aside, if I put xstat_plus[:Burn_A] in a formula, it seems to work, but I do not think it is correct.
Any help would be greatly appreciated.
Hi Crystal Noel
can you explain to me, what these new stats are doing? Do they affect something?
If I don’t use the stats in the damage formula they are just numbers, right?
Yeah, exactly
I get an error: undefined method for ‘+’ if I try to use the script call: change_xstat(1, 2, 58)
Say, may I request the ability to add stat plus/minus modifiers to all objects, not just equipment?
By what I mean is dynamic stats, like Spirit +12% (of base) or Strength +10. Especially do I like the +x% feature.
Kind of like this script, only, this script also only allows such features to equipment instead of all objects http://yanflychannel.wordpress.com/rmvxa/gameplay-scripts/equip-dynamic-stats/
Although I think there is something I’m not understanding with this script and enemy stats:
My damage formula is: (database_param(2)) + (xstat.str / 4) <– that which the ) fixed the error
However, while I can do damage fine, enemies cannot, even if I give them 99 STR, 16 hits and 500 ATK. It's NULLed out. So my guess is something is reading it as zero, but I do not know why. All my enemies have their own formulas in the noteboxes, but none of them can do any damage.
It could be my Attack Skill formula: (a.xstat.pwr * a.xstat.hit) – b.def * 2 – b.xstat.sta
with the enemies the PWR * HIT causing a x * 0 somewhere and reading 0 damage, but I have no idea.
So:
x = 3 (User's DEF)
y = 4 (User's STA)
z = 16 (Enemy's PWR) [Calculated from: (database_param(2)) + (xstat.str / 4)]
The base ATK formula: (a.xstat.pwr * a.xstat.hit) – (b.def * 2) – b.xstat.sta
(z * 1) – (x * 2) – y
(16 * 1) = 16 – (3 * 2) = 10 – 4 = 6 +- 1.2 (<– 20% variance on damage.)
So theoretically, it should do between 5-7 damage, but yet the enemy always does zero.
With 500 ATK, 99 STR, and 16 HITS (The maximum possible in my game)
PWR: 500 + 99/4 = 524.75 == 525
(525 * 16) = 8400 – (3*2) = 8394 – 4 = 8390 +- 1678
So theoretically, this should do between 6712 – 10068 damage, but even with these stats: when the enemy would attack a LV 1 character, it does zero damage.
I don't understand it. I got to be getting a times 0 somewhere in one of the formulas.
So I’m having an issue when I set my stats for the class they are being overrun by the DEFAULT_LEVEL_FORMULA given in the host script. Is there a way for me to make it so that this doesn’t happen? I want the stats to be based off of the actor’s class not the actor themselves. Thank you!
Hi CrystalNoel, thanks for the wonderful script! I have a question regarding its usage though.
When setting variables to xstat values for events, its quite easy for actor.xstats : I go for “control variables”, select the wanted variable and let it set by script with ” $game_actors[1].xstat.mystat “, for example.
Can I do the same with enemy xstats? $game_enemy[1] and $data_enemies[1] return errors.
Or do I have to create a new actor for every enemy, paste the xstats there and select the values then via $game_actors[31(orwhatever)].xstat.mystat ?
Thanks for the help and continue your great work!
I want to make a stat that shows on menu with 2 decimals, like 5.00
can you help me? @_@
Is it possible to make some stats, such as hit count invisible, that means they exist, you just can’t see them in the menu!
Crystal, would you happen to know how to have the changes to different xstats show when equipping weapons and armor? I only have two additional parameters, which are Attack and Defense, and I have weapons and armor only affect those stats. I just need to have those changes show on the equipment menu.
This script is exactly what I’m looking for, but I keep getting an error:
[
line 323: TypeError occurred.
can’t convert nil into String
]
All I’ve done is create 5 stats [:wgt,:pat,:mat,:pdf,:mdf], set each formula to zero, set each name to the capitalized version of each [ :wgt = “WGT” ], and changed the starting values of each according to player class.
I’d greatly appreciate any help or suggestions.
I was able to fix my earlier issue, but now I have a new one.
I am creating a total of 10 extra stats, the first 6 of which I want to appear.
I was hoping that the next 4 would be cut off, but they keep going down the screen.
Is there a way to either:
– show the last four in another column
– not show the last four (but the player still has them)
Hello Crystal,
Is their a way to get access to the xstats an equipped item grants you via scriptcall?
Something like
$data_armors[armor_id].xstat[xstat_id]
?
Greetings, Stefan