Glyxis 5 Posted April 14, 2014 (edited) Hi. This is quite that what i'm searching for, BUT there's one problem: Like Gorlami said; I want to item to change these stats. There isn't very much extra stats scripts (actually this is only which I found), so is there way to do that? Oh Never mind ^^ Found other script, which suits perfectly for me (http://forums.rpgmakerweb.com/index.php?/topic/15015-crystal-engine-extra-stats/) Edited April 14, 2014 by Glyxis Share this post Link to post Share on other sites
Exmailianix 0 Posted May 16, 2014 Is there a way to make a stat start at a specific number and then follow a formula upon leveling up and that is different for each character? Share this post Link to post Share on other sites
halrawk 11 Posted June 15, 2014 Is there any way to grow an xstat with an item? I'd like to create a potion that increases str permanently by 1. Share this post Link to post Share on other sites
ZombieBear 66 Posted June 25, 2014 (edited) @halrawk: I was actually looking on here trying top figure out the same thing, then I figured it out. Gotta' love when that happens! To do this set you item damage to "HP Recover" to bring up the damage formula box, then put this into there: "b.xstat.str += 1". To make it work even if your actor HP is full I also have the item add and remove a dummy state, just a blank state that does literally nothing. You can call it something like grow stat (or whatever you want). Hope that helps! EDIT: @James Griffin: I'm not sure what it is you're going for, but I think you're trying to make formulas that round up instead of using the default way the stats are handled, which is to truncate that value to an integer. I made this change: def z26variate_stats(stat, level, adding = true) return if Z26.actor_level_formulas(@actor_id)[stat].nil? if Z26.actor_level_formulas(@actor_id)[stat].is_a?(String) amount = eval(Z26.actor_level_formulas(@actor_id)[stat]).to_f else amount = eval(Z26.actor_level_formulas(@actor_id)[stat].round).to_f end if adding eval("@xstat.#{stat} += #{amount}") else eval("@xstat.#{stat} -= #{amount}") end end This changes the value to float and it automatically rounds up. However, this doesn't work on division... not sure what's going on there, but if you get creative with your formulas you can derive something that works, it just may be rounded down here or there. Edited June 25, 2014 by ZombieBear Share this post Link to post Share on other sites
AnxiousMonkey 1 Posted August 20, 2014 I'm using some Yanfly scripts (Big Surprise), and I just found this, a tad late if I say so. I'm wondering how to modify it to be compatible with Yanfly's Status Menu script, it has an area where you can have it display whatever stats you want, but me being the coding fool I am can't manage to get the Xstats to show up there. Not sure how to identify the stats in code. Share this post Link to post Share on other sites
Yukijin 7 Posted January 1, 2015 (edited) I was searching in the topic but I didn't find anything related to my question Is there a way to make the weapon bonus add to the formula? The formula I have right now, for one of the stats, is the following. class Game_BattlerBasedef speedbase = 23bonus = 3 range = (level * 3 / 10) + ((level * 3 + bonus) / 32)base + rangeendend If I have a weapng with the notetag '<weapon_xstat: Strength 5>' and a Armor with the notetag '<weapon_xstat: Strength 2>' I would have a temporary bonus of 7 Strength added to the Strength stat while this 2 equipment are equipped. However, I would like to keep that feature and to add the option of adding that value to the formula. It would become something like this (it may have some errors tho): class Game_BattlerBasedef speedbase = 23ebonus = x # [this value would accumulate and would be equal to the <weapon_xstats: > I have equipped. i'll give examples bellow]bonus = 3 + ebonusrange = (level * 3 / 10) + ((level * 3 + bonus) / 32)base + rangeendend Ex, using the Strength stat: • Actor 1, let's call it Steve base Strength is 23. He is lvl 1 right now and haves equipped a Sword, with the notetag <weapon_xstat: Strength 1> and a armor with the notetag <weapon_xstat: Strength 3>. • Since he starts with 23 Strength, he will have right now, 26 Strength (the base plus the notetags) • Steve now goes from lv1 to 2, which will make the stat formula work class Game_BattlerBasedef speedbase = 23ebonus = 4 # [since it's the base]bonus = 3 + 4range = (1 * 3 / 10) + ((1 * 3 + 7) / 32)23 + 0,3125 # 23,3125 = 23endend At lvl 2 Steve haves 23 Strength plus 3 temporary bonus from his equipment. Steve then takes his armor into a chainmail with the notetag <weapon_xstat: Magic 3>, losing his 2 bonus of Strength. After this he goes up to level 3. class Game_BattlerBasedef speedbase = 23ebonus (the ebonus now would be 4) = 5 # [the total would be 5]bonus = 3 + 8range = (2 * 3 / 10) + ((2 * 3 + 8) / 32)23 + 0,3375 # 23,4375 = 23endend He would still had 23 Strength, the ebonus now would be 5, and his temporary bonus would be 1, making his total Strength 24. Hower Steve now changes into a sword with no Notetags, making his Strength 23. I hope I didn't make the explanation too confusing (I tend to do that since English is not my main language ^^" Edited January 16, 2015 by Yukijin Share this post Link to post Share on other sites
+ Jinumon 29 Posted April 2, 2017 I'm having some trouble implementing this script. I set the defaults with a simple: STATS = [:Arms,:Armor] #Default xstat formulas for ACTORS DEFAULT_LEVEL_FORMULA = { :Arms => 0, :Armor => 0, } #Default xstat formulas for ENEMIES DEFAULT_FOR_ENEMIES = { :Arms => 0, :Armor => 0, } I then added a: <weapon_xstat: Arms 5> to some weapons, playtested, and double-checked my characters stats to make sure the weapons were increasing his Arms stat, everything's peachy. I then changed the base "Attack" skill damage formula to: a.xstats.Arms - b.xstats.Armor .... No damage. Everything takes no damage. I made sure to add a: <xstat>:Arms => 10,:Armor => 0,<xstat_end> tag to the enemy's notes, but still nothing. I've tried adding parentheses () to the damage formula for good measure, but I'm not getting anything. With a base Armor of 0 and Arms of 5 or 10, I should be dealing damage equal to my Arms stat, shouldn't I? What am I doing wrong? Jinumon Share this post Link to post Share on other sites
Sixth 113 Posted April 3, 2017 You deal no damage because your formula got a syntax error (trying to call a non-existent method), which would crash the game if not for that rescue call which simply returns 0 for damage if something goes wrong. You used: a.xstats.Arms - b.xstats.Armor Instead of: a.xstat.Arms - b.xstat.Armor Also, it is bad habit to start variable names with a capital letter. It's understandable if you are not too code-savvy yet, but using capital letters can cause some problems in some specific cases, so you should stick with lowercase variable/setting names just to be sure. Share this post Link to post Share on other sites
Gabre 0 Posted November 22, 2017 (edited) Question: I have created the stat "sres". But when I use the stat, for example with "b.xstat.sres" as an enemy resistence stat, the whole skill deals no damage. And yes, I have created the stat for enemies and it is by default 0 (":sres => 0,"). edit: (completly forgot about that one). I found out that I somehow managed to write ":sr'es" and did not noticed that until I picked up the project again Edited February 1, 2018 by Gabre Share this post Link to post Share on other sites
AbyssalRabbit 0 Posted February 16, 2019 (edited) can I change xstat when an event is triggered? (And xstat will not increase when level up) for example Every time an actor is speaking with some NPC, and then Actor's xstat going to -1 (-1 each speaking with NPC) ** sorry I'm not good English Edited February 16, 2019 by AbyssalRabbit Share this post Link to post Share on other sites
TheRexYo 0 Posted August 10, 2019 Okay, well, I'm new to this form and I'm not quite sure this is going to work, but I'll ask anyway. Is there a way to get an enemy's stat to a variable (I need to so that I can utilize Yanfly's Enemy Level script to increase the stat based on the enemy's level)? Thanks in advance, TheRexYo P.S. - Your script's awesome! Share this post Link to post Share on other sites
roninator2 257 Posted August 11, 2019 $game_variables[X] = $game_troop[X].xstat.str should work Share this post Link to post Share on other sites
Vodun 7 Posted December 17, 2019 Hello, got a question. (in this pretty old topic) Can I use variables instead of values like "'(level/3.5) + 16', " in this script? I tried using $game_variables[id] but the script seems to not recognize it. (in both actual script and actor note). I would appreciate help. Share this post Link to post Share on other sites