[XP] RO Job/Skill System

Started by Blizzard, January 09, 2008, 04:24:13 pm

Previous topic - Next topic

Tanklinbitz

Hey blizz, another couple of things.

1. When I change from one mage class to another that uses the same armor and/or weapons it just duplicates the items.Example: Black Mage and White Mage both use a bronze rod. I change to Black Mage class. I equip the bronze rod. Then I switch to the White Mage. I go to the equip screen and I have the bronze rod equip and it says I have another in my inventory. It does it like every time I switch. I was wondering if there was a part of the code I overlooked that was suppost to stop it from happening.

2. I had an idea and I'm not sure how hard it would be to do. Like have it so you have to master 2 classes to change into a certain class. Like for a paladin you have to be like a lvl 15 warrior and a lvl 15 White Mage. Something like that. If its too much trouble to do then I can live with it as it is now.

Blizzard

1. o.o I will look into that.

2. Combined class requirements? I'll see what I can do.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Tanklinbitz

Hey blizz, sorry but I've got another thing. With the whole changing the char image, is there a way to make a hidden accessory, and then change that accessory with the class. I was thinking of just using the visual equip script and then make an accessory for each class then set the class image to that accessory. If i can make the accessory hidden then the player couldn't change it, and if the accessory changes with the class then the char. image will change with the class.

Blizzard

You're overcomplicating things unnecessarily.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

legacyblade

Quote from: Tanklinbitz on October 26, 2008, 10:16:23 pm
2. I had an idea and I'm not sure how hard it would be to do. Like have it so you have to master 2 classes to change into a certain class. Like for a paladin you have to be like a lvl 15 warrior and a lvl 15 White Mage. Something like that. If its too much trouble to do then I can live with it as it is now.


Well, it's not as feature rich as this job system, but that's how my class change system works.

http://forum.chaos-project.com/index.php?topic=1688.0

I'm going to upload my updated script later today.

rgangsta

I get this error everytime I activate NGP.
:'(
HELP

Blizzard

That's not a problem with my script.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Aqua

How are you accessing the skill learning screen?



Btw... when you insert images... you're supposed to put the .png file into the image (and spoiler) tags, not the .php.  The way you do now is not an image and cannot be opened.

The ones you put are a .php file with _GET info that just ends in .png; it's not the actual image itself.

So either just put that link there or get the real .png.

Kagutsuchi

December 08, 2008, 06:21:15 pm #48 Last Edit: December 09, 2008, 11:29:09 am by Kagutsuchi
I blame imageshack for being confusing :ninja: (I removed my previous post)

When I try to access the skill learning screen I get this error:
Spoiler: ShowHide

I am accessing the skill learning screen from an event, using call script. "$scene = Scene_SkillChange.new"
(without the ")

The part of the script I've edited:
Spoiler: ShowHide
#==============================================================================
# module BlizzCFG
#------------------------------------------------------------------------------
#  This module serves for configuration in my scripts and for consistency.
#==============================================================================

module BlizzCFG
 
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  INIT_JP = 1
  LVL1_POWER = 50
  LVL1_COST = 200
  LVLUP_RATE = 20
  EXP_RATIO = 20
  RESET_LVLS = false
  JOB_ONLY = false
  USE_LEVEL = false
  USE_ALL = false
  CLASS_SKILLS = false
  HIDE_SKILLS = false
  RO_RIGHT = false
  EVASION = 'EVA'
  UP_COLOR = Color.new(0, 255, 0) # (R, G, B)
  DOWN_COLOR = Color.new(255, 0, 0) # (R, G, B)
  CD_SKILLS = [70, 80]
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

  def self.roskill_maxlevel(id)
    case id
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START RO Skill Database
#
#   You can define the max level of each skill here. Use following template to
#   set up your configuration:
#
#     when ID then return NUMBER
#
#   ID     - the skill ID
#   NUMBER - the maximum level
#
#   Note that using values lower than 1 WILL CAUSE BUGS! Default value is 1 and
#   skills that are not defined here will have the default value automatically
#   applied.
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    when 1 then return 10
    when 21 then return 9
    when 60 then return 1
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END RO Skill Database
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    end
    return 1
  end
 
  def self.roskill_reqs(id)
    case id
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START RO Skill Requirement Database
#
#   You have the option to make skills require not only a specific level, but
#   other skills and their levels as well. Such a skill will not appear in the
#   list of skills until all requirements are met.
#   Use following template to set up your configuration:
#
#     when ID then return [[SKILL_ID1, MIN_LEVEL1], [SKILL_ID2, MIN_LEVEL2], ...]
#
#   ID        - the skill ID
#   SKILL_ID  - ID of the required skill
#   MIN_LEVEL - minimum required level of the required skill
#
#   You can add as many requirements as you want, separate them with commas.
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    when 21 then return [[1, 9]]
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END RO Skill Requirement Database
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    end
    return []
  end
 
  def self.rojob_maxlevel(id)
    case id
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START RO Job Database
#
#   You can define the max level of each job here. Use following template to
#   set up your configuration:
#
#     when ID then return NUMBER
#
#   ID     - the class ID
#   NUMBER - the maximum level
#
#   Note that using values lower than 1 WILL CAUSE BUGS! Default value is 1 and
#   jobs that are not defined here will have the default value automatically
#   applied.
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    when 1 then return 70
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END RO Job Database
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    end
    return 1
  end
 
  def self.rojob_next(id)
    case id
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START RO Job-Connection Database
#   
#   Here you can define job change trees. When you have one job active you can
#   change to any other job that is defined here. It is possible to define
#   recursive trees where a class can be changed back as well without problems.
#   Use following template to set up your configuration:
#
#     when ID then return [[MIN_LEVEL1, NEW_ID1], [MIN_LEVEL2, NEW_ID2], ...]
#
#   ID        - the current class ID
#   MIN_LEVEL - minimum level required to be allowed to change
#   NEW_ID    - the ID of the new class
#
#   You can add as many next classes as you want, separate them with commas.
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    when 0 then return [[0, 0]]
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END RO Job-Connection Database
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    end
    return [[]]
  end
 
  def self.job_stat_mod(id)
    p_maxhp = p_maxsp = p_str = p_dex = p_agi = p_int = 0
    m_maxhp = m_maxsp = m_str = m_dex = m_agi = m_int = 1.0
    case id
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Job Stat Modifier Database
#   
#   You are able to set up modifiers for actor stats that change depending on
#   the current job. Use following template to set up your configuration:
#
#     when ID
#       p_maxhp = PLUS
#       p_maxsp = PLUS
#       p_str = PLUS
#       p_dex = PLUS
#       p_agi = PLUS
#       p_int = PLUS
#       m_maxhp = MULTI
#       m_maxsp = MULTI
#       m_str = MULTI
#       m_dex = MULTI
#       m_agi = MULTI
#       m_int = MULTI
#
#     ID    - the current class ID
#     PLUS  - an integer value (default is 0)
#     MULTI - a decimal value (default is 1.0)
#
#   The values that have p_ before that name are static modifiers. For example,
#   if you use 100, then the given stat will increase by 100 if the actor has
#   the given class. If you use -200, then it will decrease by 200 from the
#   actor's basis.
#   The values that have m_ before that name are dynamic modifiers. For
#   example, if you use 1.1, then the given stat will increase by 10% if the
#   actor has the given class. If you use 0.8, then it will decrease by 20%
#   from the actor's basis.
#   
# Note:
#   
#   It might be a good idea to create a neutral class if you are using this
#   feature. If you don't set up a class here, then the default values will be
#   applied. Keep in mind that first all static modifiers will be applied and
#   afterwards the dynamic modifiers.
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    when 1
      p_maxhp = 0
      p_maxsp = 0
      p_str = 0
      p_dex = 0
      p_agi = 0
      p_int = 0
      m_maxhp = 1
      m_maxsp = 1
      m_str = 1
      m_dex = 1
      m_agi = 1
      m_int = 1
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END RO Job Stat Modifier Database
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::


Edit: I tested the class change screen, and it worked without problems.

Edit2: I found out that it was because I had forgotten to add one of the skills my character was going to learn to the list of learning skills ^^;;
However I still get the problem, but now I get it when I try to learn the skill :(

The part where the error occurs:
Spoiler: ShowHide
#----------------------------------------------------------------------------
  # draw_item
  #  i     - index
  #  color - font color
  #  Draws a specific skill and the level requirement to learn it.
  #----------------------------------------------------------------------------
  def draw_item(i, color = nil)
    lvl = (BlizzCFG::USE_LEVEL ? @actor.level : @actor.job_level)
    # decide color depending on which level is used
    if !BlizzCFG::HIDE_SKILLS && (lvl < @commands.level || # <<<<<<<<<<<<<<<<
        BlizzCFG.roskill_reqs(@commands.skill_id).any? {|r|
             !@actor.skills.include?(r[0]) || @actor.skill_level(r[0]) < r[1]})
      self.contents.font.color = disabled_color
    else
      self.contents.font.color = normal_color
    end
    # get rectangle
    rect = Rect.new(32, 32*i, self.contents.width - 36, 32)
    # get icon bitmap
    bitmap = RPG::Cache.icon($data_skills[@commands.skill_id].icon_name)
    opacity = self.contents.font.color == normal_color ? 255 : 128
    # draw bitmap
    self.contents.blt(4, 4+32*i, bitmap, Rect.new(0, 0, 24, 24), opacity)
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    # draw name and requirement if not using the hiding option
    self.contents.draw_text(rect, $data_skills[@commands.skill_id].name)
    unless BlizzCFG::HIDE_SKILLS
      self.contents.draw_text(rect, "(Lv #{@commands.level})", 2)
    end
  end

Blizzard

Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Kagutsuchi

I just think I should say that I don't think it is something wrong with the script. It is either that I have forgot to add something, like I forgot to add one of the skills my character were supposed to learn, or that it isn't compatible with some of the scripts I am using.

Blizzard

Then you should test it alone and with your custom scripts enabled.

Are your scripts in the right order, BTW? http://forum.chaos-project.com/index.php?topic=23.0
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Kagutsuchi

After trying to re-implement the system, I get this error.



I have found out that it got something to do with your Chaos Rage Limit System, because when I remove it, the RO Job/Skill System starts working. CRLS is very important to me, so I'd be glad if you could fix it blizz :) (I have tried to upgrade to the latest version)

(I am using it in my The World R:3 project, and I have the CTLS thingie which makes CRLS work with blizz abs)

Blizzard

Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Kagutsuchi

I decided to temporary remove the CRSL system, until you had hopefully fixed it, but now I encounter this problem when the characters try to execute a skill.

(Skill learning script = RO Job/Skill System)

I suspect this might mean that it isn't compatible with blizz abs :( I am hoping you can fix this too. (Please prioritize getting the RO Job/skill system compatible with blizz abs, rather than the crsl system)

Blizzard

Ok, THAT'S weird. O_o But I think I know what the problem is. I changed how the SP consumption works in Blizz-ABS. I didn't update this script for quite some time so it's probable that it needs to be updated. I'll get to it as soon as I release CP Beta.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Kagutsuchi

Ok good ^^ Glad to hear it will be fixed quickly ^^ (Yeah, I think there might have been something with the sp, cause when I opened the hotkey list the cost of the skills was still the original cost, and when I put them into the quick button the amount of times I could use it before running out of mana didn't show either.)

Blizzard

Then I should probably get back to work on CP Beta. xD
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Kagutsuchi

Yes, I'd really love to be able to be on schedule with the demo of my game without having to cut out too much stuff that isn't completed yet ^^;;

themrmystery

Okay, maybe I'm just not reading the instructions right but, or I don't know a very common event script but here goes:

How do you force an actor to learn a skill?

I do not mean the raise skill level, as that method works fine, the only problem is, for instance in your demo (Leg Sweep: 061), when you talk to the pig, he raises the level, and you can have skill ranks maxed out at 3 of 3, and still not actually KNOW the skill, you just can spend a job point to learn it now at max level.  I want the pig guy to actually make you learn the skill, without having to spend job points.

Thanks.