Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

[VX] Job Changing/EXP Script

Okay I have a quick question about scarecrow580 plug in for this script. Is there a way to take out the job changes feature, yet keep the % stat bonuses for certain jobs?
 
With regards to the script posted by Alexnard, I am having issues.

I've tried using it a bunch of different ways and still get the same errors.

It says this, "Cannot convert hash into integer"

and the error is referenced to this line of code:

Code:
      self.contents.font.color.alpha = (@member.class_id == $data_classes[AVAILABLE_CLASSES[member.id]].id ? 128 : 255)

I am not a scripter and this doesn't seem too complicated a problem, but I am stumped.

Is there anyone who can offer some advice to why I'd be getting this hash/integer error?

I have tried this script in both my current project and a new project and keep getting the same errors.
 
Fist off I would like to say thank you for making such a well programed script. However I'm stuck on the unlocking part of the script. I do know a few Programing languages, however I don't know anything about Ruby and have yet taken the time to learn the language.

#-----------------------------------------------------------------------------
  # This is an Alteration Of a Piece of Prexus' Script. It Has Been Altered
  # Such That You Can Unlock Jobs in a Final Fantasy V Manner. While This
  # Is Slightly Confusing, It Is Rather Easy To Implement. In The Code Below,
  # There is a Marked Section Where, If You Want The Jobs Unlocking System,
  # You Will Alter The Line As Indicated Below, Else, Leave it Alone.
  # The n Below, Is to be Replaced With The ID of a Variable. In Order To Use
  # The Job Unlocking System, You Must Set Variable n to a Number. If The
  # Variable is Set to 1, All Jobs Are Available. If the Variable Is Set Greater
  # Than 1, For Each Unit Above One, One Job Will Be Left Off The Job Selection
  # List. So, If The Variable Is 2, The Last Class In Your Classes Tab Will
  # Be Left Off The List. In Order to Unlock Jobs, Begin The Game With A Higher
  # Variable Number, and When New Jobs Are Unlocked, Simply Alter The Variable
  # To a Lower Number, Eventually Reaching 1 (ie. All Jobs Available)
  # This Can Additionally Be Used To Create Classes Which The Player Is Never
  # Aloowed To Select. Simply Make The Unselectable Class The Lowest Class In
  # The Classes Tab. Then, Make The Variable Never Equal to One. In This Way,
  # This Class Will Never Be "Unlocked".
  #-----------------------------------------------------------------------------
class Window_ClassPick < Window_Selectable
  def initialize(member = nil)
    super(48, 178, 256, 158)
    #@item_max = $data_classes.size - 1 # Replace 1 with $game_variables.[](n)
####################################################
#From the explanation from above this is what I understand how to implement this code.
$test  =  5 
@item_max = $data_classes.size - $game_variables.[]($test)
#Then change the code through the Event commands >> advance >> script
#however when I do it this way all the jobs show. I am missing something and am in hopes that
#someone could explain how to set this up properly.
####################################################
  create_contents
    @member = member
    self.index = -1
    self.active = false
    refresh
  end
end

Thank you for your time.

SKi
 
class Window_ClassPick < Window_Selectable
  def initialize(member = nil)
    super(48, 178, 256, 158)
    #@item_max = $data_classes.size - 1 # Replace 1 with $game_variables.[](n)
####################################################
#From the explanation from above this is what I understand how to implement this code.
$test  =  5
@item_max = $data_classes.size - $game_variables.[]($test)
#Then change the code through the Event commands >> advance >> script
#however when I do it this way all the jobs show. I am missing something and am in hopes that
#someone could explain how to set this up properly.
####################################################

The problem is that $game_variables.[]($test) with $test = 5 tells the code to look at the fifth variable and use that value. I believe you probably have your fifth variable set to 0 (or undefined, thus the game takes it as zero). I decided to use the $game_variables.[](n) form so that non-scripters could simply change the variable without calling a scripting event. If you want to change it through a scripting event, instead use this:

Code:
class Window_ClassPick < Window_Selectable
  def initialize(member = nil)
    super(48, 178, 256, 158)
    @item_max = $data_classes.size - $test

Then it will use the value of $test instead of using the value of $test to specify a variable to use. Hopefully this answers your question? If not, just let me know and I will try to explain it more clearly. Best wishes.

--Scarecrow580
 

Aveon

Member

I require your help.....
I keep getting the following error after simply taking the script from the demo and inserting it into the game above all other scripts...

the error is as follows:



??? Profession? 437????No method error
undefined method [] fornil:NilClass

I have over 6 classes

PLEASE HELP!!!!!!!
 

Giam

Member

I get an error when I have less than 4 party members. It occurs when I move over to the black spot (Where the 4th party member would be). It reads
Script 'Profession' line 434: NoMethodError occurred.
Undefined method 'clss_id' for nil:NilClass
which is
Code:
self.contents.font.color.alpha = (@member.class_id == $data_classes[i].id ? 128 : 255)
Help?

EDIT:

Your Job Changing and Party Scripts have a compatibility issue. When both are in the game "Party below Job below Materials" The Job script will mess up if you have less than 4 characters and go to a blank line. It does this by itself too, but I changed part of the code to:

Code:
class Window_CurrentParty < Window_Selectable
  def initialize
    super(48, 80, 256, 64)
    @item_max = $game_party.members.size  
    @column_max = @item_max
    create_contents
    self.index = 0
    refresh
  end

So it will work when it is by itself, but still not with the Party Changer. I don't know which to put on top of the other. Putting the party changer on top of the job changer with the edited code will stop the error, but it causes a new one. The party size will go down from 4 to 3 and stay that way in the Party changer (Only 3 max members vs 4) and works when you take, 2 or 3 members out of the party as well.
Picture:
 
I have a question about this script. When you use it, can you make certain classes be able to change to another class? (ex. Priest lv30 ONLY to Pope)
 

SowS

Member

Hello! I'm a newbie when it comes to scripting since i just got a copy of VX a few days ago...
Great scripts you got here and I'm using Scarecrow's plug-in right now...

Anyways, for those who are using Dargor's CMC, add this script below the plugin:
#==============================================================================
# ** Custom Commands - Prexus' Job Changing System
#------------------------------------------------------------------------------
#  © SowS, 2008
#  12/05/08 
#------------------------------------------------------------------------------
#  Instructions:
#  As usual, paste this above main but BELOW Prexus' Job Changer...
#  Now, in his class changer, you will see this in line 163
#      $scene = Scene_Map.new
#  Change this into:
#      $scene = Scene_Menu.new
#  If you are using Scarecrow's plugin, delete all lines starting from line 694
#    to the last line.
#==============================================================================

# Vocabulary
Vocab::ClassChange = 'Job'

#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
#  This class performs the menu screen processing.
#==============================================================================

class Scene_Menu < Scene_Base
  #--------------------------------------------------------------------------
  # * Alias Listing
  #--------------------------------------------------------------------------
  alias sows_vx_cmcclasschange_menu_create_command_window create_command_window
  alias sows_vx_cmcclasschange_menu_update_command_selection update_command_selection
  #--------------------------------------------------------------------------
  # * Create Command Window
  #--------------------------------------------------------------------------
  def create_command_window
    commands = $game_system.menu_commands
    index = commands.index(Vocab::save)
    $game_system.add_menu_command(index, Vocab::ClassChange)
    sows_vx_cmcclasschange_menu_create_command_window
  end
  #--------------------------------------------------------------------------
  # * Update Command Selection
  #--------------------------------------------------------------------------
  def update_command_selection
    sows_vx_cmcclasschange_menu_update_command_selection
    command = @command_window.selection
    if Input.trigger?(Input::C)
      Sound.play_decision
      case @command_window.selection
      when Vocab::ClassChange
        $scene = Scene_ClassChange.new
      end
    end
  end
end

My instructions are there.
 
okay, so i'm going to do my job system mostly sans scripts, since i can't script really and i haven't found something that suits my needs. i am going to create items called "change character" (character being the person's name) for each character that can change classes. using the item will pull up a common choice event to switch the character's class. this will allow me very easily to change what classes each character can use without having to rely on scripts or multiple databases, etc., even if it's a bit clunky (works for me; in my game there won't be the need to change classes all that often, more like once or twice a dungeon, and each character in my game will only use up to four classes anyway). should only need a few switches/variables to make it run.

so, my question is, is there a way i can use one of the scripts posted so that i can still do a lot of the fun stuff with jobs - specifically having stat bonuses, job levels/experience, and keeping learned skills/job levels when changing jobs - while still using my rinky dink way of changing jobs? also if you can already see a problem with the way i've thought out how to do this, please let me know. thanks.
 

Gimnis

Member

awesome!! is there any chance you will make this for XP?

and can a job be available only if you was in a specific job before
example:

| LVL 1 | LVL 2 | LVL 3 |
warrior > Paladin -> Divine Warrior
---------^ Knight -> Weapon Master
______________________________
wizard > Fire Mage -> Fire Lord
---------^ Ice Mage -> Ice Lord
_______________________________
thief > Bandit -> Gun Master
----------^ Rogue -> Assassin
_______________________________
hunter > Ranger -> Forest Walker
----------^ Archer -> Arcane Archer

lets say, if you start as a warrior, you can only choose Knight Or Paladin, and if you choose Paladin, you HAVE to take Divine Warrior

is possible, or is it already in the script?
 
Octople Threat":d0mpxcgk said:
Could you re-upload the demo or something, cause I can't get it to work at all.

I was just going to say the same thing...would you re-upload it please? :down:
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top