Stats Generator V4.0

Stats Generator
Version: 4.0

Introduction

This script emulates the database's generate curve feature, so that you can define a starting value for a stat (at the minimum level) and a maximum value (can be over level 99, if you wish) and the growth (expressed as a ratio of early and late growths) and this script will generate the values for every level. This demo also comes with my Limit Breaks script so that you can break the limits and still generate a curve for that fits it.

Features
  • Can be used with stats over 999 and 9999 for hp/sp
  • Can be used with break level limit scripts
  • A bit more advanced growth formula than the database (Uses a minimum and maximum level and now a middle level)

Demo
http://www.rmxp.org/forums/downloads.php?do=file&id=861

FAQ

Compatibility

SDK compliant
Requires Method and Class Library V2.x or greater

Credits and Thanks

Prexus for pointing out the bug with V1.0

Author's Notes

I created this script out of a bit boredom and curiousity



Bug with the Database's Function Spoiler
Yes sometimes there is a slight bug with the generate curve feature with the database All you have to do is set the min to 50 and the max to 500 set the growth for fast and look at the result for level 96
FTP...lol
Anyway nice script! You realy like maths don't you? Now we can control even more how characters! Good Work!
so this basicly does...?
*hates to repeat himself*

Reread and comprehend :P come back when you know what this does *hint* stats that increase when you level
Out of curiosity, is it possible to modify this so that the stats are decided by classes and not actors ids? More like the older versions of RPG Maker?
In all, this is actually pretty cool. Good for making actors that can pass level 99 and stuff, far more mathmatically than KGC did.

Good work Trickster. I will be using part of this on my Dynamic Enemies system right now. Thanks.
[QUOTE=Cygnea]Out of curiosity, is it possible to modify this so that the stats are decided by classes and not actors ids? More like the older versions of RPG Maker?[/QUOTE]

change this line in the script
case @actor_id
Expand to see the code.


to this

case @class_id
Expand to see the code.


@Trickster
lol you should have seen how long it took me to come up with all of that *rustiness with differential equations*, I've been experimenting with other formulas (cubic, quartic, etc) with other conditions and seeing the results...
Of course it's that easy. Thank you very much!
Ummm....i dont know if this Trickster is SephirothSpawn or not, so im very confuzled. But, is it better to replace the old one of SephirothSpawn's that was posted on .net some time ago....or what...?
[QUOTE=Master InuYasha]Ummm....i dont know if this Trickster is SephirothSpawn or not, so im very confuzled. But, is it better to replace the old one of SephirothSpawn's that was posted on .net some time ago....or what...?[/QUOTE]

what are you talking about?
:( Sorry....i made a mistake. I should have read your post more clearly, this doesnt replace the Enemies That Level Up script by SephirothSpawn, this is based on stats. Sorry....
Sorry to bother you again, but I have another question. Could this be changed to modify the stats in the database? (HP, SP, etc?)

EDIT: Actually, please disregard this; this is more of a script request.
[QUOTE=Cygnea]Sorry to bother you again, but I have another question. Could this be changed to modify the stats in the database? (HP, SP, etc?)

EDIT: Actually, please disregard this; this is more of a script request.[/QUOTE]

Didn't I state in my first post that if you wanted it for other stats just say so and I will write the code for it?

Give me a few minutes
You did? I must have missed it, sorry! [I see it now though >.<]

Thank you very much.
Well, it's been over a week so I'm wondering if you've made any progress on my request...
Yes, I would like to see this as well.
Not bad.
I've been looking for something like this for a while
Oops sorry I completely forgot, I've been busy with other things at the moment just give me a few days and It'll be done
Thanks! :D There's no rush so don't push yourself.
The latest version of this script has been reposted

@Seph - No you don't have to worry about anything nothing was changed or added since I last posted this the only thing I did was fix a bug in the Limit Break script

The next version I will derive another formula (cubic - ax^3 + bx^2 +cx + d) to use for this script (just for fun) and this formula will let you have a curve that switches growth (starts out early and then goes late and vice versa) It will also allow you to set a value for another level
right now you can just do minlevel = min and maxlevel = max, next version you may do minlevel = min, maxlevel = max, and midlevel = mid (midlevel is between minlevel and maxlevel) and the midlevel will be the switch growth point
Umm...how exactly does this work?

I'm not too good with scripts, and I'm having some trouble figuring out how to get this to work.

For know, I just want to make it so all of my characters can get to level 255. I tried doing what I thought would enable it, but it didn't work very well. I made an event that raises the party's level by 100 (Level+98, Level+2) but three of the characters just went to level 99. The first character went to level 3! It seems that the Level+98 event made him go to level 1, and then the Level+2 event made him go to level 3.

I'm not sure what to do...
I'm not even going to try to pretend to know what all of those formulas mean :drip01:
[QUOTE=Armor King 108;113422]Umm...how exactly does this work?

I'm not too good with scripts, and I'm having some trouble figuring out how to get this to work.

For know, I just want to make it so all of my characters can get to level 255. I tried doing what I thought would enable it, but it didn't work very well. I made an event that raises the party's level by 100 (Level+98, Level+2) but three of the characters just went to level 99. The first character went to level 3! It seems that the Level+98 event made him go to level 1, and then the Level+2 event made him go to level 3.

I'm not sure what to do...[/QUOTE]

Let me see your setup for the Level Generation script

make sure you have setup this correctly
#--------------------------------------------------------------------------
  # * Maximum Level for actors syntax: actor_id => Max Level
  #--------------------------------------------------------------------------
  Max_Level = {1 => 200}
Expand to see the code.


That could be your problem but you didn't give enough information


[QUOTE=Kaoii;113424]I'm not even going to try to pretend to know what all of those formulas mean :drip01:[/QUOTE]

Could on add some stuff to your post, I could've read that as spam and warned you for it. But well I do almost have the cubic curve ready I have it all worked out on paper and so far Its 3 pages long
Okay, I think I already figured out how the level thing works...

Now, I want to try and mess with all the stats, but I really don't know what all this stuff means...

Quote:
[min, max, minlvl, maxlvl, early, late]


That stuff. I can't really understand what all those mean. Especially "Early" and "Late"...
Screenies?
Armor King 108;113978 wrote:
Okay, I think I already figured out how the level thing works...

Now, I want to try and mess with all the stats, but I really don't know what all this stuff means...



That stuff. I can't really understand what all those mean. Especially "Early" and "Late"...


And to repeat Let me see your setup for the Level Generation script

It says what it means, Armor King.

min - Minimum value
max - Maximum Value
minlvl - Minimum Level
maxlvl - Maximum Level
early - Early Influence
late - Late Influence

Example from the demo
  [B]1[/B] => [[B][COLOR=Red]80[/COLOR][/B], [B][COLOR=Blue]100000[/COLOR][/B], [B][COLOR=SeaGreen]1[/COLOR][/B], [B][COLOR=DarkOrange]200[/COLOR][/B], [B][COLOR=Purple]1[/COLOR][/B], [COLOR=DimGray][B]2[/B][/COLOR]]
Expand to see the code.
For Actor Id 1 (Aluxes) At level 1, the minimum level, whatever stat this is will be the minimum value which is 80. At the maximum level, which is 200, the value for the stat will be 100000. Now this curve is a late curve since the late influence, 2, is higher than the early influence, 1. The Curve will grow slowly in the first few levels but near the end it will grow rapidly, not as late as putting 0 for the early influence and 1 for the late influence as that will be a complete late curve.

Ok here are some early late influences
Early  |   Late    | Curve
-----------------------------
   1   |     1     | Steady Curve
   1   |     0     | Pure Early Curve
   0   |     1     | Pure Late Curve[/FONT]
Expand to see the code.
And Also any multiple of the above combinations will also get you the same curve as all this does is takes the average of the early and late curves using the influence values

For example
The curve for 3 - Early 2 - Late formula will be
3 * (Early Curve) + 2 * (Late Curve)
____________________________________
                  5 [/FONT]
Expand to see the code.
Generally its
(E. Influence) * (Early Curve) + (L. Influence) * (Late Curve)
________________________________________________________
             
             (Early Influence) + (Late Influence) [/FONT]
Expand to see the code.
Digimon Leader;113991 wrote:
Screenies?


Ok, just so you know Digimon Leader, I could take your above post as spam (One word, nothing to do with the script). Now would you please tell me as to why a script that just setups stats (This script is basically just a formula and a setup) would require a screenshot as to how it works/looks in game, because all you would see is just the default windows. I suppose I could take a screenshot of the level being over level 99, but that would be a waste of time since anyone can see that. There is a reason why I removed the screenshot section, it doesn't require any!
Okay, I think I understand how it all works now. I can probably figure it all out with a little trial and error, and I think I understand how it all works now. My game should probably use a late curve...because it has almost ridiculously high stats...

Quote:
Hp_Curve_Actor = {1 => [80, 46000, 1, 999, 1, 2],
2 => [100, 112000, 1, 999, 1, 2],
3 => [90, 51350, 1, 999, 1, 2],
4 => [100, 87600, 1, 999, 1, 2]}


I might chance it later so it's higher, but I don't know. But I want to make it so the characters start out really weak, then get super powerful later...

However, there is still one thing I do not understand. That would involve the class ID stuff. I assume it lets you have different stat growth and such for different classes, but it didn't seem to do anything...does it only work if you haven't assigned actor stat growths? Or something?

Anyway, thanks for the help, especially 'cause I'm not explaining this very well.
[QUOTE=Armor King 108;114508]Okay, I think I understand how it all works now. I can probably figure it all out with a little trial and error, and I think I understand how it all works now. My game should probably use a late curve...because it has almost ridiculously high stats...

I might chance it later so it's higher, but I don't know. But I want to make it so the characters start out really weak, then get super powerful later...

However, there is still one thing I do not understand. That would involve the class ID stuff. I assume it lets you have different stat growth and such for different classes, but it didn't seem to do anything...does it only work if you haven't assigned actor stat growths? Or something?

Anyway, thanks for the help, especially 'cause I'm not explaining this very well.[/QUOTE]

Do note that it is possible to have stats over 9999, but it isn't recommended to do so (The Hp text will be scrunched, etc)

The Class ID Stuff is only used if the curve for the actor is not defined.
So, the Class one only works if the Actor one isn't defined yet? That's fine, I mean...even if I want to have two characters with the same class, but different stat growth, I could just make two different classes that seem the same, but have different IDs and stat curves.

And, the problem with the stats being scrunched is no longer a problem. I asked in Script Support how to solve that, and someone already replied. It works just fine...well, I don't think leaving room for 999999/999999 HP on the main status screen will work, but that's fine...

Well, I don't have any more questions to bother you with. Thanks for the help.

Ahhhh....it's lagging.

When I try to testplay my project, it takes like 10 seconds before anything happens, and then a message comes up saying "The script is hanging."

Could this be because I made the stats so high or something?

I just edited it so the first four actors get stats over 1000, would that make it hang?
Hmm
1) May I see your setup?
2) What other scripts are you using?

Original thread: https://www.hbgames.org/forums/viewtopic.php?t=6599