Jump to content
Sign in to follow this  
Fomar0153

Unique Classes Script

Recommended Posts

This script is aimed at scripters or people using several of my unique classes scripts. The easiest way to explain it is by probably explaining my motivation for coding it. Back when I was scripting for XP and VX sometimes I would create systems only for certain characters e.g. one character is an alchemist and can mix potions or a group of characters learn skills from their weapons or an accessory (think spell tomes) and increasingly Game_Actor would be full of code that was only needed for a fraction of the total characters. This is my solution, to put all the code that only applies to one or a small group of characters into it's own class.

 

Anyway here's the script with an example for each of my other scripts.

 

Unique Classes Script

Instructions are in the script.

=begin
Unique Classes Script
by Fomar0153
Version 1.0
----------------------
Notes
----------------------
Useless by itself.
This script allows for scripters to develop more individual
characters or classes with less concern for
----------------------
Instructions
----------------------
Edit the case like this:
when class_id # Class Name
 @data[actor_id] ||= Game_ClassName.new(actor_id)

Follow the instructions in any Unique Class you add
----------------------
Known Bugs
----------------------
None
=end
class Game_Actors
 #--------------------------------------------------------------------------
 # â— Rewrites []
 #--------------------------------------------------------------------------
 def [](actor_id)
return nil unless $data_actors[actor_id]
case $data_actors[actor_id].class_id
# All edits should take place in this case
when 1 # Weapon Master
  @data[actor_id] ||= Game_WeaponMaster.new(actor_id)
when 4 # Blue Mage
  @data[actor_id] ||= Game_BlueMage.new(actor_id)
else
  @data[actor_id] ||= Game_Actor.new(actor_id)
end
 end
end

 

Updates List of Unique Classes

Blue Mage

Weapon Master (Equipment Skills)

Skill Master (level skills based on usage)

Edited by Fomar0153

Share this post


Link to post
Share on other sites

This has in fact answered my question about the whole class assigned equipment that I posted on the last page for custom item slots. Thank you posting such scripts and giving beginning scripters and makers a well instructed written demo.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×