[XP] RO Job/Skill System

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

Previous topic - Next topic

Blizzard

January 09, 2008, 04:24:13 pm Last Edit: October 07, 2021, 10:29:46 am by Blizzard
RO Job/Skill System
Authors: Blizzard
Version: 2.3
Type: Ragnarok Online Job/Skill System Clone
Key Term: Custom Skill System

Introduction

This script allows you to use a skill system that is very similar to the skill system of the MMORPG Ragnarok Online. By gaining jobs and job levels the characters get points which they can use to learn and make skills stronger. Stronger skills have a higher numerical effect and lower SP cost. This script also allows the usage of a job change system.

This work is licensed under BSD License 2.0:
QuoteCopyright (c) Boris "Blizzard" Mikić
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1.  Redistributions of source code must retain the above copyright notice,
    this list of conditions and the following disclaimer.

2.  Redistributions in binary form must reproduce the above copyright notice,
    this list of conditions and the following disclaimer in the documentation
    and/or other materials provided with the distribution.

3.  Neither the name of the copyright holder nor the names of its contributors
    may be used to endorse or promote products derived from this software
    without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

You may use this script for both non-commercial and commercial products without limitations as long as you fulfill the conditions presented by the above license. The "complete" way to give credit is to include the license somewhere in your product (e.g. in the credits screen), but a "simple" way is also acceptable. The "simple" way to give credit is as follows:
QuoteRO Job/Skill System licensed under BSD License 2.0, Copyright (c) Boris "Blizzard" Mikić

Alternatively, if your font doesn't support diacritic characters, you may use this variant:
QuoteRO Job/Skill System licensed under BSD License 2.0, Copyright (c) Boris "Blizzard" Mikic

In general other similar variants are allowed as long as it is clear who the creator is (e.g. "RO Job/Skill System created by Blizzard" is acceptable). But if possible, prefer to use one of the two variants listed above.

If you fail to give credit and/or claim that this work was created by you, this may result in legal action and/or payment of damages even though this work is free of charge to use normally.


Features

  • job/class level and and change system
  • skill level system that can be turned off as well
  • gain Job Points for each Job Level and use them to power up your skills or learn new ones
  • increased SP cost and decreased skill power for skills that have not been improved to the maximum level
  • two fully functional scenes for class changing and skill learning/improving
  • easy setup and use
  • compatible with Blizz-ABS and RTAB
  • wide range of possible uses
v1.0b
  • fixed font problem
  • now beta
v1.01b
  • fixed a crash problem where enemies would be tested on skill levels
v1.2b
  • actors can now learn Chaos Drive transformation skills through this system (REQUIRES CRLS 5.0 OR HIGHER)
  • classes/jobs now can have stat modifiers
v1.3b
  • skills can now have other skills as requirements
v1.4b
  • added option to hide skills that haven't met the prerequisites yet
  • improved coding and the way data display is being refreshed
v1.5b
  • fixed bug with forgetting skills
  • added option to forget all skills from other classes when changing the class
v1.6b
  • now more compatible with Blizz-ABS 2.57
v2.0b
  • fixed bug where HP/SP wouldn't apply when the max HP/SP were decreased
  • fixed bug with skill usage when JOB_ONLY was not active
  • now more compatible with Blizz-ABS 2.7
  • improved coding
v2.01b
  • fixed bug when activating JOB_ONLY
v2.1b
  • fixed a few small problems with Blizz-ABS
v2.2b
  • fixed a the bug where during actor parameter testing the class of the dummy actor would change and unequip equipment
  • fixed crash bug that could occur when trying to change the class again
v2.3
  • added new license
  • added usage and crediting instructions


Screenshots



Demo

RO Job/Skill System

Script

Just make a new script above main and paste this code into it.
Script Download

Instructions

Inside the script in the first comment.

Compatibility

95% compatible with SDK v1.x, 60% compatible with SDK v2.x. Can cause incompatibility issues with other exotic Skill Systems, CMS-es and CBS-es. Fully compatible with Blizz-ABS, not compatible with Mr. Mo's ABS. WILL corrupt old savegames.

Credits and Thanks

  • Boris "Blizzard" Mikić
  • Nightfox for requesting this

Author's Notes

If you use this system to learn CD skills, it is recommended that you leave the skills' maximum level at only 1 as the consumption cost of the stats cannot change in CRLS. CD skills also don't appear in the improvement screen. Don't forget that you need to let the class be able to learn the CD skills just like a normal skill. If you don't have CRLS installed, the skill will be learned as if it was a normal skill.

If you find any bugs, please report them here:
http://forum.chaos-project.com

That's it! N-Joy! =D
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.

Spoofus

hey Blizz is there a way to have like a base stat bounus depending on the job of the character like if it a melle job it has a slight STR boost but if you change to a mage class you loose the STR boost and gain a INT boost instead


My Blog site I am working on: http://spoofus.weebly.com/

Blizzard

Sure. I'll see if I can add that in the next version.
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.

Spoofus

awsome that idea just hit hit me and thought that would be a cool feature  :D


My Blog site I am working on: http://spoofus.weebly.com/

Phasedscar

I just want to say that you've done a great job with all these codes Blizzard.  I'm currently making a game with your Blizz-ABS, Custom Stat Improvement, and RO Job skills.

I did notice something strange though.  When using Blizz-ABS with RO Job skills the changes to a skill's performance wasn't changing at all.  I placed the code above the main originally, when that didn't work I placed it over Blizz-ABS, though I'm not
getting any error messages whatsoever, it isn't scaling the skill strengths at all.

I'll give you a little more detail in what I have done with the customization if that
may have caused it.

  INIT_JP = 1
  LVL1_POWER = 50
  LVL1_COST = 100
  LVLUP_RATE = 20
  EXP_RATIO = 20
  RESET_LVLS = false
  JOB_ONLY = false
  USE_LEVEL = true
  USE_ALL = true
  RO_RIGHT = true
  EVASION = 'EVA'

I have each skill in my database set to a maximum of 10
   
when 1 then return 10
   when 2 then return 10
   when 3 then return 10
   when 4 then return 10
    etc.

And a branching job increase system, starting with a dummy class. ( ClassName(minimum level required))

                                                 _ Berserker(lv40)
                 __________Warrior(lv19)
               /                                 - Gladiator(lv40)
       Squire(lv1)
     /         \                                        _ Assassin(lv40)
   /             -----------------Rogue(lv19)
  /                                                     - Duelist(lv40)
???(starting)
  \                             _ Archmage(lv40)
   \             Mage(lv19)
     \         /               - Necromancer(lv40)
      Acolyte(lv1)
               \                                     _ Witchdoctor(lv40)
                 \__________Shaman(lv19)
                                                     - Priest(lv40)

The code for that looks like:

    when 1 then return [[19, 3], [19, 4]]
    when 2 then return [[19, 5], [19, 6]]
    when 3 then return [[40, 11], [40, 12]]
    when 4 then return [[40, 13], [40, 14]]
    when 5 then return [[40, 7], [40, 8]]
    when 6 then return [[40, 9], [40, 10]]
    when 15 then return [[1, 1], [1, 2]]


I had double checked all of that but I'm not sure if it has anything to do with it.  Anyway, I'm only mentioning a minor glitch that seems to be taking part of the code.  If there's any suggestions it would be greatly appreciated.
Spoiler: ShowHide
My own game project & My resource workshop! (respectively)
http://forum.chaos-project.com/index.php?topic=608.0 http://forum.chaos-project.com/index.php?topic=682.0



What that is? Affection area for flails. - Blizz-ABS, the ultimate ABS

The pictures in your signature may altogether be no more than 200kB. The height must not exceed 200 px and the width must not exceed 800 px. Altogether they may take up an area of 160000 px2. Every signature not matching this criteria is a subject of the moderator team to remove and leave this rule as message in your signature.

Blizzard

Hm, according to the script order list I put together here the ROSYS should go below Blizz-ABS. Could you check on this? If it doesn't work, I'll fix it right away.
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.

Phasedscar

January 23, 2008, 06:14:25 pm #6 Last Edit: January 23, 2008, 06:30:56 pm by Phasedscar
I had actually set it back to the script order you had posted before (I've been reading pretty diligently on your forums and just now decided to speak up).

I did notice that I had taken you Equap script out of tons of addons and placed it in there, I'm thinking I might be getting a reset on the skill values from there, so I'm going to remove it and see what happens.

Edit1: In case you're wondering I had taken apart much of the tons of addons to clean up the script order a little and make it easier to modify the databases.  In other words I didn't want to look through thousands of lines of code to fine exactly what I'm looking for.

Edit2: Ok, I changed the script order to:
SDK 1.5
STCMS Hybrid
Tons of Addons
Blizz-ABS 1.8
Stat Distribution System
RO Jobskills
Main

I actually encountered another error with this... "Script Blizz-ABS line 6595: NoMethodError occurred, Undefined Method 'draw_text_shaded_later' for #<bitmap:0x3ab68f0>".  It might be 1.8 since you have been heavily modifying it for the Party AI lately, I'm not sure.
Spoiler: ShowHide
My own game project & My resource workshop! (respectively)
http://forum.chaos-project.com/index.php?topic=608.0 http://forum.chaos-project.com/index.php?topic=682.0



What that is? Affection area for flails. - Blizz-ABS, the ultimate ABS

The pictures in your signature may altogether be no more than 200kB. The height must not exceed 200 px and the width must not exceed 800 px. Altogether they may take up an area of 160000 px2. Every signature not matching this criteria is a subject of the moderator team to remove and leave this rule as message in your signature.

Blizzard

Sure, no problem. That's why I made every add-on separate, you can easily delete the ones you don't need for whatever reason. Yeah, EQUAP could be causing problems.
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.

Phasedscar

Ok, I changed the order I mentioned above slightly so that Tons of Addons is below Blizz-ABS and it removed that one error.  I had modified Tons to contain Multi_Drop, HPSPPLUS and Multi_Hit.  Didn't alter the code on any of the lines of actual code in those addons, just a little bit of the databases.
Spoiler: ShowHide
My own game project & My resource workshop! (respectively)
http://forum.chaos-project.com/index.php?topic=608.0 http://forum.chaos-project.com/index.php?topic=682.0



What that is? Affection area for flails. - Blizz-ABS, the ultimate ABS

The pictures in your signature may altogether be no more than 200kB. The height must not exceed 200 px and the width must not exceed 800 px. Altogether they may take up an area of 160000 px2. Every signature not matching this criteria is a subject of the moderator team to remove and leave this rule as message in your signature.

Blizzard

January 23, 2008, 06:37:32 pm #9 Last Edit: January 23, 2008, 06:40:08 pm by Blizzard
Alright then. :) That deserves a power up, don't you think? ^_^
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.

Phasedscar

Haha, now I just need the sound from Soldiers of Fortune..  "FOOD!"
Spoiler: ShowHide
My own game project & My resource workshop! (respectively)
http://forum.chaos-project.com/index.php?topic=608.0 http://forum.chaos-project.com/index.php?topic=682.0



What that is? Affection area for flails. - Blizz-ABS, the ultimate ABS

The pictures in your signature may altogether be no more than 200kB. The height must not exceed 200 px and the width must not exceed 800 px. Altogether they may take up an area of 160000 px2. Every signature not matching this criteria is a subject of the moderator team to remove and leave this rule as message in your signature.

Blizzard

January 26, 2008, 12:19:25 pm #11 Last Edit: January 26, 2008, 12:20:05 pm by Blizzard
BTW, you should get 1.89. And the problem with the font was the shaded text add-on which Blizz-ABS had to test if it's there. Best you add the add-on above Blizz-ABS.

EDIT:

Updated to v1.2b.
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.

Spoofus

woot....  ;D you added the stat bonuses yay!! i guess asking does help out lol


My Blog site I am working on: http://spoofus.weebly.com/

Phasedscar

It is awesome, I would have mentioned it myself except you already had lol.

Good Job btw Blizz, it's working great for me now.
Spoiler: ShowHide
My own game project & My resource workshop! (respectively)
http://forum.chaos-project.com/index.php?topic=608.0 http://forum.chaos-project.com/index.php?topic=682.0



What that is? Affection area for flails. - Blizz-ABS, the ultimate ABS

The pictures in your signature may altogether be no more than 200kB. The height must not exceed 200 px and the width must not exceed 800 px. Altogether they may take up an area of 160000 px2. Every signature not matching this criteria is a subject of the moderator team to remove and leave this rule as message in your signature.

Caro Ru Lushe

 :D Finally, it is able to make Chaos Drives be learned! <3

*Power Up*

Spoofus

hmmm i was wondering if it would be possible to have it to where you can learn passive skills that raise your stats permanently
example:
thew player is a theif class and learns
a skill named Hawk's Grace( adds +5 AGL) and changes his class to
warrior, and he looses that skills stat raise until he changes back and then he would get the skill bounus again


My Blog site I am working on: http://spoofus.weebly.com/

Blizzard

You mean like specific skills that additionally increase the stats when in the right class?
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.

Spoofus

yeah exactly..you right on te mooney


My Blog site I am working on: http://spoofus.weebly.com/

Phasedscar

February 22, 2008, 07:25:28 pm #18 Last Edit: February 22, 2008, 07:27:24 pm by Phasedscar
I decided to make a common event for custom class stat increases.  Basically it's just a series of variables that I'm using to increase the stats based on the character level.
Works like this:

Control Variables: [001: current_level] = [Character]'s Level
Conditional Branch: Variable [001: current_level] == [002: next_level]
    Control Variables: [002: next_level] = Variable [001: Current_level]
    Control Variables: [002: next_level] += 1
     Condition Branch: [003: class] == ?? (a constant variable to determine your class, should be done when you use an activation event) 
         HP +10
         STR +10
    End
etc.
   Wait 1
Else
   Wait 1
End

This wont work unless I make an event where 002: next_level will have the same or higher requirement then the character's current level.  It's pretty simple and straight forward but it will allow for a linear increase in stats.  I would however like to also have learned abilities to increase stats that can be learned.

You can do it through a simple condition branch in a common event, the harder part is making sure that you do not have it repeat the increase.

Conditional Branch: [Character] is [Skill1] learned.
   Conditional Branch: Variable [004: HP_increase] == 0
      HP + 10
      Control Variable: [004: HP_increase] == 1
End
Conditional Branch: [Character] is [Skill2] learned.
   Conditional Branch: Variable [005: SP_increase] == 0
      SP + 10
      Control Variable: [005: SP_increase == 1]
End

Comment: You can also use these as a linear learning path, so you can reuse the same variable to say, make a skill better.


Conditional Branch: [Character] is [Skill1rank2] learned.
Conditional Branch: Variable [003: HP_increase] == 1
   HP + 10
   Control Variable: [003: HP_increase] == 2
End

Not that for each unique skill not associated to the stat increase skill, you should add a new variable.  You should also make a unique skill for each rank to keep it from going further down your tree when you do not wish it too.  You can also remove the skill from your skill list on your character, but be careful in how the Control Variable works so that if you want it to repeatedly increase your stats it wont stop on the Conditional Branch: Variable [001: ??] == ?

You will also have to make a new set of conditional branches for each character, but if you plan on having unique skills to each character that wont take long.

Also, be sure to put in a wait command at the very bottom of the common event script to keep it from looping too bast and stalling your game.  Generally speaking a Wait 1 or Wait 2 is the best choice since it's still fast but throttles the scripts run speed down to a finite amount
Spoiler: ShowHide
My own game project & My resource workshop! (respectively)
http://forum.chaos-project.com/index.php?topic=608.0 http://forum.chaos-project.com/index.php?topic=682.0



What that is? Affection area for flails. - Blizz-ABS, the ultimate ABS

The pictures in your signature may altogether be no more than 200kB. The height must not exceed 200 px and the width must not exceed 800 px. Altogether they may take up an area of 160000 px2. Every signature not matching this criteria is a subject of the moderator team to remove and leave this rule as message in your signature.

Blizzard

This looks nice. Why don't you post it in the Event Systems section? :)
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.