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.

[XP] Skills Learning System by Charlie Lee (v1.7)

What system would you prefer to decide what skills a character can learn from a given weapon/accesso

  • All the skills available for his class, with the learning of skills by leveling up disabled.

    Votes: 16 44.4%
  • All the skills available for his class at level 99, in order to avoid that he learns the skill by le

    Votes: 2 5.6%
  • All the skills defined in the configuration file for each character, identified by IDs.

    Votes: 9 25.0%
  • All the skills defined in the configuration file for each character, identified by names.

    Votes: 5 13.9%
  • Other (post your suggestion)

    Votes: 4 11.1%

  • Total voters
    36
Hi everybody. I have a little update.
Version 1.5 introduces two new types of skills that can be defined with the old good element-tagging technique: "Immediate Use" and "Item Needed". Their meaning is obvious... however it is described in the updated instructions, first post.
The changes to the Status scene are now optional and in a separated page of the script editor, and you can remove them by simply removing that page. As an alternative I introduced a new scene that shows the progress in the learning of skills, and can be recalled by using a simple script instruction within an item (calling a common event), an event, or from a modified Main Menu.

Bye...
 
OK, so after weeks of trying I finally figured out some stuff that helps in making this script work the way I needed it.  So if anyone else is having problems with making a new type of weapon using multi-equip and getting it to learn the new skills I got a method for ya.  It's actually really simple and easy, I was just going about it the wrong way.  Also their is some things you should know about the script that wasn't mentioned that will help a lot too.

So let me explain how my skill system works first.  You can equip three Blood Gems, each will teach you a new skill.  First off, you need to know that you won't be able to actually get the new armor slots to work with this.  This is because the script doesn't look up the equipment your wearing through item ids, instead it looks up your equipment slots.  Let me see if I can explain better with examples;

Here's how my equip screen WAS set up -

Weapon
Artifact(assc)
Artifact(assc)
Blood Gem
Blood Gem
Blood Gem

Blood Gem was a new equipment type but that needed to be changed as you can't call by item ids.  So I changed it to this;

Weapon
Blood Gem
Blood Gem
Blood Gem
Artifact
Artifact

Now that we have are skill learning specific item in the slots that regular armor is equiped we can work with it.  I changed the Blood Gem to the 4th item type(assc) and made the artifacts the new armor type instead.  Then because this script can only read the original 4 armor slots we need the blood gems to be set in those positions, as you can see I moved them to show up in slots 1,2 and 3.  Ok, so now are setup is compatible.  Now open up Charlie Lee's script and look at lines 358-429.  The two ends after this line must stay below the new sections to be added to make more then one skill learning armor slots.

So since I don't need the learn by weapons I deleted that section(lines 358-294 deleted).  The I copied the assc section which actually isn't specifically calling assc but instead the armor slot where assc typically are.  Lets look at the script;

Code:
    # ACCESSORY
    y+=24
    y+=24
    self.contents.font.color = text_color(0)
    if $data_armors[@actor.armor4_id] != nil
      self.contents.font.color=system_color
      self.contents.draw_text(x,y,320,20,"Accessory equipped: ")
      self.contents.font.color=normal_color
      self.contents.font.bold=true
      draw_item_name_size($data_armors[@actor.armor4_id], x+200, y,18)
      
      y+=36
      bars=[]
      for class_no in 0 .. $data_classes.length
        if $data_classes[class_no] != nil
          if $data_classes[class_no].name == $data_armors[@actor.armor4_id].name
            for learning_no in 0 ... $data_classes[class_no].learnings.length
              skill_name=$data_skills[$data_classes[class_no].learnings[learning_no].skill_id].name
              skill_id=$data_classes[class_no].learnings[learning_no].skill_id
              bars[learning_no]=Bar.new(x+200,12+y+16*learning_no,100,8,self.contents)
              bars[learning_no].highlight_complete=true
              bars[learning_no].refresh([LEARNING_EXP_POINTS_MULTIPLIER*$data_classes[class_no].learnings[learning_no].level,@actor.experience_points_skills[skill_name]].min,(LEARNING_EXP_POINTS_MULTIPLIER*$data_classes[class_no].learnings[learning_no].level))
              self.contents.draw_text(x,y+16*learning_no,320,32,skill_name.to_s)
              self.contents.draw_text(x+320,y+16*learning_no,120,32,[LEARNING_EXP_POINTS_MULTIPLIER*$data_classes[class_no].learnings[learning_no].level,@actor.experience_points_skills[skill_name]].min.to_s+
              " out of "+(LEARNING_EXP_POINTS_MULTIPLIER*$data_classes[class_no].learnings[learning_no].level).to_s)
              if @actor.experience_points_skills[skill_name] >= LEARNING_EXP_POINTS_MULTIPLIER*$data_classes[class_no].learnings[learning_no].level or actor.skill_learn?(skill_id)
                self.contents.draw_text(x+440,y+16*learning_no,120,32,"TECHNIQUE LEARNED")
              end
            end
          end
        end
      end
    else
      self.contents.draw_text(x,y,320,32,"No accessory equipped")
    end

The lines we will be changing are these ones;

Code:
Line 399 -  if $data_armors[@actor.armor4_id] != nil

Code:
Line 404 -  draw_item_name_size($data_armors[@actor.armor4_id], x+200, y,18)

Code:
Line 410 -  if $data_classes[class_no].name == $data_armors[@actor.armor4_id].name

Right now they call the data from the 4th armor slot, but if you look at my setup i moved the slots it needs to call to armor slot 1,2 and 3.  So all we would do is start by changing each of those armor calls to slot 1 by changing the 4's to 1's.

Then I would copy and paste the data two times below it(remembering to keep those last two ends [not in the code i posted] at the end of them all)  and then change the numbers sequentially to armor slot 2 then armor slot 3.  And bam!  Works perfect.

I don't know how many people will actually find this useful but it helps explain the mechanics of the script and how it works for people who can't really script but are looking to get this working the way they need.  So hopefully it helps at least a few people.
 
Big update!
Version 1.6 was totally recoded.

New features include:
v1.6: New Scene_Learning_Status
v1.6: Shop Add-On
v1.6: Equip Add-On
v1.6: Full support of learning from weapons as well as from all armor types

and a somewhat new graphic design.
 
Updated with version 1.7.
Learning limited by classes has been introduced.

When CLASS_BASED_LEARNING=true is configured, characters will be able to learn only skills that are available for their classes, as configured in the database.
In the shop scene, use the SHIFT key to toggle the character of the equipment skills window.

New features:
v1.7: Learning of skills can be limited on a class basis.
v1.7: Skills that cannot be learned are shown in disabled color (applies to learning status scene, equip scene, and shop scene).
v1.7: The old learning status, accessed from the status scene, has been removed.
 
I found a bug. The level you set to your character for the skills for them to learn, once they reach that level, they will learn that skill without having to learn it from their weapon, or armor. EX: Under the class fighter, if you have his skill Feint Attack for level 99, once that character who his fighter as his class hits 99, he will learn that skill, without the need of learning it from his weapons, or armors. I also have a question? Why did you remove the learning status, accessed from the status scene? I really like that option, and the way it made the status for my characters look. Keep up the good work Charlie Lee :)
 
@Zero2505
I know that the RMXP's native learning system can interfere, i still have to decide how to disable it. Did you see the poll? I guess some people could want the two systems interoperating... i don't know. I will add some configuration options in the next release.
And about that skill learning status accessible from the status window: i didn't like it because it was an unnecessary edit of a RMXP class whereas it could be done with a brand new scene. It's gone, history. :)
 
There's no key anymore. You have to use a script command as Zero2505 said:
$scene=Scene_Learning_Status.new(0)

You can use an item associated to a common event, or you can modify the menu to have an additional entry that opens the Skill Learning Status. I'm about to add some instructions on how to do this simple edit to the menu. Check the first post.
 
Charlie Lee i've noticed a slight problem for those who place the optional scripts Scene Equip, and Scene Shop beneath the SDK.

It seems to conflict with the SDK 2.3 Part 1 Line 602 Object.update.
 
I've just uploaded a new demo with a bug fixed in Scene Equip. The link in the first post has been updated.
http://www.mediafire.com/?jtw2yutj1io
XP Learner, could you please give me more details? What does the error say?
However, consider that this system is non built to work with the SDK, i can see if it can be fixed easily anyway.
 
Incredible job! Is there any chance we'll see a RMVX port? I'd use it in a heartbeat for my upcoming project. :)

It goes pretty far with no error. The first error is on the main SLS script at line 152...

Code:
  #--------------------------------------------------------------------------
  # * Start After Battle Phase
  #--------------------------------------------------------------------------
  152   alias start_phase5_skl start_phase5
  153   def start_phase5
  154    @skill_learning_window=Window_BattleResultSkillLearning.new
  155    exp = 0
  156    # Loop
 
I'm combining this script with the XAS action battle system and when I complete a battle the EXP for the skill stays at 0. I'm wondering how I'd be able to sort this out. I think its something to do with the SCENE_BATTLE section of the script?
 

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