Jump to content
Crystal Noel

Crystal Engine - Extra Stats

Recommended Posts

extra-stats.png?w=690

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/

Edited by Crystal Noel
  • Like 1

Share this post


Link to post
Share on other sites

The new script call in version 1.01 is even more handy. It allows you to directly alter these stats.

Share this post


Link to post
Share on other sites

Actor/Class/Weapon/Armor/State/Enemy Notetags

<state_xstat: stat x%> Sets the specified stat to be multiplied by x%

Does this effect work for skills? I noticed you added this...

 

 

 

Skill/Item Notetags

<weapon_xstat: stat x> Changes the specified stat by x

So I was wondering if the same functionality (the % increase) could be applied to skills (i.e. for passives)

 
Awesome script, btw, I was hoping someone would add a way to add extra parameters ^^

 

Share this post


Link to post
Share on other sites

The way to do that is to use this script: http://victorscripts.wordpress.com/rpg-maker-vx-ace/gameplay-scripts/passive-states/

Set up a skill that bestows an invisible passive state, that state will change the actors stat by the specified value.

Also the tag was supposed to be <xstat growth: stat x>. It was so you could make items that augment a stat.

Share this post


Link to post
Share on other sites

I wasn't aware that VE Passive passed through the note tags o:

But thanks for that info~ 

I've been dying for a separate stat to negotiate healing xD 

 

Actually, quick question: Is there a way to show extra parameters to the scene_equips? That way, when you equip, say, a staff that increases SPI by 50, you could see that visibly and can compare?

Edited by Megahead11
  • Like 1

Share this post


Link to post
Share on other sites

I realize I'm not setting something up.

 

But I'm using yanflay's extra param and ace status menu scripts.

 

I put

 

<xstat>
      :str => '23 + ((level * 70) / 128)',
      :sta => '24 + ((level * 48) / 128)',
      :spi => '20 + ((level * 57) / 128)',
</xstat_end>

 

In the class note tags.  Am I do this right or am I doing something wrong.

And why exactly isn't the new stats showing up in the status menu?

Share this post


Link to post
Share on other sites

@Notsalony

Those tags are correct, but the script was not designed to work with Yanfly scripts as is.

You can modify the Status Menu and Equip engine to display them however.

I use yanfly: Equip Engine, Status Menu and Shop options.

 

I'm still trying to muddle my way through Shop Options by trial and error... mostly error... :(

 

But I have managed to get the Status Menu and Equip engine working.

I am only just now, past couple days, trying to figure out scripting for more than a small formula.

So to all you people who know how to do it! I'm sorry is this is FUGLY!

 

My GameScreen is set to 640 x 480

I ONLY USE General and Properties commands so I didn't bother modding anything but those

I would spoiler this but I dont know how...

 

Mine looks like: I only have 2 new stats SA and EA

 

#**********************************

# draw_general_parameters

#**********************************

  def draw_general_parameters

    dx = 24

    dy = line_height / 2

    draw_actor_level(dx, line_height*1+dy, contents.width/2 - 24)

    draw_actor_param(0, dx, line_height*2+dy, contents.width/2 - 24)

    draw_actor_param(1, dx, line_height*3+dy, contents.width/2 - 24)

    draw_actor_param(2, dx, line_height*4+dy, contents.width/4 - 12)

    draw_actor_param(4, dx, line_height*5+dy, contents.width/4 - 12)

    draw_actor_param(6, dx, line_height*6+dy, contents.width/4 - 12)

    dx += contents.width/4 - 12

    draw_actor_param(3, dx, line_height*4+dy, contents.width/4 - 12)

    draw_actor_param(5, dx, line_height*5+dy, contents.width/4 - 12)

    draw_actor_param(7, dx, line_height*6+dy, contents.width/4 - 12)

    dx = 24                                                 "dx" should repeat identically like this.

    draw_actor_param(8, dx, line_height*7+dy, contents.width/4 - 12) dy's Multiplier > line_height*7+dy < should increment by 1 Every TWO new stats

    dx += contents.width/4 - 12                  "dx" should repeat identically like this.

    draw_actor_param(9, dx, line_height*7+dy, contents.width/4 - 12)  

  end

 
NEXT
 
#************************
# draw_actor_param
#************************
  def draw_actor_param(param_id, dx, dy, dw)
    colour = Color.new(0, 0, 0, translucent_alpha/2)
    rect = Rect.new(dx+1, dy+1, dw-2, line_height-2)
    contents.fill_rect(rect, colour)
    change_color(system_color)
    if param_id < 8
      draw_text(dx+4, dy, dw-8, line_height, Vocab::param(param_id))
      change_color(normal_color)
      draw_text(dx+4, dy, dw-8, line_height, @actor.param(param_id).group, 2)
    else
      case param_id            KEEP ADDING CASES FOR ALL NEW STATS
        when 8
          draw_text(dx+4, dy, dw-8, line_height, "SA")       YOU NEED TO SPECIFY YOUR XSTAT TITLES HERE
          change_color(normal_color)
          draw_text(dx+4, dy, dw-8, line_height, @actor.xstat.SA.to_s, 2)  Replace @actor.param.(param_id).group      with
        when 9                                                                                                         @actor.xstat.NEWSTAT.to_s             <----
          draw_text(dx+4, dy, dw-8, line_height, "EA")
          change_color(normal_color)
          draw_text(dx+4, dy, dw-8, line_height, @actor.xstat.EA.to_s, 2)
      end
    end
  end
 
At least thats what I did and mine works fine ;)
Hope it helps.
Sorry again if this is fugly and/or a horrible script modification.
 
 
 
 
 
Oh Yeah!
I came here to ask a question!
 
How would I go about accessing the value of a specific weapons xstat?
I don't want to augment it, just use the value of that weapons xstat. NOT the total value of the players xstat
Edited by Arkyne

Share this post


Link to post
Share on other sites

Well, i have a issue with enemy's and class' formulas. When I put this on them:

 

<xstat>
      :str => '500',
</xstat_end>

 

(basic str is 12) the basic damage doesnt change (before: 50, now: 50, no changes), but when I use it on a normal skill formula it works.

My custom damage formula is a script with def basic_attack(enemy, type) etc... It only detects the "default" formula, doesnt detect my new enemy or class formula.

I was for days looking for a solution, I hope your answer! 

 

This is my formula:

  def basic_physical(enemy, wp, bsdmg, penetrat, rateattack, skillcode)

   v1 = self.atk #Potencia física
   v2 = self.xstat.str
   v3 = self.xstat.pow
   v4 = self.xstat.att
   v5 = self.xstat.ppn
   v6 = self.xstat.tdm
   w1 = enemy.def
   w2 = enemy.mhp
   w3 = enemy.hp
   w4 = enemy.xstat.res
   w5 = enemy.xstat.end
   w6 = enemy.xstat.spi
   w7 = enemy.xstat.ent
   w8 = enemy.level
 
   y1 = v1 / w1
   y2 = bsdmg + v3
   y3 = v2 * 5 + v4 * 3.3
   y4 = v6
   
   y5 = w4 * 7.5 + w5 * 1.85 + w1 * 2.85
   y6 = y5 / (v5 / 8)
   
   y7 = y1 * y2 * y3
   yf = y4 + y7 / y6
   dmg = 3 + rand(5) + [yf,10 + v6 + self.atk].max
   
    return dmg
  end

Share this post


Link to post
Share on other sites

Hello ,

 

I need to create a "Number of attack" stat , I mean like this

 

Str:

Def:

Dex:

Agi:

# Attack 2 = That means that  you can attack twice (2 normal attacks)

 

So I need a statistic that can change the number of time you attack .

 

And I'm not sure if we can already set this in the database for skills .

 

Thank you

Share this post


Link to post
Share on other sites

I seem to be having a damage problem with trying to access the enemy's stats. My attack formula is as follows: (a.xstat.pwr * a.xstat.hit) - (b.def * 2) - b.xstat.sta

 

With these formulas while I can do damage to enemies with no problem, the enemies cannot do damage to me as it always returns to 0 damage. The formula that determines xstat.pwr is: (database_param(2)) + xstat.str * 4)

 

Now this is different from the party's str formula, but that shouldn't make a difference. The hits are determined by str and sta and the minimal for both pwr and hits are 1. Does anyone know what could be causing the damage to return to 0 for enemies?

Share this post


Link to post
Share on other sites

This script is exactly what I'm looking for, but I've run into an issue.

 

I am trying to create 10 extra stats, the first 6 of which I want to be displayed.

I was hoping the last 4 would be cut off, but they just continue down the screen.

 

Is there any way to have the last 4 not be displayed, but still exist?

Share this post


Link to post
Share on other sites

I've run into another issue. I tried battling an enemy, but the game gave me the error:

 

]

Script 'Crystal Engine: - Extra Stats' line 260: NoMethodError occurred.

 

undefined method 'database_param' for

#<Game_Enemy:0x9e40da0>

]

 

I haven't touched the enemy xstats, but that might be the problem. Enemies will have their own skills, so they don't need any xstats.

If my issue is related to enemies having undefined xstats, then how can I make enemies not have xstats? Or should I set each stat to 0 ?

Share this post


Link to post
Share on other sites

image.png.174d293340b33b47b99ec17fd757df30.png 

Ok so when I tried adding Yanfly's Equip engine with Kread's actor inventory and item charge scripts I get this error message after I equip any items in the accessory slot then view status I then tried N.A.S.T.Y. Extra Stats 1.1 By: Nelderson and it didn't get an error message. (the error message is pasted over the status window with the nasty extra stats added)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted