Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

4 Pages V  < 1 2 3 4 >  
Reply to this topicStart new topic
> Leveling Equips (weapons & armors that level up), Beta Release updated to v0.6.27
Swish
post Sep 20 2010, 01:42 PM
Post #21


Level 2
Group Icon

Group: Member
Posts: 17
Type: None
RM Skill: Undisclosed




Well it doesn't work properly... I made accessory called cure orb, and written in it <equip skill 6>, then written in 006: Cure <requires battles: 3> and after 3 battles my char didn't learn skill... sad.gif what should I do?
Go to the top of the page
 
+Quote Post
   
LordHeinrich
post Sep 20 2010, 01:56 PM
Post #22


Level 14
Group Icon

Group: Revolutionary
Posts: 267
Type: Artist
RM Skill: Beginner




Give me a moment to test it out some more. While I do this, please let me know if you are using an extra armor (YEM Equipment Overhaul) slot or a default armor slot.
Go to the top of the page
 
+Quote Post
   
Swish
post Sep 20 2010, 02:21 PM
Post #23


Level 2
Group Icon

Group: Member
Posts: 17
Type: None
RM Skill: Undisclosed




not using extra slot atm
Go to the top of the page
 
+Quote Post
   
LordHeinrich
post Sep 20 2010, 02:51 PM
Post #24


Level 14
Group Icon

Group: Revolutionary
Posts: 267
Type: Artist
RM Skill: Beginner




I tested it with the default system and it works fine, however, it doesn't work with Yanfly Engine Melody. It might be YEM Skill Overhaul that is causing a conflict. This one will take a bit of time to look into. I will delay the next release until I figure something out for this. Thanks for pointing out the issue

EDIT : I'm an idiot tongue.gif I was fooled by my own feature!! I didn't explain it to you, but one feature of the equip skill system is that you can restrict it to only equips that can level up. This is set at the beginning of the configuration by setting RESTRICT_EQUIPS = true/false. By default, it is set to true meaning that only equipment that can level up will teach skills. So, you have to set the feature according to how you are making your game. I wasn't getting it to work with YEM, because Leather Shield wasn't set to level up, but it was in the other tongue.gif It works as it should as long as everything is setup correctly.

I'll alter Scene Battle Slightly, because Victory Aftermath may or may not cause issues.

Next update should be up in a few minutes.
Go to the top of the page
 
+Quote Post
   
LordHeinrich
post Sep 20 2010, 05:33 PM
Post #25


Level 14
Group Icon

Group: Revolutionary
Posts: 267
Type: Artist
RM Skill: Beginner




New version 0.6.27 uploaded. I removed the level cap on equips, so now you can set them to whatever you want (within reason). In order to do this, you must first set the absolute cap using the configuration LEVEL_CAP_nnn. Whatever is set here, is the absolute highest level that equips can level to. This is the only way to make it so the game will not crash when you alter the level caps. There is a note about setting levels in the instructions, but basically higher levels = more CPU cycles.

@Swish,
Just in case you didn't read the edit above, the Equip Skill system is set to work only for equips that can level by default. If you plan to use it on all equips, then you must set RESTRICT_EQUIPS = false.

I also added customization for different colors based on the equip status. The different status are:

no_level - This means an equip cannot level and never leveled up
disabled - This means an equip was able to level up and reached minimum level 2, but it can no longer level (because of a disable_level script call)
can_level - This means an equip can still level and is not at max level
max_level - This means an equip is at maximum level.

I also made some minor bug fixes, although I do not remember what as they were actually from an unreleased v0.6.21. I do remember correcting the Two-Handed equip bug, where you can equip a Two handed weapon with a shield.

I am not going to add the Skill Require Equip Level and Require Equip Stat feature to the script. I can't get them to work correctly and it is better if I move on to finishing up the system by creating item windows and such.

The script still has a long way to go before leaving Beta status, but it may be good enough to start using in Demo Projects. Because of the size of the script, it is getting hard to catch all the bugs, so please report any!!
Go to the top of the page
 
+Quote Post
   
Dyrnwyn
post Sep 21 2010, 06:42 AM
Post #26


Level 4
Group Icon

Group: Member
Posts: 46
Type: None
RM Skill: Beginner




Thanks, LH! I'll load it up in AoS and give it a shot. I think this is going to be exactly what I was hoping for and enable me to cut my database from about 750 weapons / armor down to about 125. HUGE HELP! smile.gif

Double post: Megaupload hates me. File temporarily unavailable. sad.gif
Go to the top of the page
 
+Quote Post
   
Swish
post Sep 21 2010, 01:44 PM
Post #27


Level 2
Group Icon

Group: Member
Posts: 17
Type: None
RM Skill: Undisclosed




Thank you LordHeinrich! It works great!. Now I just await when you add compatibility to menu so I can see battle requirements for skills.
Go to the top of the page
 
+Quote Post
   
LordHeinrich
post Sep 21 2010, 10:27 PM
Post #28


Level 14
Group Icon

Group: Revolutionary
Posts: 267
Type: Artist
RM Skill: Beginner




@Dyrnwyn,

The link should work. You could be trying at a time when the servers from your country are busy. Try refreshing when pages don't work. If you can't get it, I can re-upload and post a second link or something.
-------------------
I made a very small progress on the script, not enough to warrant a new release, but added the ability to view what skills get taught by equips. This is for the item scene, so no progress bars in this one. I'll have progress bars and such in the equip scene. This is also compatible with my Sell Item Overhaul script and will display the equip_skill info in the additional window. The patch is small enough to spoiler, so no download link:

Equip Info Patch
CODE
module GNM
  module DISPLAY_EQ_LEVELS  
    hash1 = EQUIP_PROPERTIES # do not edit
    
    # displays what to display when equipping skills
    hash2 ={:eq_skill   => "Teaches Skills"}
    
    hash1.merge!(hash2) # do not edit
    EQUIP_PROPERTIES = hash1 # do not edit
  end
end

#==============================================================================
# class Window_EquipData
#==============================================================================
class Window_EquipData < Window_Base
  #--------------------------------------------------------------------------
  # draw_weapon_properties
  #--------------------------------------------------------------------------
  alias_method :hein_patch_wp_prop, :draw_weapon_properties unless $@
  def draw_weapon_properties(dy)
    dy = hein_patch_wp_prop(dy)
    draw_equip_skill(dy)
    return dy
  end
  #--------------------------------------------------------------------------
  # draw_armor_properties
  #--------------------------------------------------------------------------
  alias_method :hein_patch_ar_prop, :draw_armor_properties unless $@
  def draw_armor_properties(dy)
    hein_patch_ar_prop(dy)
    draw_equip_skill(dy)
    return dy
  end
  #--------------------------------------------------------------------------
  # draw_equip_skills
  #--------------------------------------------------------------------------
  def draw_equip_skill(dy)
    return dy if @item.equip_skills.nil? or @item.equip_skills == []
    dx = 0; @data = []; text = @hash[:eq_skill]
    self.contents.font.color = system_color
    self.contents.draw_text(dx, dy, contents.width, WLH, text, 1)
    dy += WLH
    skills = @item.equip_skills
    skills.each { |i|
    @data << $data_skills[i] }
    for skill in @data
      if @data.index(skill).to_i%2 == 0
        dx = 4
      else
        dx = contents.width/2 + 4; dy -= WLH
      end
      n = skill.name
      self.contents.font.color = normal_color
      self.contents.draw_text(dx, dy, contents.width/2 - 8, WLH, n, 0)
      dy += WLH
    end
    return dy
  end
end
if $imported["SellItemOverhaul" && "EquipLevels"]
  #==========================================================================
  # ** Window_CustomStatus
  #==========================================================================
  class Window_CustomStatus < Window_Base
    alias_method :hein_patch_sio_draw_info, :draw_information
    def draw_information(dy)
      draw_equip_skill(dy)
      hein_patch_sio_draw_info(dy)
      return dy
    end
    #--------------------------------------------------------------------------
    # draw_equip_skills
    #--------------------------------------------------------------------------
    def draw_equip_skill(dy)
      return dy if @item.equip_skills.nil? or @item.equip_skills == []
      dx = 0; @data = []; cw = contents.width
      skills = @item.equip_skills
      skills.each { |i|
      @data << $data_skills[i] }
      for skill in @data
        n = skill.name; t = "Equips Skill "
        self.contents.font.color = system_color
        self.contents.draw_text(dx, dy, cw*2/5, WLH, t, 0)
        self.contents.font.color = normal_color
        self.contents.draw_text(cw*2/5 + 4, dy, cw*3/5 - 4, WLH, n, 0)
        dy += WLH
      end
      return dy
    end
  end
end
Go to the top of the page
 
+Quote Post
   
Swish
post Sep 22 2010, 09:25 AM
Post #29


Level 2
Group Icon

Group: Member
Posts: 17
Type: None
RM Skill: Undisclosed




umm where should i put patch?
Go to the top of the page
 
+Quote Post
   
Dyrnwyn
post Sep 22 2010, 08:10 PM
Post #30


Level 4
Group Icon

Group: Member
Posts: 46
Type: None
RM Skill: Beginner




Try putting it at the bottom of the existing script. from the looks of it, it adds another scene, so it can go anywhere before/after existing scenes.
Go to the top of the page
 
+Quote Post
   
LordHeinrich
post Sep 23 2010, 01:10 PM
Post #31


Level 14
Group Icon

Group: Revolutionary
Posts: 267
Type: Artist
RM Skill: Beginner




Right, it goes right below the equip level script. You can either append to the script or make a new one just below. Note, that I made a slight edit because I didn't notice when I posted, but it didn't copy/paste correctly. No code was changed, I just deleted the line that was just "===".

What the patch does is add lines to the display box in the new scene I made for viewing the Level Status. It will look something like:

Teaches Skills
Skill 1 Skill 2
Skill 3 Skill 4
etc...

Don't go to crazy teaching equips too many skills, or it will eat up all the space in the window as it is set for two skills per row.

Also, if using my Sell Item Overhaul Script, it will add those lines to the Information Window. This looks something like:

Information
Teaches Skill 1
Teaches Skill 2
Teaches Skill 3

The good thing about that is that it will show when selling equips that equip skills... if I remember correctly, also when buying equips with the Buy Item add-on.

It also adds a line to the EQUIP_PROPERTIES hash in the configuration of the equip level script to be able to edit what it says when a weapon can equip skills.

The patch is temporary and once the next version is up (when I get to editing the equip scene) it won't be needed.
Go to the top of the page
 
+Quote Post
   
Dyrnwyn
post Sep 24 2010, 05:53 PM
Post #32


Level 4
Group Icon

Group: Member
Posts: 46
Type: None
RM Skill: Beginner




Heyas, again, LH. I found another bug in the system. I'm not sure if this one will be fixable, but here's what I have:

I have multiple weapons that require a LOT of exp to level. In testing this awesome mod, I got about 1/2 to a level on a high-end item, then needed to take care of something, so I saved the game to resume testing later. When I reloaded the game later, I noticed all the exp was gone from the item. After more checking, I found that every item loses its exp when you save and then resume later. Something you can work with?

And a second small bug:

I know you were designing your script to be fully compatible with the melody battle engine (YAY!!!) I just wanted to let you know that if you swap weapons in battle, as Yanfly's scripts allow, it'll crash out after battle when it tries to award weapon / armor exp. Thanks LH!

EDIT: And one more thing: I'm sometimes getting a nil error with line 1388,
@cri = [@cri + @cri_gain, @max_cri].min unless @max_cri == @cri
no idea how that happened, because I haven't set up any critical factors in my RPG.

This post has been edited by Dyrnwyn: Sep 24 2010, 06:52 PM
Go to the top of the page
 
+Quote Post
   
LordHeinrich
post Sep 24 2010, 07:09 PM
Post #33


Level 14
Group Icon

Group: Revolutionary
Posts: 267
Type: Artist
RM Skill: Beginner




I will try and look into the first bug because that one is pretty serious. Does this only happen when an equip gains experience, but does not level up? I'll fiddle a bit to try and duplicate the bug first, cause levels are saving fine for me on the YEM set up I have and they show the proper experience.

Edit: I am noticing some odd behavior, with the exp shifting to unequipped weapons. ** I meant equips **

Edit II: Which version of the script are you using? Line 1388 is just "end" in the uploaded one. In the unreleased version that integrates the patch, line 1388 is "return if @no_level". I can't seem to get either of the first two bugs except for the odd behavior I posted in the first edit. You can try this to see if it solves the exp being lost... Not sure if it will do anything (won't mess anything up though), but worth a try:

Scene File
CODE
#==============================================================================
# Scene File
#==============================================================================
class Scene_File < Scene_Base
  #--------------------------------------------------------------------------
  # alias method: Execute Load
  #--------------------------------------------------------------------------
  alias_method :hein_equplvls_scene_file_do_load, :do_load unless $@
  def do_load
    hein_equplvls_scene_file_do_load
    for actor in $game_party.members
      for item in actor.equips
        next if item.nil?
        item.scan
      end
    end
    for item in $game_party.items
      next if item.nil?
      item.scan
    end
  end
end


Also, there is a chance a script is overwriting something in this script or just clashing for some reason.

As for the line 1388 bug, that was due to my laziness and using copy/paste. I always made changes to RPG::Weapon first, tested, and if everything is fine, I then modified RPG::Armor. I normally don't use copy/paste, but once in a while, I get lazy or tired. The error arises because Armor does not have either critical or hit, but does have eva. Use this as a patch for class RPG::Armor. If you want to directly edit the script, I marked the modifications:

RPG Armor Fix
CODE
module RPG
  class Armor < BaseItem
    #------------------------------------------------------------------------
    # gain experience
    #------------------------------------------------------------------------
    def gain_exp(amount)
      return if $BTEST
      return if @no_level
      return unless @can_level or LEVEL_ARMORS # modified from LEVEL_WEAPONS
      return if @level >= @max_level
      mx = (@exp_list[@max_level] - 1) - @exp
      amount = amount >= mx ? [mx - 1, 0].max : amount
      @exp += amount
      while @exp >= @exp_list[@level] and @exp_list[@level] > 0
        level_up
      end
    end
    #------------------------------------------------------------------------
    # level up
    #------------------------------------------------------------------------
    def level_up
      return if @no_level
      return unless @can_level or LEVEL_ARMORS # modified from LEVEL_WEAPONS
      if @level >= @max_level
      else
        @level = [@level + 1, @max_level].min
        if $game_switches[LEVEL_UP_SWITCH]
          @exp += @exp_list[@level-1] - @exp_list[@level-2]
        end
        $game_switches[LEVEL_UP_SWITCH] = false
        @maxhp  = [@maxhp  + @hp_gain,  @max_hp].min  unless @max_hp == @maxhp
        @maxmp  = [@maxmp  + @mp_gain,  @max_mp].min  unless @max_mp == @maxmp
        @atk = [@atk + @atk_gain, @max_atk].min unless @max_atk == @atk
        @def = [@def + @def_gain, @max_def].min unless @max_def == @def
        @spi = [@spi + @spi_gain, @max_spi].min unless @max_spi == @spi
        @agi = [@agi + @agi_gain, @max_agi].min unless @max_agi == @agi
        @eva = [@eva + @eva_gain, @max_eva].min unless @max_eva == @eva # modified added @eva line, deleted @hit & @cri #lines
        if $imported["DEX Stat"]
          @dex = [@dex + @dex_gain, @max_dex].min unless @max_dex == @dex
        end
        if $imported["RES Stat"]
          @res = [@res + @spi_gain, @max_res].min unless @max_res == @res
        end
      end
    end
  end
end
Go to the top of the page
 
+Quote Post
   
Dyrnwyn
post Sep 25 2010, 05:59 PM
Post #34


Level 4
Group Icon

Group: Member
Posts: 46
Type: None
RM Skill: Beginner




Heyas, LH. Sorry for the slow reply. I was out most of the day.

I did the second patch you listed for the armor fix and it works like a champ. No more crashing. Here's the info on the armor losing exp after the game is turned off and loaded from a save file:

The item is a HP booster that gains HP every level. here is the setup:
<can level>
<max item level: 200>
<maxhp: +10>
<exp: 5>
<hp gain: 5>

And so you can debug, here is a list of my scripts installed:
YEM Core fixes/upgrades
YEM Custom message melody
YEM Equipment Overhaul
YEM Extended Movement
YEM Item Overhaul
YEM Main Menu Melody
YEM Skill Overhaul
YEM Status Menu Melody

YEM Battle Engine Melody 1-5
YEM New Battle Stats
Wereform script (From Yanfly's site)

YEM System game options
YEM Victory Aftermath
YEM Aftermath Compatibility
KGC_Large Party

YEM Controlled Encounter Rate
YEM Debug Menu Extension
YEM Keyboard Input
YEM Iconview Melody
YEM Party Influenced music
YEM Snapshot Battle Back
YEM Swap Random Monster
YEM Icon Module Library
Leveling weapons (This scirpt)
Thomas_Edison_VX
Map Name Popup

Overall, I don't see anything that would interfere with the script directly, so long as it works with all the YEM scripts. Godspeed on debugging.

QUICK EDIT:

This is probably really important. The armor is the only thing losing exp when I load the file. Weapons retain their exp just fine. Hope that helps!

This post has been edited by Dyrnwyn: Sep 25 2010, 06:18 PM
Go to the top of the page
 
+Quote Post
   
LordHeinrich
post Sep 25 2010, 10:24 PM
Post #35


Level 14
Group Icon

Group: Revolutionary
Posts: 267
Type: Artist
RM Skill: Beginner




I can't spot anything in the extra scripts that would interfere with the equip level script. The only thing I can think of is the extra armor slots from YEM Equipment Overhaul. The extra armor slots are still buggy and I am not sure if I can fix that.
Go to the top of the page
 
+Quote Post
   
Dyrnwyn
post Sep 26 2010, 05:02 PM
Post #36


Level 4
Group Icon

Group: Member
Posts: 46
Type: None
RM Skill: Beginner




Nerts. OK, LH, I have confirmed it:

The issue is with the YERD Equipment extension settings. When it is loaded, the gear loses its weapons on load. If I disable the script, your script works perfectly for weapons and armors.

Think you might be able to work with Yanfly on getting it figured out?

Either way, it's working great for weapons, which is exactly what I needed for my RPG. Much appreciated there!! biggrin.gif

EDIT: On further testing, shields, helms, armor all work fine. It's just accessories that seems to be a problem. Hope that helps out. smile.gif

EDIT 2: On even further testing, if you create another accessory type, and don't have multiple armor of the same types, it works fine. So, instead of 3x accessory slots like I did have, I'm just going to make a ring slot, bracer slot, and amulet slot. That's got it fixed. smile.gif

This post has been edited by Dyrnwyn: Sep 26 2010, 05:50 PM
Go to the top of the page
 
+Quote Post
   
LordHeinrich
post Sep 26 2010, 06:46 PM
Post #37


Level 14
Group Icon

Group: Revolutionary
Posts: 267
Type: Artist
RM Skill: Beginner




Glad you got it resolved! Also, thanks for the info. I am still confused as to your setup that is working fine. If you can take a screen shot of your equip scene, I would appreciate that. Maybe that would help me a bit, because I have an odd setup in in my YEM Equipment Overhaul and that could be why the EXP is behaving oddly on the extra armor slots.

I'll start working more on expanding the equip scene for compatibility (equip progress and such). Right now, I may go on something like the FFIX menu format. Then have an additional scene within that for the extra info for the equip skills and the ability to access the Equip Level info scene... Hopefully it will not get too crazy.
Go to the top of the page
 
+Quote Post
   
nevious
post Sep 27 2010, 12:09 AM
Post #38


Hyperfunctional Drive Modulator?
Group Icon

Group: Revolutionary
Posts: 337
Type: Artist
RM Skill: Advanced




you should realy put a demo to this it would help people much more


__________________________
Artist: Advanced
Musician: None
Scripter: Undisclosed
Writer: Beginner
Developer: None
Event Designer: Intermediate







[Show/Hide] Signatures








necroking nevious


Check out my Gallery!! (please leave comments constructive critizism helps. but please dont be rude.
My Gallery!!

Omegazions rougelike battlesystem in action


Go to the top of the page
 
+Quote Post
   
Dyrnwyn
post Sep 27 2010, 05:50 AM
Post #39


Level 4
Group Icon

Group: Member
Posts: 46
Type: None
RM Skill: Beginner




I'll do you one better, LH. The issue is fixed with the YEM equipment overhaul. Here's what I have now that I made the changes:
CODE
  # This determines the order of equipment inside the equipment scene. Note
    # that this does not include weapons as they're automatically the first
    # piece of equipment by default.
    TYPE_LIST =[
      :shield,   # Shield slot for equippable shield type armours.
      :helmet,   # Helmet slot for equippable headgear type armours.
      :armour,   # Armour slot for equippable bodygear type armours.
      :cloak,    # Cloak Accessory for back.
      :charm,    # 1st Accessory slot for misc armours.
      :other,      # 2nd Accessory slot for misc armours.
      :ring,     # 3rd Accessory slot for misc armours.
    ] # Do not remove this
    
    # Adjust the following below to determine the ruleset adjusted for equip
    # equip type following the pre-made template. Here's what each does:
    #     Name - The name of the equip type. When using tag, refer to this.
    #     Kind - The kind number associated with the equip type.
    #   Empty? - Whether or not the equipment slot can be empty.
    # Optimize - When optimizing, include this equipment type or not.
    TYPE_RULES ={
    # Type     => [     Name, Kind, Empty?, Optimize],
      :weapon  => [ "Weapon",  nil,   true,     true],
      :shield  => [ "Shield",    0,   true,     true],
      :helmet  => [ "Helmet",    1,   true,     true],
      :armour  => [ "Armour",    2,   true,     true],
      :charm   => [ "Charm",     5,   true,    false],
      :other   => [ "Accessory", 3,   true,    false],
      :ring    => [ "Ring",      6,   true,    false],
      :cloak   => [ "Cloak",     4,   true,     true],


Originally, under Yanfly's default setup, it's like this:
CODE
# This determines the order of equipment inside the equipment scene. Note
    # that this does not include weapons as they're automatically the first
    # piece of equipment by default.
    TYPE_LIST =[
      :shield,   # Shield slot for equippable shield type armours.
      :helmet,   # Helmet slot for equippable headgear type armours.
      :armour,   # Armour slot for equippable bodygear type armours.
      :cloak,    # Cloak slot for equippable mantle type armours.
      :other,    # 1st Accessory slot for misc armours.
      :other,    # 2nd Accessory slot for misc armours.
      :other,    # 3rd Accessory slot for misc armours.
    ] # Do not remove this
    
    # Adjust the following below to determine the ruleset adjusted for equip
    # equip type following the pre-made template. Here's what each does:
    #     Name - The name of the equip type. When using tag, refer to this.
    #     Kind - The kind number associated with the equip type.
    #   Empty? - Whether or not the equipment slot can be empty.
    # Optimize - When optimizing, include this equipment type or not.
    TYPE_RULES ={
    # Type     => [     Name, Kind, Empty?, Optimize],
      :weapon  => [ "Weapon",  nil,  false,     true],
      :shield  => [ "Shield",    0,   true,     true],
      :helmet  => [ "Helmet",    1,   true,     true],
      :armour  => [ "Armour",    2,   true,     true],
      :other   => [  "Other",    3,   true,    false],
      :cloak   => [  "Cloak",    4,   true,     true],


As you can see, the issue comes up with the accessories. She had 3x all using the same number for the kind, which was 3 in the second group. I think that was what threw things. In mine, I just simply made 2 more kinds so there were no repeat numbers. Easiest coding fix I've ever encountered. smile.gif
Go to the top of the page
 
+Quote Post
   
LordHeinrich
post Sep 27 2010, 12:13 PM
Post #40


Level 14
Group Icon

Group: Revolutionary
Posts: 267
Type: Artist
RM Skill: Beginner




lol tongue.gif now I get it biggrin.gif I'll have to double check my setup then, cause the EXP behaves oddly for me tongue.gif Thanks for the info!
Go to the top of the page
 
+Quote Post
   

4 Pages V  < 1 2 3 4 >
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 25th May 2013 - 08:19 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker