RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
CSBS - v1.2

0 Members and 1 Guest are viewing this topic.

***
Rep:
Level 90
Skilled Scripter, Shitty Mapper, Decent Writer.
I couldn't help but feel like updating a few of my scripts. I also realized I had never posted this one here though.

Spoiler for Changes over v1.0 & v1.1:
Quoting SECTION 2 of the script notes.
Code: [Select]
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#SECTION 2:Changes made to each version - CMTEV
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#------------------------------------------------------------------------------------------------------------------------
#============================================================
#CHANGES IN v1.2
#============================================================
#------------------------------------------------------------------------------------------------------------------------
#CHANGE #1:
#The Interpreter class changing method was slightly altered to process the removal and addition of
#class bonuses. I can't believe I didn't think of doing this before!
#
#CHANGE #2:
#Various bits of the notes were changed to accomodate CHANGE #1 so people who read the notes
#wouldn't get confused.
#
#------------------------------------------------------------------------------------------------------------------------
#============================================================
#CHANGES IN v1.1
#============================================================
#------------------------------------------------------------------------------------------------------------------------
#CHANGE #1:
#The method add_ex_class_bonus has been renamed to ex_class_bonus for the simple reason
#that the method used to remove bonuses and such no longer exists, leaving the old name to
#be misleading.
#
#CHANGE #2:
#The method ex_class_bonus has been changed to handle the adding and removing of class bonuses.
#For a full break down of how ex_class_bonus works now, read SECTION 4.
#
#CHANGE #3:
#The method remove_ex_class_bonus was completely removed.
#------------------------------------------------------------------------------------------------------------------------
#============================================================
#CHANGES IN v1.0
#============================================================
#------------------------------------------------------------------------------------------------------------------------
#The original release version. I didn't like the original structure of the script so I released a v1.1
#fixing the issues I had with the script. You should find this script to be a bit easier to use now.

Spoiler for How to use this script:
Insert this script above Main and below the rest of the scripts. Quoting SECTION 3-5 of the script notes to explain how to use this script to the fullest of it's potential. There's almost 200 lines of pure notes going into great detail of how to use this script and how this script works. Please read them.
Code: [Select]
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#SECTION 3:Setting up the class database - SUTCB
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#
#You will have to set up the method ex_class_bonus as follows
# Let's say you want to use an equation to return 16% of an actor's attribute.
#You would use the following formula.
#
#((actors stat syntax * 1.0) * 0.16)
#
#List of actor stat syntax:
#Agility:    actor.agi
#Dexterity: actor.dex
#Max Hp:   actor.maxhp
#Max Sp:    actor.maxsp
#Strength: actor.str
#Intelligence: actor.int
#
#Something to note about decimals in RGSS:
#You need the 0. because RGSS does not automatically add the zero to decimals without a zero at the
#front of them. It causes funny things to happen when you forget the zero in your decimals.
#Also, I have setup two default settings for class IDs 1 and 2 as examples for you.
#
#The method add_ex_class_bonus  has been renamed to ex_class bonus and is located at line 317.
#
#The method remove_ex_class_bonus is removed and no longer usable.
#
#
#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
#SECTION 4:Class bonus changing tutorial - CBCT
#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
#Now to show you how to setup an event to remove an actor's bonus, change their class, and add the
#bonuses from the new class. We'll use the default database and Arshes(default party) as an example
#by changing his class and bonuses from Fighter to Lancer. Read along while doing this to ensure you
#know how to remove and add bonuses if at any point in the story you want an actor's class and/or
#bonuses to be changed.
#
#STEP 1:
#Use the Change Class event command to change a character's class to whatever class you want.
#
#Done! Everything is now handled internally by the scripting whenever the classes are changed through
#event commands.

Spoiler for The purpose of this script:
The purpose of this script is to give characters bonuses and/or penalties to their max Hp, max Sp, Strength, Agility, Dexterity, and Intelligence. For a full explanation on how to utilize this script to the greatest of it's potential, read SECTIONS 3-5 of the notes.

Spoiler for Screenshots:
Not available for this sort of script.

Spoiler for Demo:
Not available for this sort of script.

Spoiler for Compatibility issues:
Quoting SECTION 1 of the script notes.
Code: [Select]
#-------()=======================================================>
#SECTION 1:Compability and other issues - CAOI
#-------()=======================================================>
#First things first...BACK UP YOUR PROJECT BEFORE USING THIS SCRIPT!!! This will ensure no work
#is lost if something goes wrong. How do you back up your project? Make a game disk. In the event
#this script DOES cause a major error in your project even AFTER it has been removed from the
#project, then you will have the back up game disk to fall back on. Simply have the game disk
#overwrite your projects directory.
#
#This script corrupts your old save games because it saves new data in the save game files.
#
#This script has 3% chance of being incompatible with SDK but has not been tested with SDK.
#
#This script has a 10% chance of being incompatible with other scripts that alter or otherwise change
#the Game_Actor class. This involves scripts that add new attributes, change existing attributes, or
#otherwise alter character data.
#
#This script has a 5% of being incompatible with other scripts that alter or otherwise change the way
#a project saves or loads data. I have taken a measure to prevent incompatibilities but the chance
#is still there.
#
#CLASSES ALTERED:
#Interpreter - Changing the actor's class with event commands will now trigger defined changes.
#Scene_Title - Creates $game_ex to be used similar to the other class global variables.
#Scene_Save - Stores $game_ex data in the save file of a project.
#Scene_Load - Loads $game_ex data from a save file for continued usage.

Spoiler for The script:
Code: [Select]
#============================================================
#------------------------------------------------------------------------------------------------------------------------
#============================================================
#Class name: Game_Ex
#Class version 1.2.0
#Created on 4-22-2007
#Last updated: 3-18-2008
#refer to $game_ex for methods stored within this class.
#
#TABLE OF CONTENTS:
#SECTION 1:Compability and other issues - CAOI
#SECTION 2:Changes made to each version - CMTEV
#SECTION 3:Setting up the class database - SUTCB
#SECTION 4:Class bonus changing tutorial - CBCT
#SECTION 5:Method names and their functions - MNATF
#SECTION 6:Final notes concerning the script - FNCTS
#
#To quick jump to a section, use the capital letters by the section name.
#
#-------()=======================================================>
#SECTION 1:Compability and other issues - CAOI
#-------()=======================================================>
#First things first...BACK UP YOUR PROJECT BEFORE USING THIS SCRIPT!!! This will ensure no work
#is lost if something goes wrong. How do you back up your project? Make a game disk. In the event
#this script DOES cause a major error in your project even AFTER it has been removed from the
#project, then you will have the back up game disk to fall back on. Simply have the game disk
#overwrite your projects directory.
#
#This script corrupts your old save games because it saves new data in the save game files.
#
#This script has 3% chance of being incompatible with SDK but has not been tested with SDK.
#
#This script has a 10% chance of being incompatible with other scripts that alter or otherwise change
#the Game_Actor class. This involves scripts that add new attributes, change existing attributes, or
#otherwise alter character data.
#
#This script has a 5% of being incompatible with other scripts that alter or otherwise change the way
#a project saves or loads data. I have taken a measure to prevent incompatibilities but the chance
#is still there.
#
#CLASSES ALTERED:
#Interpreter - Changing the actor's class with event commands will now trigger defined changes.
#Scene_Title - Creates $game_ex to be used similar to the other class global variables.
#Scene_Save - Stores $game_ex data in the save file of a project.
#Scene_Load - Loads $game_ex data from a save file for continued usage.
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#SECTION 2:Changes made to each version - CMTEV
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#------------------------------------------------------------------------------------------------------------------------
#============================================================
#CHANGES IN v1.2
#============================================================
#------------------------------------------------------------------------------------------------------------------------
#CHANGE #1:
#The Interpreter class changing method was slightly altered to process the removal and addition of
#class bonuses. I can't believe I didn't think of doing this before!
#
#CHANGE #2:
#Various bits of the notes were changed to accomodate CHANGE #1 so people who read the notes
#wouldn't get confused.
#
#------------------------------------------------------------------------------------------------------------------------
#============================================================
#CHANGES IN v1.1
#============================================================
#------------------------------------------------------------------------------------------------------------------------
#CHANGE #1:
#The method add_ex_class_bonus has been renamed to ex_class_bonus for the simple reason
#that the method used to remove bonuses and such no longer exists, leaving the old name to
#be misleading.
#
#CHANGE #2:
#The method ex_class_bonus has been changed to handle the adding and removing of class bonuses.
#For a full break down of how ex_class_bonus works now, read SECTION 4.
#
#CHANGE #3:
#The method remove_ex_class_bonus was completely removed.
#------------------------------------------------------------------------------------------------------------------------
#============================================================
#CHANGES IN v1.0
#============================================================
#------------------------------------------------------------------------------------------------------------------------
#The original release version. I didn't like the original structure of the script so I released a v1.1
#fixing the issues I had with the script. You should find this script to be a bit easier to use now.
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#SECTION 3:Setting up the class database - SUTCB
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#
#You will have to set up the method ex_class_bonus as follows
# Let's say you want to use an equation to return 16% of an actor's attribute.
#You would use the following formula.
#
#((actors stat syntax * 1.0) * 0.16)
#
#List of actor stat syntax:
#Agility:    actor.agi
#Dexterity: actor.dex
#Max Hp:   actor.maxhp
#Max Sp:    actor.maxsp
#Strength: actor.str
#Intelligence: actor.int
#
#Something to note about decimals in RGSS:
#You need the 0. because RGSS does not automatically add the zero to decimals without a zero at the
#front of them. It causes funny things to happen when you forget the zero in your decimals.
#Also, I have setup two default settings for class IDs 1 and 2 as examples for you.
#
#The method add_ex_class_bonus  has been renamed to ex_class bonus and is located at line 317.
#
#The method remove_ex_class_bonus is removed and no longer usable.
#
#
#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
#SECTION 4:Class bonus changing tutorial - CBCT
#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
#Now to show you how to setup an event to remove an actor's bonus, change their class, and add the
#bonuses from the new class. We'll use the default database and Arshes(default party) as an example
#by changing his class and bonuses from Fighter to Lancer. Read along while doing this to ensure you
#know how to remove and add bonuses if at any point in the story you want an actor's class and/or
#bonuses to be changed.
#
#STEP 1:
#Use the Change Class event command to change a character's class to whatever class you want.
#
#Done! Everything is now handled internally by the scripting whenever the classes are changed through
#event commands.
#
#
#********************************************************************************
#SECTION 5:Method names and their functions - MNATF
#********************************************************************************
#Alphabetical listing of methods, their fuctions within Game_Ex, and arguments to be passed along
#to said methods.
#
#  add_ex_class_bonus(class_id, actor_id)
# RENAMED TO ex_class_bonus IN v1.1
#
#  ex_class_bonus(class_id, actor_id, bonus)
# class_id - The actor's current class id in the database
# actor_id - Id of the actor who's stats are being modified by Game_Ex.
# bonus - Set as true if you are applying a set of new "bonuses". Set as false if you're removing the "bonuses".
# -Shinami-
# I use $data_actors instead of $game_actors for the class_id argument.
# Without the use of $data_actors, for unknown reasons I am unable to
# call the player's class id.  Not exactly efficient but it works.
#
# -processing notes-
# This method functions through the use of a case based on the value of
# $data_actors[actor's id].class_id passed on as an argument during the calling
# of the method. Pass off the actor's ID and class ID for proper addition of class
# bonuses and/or penalties.
#
#  base_class
# No arguments passed on. Purpose is to store the starting class of each actor.
# This allows the project team to have the ability to give a character their own
# unique class that only they can use.
# -Shinami-
# This method is still in early developement. May be subject to change.
# Currently, this method serves no purpose in the original script written by me.
#
# -processing notes-
# The sole purpose of this method is to store the actor's starting class for the reason
# that in future updates, a class changing scene may be made to handle the changing
# of each character's class while using their starting class as a "base" class that is unique
# to that actor alone but still allowing an actor access to other classes as conditions are met.
# Currently, this method serves no purpose.
#
#  remove_bonus(class_id, actor_id)
# METHOD WAS REMOVED FOR INEFFICENCIES IN v1.1
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#SECTION 6:Questions and final notes concerning the script - FNCTS
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#More questions will be added as they are asked while others are simply questions I've had numerous
#times with other people's scripts. If you get an error while messing around with this script, read the
#questions here to see if one answers your problem.
#
#Question 1
#What the hell is with the screwy ASCII art crap things around the section names?
#
#Answer
#That's just to denote you're at the start/end of a section. I could have just not included ANY notes
#at all though so just put up with it. Hell, I did! XD =^-^= I'm a sword fanatic though...hence the
#crappy sword thingy at SECTION 1.
#
#Question 2
#I don't understand how to use this script. How do I use it?
#
#Answer
#Just PM me on the forum at http://rmrk.net/index.php/board,25.0.html
#I'm busy with a FFT Class Changing/Skill System at the moment though so I won't be responding
#immediatly. While you wait for my response, you can read the notes while experimenting with the
#script. Seriously though, asking this after someone took the time to note out how everything works
#will piss a few people off but I'm nice and don't bite, unless you have cookies, so ask away. ^_^
#
#Question 3
#I want to learn scripting. Where did you learn?
#
#Answer
#I didn't learn from just one place. Actually, I learned by experimenting with dozens of scripts as well
#as taking script requests to further sharpen my skills. I remember the first CMS I did...horribly done
#when I look back at it but the sense of pride I felt when I completed my first request was enough to
#keep me learning how to script so that I could take more than just CMS requests.
#
#Question 4
#What the hell is a syntax? You lost me there in the questions below!
#
#Answer
#A syntax is something used in any sort of programming language to do special things. Inside the
#RGSS editor, RGSS syntax such as if, and, else, class etc. appear in blue to denote they are syntax.
#
#Question 5
#The script isn't working! It keeps crashing and taking me to a line in ex_class_bonus! I did everything
#right!!! What's wrong?!
#
#Answer
#What you most likely forgot was to put a zero in your decimals. If they're put in like this, .08, it'll
#cause an error. You MUST have a zero before your decimals or the script WILL crash. Like I said
#before, if you forget the zero at the front of your decimals, you'll encounter some strange things.
#
#Question 6
#I get this wierd error that takes me to the start of a "when" syntax thingy! What's wrong?!
#
#Answer
#Quite simple. You might have forgotten an "end" syntax to close off an "if" syntax.
#
#Question 7
#I want to release a modified version of this script with my own changes. Can I do that?
#
#Answer
#Under four conditions I will allow this.
#Condition 1: You CAN NOT charge for this script in any way, fashion, or form! If you see someone
#charging for this script, e-mail me at shinami576@hotmail.com and I WILL put an end to it. Making
#people sign up for your forums to view this script is fine though because lurkers suck.
#Lurker - People who take scripts, graphics, etc. from forums without contributing to a forum's
#community.
#
#Condition 2: You MUST have my permission to post a modified version of this script. I like knowing
#where my works are posted so that I can provide troubleshooting for people who use my scripts. You
#can contact me at shinami576@hotmail.com or malinko576@yahoo.com. My yahoo address is really
#bugged at the moment with tons of junk mail so there is a better chance of you reaching me at my
#hotmail address
#
#Condition 3: You MUST give credit to EVERYONE who has lent a hand in altering this work. People
#get this warm little glow inside that makes them feel good when they see their name in a list of credits.
#
#Condition 4: If you changed anything, you MUST include a full set of notes detailing EVERYTHING you
#changed and how each method inside your version release works. This means having a section
#detailing how to use the script, how the methods work internally, and what role each method's
#arguments play in the script. For a good idea how to do this, look at SECTION 6. You must also
#include a compatibility section that clearly states possible and/or known incompatibilities with the
#script. This helps people that read to keep from screwing up their project.
#
#Question 8
#Why do I need to fulfill those four conditions you just mentioned? They're such a pain in the ass.
#
#Answer
#People won't pay for scripts but people in this world will always try to make a quick buck or two off of
#people who don't know any better. It's called being naive.
#Also, I like knowing where my works are posted so I can provide support for said scripts. It really
#sucks when you find an awesome script on some obscure site but can't find anyone to provide help
#for it when you have questions about it or how to make it work.
#Again, people like seeing their name in a credits list because they worked hard on something you
#used. Also, it's proper etiqute(sp?) to credit people who contributed to your project, just like you see
#tons of names in the credits of a movie. Although in the movies, it's law to credit everyone who did
#had a hand in the making of the movie...or so I think? Regardless, you get my point.
#Finally, I feel it is proper programming etiqute(sp?) to note out EVERY THING in a project, script, or
#program so that others who look at your work can see how you did the things you did and possibly
#learn new things from your programming methods.
#
#
#These are the only questions that I can think of now that'll most likely come up. I'm sure I'll be adding
#to them though! ^_^
#
#===========================================================
#----------------------------------------------------------------------------------------------------------------------
#===========================================================
#===========================================================
#----------------------------------------------------------------------------------------------------------------------
#===========================================================
#Class name: Game_Ex
#Class version 1.0.0
#Last updated: 4-22-2007
#The class which holds the coding that makes everything possible.
#===========================================================
#----------------------------------------------------------------------------------------------------------------------
#===========================================================
class Game_Ex
  def initialize
for i in 1...$data_actors.size
  setup(i)
end#of "for"
  end#of initialize
 
  def setup(actor_id)
actor = $data_actors[actor_id]
@class_id = actor.class_id
ex_class_bonus(@class_id, actor_id, true)
base_class
  end#of setup
 
  def base_class
@base_class = @class_id
return @base_class
  end#of base_class
 
  def ex_class_bonus(class_id, actor_id, bonus)#(actor's class id, actor's id, true if giving bonuses and false if removing bonuses)
actor = $game_actors[actor_id]
case class_id #$data_actors & class_id uses the ID numbering you see in the database.
when 1#Class ID #1 Default database:Fighter
  ex_class_bonus_hp = ((actor.base_maxhp * 1.0) * 0.2) #20% bonus
  ex_class_bonus_sp = ((actor.base_maxsp * 1.0) * 0.25) #25% penalty
  ex_class_bonus_str = ((actor.base_str * 1.0) * 0.4) #40% bonus
  ex_class_bonus_dex = ((actor.base_dex * 1.0) * 0.3) #30% penalty
  ex_class_bonus_agi = ((actor.base_agi * 1.0) * 0.3) #30% penalty
  ex_class_bonus_int = ((actor.base_int * 1.0) * 0.16) #16% bonus
  if bonus#This is the branch part that adds the "bonuses" from a class
actor.maxhp += ex_class_bonus_hp#If you subtracted from a stat in the other branch
actor.maxsp -= ex_class_bonus_sp#then you'll add to that stat in this branch.
actor.str += ex_class_bonus_str
actor.dex -= ex_class_bonus_dex
actor.agi -= ex_class_bonus_agi
actor.int += ex_class_bonus_int
  elsif bonus == false#This is the branch part that removes the "bonuses" from a class
actor.maxhp -= ex_class_bonus_hp#If you added to a stat in the other branch
actor.maxsp += ex_class_bonus_sp#then you'll subtract from that stat in this branch.
actor.str -= ex_class_bonus_str
actor.dex += ex_class_bonus_dex
actor.agi += ex_class_bonus_agi
actor.int -= ex_class_bonus_int
  end#of "if"
  return
when 2#Class ID #2 Default database:Lancer
  ex_class_bonus_hp = ((actor.base_maxhp * 1.0) * 0.16) #16% penalty
  ex_class_bonus_sp = ((actor.base_maxsp * 1.0) * 0.33) #33% bonus
  ex_class_bonus_str = ((actor.base_str * 1.0) * 0.3) #30% penalty
  ex_class_bonus_dex = ((actor.base_dex * 1.0) * 0.19) #19% bonus
  ex_class_bonus_agi = ((actor.base_agi * 1.0) * 0.3) #30% bonus
  ex_class_bonus_int = ((actor.base_int * 1.0) * 0.16) #16% bonus
  if bonus
actor.maxhp -= ex_class_bonus_hp
actor.maxsp += ex_class_bonus_sp
actor.str -= ex_class_bonus_str
actor.dex += ex_class_bonus_dex
actor.agi += ex_class_bonus_agi
actor.int += ex_class_bonus_int
  elsif bonus == false
actor.maxhp += ex_class_bonus_hp
actor.maxsp -= ex_class_bonus_sp
actor.str += ex_class_bonus_str
actor.dex -= ex_class_bonus_dex
actor.agi -= ex_class_bonus_agi
actor.int -= ex_class_bonus_int
  end#of "if"
  return
end#of "case class_id"
  end#of "ex_class_bonus"
end#of class
#===========================================================
#----------------------------------------------------------------------------------------------------------------------
#===========================================================
#Class name: Interpreter
#Class version 1.0.0
#Last updated: 3-18-2008
#Causes the actor's stats to be changed to the scripted settings.
#===========================================================
#----------------------------------------------------------------------------------------------------------------------
#===========================================================
class Interpreter
  #--------------------------------------------------------------------------
  # * Change Actor Class
  #--------------------------------------------------------------------------
  def command_321
# Get actor
actor = $game_actors[@parameters[0]]
# Change class
if actor != nil
  $game_ex.ex_class_bonus(actor.class_id,actor.id,false)
  actor.class_id = @parameters[1]
  $game_ex.ex_class_bonus(actor.class_id,actor.id,true)
end#of "if actor != nil"
# Continue
return true
  end#of "def command_321"
end#of class
#===========================================================
#----------------------------------------------------------------------------------------------------------------------
#===========================================================
#Class name: Scene_Title
#Class version 1.0.0
#Last updated: 4-22-2007
#When starting a new game, the Game_Ex class is initialized.
#===========================================================
#----------------------------------------------------------------------------------------------------------------------
#===========================================================
class Scene_Title
  alias command_new_game_with_ex command_new_game
  def command_new_game
command_new_game_with_ex
$game_ex = Game_Ex.new
  end#of command_new_game
end#of class
#===========================================================
#----------------------------------------------------------------------------------------------------------------------
#===========================================================
#Class name: Scene_Load
#Class version 1.0.0
#Last updated: 4-22-2007
#When loading the game, the Game_Ex class data is also loaded from inside the save file.
#===========================================================
#----------------------------------------------------------------------------------------------------------------------
#===========================================================
class Scene_Load
  alias read_ex_save_data read_save_data
  def read_save_data(file)
read_ex_save_data(file)
$game_ex = Marshal.load(file)
  end#of read_save_data
end#of class
#===========================================================
#----------------------------------------------------------------------------------------------------------------------
#===========================================================
#Class name: Scene_Save
#Class version 1.0.0
#Last updated: 4-22-2007
#When saving the game, the Game_Ex class data is also stored inside the save file.
#===========================================================
#----------------------------------------------------------------------------------------------------------------------
#===========================================================
class Scene_Save
 
  alias write_ex_save_data write_save_data
  def write_save_data(file)
write_ex_save_data(file)
Marshal.dump($game_ex, file)
  end#of write_save_data
end#of class

Spoiler for Credits:
  • Shinami-I made the script.
  • Squaresoft-I got the idea from FF Tactics which IS originally their work.

Spoiler for Final notes:
I thought this would be the final release but a really good idea came to me for it on how to make it even easier to use and well, here you see it! I've written an extensive set of notes on practically everything concerning this script, how to use it, and a questions section that answers questions for newbe and veteran scripters alike. If your question wasn't answered, post it here and I'll answer back when I get a moment.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Looks good. I'm curious as to what CSBS stands for :P

Anyway, I'm not really sure what the script does. It says it adds bonuses, but are these just static bonuses or growth bonuses? I suspect growth bonuses, but I think it'd help to make that clearer considering how useful that feature is and by making it clear a lot more people would be attracted to the script.

But then again, I'm kind of dense, so that is probably why I am unclear. Anyway, I'll move this to the database now.
« Last Edit: March 18, 2008, 12:27:46 PM by modern algebra »

***
Rep:
Level 90
Skilled Scripter, Shitty Mapper, Decent Writer.
The bonus is static. As for the name itself, CSBS stands for Custom Stat Bonus System. It was designed for games that use class changer scripts. After all, it doesn't make sense to change a character from a melee class to a magic class and their stats retain their melee formability while sucking at magic. My apologies for not being clear. It's been quite a while since I've posted a script. =3

*
? ? ? ? ? ? ? ? ? The nice kind of alien~
Rep:
Level 92
Martian - Occasionally kind
Nice work Shinami ^^

I looked at your code and got a few comments ^^
Practice on making good names.
You use Game_Ex as the class name for where you use the functionality. It is not a very expressive name and could mean loads of different stuff.
Spend some time thinking up names. It might be boring and stuff, but it will make the script easier to understand, easier to maintain and decrease the probability of conflicts with other scripts. I thought about Game_CSBS since that's what you can your system, but it could easily not be the most fitting word.

Instead of altering the Scene_Load and Scene_Save you should put the functionality into Game_System. You could do it like this:
Code: [Select]
class Game_System
  def csbs
    @csbs = Game_CSBS.new if @csbs.nil?
    return @csbs
  end
end
The @csbs = Game_CSBS.new if @csbs.nil? part is called lazy instantiation because the Game_CSBS object is only created when called the first time.
This would mean that you have to change your Scene_Title mod to this instead:
Code: [Select]
class Scene_Title
  alias command_new_game_with_ex command_new_game
  def command_new_game
    command_new_game_with_ex
    $game_system.csbs
  end#of command_new_game
end#of class

And similar changes for the interpreter part.

Otherwise nice work ^^

*hugs*
 - Zeriab

********
Shadow Knight
Rep:
Level 91
Ruin that brick wall!
Project of the Month winner for October 2008
Seems to be a nice and useful script, especially useful to make those boring linear growths into something more realistic and has variety!
But just making sure, this scripts suits with class changing systems right?
So does it mean when you change classes, the change in stats is proportionally counted by the script or do we decide the value ourselves?

Good job anyway ^_^
Be kind, everyone you meet is fighting a hard battle.

**
Rep:
Level 86
Rastel Maskil Magister~
Ah~ I see so this acts like pretty much like the master system like games such as breath of fire III and IV, right?

exelent.... I'm new at this whole making RPG's thing... moreover at the fact of programming.. I may or may not use this script....but before you think im an Idiot hear me out.

The event commands allow you to change the parameters of you character, so this script pretty much keeps their parameteras it is... for then giving them bonuses every level up?

I was thinking doing on my RPG the same master system you see in Breath of fire III and IV, and for that I was simply going to use the event commands to change their parameters as they change masters; Tho I came to a big brick wall where certain characters have certain parameters and if i go like a jackass and star changing their parameters.. how is the game or myself gonna rember their true parameters if the player decides to leave the master?

lol, I'll try to use this.. but since I'm not that smart in this scripting thing I'll end up screwing up (I tried changing my CMS which I did succesfully but when I want to try to put Faces instead of sprites in the menu window.. I keep getting the same annoying "Unable to find file" error... lol gets in my nerves really... ><.

but thank you for the addition... I trust that if i have any problem I can come here , right? ^^;;

 ;8

***
Rep:
Level 90
Skilled Scripter, Shitty Mapper, Decent Writer.
So does it mean when you change classes, the change in stats is proportionally counted by the script or do we decide the value ourselves?
The value is decided by you. Lets say you Arshes has his starting stats like this:

hp- 1000
sp- 1000
str- 100
dex- 100
agi- 100
int- 100

and then the script applies your defined Fighter class bonuses. We'll use +50% hp, -50% sp, +10% str, +20% dex, -10% agi, and -20% int for an example. His stats would become like this:

hp- 1500
sp- 500
str- 110
dex- 120
agi- 90
int- 80

These bonuses/penalties affect the character only when they're applied. They don't affect the stats gained when level ups are gained.

The event commands allow you to change the parameters of you character, so this script pretty much keeps their parameteras it is... for then giving them bonuses every level up?

how is the game or myself gonna rember their true parameters if the player decides to leave the master?
The script handles all parameter changes from class changing through event commands. That is something you won't have to worry about. All the script requires from you event wise is that you use the class change event command.

lol, I'll try to use this.. but since I'm not that smart in this scripting thing I'll end up screwing up (I tried changing my CMS which I did succesfully but when I want to try to put Faces instead of sprites in the menu window.. I keep getting the same annoying "Unable to find file" error... lol gets in my nerves really... ><.

but thank you for the addition... I trust that if i have any problem I can come here , right? ^^;;

 ;8
Of course you can post here with problems you're having! Also, PM me the syntax you're using for faces in your menu window and I'll look it over to find out what's wrong. Finally, you're welcome for the script. =3