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

ok I like the way you made some classes unlockable..

but is there a different way to do it?

say more like final fantasy tactics? where squire turns into knight...
and chemist turns into white mage/black mage...

I was hoping to put in a few starting classes...

Novice: (or actually none) this class I wanted to allow it to use passive skills that would be learned from other classes...
then I wanted to have a script check the novice's job level and say if at level 10... you went to a couple areas you could buy additional jobs... or have to do quests for other jobs...

say at level 10 novice char went to a fighter school... you would be charged a fee... then given a quest of defeating some monsters... after that it activated a switch and gave you...

Fighter and Brawler... Fighter focuses more on weapons while brawler focuses on defense and fists...

I am thinking that as long as the class was unlocked by the main char other chars could choose the class...

but it would be nice if some of the chars were locked from touching certain classes...
 
Well, I'll see what I can do for you. My scripting knowledge is rather basic and my biggest problem would be figuring out how to make it so Prexus' Window_ClassPick only shows certain classes. So far the only way to manipulate which classes are shown is by changing the @item_max which will reduce the number of classes shown, but not let you pick and choose which classes you want. (This is how I currently have it set to "unlock" jobs in a Final Fantasy V manner, by simply changing the @item_max to include or exclude classes) I haven't ever really played around with the window classes, so I'm not to totally sure how to do this. If somebody can help me figure that out, I should be able to build the rest of the system that wsensor talked about. I'll mess around with trying to change it, like I have done with pretty much everything else, but if somebody with more scripting knowledge/knowledge of window classes can help, it would be greatly appreciated. I'll try and see what I can figure out for you over the weekend wsensor. Hopefully I can think of something.
 
could you use hash stuff?
like include only the jobs available in a hash?

I think I saw it in another job script but it does not have separate job levels like this one...
 
Yeah.... I have VERY basic scripting knowledge, and I don't even know what hashing is... (wow, that sounds awful reassuring about my plugin, doesn't it?) Like I said before, I pretty much learned all I know from changing random bits here and there and seeing what happened. Let me look into hashing to see what exactly it is and see if I can't implement. Thanks for the suggestion wsensor =)
 
I've going to be putting out a large update to this script within a week or so, including a majority of the features that have been mentioned in this thread. This make may your script null, scarecrow, but thank you for helping support my script in my lack of interest.
 
Well, I am really looking forward to your update Prexus, as this script is one of my personal favorites (as well as pretty much essential for the game I am making). I am really excited that you will be releasing an official addition to the script as the workarounds I had provided to add features were not very well done and I am looking forward to the easily customizable options etc. As far as making my script null, I really don't mind as this was more of a learning experience than anything for me. I've gone from having absolutely no knowledge of scripting to being able to implement features and having a basic understanding of ruby (ie methods, classes, etc.) I apologize if it appeared that I hijacked your thread/script for my own purposes, but that really wasn't my intention. I simply wanted to alter the script for my own use and intentions, and because there were features others were interested in, I posted it here. Anyways, please accept my apologies for essentially hijacking your script, and I really look forward to your update. Best wishes.

--Scarecrow580
 

Marpy

Member

Is there any way to implement special proficiencies for specific characters?
AKA: the main character can always weild the King's Sword, no matter what his class, while no other character can?
Also, sorry for any typos. Hard to type on a Wii.
 
hi. serious noob here.

haven't tried to use the script yet but i'm thinking it'll work for my game idea. one question: any way to unlock the class system (and, for that matter, change party system) later into the game instead of having it available from the beginning? again, apologies if this question is incredibly rudimentary.
 
Sorry, one more quick question: in using scarecrow's script, I'm going to have multiple class databases. What I want to do is make a game in which each character has access to about 4 classes, but not from the very beginning. Example: main character starts with access to warrior and thief, later in the game adds on paladin, then much later can also switch to a fourth class. Would the only way to do this be to create a separate class database for each character, and then another one for that character when he/she adds on new classes?

Feel free to e-smack me if this makes no sense.
 
Prexus stated he will be releasing his new version within a week, so I suggest waiting for the next version to see what all is included. If need be, I can try and implement any features you want for you, but we should wait to see if Prexus includes the features you are interested in or if he plans on adding them. Additionally, any features I would try and add on now, probably wouldn't fit with the new version so I would have to re-write them. So after the release of the new version, I would be more than happy to try and help anybody, given that Prexus doesn't mind, of course.
 

Xaitan

Member

First day using VX, i know a few bit's and bobs about it. I really liked the look of this script so i thought i would give it a go and i added scarecrows add-on.

The thing i want to do is, for example: Allow change to Paladin when lvl 30 (or w.e) I found the bit in scarecrows add on that allows you to do this and i have read it, only trouble is it makes no sense to me, can someone quickly give me an idea on how to change it for future reference xD, sorry for the hastle ¬¬.
 

Verzen

Member

Prexus, ive noticed something that could go wrong with your script that I think should be looked into.
If a player is level 60 and gets a new job, then kills a monster.. he can easily gain several levels in that job at a time.
Suggestion? Make it so that you can set how many "job points" a monster, or group of monsters, can give.. You must reach X job points to reach a level in that job.

Also
Is it possible to make it like FF5 so that you can use a skill of another class, you can use a single skill of that class for another job? Or something similar to this... Or make it like FF11 where you can have a level 10 warrior/level 5 cleric as long as both classes are level 10? (That would be made easy by assigning each class a variable, than when it asks, "Pick your secondary class" It automatically divides that secondary class by 2 until it's reassigned, then it brings it back to the level it use to be) (Let me clarify on this - The secondary class can NEVER be higher than 50% of the main class in levels.. This is to balance it out)
Also when someone levels up their actually class, can it be an option to set their "Stat gain" Depending on the class that they currently are? (such as change it so that the maker can set the minimum value and the maximum value, which would create it's own curve)
And one more suggestion.. Adding a "Custom commands menu" To alter the various commands, and when you turn into one class, it automatically takes one of the commands and turns it into the command that goes along with that class.. Example - I have a barbarian class... I choose it with one of my characters. He now gets the "Rage" ability where "Skill" use to be.

One more idea - Make special "Passive" Traits added on to the script so that you can make classes that actually give a passive trait depending. Such as higher crit etc... And make it compatibile with tankentai 2.7.. Thanks Prexus, you rock.
 

Marpy

Member

Quick question: I got the whole menu thing down, but is there a way to hide the job change part of the menu until a certain switch has been activated. So that the player characters can't change jobs until after they do the quest that unlocks that power. Or whatever.
 
Hey Prexus, I just wanted to see ow that update was coming along. I'm rther excited to see what you will be implementing. Hopefully all is well. Best wishes.
 
I am having a big problem. Everytime I go to the event that has the job changer as soon as I talk to the event it tells me windows selectable line 32 error. it refuses to work.
 
What will the update include?

I made a addon for the prexus script already which allows you to select what characters classes are and also allow you to add new classes during the game.

Script:
#==============================================================================
#  Job changer(v1.0)-addon -Selectable Classes
#------------------------------------------------------------------------------
#  This add on allows you to know pick selectable classes for Prexus job changer
#  script. In order to assign a character to a class you must use the config
#  in the following format: AVAILABLE_CLASSES[actor.id]={1=>class.id,
#  2=>class.id...}.

#  New script commands: Used in script in Event Commands

#  Character_Class.new_class(actor,class_id):

#  Adds a class to the selected actor
#  e.g. Character_Class.new_class(1,6): Ralph learns Dark Knight or 
#  Character_Class.new_class($game_party.members[2].id,6): party member 3 learns
#  Dark Knight
#
#   Character_Class.remove_class(actor_id,class_id): Removes Class from character
#  doesn't work if character has class or is currently at that class
#  Not 100% tested please report any bugs
#
#==============================================================================

# Config

# AVAILABLE_CLASSES[actor.id]={1=>class.id,  2=>class.id...}.

# Notes: make one for each actor or you will get an error

AVAILABLE_CLASSES=[]#Don't change

# Actor 1 Ralph -> Paladin, Warrior, Magican
AVAILABLE_CLASSES[1] = {
1 =>1,
2=>2,
3=>4}

# Actor 2 -> Paladin, Warrior, Priest
AVAILABLE_CLASSES[2] = {
1 =>1,
2=>2,
3=>3
}

# Actor 3 -> Paladin
AVAILABLE_CLASSES[3] = {
1 =>1
}
# Actor 3 -> Paladin, Knight
AVAILABLE_CLASSES[4] = {
1 =>1,
2 =>5
}
AVAILABLE_CLASSES[5] = {
1 =>1,
2 =>5
}
#------------------------------------------------------------------------------
#Script
#==============================================================================
class Character_Class
   
   def self.new_class(actor,class_id)
     @ava_class = AVAILABLE_CLASSES[$game_actors[actor].id]
     @ava_class[@ava_class.length+1] = class_id unless @ava_class.has_value?(class_id)
   end
   
def self.remove_class(actor,class_id)
    @ava_class = AVAILABLE_CLASSES[$game_actors[actor].id]
    if @ava_class.has_value?(class_id) 
    if $game_actors[actor].class_id!= class_id
    if @ava_class.size > 1
    @lose = @ava_class.index(class_id)
    @ava_class.delete(@lose)
    for i in @lose...(@ava_class.size+1)
      @ava_class = @ava_class[i+1]
    end
    end
    @ava_class.delete(@ava_class.size) unless @ava_class[@ava_class.size] != @ava_class[@ava_class.size-1]
  end
  end
  end
   
end
 
class Window_CurrentParty < Window_Selectable

alias vitalice_addon_init initialize
 
  def initialize
    vitalice_addon_init
    @item_max = $game_party.members.size
  end
end

class Window_ClassPick < Window_Selectable
 
  def item

  return  $data_classes[AVAILABLE_CLASSES[member.id][self.index + 1]]
  end
 
  def refresh
    @item_max = AVAILABLE_CLASSES[member.id].size 
    @y = 0
    y = 0
    for i in 0..$data_classes.size - 1
     rect = item_rect(i)
      self.contents.clear_rect(rect)
    end
    for i in 1..@item_max
      @y+=WLH
      w = self.contents.width
      self.contents.font.color.alpha = (@member.class_id == $data_classes[AVAILABLE_CLASSES[member.id]].id ? 128 : 255)
      self.contents.draw_text(0, y+@y-WLH, w, WLH, $data_classes[AVAILABLE_CLASSES[member.id]].name)
      level = @member.class_level[$data_classes[AVAILABLE_CLASSES[member.id]].id]
      self.contents.draw_text(0, y+@y-WLH, w, WLH, "Lv. " + level.to_s, 2)
    end
  end
end


Assigning classes to characters in this script is simple just make a new Variable at the top called AVAILABLE_CLASSES[(actor_id)] then  assign each class by by AVAILABLE_CLASSES[(actor_id)]= {1=> class_id, 2=>class_id2...}. Do for each character in your game.

Also allows you to add a class to character through events  Character_Class.new_class(actor,class_id) script. Hopes this helps
 
This is an awesome script, very useful, I'm just wondering, is there a script command so I can change an actor's job via an event without bringing up the changing menu? If there already is one, I'm going to feel so stupid. Lol.

Sam.
 

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