Adding more stats that behave like SP
#2
Just like any of the RMXP stats, Strength, Intelligence, Raw Good Looks, they all have a fully minimum stat of 0 and a full blown max of 999 regardless of level.

What you want is to understand about the stat's increase and how they work.

When you change the Str, Dex, HP stats, you can do that in the editor.  With this, you need the script.  Please note the below section:
Code:
 # Described below.  Actor #1's char stat starts at 10 and const starts at 12
 #                   Actor #2's char stat starts at 20 and const starts at 24
 #                   Both have a 2pt curve for char and 3pt curve for const
 #
 #
   XTRA_STATS_ACTOR = {1 => [[10, 2], [12, 3]],
                       2 => [[20, 2], [24, 3]] }  
This is describing TWO different stats for two different actors.
When it shows:  1 => [[10,2],[12,3]] .... it shows how actor #1 handles TWO different stats.  The first array [10,2] is for the first stat, and [12,3] is for the second stat.

I guess you'd have   1 => [[10,2]] all by itself to handle your #1 actor as you're adding only one stat, right?  But you'd be doing this for actor #2,  #3, #27, #98, whatever.

Each of these arrays defines what your actors start off with at level 1, and how much of an increase you get insofar as a stat increase.  In the above CODE example, Actor #1 startts off his first stat with 10 points to that stat, and Actror #2 gets 20 points of that stat at level 1.  Both have a 2pt curve in the above example.

So there is no begin or end stats, but a curve progression.

Now you can run a test, jacking your hero up to the max level and see how high his stats are at that level.  It would be so much easier if I could edit/alter the editor.... yeah, like that's gonna happen.

Just remember, you need to make matching stats for enemies, weapons, etc.

And the section of  code you are looking at,  XTRA_STATS_RATE, handles how status effect may play with the new Stat.  Like if the VENOM state makes your stat reduce by 20% or  so.

I'm using it for 'fatigue' in my own action game.

EDIT: Oh the bars thing.

Remember that the script suggests both a 'Char' and a 'Const' stat? It's defined like:
Code:
def char
    n = [[base_char + @char_plus, 1].max, 999].min
    for i in @states
      n *= XTRA_STATS_RATE[i][0] / 100.0
    end
    n = [[Integer(n), 1].max, 999].min
    return n
  end
You create these of course, or a MP method in your case. Once done, you make your bar access actor.mp instead of actor.sp
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)

[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png]    [Image: liM4ikn.png]    [Image: fdzKgZA.png]    [Image: sj0H81z.png]
[Image: QL7oRau.png]    [Image: uSqjY09.png]    [Image: GAA3qE9.png]    [Image: 2Hmnx1G.png]    [Image: BwtNdKw.png%5B]
  Above are clickable links
Reply }


Messages In This Thread
RE: Adding more stats that behave like SP - by DerVVulfman - 07-17-2020, 09:22 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
   Adding face script on Cogwheel's RTAB Battle Status rekkatsu 15 15,590 08-25-2020, 03:09 AM
Last Post: DerVVulfman
   Best Practices for Adding New Data to Saves tnsi 3 5,993 02-16-2015, 04:50 AM
Last Post: tnsi
   Adding new Stats? shintashi 2 5,583 03-27-2010, 11:42 PM
Last Post: Victor Sant



Users browsing this thread: 1 Guest(s)