Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Adding more stats that behave like SP
#3
(07-17-2020, 09:22 PM)DerVVulfman Wrote: 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

Thanks for your reaction.
In fact I could use the second stat too because I'm thinking of a "Morale" stat.

I have been trying to tweak with the min and max stats combined with the bar im using. But every time it gives me an error like 'undefined method []' for nil:NilClass' (might have to do a roll back since I've been messing around with it a lot).

So far I do understand how the arrays work. Although I do not know if I can define a minimum and a maximum amount with the "def MP" method. Also with that mp bar Sarcasm It looks like it is conflicting somehow.

For example, if I use the def MP method to say
Code:
def mp
n = [[base_mp + @mp_plus, 0].max, 20].min
This could work for level 1

But if the hero levels, I'd want the max MP to be 25 for example. So it would look like this

Code:
def mp
n = [[base_mp + @mp_plus, 0].max, 25].min

I don't think the above examples would work since the MP must be able to be unique for each character, while this method is meant for all actors right?

The bar im trying to use has a hard time accesing the data from XTRA_STATS_ACTOR. I guess that is because I dont know how to do it
Reply }


Messages In This Thread
RE: Adding more stats that behave like SP - by Bennerdeben - 07-19-2020, 05:54 PM

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



Users browsing this thread: