Actor and Class Stat Growth
#1
Actor and Class Stat Growth
Version: 1.3.1


Introduction
Consider this a present to the forum for my birthday (SHUT UP I KNOW ITS A BIT LATE :p). This is a script I wrote in about two hours that changes the level up system to where it is defined as a random growth or percentage growth

for example a knight's growth can be defined as
5-10 hp, 0-2 sp, 5-10 str, 5-6 dex, 3-4 agi, 2-4 int

while a mage's growth can be defined as:
3-6 hp, 5-8 sp, 2-3 str, 4-5 dex, 6-10 agi, 7-12 int

or you can define it yourself there are many ways to customize

It is pretty much the same system used in many commercial RPG's (A few of the Dragon Warrior Games and Breath of Fire to name a few)


Features
  • Definable for actors and classes
  • Highly Customizable
  • Can Replace or work with the default stat system
  • Can be a random or percent growth (see instructions)
  • Can define the growth yourself (with Proc objects)
  • Also can be done for Atk, Pdef, Mdef, and Eva
  • And other stats created from other scripts (neat Bonus )


Screenshots
Yeah like that will help, Look at the stat at level one, level up now look at it there's your screenshot.


Demo
Download Here


Script
Nah the families will have to stick to the boring default. The families should be able to level up at all if you ask me.


Instructions
Ok this is the fun part

Add all scripts above main below SDK, but!

The script "Level Script Auto Aliaser" needs to be above main as your last script if not then you will get an undefined method since the methods it is trying to alias have not been created yet.

This time there are two text files you need to copy. In the Data Folder of the Demo you will need to copy ActorLevels.rxdata and ClassLevels.rxdata.
In ActorLevels.rxdata you can define the growth rates for each actor and in ClassLevels.rxdata you can define the growth rates for each class

Now to Setup the Data

Quote: 1) Id
This is required

The pointer to the Actor/Class that this affects, if you aren't using it for an actor or class, just skip it an move on

Quote: 2) (Stat)
The (Stat) Name
Syntax - Range, Proc, Integer, Array, Hash, Float
Note - This applies to maxhp, maxsp, str, dex, agi, int, stats you defined

This applies to the Stat Parameters and the rest of the information is just stat value, where stat is the maxhp, maxsp, str, dex, agi, int and any stats that are defined within the setup.

Syntax for this can be either
  • Integer
  • Constant Growth
  • Ex 3 means that it will increase by 3 each level
[*]Float
[*]Percentage Growth
[*]Ex 0.5 means that it will increase by 50% each level
[*]note - this is from the base_(stat) method
[*]Range
[*]Random Growth from Range
[*]Ex 5-8 means that it will increase by 5-8 each level
[*]Array
[*]Random Growth from Range 2
[*]Ex - [4,4,4,5,5,6]
[*]50% Chance of increase by 4
[*]33.3% Chance of increase by 5
[*]16,7% Chance of increase by 6
[*]Hash
[*]Define Growth for a set of levels
[*]Ex - {1..3 => 1, 4..6 => 0.5, 6..10 => 4..6}
[*]Levels 1 - 3 will grow by 1
[*]Levels 4 - 6 will grow by 50%
[*]Levels 6 - 10 will grow by 4 - 6
[*]Proc
[*]Your Choice (Advanced Option)
[*]Call with Proc.new {|level, value| -code here-}
[*]use semicolons for line breaks
[*]The Value Returned can be any of the above except a hash including another proc[/LIST]


Lastly Setting up Extra stats
In the Setup this hash controls that

Code:
Extra_Stats = [:atk, :pdef, :mdef, :eva]

The Elements in the Array are Symbols And what this does is automatically alias the base_(stat) method so nobody has to do any work getting it to work for that stat ;) It also adds it so you can define it in the text files, pretty nifty I say.


FAQ
Q) Why do I get an Error when I encrypt my project?
A) Its because the File Gets Encrypted with the Game Data and it can't read through encrypted files. But I have found a fix for this in the Setup Section Set the Save Data Option to True, run your project once, and set it to false then encrypt your project. What this does is saves the data to where it can be read when your project is encrypted. (It creates the file Levels_Encrypted.rxdata Do not mess with this file once it is created)

Note: Permission granted by Trickster to post:
Quote:And if you post what you have now of my stuff then you don't have the latest versions. I'm too lazy/busy to post stuff.
As this is his material, it is deletable upon his request. Due to his current absense, no support is available. Please do not PM or eMail him for support.


Compatibility
Requires SDK Part III
Requires MACL V1.5


Credits and Thanks
Everyone who wished me a happy birthday yesterday :D


Author's Notes
Note: (A Bit off topic) but if you want to use my Loading Data from Text File get the one out of this demo as It checks for more types of objects, allows better commenting (=begin and =end), and is alot better than the version found in MACL


Terms and Conditions
Hey, I posted this publicly. You can use it. What do you expect? But if you do use it, I do expect you to spell my name correctly in your game. And yes you can use it in commercial games too.
Reply }


Possibly Related Threads…
Thread Author Replies Views Last Post
   DerVV's Actor Stat Points Distributor DerVVulfman 0 569 07-16-2024, 04:46 AM
Last Post: DerVVulfman
   MACL - Method And Class Library Trickster 3 8,920 04-02-2021, 06:21 AM
Last Post: Megalukes
   Actor Battle Items DerVVulfman 4 6,119 11-08-2020, 12:36 PM
Last Post: Mel
   Hidden Class rewrites hanetzer 6 16,311 04-10-2013, 08:01 PM
Last Post: Narzew
   Job Stat Modifier buddysievers 0 4,685 05-15-2012, 01:57 PM
Last Post: buddysievers
   Xenres Single Actor Escape Kirito 0 6,127 10-24-2010, 05:28 AM
Last Post: Kirito
   Actor Cloning System by Charlie Fleed Charlie Fleed 5 11,165 02-09-2010, 04:38 PM
Last Post: desbrina
   Battlestatus Actor Highlighter DerVVulfman 4 10,373 12-01-2009, 09:41 PM
Last Post: explocion200
   Actor AutoSelfSwitches [Add-on] PK8 0 803 11-09-2009, 05:59 AM
Last Post: PK8
   Actor AutoSelfVariables [Add-on] PK8 0 811 11-09-2009, 05:49 AM
Last Post: PK8



Users browsing this thread: 1 Guest(s)