Crystal Engine - Extra Stats

Crystal Noel

Veteran
Veteran
Joined
Jun 17, 2012
Messages
113
Reaction score
32
First Language
English
Primarily Uses
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
<state_xstat: stat x%> Sets the specified stat to be multiplied by x%

Actor/Class/Enemy Notetags
<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
<xstat growth: stat x> Changes the specified stat by x

Weapon/Armor Notetags
<weapon_xstat: stat x> Sets the specified stat to be modified by x
 
Script Calls
change_xstat(actor_id, stat, value) Alter the specified stat by the specifed  value. Can be either positive or negative.

Script Download
http://crystalnoel42.wordpress.com/2013/07/05/crystal-engine-extra-stats/
 
Last edited by a moderator:

Probotector 200X

Probotect and Serve
Veteran
Joined
Mar 14, 2012
Messages
913
Reaction score
168
Primarily Uses
Whoa, looks, like, one of those scripts that I really always wanted! This...the new stats can do anything the default stats can do, right???

Well, that gets me thinking...is there any possibility this could also be used to make more "Points" stats, you know, HP/MP/TP? Or would that be a different kind of script? It's just...you can use HP/MP/TP in just about the same ways as normal stats, equipment can raise it, traits/features can alter it, and so on.

Also, what about "Growth" effects? Can you make items or whatever that "grow" extra stats?

This script already looks awesome, but, with those things too, that would be...whoa.
 

Crystal Noel

Veteran
Veteran
Joined
Jun 17, 2012
Messages
113
Reaction score
32
First Language
English
Primarily Uses
That is a different script. I have seen one before, but I can't seem to be able to find it anymore.

I just added the growth effect today. Re download the script for growth effects.
 

Probotector 200X

Probotect and Serve
Veteran
Joined
Mar 14, 2012
Messages
913
Reaction score
168
Primarily Uses
Alright then. I'll have to look for that then!

Thanks for adding the growth effects! I can definitely use this script in a few projects, one of which I'm currently working on!
 
Joined
Apr 30, 2012
Messages
216
Reaction score
35
First Language
Spanish
Primarily Uses
Sorry to bother you Crystal Noel,i put <weapon_xstat: str 20> 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.
 
Last edited by a moderator:
Joined
Apr 30, 2012
Messages
216
Reaction score
35
First Language
Spanish
Primarily Uses
I tried different metods but nothing worked...

<weapon_xstat: str -12>

<weapon_xstat: str - 12>

<weapon_xstat: -str 12>

Could you explain how it should be?

Please...

PD: I finally understood how to use the formulas for skills,no bugs so far. I love this script.
 
Joined
Apr 30, 2012
Messages
216
Reaction score
35
First Language
Spanish
Primarily Uses
Thanks you very much! :D

It works like a charm,good luck in your future projects.

EDIT:

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.
http://s22.postimg.org/4rjyeelbl/Sin_t_tulo.png
Please take your time,i hate to bother people… I will try to learn scripting in the future…

 
Last edited by a moderator:

exodus1386

Villager
Member
Joined
Jul 18, 2013
Messages
20
Reaction score
0
Primarily Uses
nevermind found the fix. and yea this xstat is actually working right for me. my other one was not updating the stat if it was based off a base stat properly.

thank you for the script
 
Last edited by a moderator:

Probotector 200X

Probotect and Serve
Veteran
Joined
Mar 14, 2012
Messages
913
Reaction score
168
Primarily Uses
Finally got around to testing this out in my project, awesome as expected.

But...two things.

One, is there anyway to have stat limits for the extra stats? Like, one of the stats can't go over 100? I tried adding STAT_MAX after the STAT_MIN section, but nothing happened, which is surprising, because at least I thought it would cause an error!

Two, buffs and debuffs? Anyway to have those for the extra stats?

Thanks again for the awesome script!
 

Hallse

Warper
Member
Joined
Jul 11, 2013
Messages
1
Reaction score
0
Primarily Uses
Hi Crystal, thanks for your script. I'm wondering if there is a way to access to the xstat with applied item bonuse from a script. I can access the base stat via $game_actors[id].xstat_plus[stat], but the item bonuses do not add. For exemple, I'd like my conditional branch to work if my SPI > 50 (including SPI inducing items) with a script condition. Sorry to bug you out, but I can't figure out how to do it, since I don't understand how to apply an actor ID to the "eval("actor.xstat.#{stat}")" command you use to draw the stats.
 
Joined
Aug 13, 2013
Messages
1
Reaction score
0
First Language
English
Primarily Uses
EDIT:  found the error, it was mine.  sorry!
 
Last edited by a moderator:

ruinlight

Warper
Member
Joined
Oct 16, 2012
Messages
2
Reaction score
1
First Language
English
Primarily Uses
Hey Crystal Engine Master. Love this script by the way. Though I was wondering.

When using xstats in damage formulas, how do I access the foe's extra stats. 

EX: a.xstat.str + a.atk - b.xstat.vit + b.def or

      actor.xstat.str * 2 + a.atk * 4 - enemy.xstat.vit + b.def * 2

Every time I keep trying to access the foe's xstats, damage returns to 0.

Any pointers would be a great help. 
 

Glyxis

Villager
Member
Joined
Jun 19, 2013
Messages
20
Reaction score
1
First Language
Finnish
Primarily Uses
Hi. This is almost what i'm, searching for, but i have couple issues: First. I want to use icons (maybe only the icons and no text) before parameter numbers. Is there way to add icons?

And second issue: It is possible to have more than 6 stats? I mean 7th stat goes atop of the  character's description box. I can't find option which shrinks the text size or create second row beside etc.
 
Last edited by a moderator:

VicWhite

Star rover
Veteran
Joined
Sep 22, 2014
Messages
261
Reaction score
186
First Language
Spanish
Primarily Uses
N/A
Great script, congratulations. Some games simply need more stats and now this is possible thanks to you :)
 

Oddball

Veteran
Veteran
Joined
Sep 4, 2014
Messages
1,919
Reaction score
529
First Language
English
Primarily Uses
N/A
can you change what the stat does?
 

Maliki79

Veteran
Veteran
Joined
Mar 13, 2012
Messages
762
Reaction score
325
First Language
English
Primarily Uses
N/A
Hello.

I dropped this on your script page but got no response.

Thought I'd put it here and see if my request has better luck:

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.
 

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,145
Reaction score
815
First Language
Hungarian
Primarily Uses
RMVXA
I just started experimenting with this script.


Your first issue can be solved by using this:

eval("$game_actors[1].xstat.#{:str}")Replace ':str' with your xstat symbol (can be found at the 'STATS' settings in the script).
Replace the ID of your actor accordingly too.


Put this into a variable, or you can just use it directly in a conditional branch by using the 'Script' method there, like this:

eval("$game_actors[1].xstat.#{:str}") >= 50This returns true if the actor with the ID of 1 got at least 50 STR.
Edit:


Just tested another method and it works too:

$game_actors[1].xstat.strReplace 'str' from the end with your xstat's symbol.
But this will count in any bonus xstat too, from equipment and so.


No idea how to check for the base xstats without the bonuses.


"$game_actors[1].xstat_plus[:str]" always returns 0 for every actor and for every xstat for me. >.>


For the second question, I use this:

<WEAPON_XSTAT: STR +11>It works even on an instanced item for me.
Replace 'STR' with your xstat's name (can be found at the 'TERMS' settings in the script).


Edit2:


Nevermind the above crossed lines. I tested it further to make sure if it is the name or the symbol what is needed. It seems that it is the symbol without the colons.


So, use the symbol, not the name!
 
Last edited by a moderator:

Maliki79

Veteran
Veteran
Joined
Mar 13, 2012
Messages
762
Reaction score
325
First Language
English
Primarily Uses
N/A
Thanks for the help.

I believe I found the issue I was having: I didn't input the stats correctly.

However after fixing that, I still had issues manually changing stats (which is a necessity for my game.) which was one of the reasons I was trying to put the value into a variable.

This script, while clearly very powerful, isn't user friendly enough for me to edit the way I need to.

I'll have to look for something else.

:-(
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Yesterday I made my first step towards eating more healthily.
I saw candy on discount and did not buy it.
"They yearn for what they fear for."
I always told my DA fans how much I hate slot machines. They're fine in games as a risk-and-reward system. But when you're spending REAL MONEY in a Vegas casino to try and hit the jackpot (which very, very few people will), it can really hurt your budget. Gambling is a bad habit, and I don't like wasting my money on a slim chance. Go to Vegas for the experience, not the jackpot.
Took the kids to a corn maze. They gave us a map and had lights at certain points in the maze. Not overwhelming... or underwhelming... just... whelming.
Okay, vacuuming fruit flies out of the air is surprisingly effective.

Forum statistics

Threads
104,394
Messages
1,006,078
Members
135,928
Latest member
mich
Top