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.
Final Fantasy Tactics class bonus and skill learning systems

0 Members and 1 Guest are viewing this topic.

***
Rep:
Level 90
Skilled Scripter, Shitty Mapper, Decent Writer.
Would anyone use either system if I were make them?

**
Rep: +0/-0Level 88
I would DEFINETELY use them, I've been looking for something like that for a long time, please oh please make them!

***
Rep:
Level 88
Legend of Mana Fan
Yeah, please make them. Especially the skill learning one.
Game I'm Working on:
-ADVENT-
Progress:
Story: 96%
Maps: 4%
Characters: 70%

*
Shooting for the "MEMBER MODERATOR OF THE YEAR 2007" Award
Rep:
Level 89
Hi, there.
Dude that would be awsome. Then allwe would need would be the fighting script. Hope you make it man. It would be a great addition
Sig by MacGravel

***
Rep:
Level 90
Skilled Scripter, Shitty Mapper, Decent Writer.
I've already laid the groundwork for the Class Stat Bonus System(CSBS) and have the bonuses functioning properly. I'm busy with two MMO's and another project in C++ but I'll work on these when I have time. I just wanted to make sure people would actually use these things before scripting them for public use. Nothing worse than scripting something and nobody uses it.

I will have to make some heavy changes to how the standard combat system processes things for the Custom Skill Learning System(CSLS) to function similar to the skills in Final Fantasy Tactics. Like in Tactics, each actor will their own base class, changeable through the game, but this will be the harder end of the two systems.

I've been doing random programming and scripting for a little over a year. I'm going to be looking at things like this and considering whether or not to script them based on the demand for such projects in the attempt to improve and refine my skill as a programmer. Please note that some of said scripts may require a certain degree of scripting knowledge. If possible, I'll eventually blend C++ and RGSS things into one another being that compiled code runs much quicker and efficently than RGSS.
« Last Edit: April 22, 2007, 05:40:30 AM by Shinami »

***
Rep:
Level 90
Skilled Scripter, Shitty Mapper, Decent Writer.
I hate double posting but here is the CSBS. I have not had time to script up a window or anything that allows class changing but you can do so through the Call Script command and Change Hero Class command on the third page of event commands. Now, without further delay, here the script. You should put it above Main and below the rest of your scripts.

THIS SCRIPT MAY CORRUPT YOUR PROJECTS SAVE GAMES. AS I ALWAYS RECOMMEND...BACK UP YOUR PROJECT FOLDER BEFORE IMPLEMENTING A NEW SCRIPT!!!

Code: [Select]
#===========================================================
#----------------------------------------------------------------------------------------------------------------------
#===========================================================
#Class name: Game_Ex
#version 1.0.0
#Last updated: 4-22-2007
#refer to $game_ex for methods stored within this class.
#
#TO REMOVE A CHARACTER'S CLASS BONUS/PENALTY:
#You must run this little script in a "Call Script" event function.
#id = $game_party.actors[NUMERAL ID OF ACTOR IN PARTY].id
#actor = $data_actors[id]
#$game_ex.remove_bonus(actor.class_id,id)
#
#TO ADD A CHARACTER'S CLASS BONUS/PENALTY:
#You must run this little script in a "Call Script" event function.
#id = $game_party.actors[NUMERAL ID OF ACTOR IN PARTY].id
#actor = $data_actors[id]
#$game_ex.add_bonus(actor.class_id,id)
#
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#Setting up the class database
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#
#You will have to set up the method add_ex_class_bonus AND remove_ex_class_bonus.
#I have yet to devise a way that allows the merger of both methods into one. 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 * 1.0) * 0.16)
#
#You need the 0. because Ruby and RGSS do not automatically add 0. to a decimal and it causes funny
#things to happen. I have setup two default settings for class IDs 1 and 2 as examples for you.
#
#The method add_ex_class_bonus is located at line 104.
#
#The method remove_ex_class_bonus is located at line 144.
#
#************************************************************************************************
#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)
#    class_id - Most commonly, $data_actors[actors id].class_id
#    actor_id - Id of the actor who's stats are being modified by Game_Ex.
#    -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. May be
#    subject to rewrite should I find the time.
#   
#    -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.
#   
#    -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)
#    class_id - Most commonly, $data_actors[actors id].class_id
#    actor_id - Id of the actor who's stats are being modified by Game_Ex.
#    -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. May be
#    subject to rewrite should I find the time.

#    -processing notes-
#    This method works in the exact opposite manner of add_bonus by removing the
#    the changes made to a character's stats by their class bonuses/penalties, allowing
#    another set of class bonuses/penalties to be assigned with the argument class_id to
#    decide which class to apply and actor_id to decide which actor to apply the class
#    bonuses/penalties to.
#===========================================================
#----------------------------------------------------------------------------------------------------------------------
#===========================================================
class Game_Ex
  def initialize
    for i in 1...$data_actors.size
      setup(i)
    end
  end
 
  def setup(actor_id)
    actor = $data_actors[actor_id]
    @class_id = actor.class_id
    add_ex_class_bonus(@class_id, actor_id)
    base_class
  end
 
  def add_ex_class_bonus(class_id, actor_id)#(class_id)
    actor = $game_actors[actor_id]
    p class_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% bonus
      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
      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
      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
      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
      return
    end
  end
 
  def base_class
    @base_class = @class_id
    return @base_class
  end
 
  def remove_bonus(class_id, actor_id)
    #if the stat is a bonus, then stat -= maxhp - base_maxhp ect
    #if the stat is a penalty then stat += base_maxhp - maxhp etc
    actor = $game_actors[actor_id]
    case class_id
    when 1#Class ID #1
      remove_bonus_hp = actor.maxhp - actor.base_maxhp #20% bonus
      remove_bonus_sp = actor.maxsp - actor.base_maxsp #25% bonus
      remove_bonus_str = actor.str - actor.base_str #40% bonus
      remove_bonus_dex = actor.base_dex - actor.dex #30% penalty
      remove_bonus_agi = actor.base_agi - actor.agi #30% penalty
      remove_bonus_int = actor.int - actor.base_int #16% bonus
      actor.maxhp -= remove_bonus_hp
      actor.maxsp -= remove_bonus_sp
      actor.str -= remove_bonus_str
      actor.dex += remove_bonus_dex
      actor.agi += remove_bonus_agi
      actor.int -= remove_bonus_int
      return
    when 2#Class ID #2
      remove_bonus_hp = actor.base_maxhp - actor.maxhp #16% penalty
      remove_bonus_sp = actor.maxsp - actor.base_maxsp #33% bonus
      remove_bonus_str = actor.base_str - actor.str #30% penalty
      remove_bonus_dex = actor.dex - actor.base_dex #19% bonus
      remove_bonus_agi = actor.agi - actor.base_agi #30% bonus
      remove_bonus_int = actor.int - actor.base_int #16% bonus
      actor.maxhp += remove_bonus_hp
      actor.maxsp -= remove_bonus_sp
      actor.str += remove_bonus_str
      actor.dex -= remove_bonus_dex
      actor.agi -= remove_bonus_agi
      actor.int -= remove_bonus_int
      return
    end
  end
end
#===========================================================
#----------------------------------------------------------------------------------------------------------------------
#===========================================================
#Class name: Scene_Title
#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
end
#===========================================================
#----------------------------------------------------------------------------------------------------------------------
#===========================================================
#Class name: Scene_Load
#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
end
#===========================================================
#----------------------------------------------------------------------------------------------------------------------
#===========================================================
#Class name: Scene_Save
#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
end

Now to explain the use of the script. You will have to setup the class bonuses/penalties in both methods. This is covered in depth in the notes at the beginning of the script. For those of you who didn't understand the explanation of changing class bonuses/penalties, CLICKY CLICKY! Eventually, when I have the spare time, I may begin work on a scene that extends this scripts use into a class changing screen.
« Last Edit: April 23, 2007, 05:24:44 AM by Shinami »

*
Shooting for the "MEMBER MODERATOR OF THE YEAR 2007" Award
Rep:
Level 89
Hi, there.
Wow, can't wait to try this out. You must have put alot of work into this, hopefully when you finish we can add it to our scripts database. Keep up the good work.
Sig by MacGravel

***
Rep:
Level 90
Skilled Scripter, Shitty Mapper, Decent Writer.
The script will require basic scripting knowledge. I commented practically every use of each function that I could think of as well for those who are still new to scripting. It didn't take me very long at all. From start to finish, I'd say 3-4 hours? What really took me so long was trying to structure the script in a coherent way so others can easily understand my work.
« Last Edit: April 23, 2007, 05:27:04 AM by Shinami »

****
If Ham didn't taste like Ham, I would hope it tasted like turkey
Rep:
Level 88
>:O
That looks awesome, great work.  I would assume this would definitely be moved to the database once it's completed.

***
Rep:
Level 88
Legend of Mana Fan
Uh....this is a very cool script but....can you make a demo or something? I don't get what you meant in the comments. What do you mean by Add and Remove Bonus/Penalty? What do you mean the player gets a bonus? Does the character get penalties for changing classes (I don't remember this in FFT...or maybe I just didn't notice it)?

Thanks,
Game I'm Working on:
-ADVENT-
Progress:
Story: 96%
Maps: 4%
Characters: 70%

***
Rep:
Level 90
Skilled Scripter, Shitty Mapper, Decent Writer.
I detailed how each method works in the notes but I was exceptionally tired last night so I probably didn't make much sense. I'll start off by explaining how the Final Fantasy Tactics system worked.

The way that Final Fantasy Tactics worked what that each class had a bonus or penalty for each characters stat. The Knight had high hp, hitting power etc. due to bonuses but also had lower mp, weaker magic etc. because of penalties.

The method below controls the addition of penalties and bonuses when changing classes. For the proper way to change a character's class in-game, look here.
As you can see below, I have a case set up that works dependent upon the actor's class ID in the database. This means if you want to make a set of bonuses and penalties for the default class Fighter, you setup a "when 1" branch since I used the $data_ variables to pull this thing together. Now continue below and I'll explain more on how this method works.
Code: [Select]
def add_ex_class_bonus(class_id, actor_id)#(class_id)
    actor = $game_actors[actor_id]
    p class_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% bonus
      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
      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
      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
      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
      return
    end
  end


Code: [Select]
when 1#Class ID #1 Default database:Fighter
This is the part where you put the actor's class ID from the RMXP database. In the default database, you would put 1 for a Fighter, 2 for a lancer, 3 for a Warrior etc. Those of you who know scripting might be puzzled by this strangeness. This is because in the $data_whatever variables, the start of their arrays is 0. Those of you who don't know scripting, don't worry about the talk of such things. You only need to know how to do addition, subtraction, and how to leave notes behind to setup the database how you want it.

Code: [Select]
      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% bonus
      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
Now we are looking at the part where the percentage of the stat you want added or removed is calculated. If you want 50% of a stat to be stored in a variable, change the decimal to 0.5 and there you go. You want 1%? 0.01 is the way to get. Want 255%? 2.55 is what you want. If you don't know how to convert percentage into a decimal, just do percent multiplied by 0.01 in the calculator that came with Windows.

Code: [Select]
      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
      return
This is the actual code that handles the stat changing. It should be rather obvious how to decide if something gets a bonus or a penalty. For penalties, just put a subtraction sign for penalty before the equal sign. For bonuses, put  an addition sign before the equal sign. Now to explain possibly the most complicated part of the whole thing.

Code: [Select]
def remove_bonus(class_id, actor_id)
    #if the stat is a bonus, then stat -= maxhp - base_maxhp ect
    #if the stat is a penalty then stat += base_maxhp - maxhp etc
    actor = $game_actors[actor_id]
    case class_id
    when 1#Class ID #1
      remove_bonus_hp = ((actor.base_maxhp * 1.0) * 0.2) #20% bonus
      remove_bonus_sp = ((actor.base_maxsp * 1.0) * 0.25) #25% bonus
      remove_bonus_str = ((actor.base_str * 1.0) * 0.4)#40% bonus
      remove_bonus_dex = ((actor.base_dex * 1.0) * 0.3) #30% penalty
      remove_bonus_agi = ((actor.base_agi * 1.0) * 0.3) #30% penalty
      remove_bonus_int = ((actor.base_int * 1.0) * 0.16) #16% bonus
      actor.maxhp -= remove_bonus_hp
      actor.maxsp -= remove_bonus_sp
      actor.str -= remove_bonus_str
      actor.dex += remove_bonus_dex
      actor.agi += remove_bonus_agi
      actor.int -= remove_bonus_int
      return
    when 2#Class ID #2
      remove_bonus_hp = ((actor.base_maxhp * 1.0) * 0.2) #16% penalty
      remove_bonus_sp = ((actor.base_maxsp * 1.0) * 0.33) #33% bonus
      remove_bonus_str = ((actor.base_str * 1.0) * 0.3) #30% penalty
      remove_bonus_dex = ((actor.base_dex * 1.0) * 0.19) #19% bonus
      remove_bonus_agi = ((actor.base_agi * 1.0) * 0.3) #30% bonus
      remove_bonus_int = ((actor.base_int * 1.0) * 0.16) #16% bonus
      actor.maxhp += remove_bonus_hp
      actor.maxsp -= remove_bonus_sp
      actor.str += remove_bonus_str
      actor.dex -= remove_bonus_dex
      actor.agi -= remove_bonus_agi
      actor.int -= remove_bonus_int
      return
    end
  end
Removing the bonus or penalty gets tricky sometimes. I think I may have thought of a way to entirely redo the whole additon/subtration of things so if I get some spare time in the next day or so I'll start on the idea so you might find this method missing in the next version. I was in a bit of a hurry at the time I did this and wasn't at my best.

Code: [Select]
when 1#Class ID #1
      remove_bonus_hp = ((actor.base_maxhp * 1.0) * 0.2) #20% bonus
      remove_bonus_sp = ((actor.base_maxsp * 1.0) * 0.25) #25% bonus
      remove_bonus_str = ((actor.base_str * 1.0) * 0.4)#40% bonus
      remove_bonus_dex = ((actor.base_dex * 1.0) * 0.3) #30% penalty
      remove_bonus_agi = ((actor.base_agi * 1.0) * 0.3) #30% penalty
      remove_bonus_int = ((actor.base_int * 1.0) * 0.16) #16% bonus
Like before, you calculate the amount that was given in the add_ex_class_bonus.

Code: [Select]
      actor.maxhp -= remove_bonus_hp
      actor.maxsp -= remove_bonus_sp
      actor.str -= remove_bonus_str
      actor.dex += remove_bonus_dex
      actor.agi += remove_bonus_agi
      actor.int -= remove_bonus_int
      return
This is the part thats different. The exact opposite actually. If the stat got a bonus from this class, subtract it. If the stat got a penalty from this class, add it back.

Don't worry if you don't understand how this method is important...I've thought of an idea that'll warrant it's removal and only add_ex_class_bonus will remain. This change'll come in about 1-2 days. Sooner though if I can get more free time.

*
Shooting for the "MEMBER MODERATOR OF THE YEAR 2007" Award
Rep:
Level 89
Hi, there.
Im really liking how much progress you have made. I hope to implement this in my game when it's finish. I have been writing a Story script and planning my game based around this system.

And you will see your name in bold and big font when the credits go up. lol
Sig by MacGravel

***
Rep:
Level 90
Skilled Scripter, Shitty Mapper, Decent Writer.
I hope to implement this in my game when it's finish.
The CSBS is done. It's just up to you to decide how to configure the script. A class changer script is merely optional.

*
Shooting for the "MEMBER MODERATOR OF THE YEAR 2007" Award
Rep:
Level 89
Hi, there.
O, lol I feel like a  :bean: (just wanted to try it out). Thanx for pointing that out.
Sig by MacGravel

***
Rep:
Level 88
Legend of Mana Fan
Ooh...So that's how it works. Thanks for explaining that. Good luck on making the skill learning script!
Game I'm Working on:
-ADVENT-
Progress:
Story: 96%
Maps: 4%
Characters: 70%

***
Rep:
Level 90
Skilled Scripter, Shitty Mapper, Decent Writer.
I'll begin work on the CSLS once I get some free time.