Actor and Class Stat Growth - Printable Version +- Save-Point (https://www.save-point.org) +-- Forum: Material Development (https://www.save-point.org/forum-8.html) +--- Forum: Scripts Database (https://www.save-point.org/forum-39.html) +---- Forum: RPGMaker XP (RGSS) Engine (https://www.save-point.org/forum-116.html) +---- Thread: Actor and Class Stat Growth (/thread-2844.html) |
Actor and Class Stat Growth - Trickster - 03-01-2008 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
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 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) 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
[*]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. |