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 > »   
Reply to this topicStart new topic
> Leveling Equips (weapons & armors that level up), Beta Release updated to v0.6.27
LordHeinrich
post Sep 9 2010, 10:08 AM
Post #1


Level 14
Group Icon

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




Equip Levels

Version 0.6.03
Author Lordheinrich
Release Date 09/10/2010
Last Update 09/18/2010

Exclusive Script at RPG RPG Revolution


Introduction
This script makes it so that equipment (weapons and armors) can gain levels. Equips are basically set up like actors in that they gain experience in battle, level up, gain stat bonuses, etc... This is a rather large script and is still incomplete, however complete enough post for feedback, feature requests, and such. I don't know if I can test all features of the script myself, do please post report any bugs.

Features
- Experience System
- Leveling System with stat bonuses
- Script calls and note tags for customization
- Equip Status Scene accessible from Scene Item
- All Equips are unique, i.e., only the ones equipped gained experience, ex: you can have a lvl 1 short sword, a lvl 2, etc...
- Ability to randomize Experience earned
- Ability to randomize Experience needed for Equips to level up
- Progress Bars for EXP and Levels
- Equip Skill System based on EXP gained, Battles and Enemies Killed
** Skills learned either by Weapon EXP, Armor EXP, Total Battles, Enemies Killed or any combination of the FOUR
- Color Coded Equips
** Different colors based on whether level is max, cannot level, or level disabled

-----------------------------------------------
Planned:
- Equip Skill System (in progress)
** Based on either level or EXP (maybe stats) << Will probably scrap level as that method is broken, same for stats...
** Based on Battles and Kills (completed)
- Percent Based Equips
** Equips can raise stats by set number, percent or both
- Equip Price based on Level/Stats
-----------------------------------------------
Please suggest additional features

Script

Link for v 0.6.27 Script

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
      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
      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
        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


Customization
READ THE INSTRUCTIONS!!!
- Global Customization within script
- Per item customization with note tags
- Script calls in events can alter some attributes of equips
- New stats for Weapons
** HP, MP, CRI
- New stats for Armors
** HP, MP

Compatibility
- Compatible with Default System
- Compatible with YEM New Battle Stats
- New command in YEM Item Overhaul to access Equip Scene
- YEM Equipment Overhaul patch within script
** Fix for purge_equipment issue now included
- Likely needs patches to work with New equip Scenes
- Must be placed below YEM Item Overhaul and YEM Equip Overhaul, if used
** Rewrites portions of those YEM Scripts
- Place above YEM Item Overhaul Patch if used
** The YEM Item Overhaul Patch rewrites a portion of this script

Screenshot
15 Zipped Screen Shots

EXP Progress

Enemy Setup


Installation
- below materials/above main
- below YEM Equipment Overhaul & Item Overhaul if used
- above YEM Item Overhaul Mod if used


Terms and Conditions
This is a beta script. Please do not use in Games meant for distribution as there may be bugs.

Credits
None while in Beta Mode
Go to the top of the page
 
+Quote Post
   
Hoopsnake Games
post Sep 10 2010, 12:15 AM
Post #2


Level 2
Group Icon

Group: Member
Posts: 27
Type: Writer
RM Skill: Intermediate




o/ Did you ever know that you're my hero?
You're everything I would like to be. o/
This could be an enormous help. I'll let you know if I see any bugs, but this could truly be the greatest subconcious help that anyone has EVER done for me.
Go to the top of the page
 
+Quote Post
   
LordHeinrich
post Sep 10 2010, 04:45 AM
Post #3


Level 14
Group Icon

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




Got to testing EXP fluctuation and found a bug. Also, tested with YEM Enemy Levels. I will be updating the whole script shortly to v 0.6.03, but here's a patch for those that downloaded the script already.

Patch to v0.6.03
CODE
class Game_Enemy < Game_Battler
  #--------------------------------------------------------------------------
  # * Get Weapon Experience
  #--------------------------------------------------------------------------
  def wep_exp
    dexp = GNM::EQUIP_LEVEL::DEFAULT_WEAPON_EXP
    p = (GNM::EQUIP_LEVEL::PERCENT >= 6 ? 6 : GNM::EQUIP_LEVEL::PERCENT)
    fluctuation = GNM::EQUIP_LEVEL::W_FLUCTUATION
    dexp = (dexp*(1.0+p/100.0)**(@level-1.0)).round if $imported["EnemyLevels"]
    lower = Integer(dexp * (100 - fluctuation) / 100)
    upper = Integer(dexp * (100 + fluctuation) / 100)
    dexp = lower + rand(upper - lower + 1)
    unless enemy.weapon_exp.nil?
      v = enemy.weapon_exp
      v = (v * (1.0 + p/100.0)**@level-1.0).round if $imported["EnemyLevels"]
      lower = Integer(v * (100 - fluctuation) / 100)
      upper = Integer(v * (100 + fluctuation) / 100)
      v = lower + rand(upper - lower + 1)
    end
    return enemy.weapon_exp.nil? ? dexp : v
  end
  #--------------------------------------------------------------------------
  # * Get Armor Experience
  #--------------------------------------------------------------------------
  def arm_exp
    dexp = GNM::EQUIP_LEVEL::DEFAULT_ARMOR_EXP
    fluctuation = GNM::EQUIP_LEVEL::A_FLUCTUATION.to_f
    p = (GNM::EQUIP_LEVEL::PERCENT >= 6 ? 6 : GNM::EQUIP_LEVEL::PERCENT)
    dexp = (dexp*(1.0+p/100.0)**(@level-1.0)).round if $imported["EnemyLevels"]
    lower = Integer(dexp * (100 - fluctuation) / 100)
    upper = Integer(dexp * (100 + fluctuation) / 100)
    dexp = lower + rand(upper - lower + 1)
    unless enemy.armor_exp.nil?
      v = enemy.armor_exp
      v = (v * (1.0 + p/100.0)**@level-1.0).round if $imported["EnemyLevels"]
      lower = Integer(v * (100 - fluctuation) / 100)
      upper = Integer(v * (100 + fluctuation) / 100)
      v = lower + rand(upper - lower + 1)
    end
    return enemy.armor_exp.nil? ? dexp : v
  end
end # class Game_Enemy


EDIT: I updated the original script to 0.6.03. The new link DOES NOT need the patch, however, anyone who downloaded prior to the patch, will either need to download the new version or install the patch just below the old one.
Go to the top of the page
 
+Quote Post
   
Feldschlacht IV
post Sep 10 2010, 08:09 AM
Post #4


MICHAEL CONFIDES TO PET CHIMP
Group Icon

Group: Revolutionary
Posts: 587
Type: Developer
RM Skill: Masterful




I honestly think this is a great idea. Looking forward to the end result.


__________________________
RMN v4 has launched! Come and check out the greatest game making site on the planet!
Go to the top of the page
 
+Quote Post
   
Lockheart
post Sep 10 2010, 04:12 PM
Post #5


Level 9
Group Icon

Group: Revolutionary
Posts: 136
Type: Developer
RM Skill: Advanced




Trying this script out, I notice that it removes all default equipped items from a character, is this normal? Cause it sorta messes up my game and likely others by doing this.
Go to the top of the page
 
+Quote Post
   
The Wizard 007
post Sep 13 2010, 06:58 PM
Post #6


Jack of all trades
Group Icon

Group: Revolutionary
Posts: 118
Type: Developer
RM Skill: Skilled




Good idea and the interface looks good but I can't seem to get my stats to increase when I level a weapon up, I read the instructions and followed them.


__________________________
Currently working on:

Underground Syndicate (mafioso/modern type RPG)
Mind Maze (old school dungeon crawler with a different feel)
Dragon Adventure (Dragon Quest type fangame with more customization)
Dark Grind (Survival horror RPG)
Go to the top of the page
 
+Quote Post
   
LordHeinrich
post Sep 14 2010, 02:40 PM
Post #7


Level 14
Group Icon

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




One of your scripts must be rewriting something in this script or changing the way that stats are made. Please give me more information about your game (which scripts you are using). Also, maybe sending me scripts.rvdata from your game would help. I would prefer fixing this issue before adding a new feature.

Thank you for pointing this out and I will try to make this compatible with whatever scripts are causing conflicts.
Go to the top of the page
 
+Quote Post
   
systemsfailed
post Sep 16 2010, 03:47 PM
Post #8


Level 1
Group Icon

Group: Member
Posts: 12
Type: Event Designer
RM Skill: Advanced




Download seems to be broken sad.gif
Go to the top of the page
 
+Quote Post
   
LordHeinrich
post Sep 16 2010, 08:13 PM
Post #9


Level 14
Group Icon

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




Maybe it was some server issue or something cause it's working for me. Try it again (maybe refresh the page a couple times). If it doesn't work, I'll post a new link.
Go to the top of the page
 
+Quote Post
   
LordHeinrich
post Sep 17 2010, 05:50 PM
Post #10


Level 14
Group Icon

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




I just wanted to post an update. I started working on the equip skill portion of this script today. I completed the skeleton of the EXP portion, so I will start refining it within the next couple of days. I will try to release a patch once I feel the EXP portion is ready for testing, however if it gets too complicated, I'll just update the script.
Go to the top of the page
 
+Quote Post
   
LordHeinrich
post Sep 18 2010, 02:14 PM
Post #11


Level 14
Group Icon

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




I made an update and also included a patch. The patch is ONLY for v0.6.03 and is NOT required for the new release 0.6.17.

The newest update features an equip skill system based on Weapon/Armor EXP. This does not mean exactly what you may think. Enemies are what give Weapon or Armor EXP. When leveling equips, a Weapon requires Weapon EXP and an Armor requires Armor EXP, however, for skills, it does not matter. So a skill can require Weapon EXP, Armor EXP or both. You can decide whatever you want.

This system can work for all equips regardless if they can level up or not, however, I made an option to skip ones that cannot level.

I have not done anything in terms of display other than a message saying a skill was mastered. Ultimately, I will include progress bars and some type of information on the Equips. I will wait however until I finish the core of the Equip Skill System.
#----------------------------
Bug report: I noticed upon testing this system that the equip level system is not compatible with YEM Equip Overhaul's Extra armor slots. I will look into that before proceeding with the next feature.
Go to the top of the page
 
+Quote Post
   
LordHeinrich
post Sep 18 2010, 08:52 PM
Post #12


Level 14
Group Icon

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




Sorry for bumping, but I found a bug. I didn't realize that I had my Sell Item Overhaul Script installed so it always tested fine. The bug was if YEM Item Overhaul or Sell Item Overhaul was not installed, it would crash when trying to draw the Equip Data in the Equip Level Scene. This is corrected in v0.6.18. I also included a new patch for those that downloaded v0.6.03. Do not use the patch for v0.6.17 because that only adds the equip feature.

update to the bug report in the previous post: The extra armor slot bug will hopefully be fixed in the next update/patch. I got them to work, however I have not done any testing. If after testing the fix works, I will post the patch.

@lockheart,

post got a little long, so I spoilered
Sorry, but I missed your post before. I just noticed that is happening with YEM Equipment Overhaul. I will have to look into it, however at the moment, there is not full compatibility with YEM Equipment Overhaul, just enough compatibility where it will not crash with Yanfly Engine Melody.

If you are using a different Equipment Scene Let me know.

I think in the end, I will have to write my own Item Scene and Equip Scene, cause usually it is a bit of a pain to get some of the scripts to be fully compatible, but I will try my best to make it fully compatible with YEM Equipment Overhaul.

Thanks for pointing out the bug!!

EDIT: It looks like it has to do with the "purge_unequippable" method. That command kicks in before the setup of this script, therefore it will unequip all equips. There isn't a universal solution to this without making the script installation complicated. For the initial setup, you can probably correct it editing YEM Equipment Overhaul:

CODE
class Game_Actor < Game_Battler
  
  #--------------------------------------------------------------------------
  # alias method: setup
  #--------------------------------------------------------------------------
  alias setup_eo setup unless $@
  def setup(actor_id)
    setup_eo(actor_id)
    @extra_armor_id = []
    @locked_equips = []
    @equip_type = nil
    @bonus_apt = nil
    create_aptitude_bonus
  #  purge_unequippable  ## This line was commented out.
  end


This will make it so that equips are not lost when the game starts. However, if armor slots are going to be altered by a script call, potentially every armor equipped will be lost! This is part of YEM Equipment Overhaul and I think it has to do with the way that you set up the Rules for the armor slots and this happens regardless of using the equip level script.

An alternative to editing any scripts would be to just have the starting equips in the party inventory, but this will not work for every game.
Go to the top of the page
 
+Quote Post
   
Kaimi
post Sep 19 2010, 04:41 AM
Post #13


Level 11
Group Icon

Group: Revolutionary
Posts: 181
Type: None
RM Skill: Intermediate




I like the script, but where are any screenshots?
Go to the top of the page
 
+Quote Post
   
LordHeinrich
post Sep 19 2010, 12:21 PM
Post #14


Level 14
Group Icon

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




@kaimi,

I added a zip archive with 15 screen shots. I didn't feel like uploading one by one to imageshack, so for now this is the only way to get them. The archive includes the following:

Scene Item - accessing the equip level scene
Equip LVL Scene - View equipped equips
Equip LVL Scene - Weapons that can level
Equip LVL Scene - Armors that can level
Gain EXP event
Example of Setting up event
Disable Level Event
Disabled Level in Equip Scene
EXP Progress
Level Progress
EXP Skill - Setup up Equip
EXP Skill - Setup skill
EXP Skill - Mastered Skill
Setting up Enemies to give EXP
Variable EXP earned from enemies

It should be enough to get a nice feel of what the script does and how to set up some of the events.
Go to the top of the page
 
+Quote Post
   
Dyrnwyn
post Sep 19 2010, 06:08 PM
Post #15


Level 4
Group Icon

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




OK, this script is awesome and the answer for something I've been trying to make myself for a long time.

I just have one question:

It looks like you can call how much of a stat increase a piece of equipment will get when leveling. At least, it seems to be mentioned in this section of the directions:

QUOTE
# ---------
# STAT "formulas". These give your equips new stats. They are HP, MP & CRI.
# Also, it allows you to modify how EVA and HIT are evaluated. Since these are
# formulas, they can be numbers, or expressions. Valid variables are:
# @level, @max_level, @base_exp, @stat ... basically all attributes that are
# within the class. You can make the formula as simple or complicated as you
# like.
# ---------


What I'm after is making a staff, for example, that will gain 1 agility and 3 spirit per level, then have a sword that does 2 str and 2 def and a shield that does 1 spi and 3 def per level. See what I'm after?

So, can you give some examples of how to make those formulas work? I assume it has to do with tagging the descriptions in the item info, but I need just a bit more info so I can do it properly.

Beyond that, awesome script!!!
Go to the top of the page
 
+Quote Post
   
LordHeinrich
post Sep 19 2010, 06:34 PM
Post #16


Level 14
Group Icon

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




New version 0.6.20 uploaded with YEM Compatibility Patch, additional features and some bug fixes. No separate patch will be available for older version because it is a little tricky to pull the updates out of the full script.

EDIT: New features expand the Skill Equip features. Now, you can also learn skills from total battles or enemies killed. I still haven't modified any of the windows, so no progress bars and such for that.

YEM Equipment Overhaul expanded. Extra Armor Slots now work, with limitations. Anything in the extra armor slots will not be unique! This means that once an item gains experience in one of the new item slots, all copies of that item will gain experience. So if you have 3 Boots and one is equipped in your extra footwear slot, all 3 boots will gain EXP/Levels/etc... Not sure if I will be able to fix this.

@Dyrnwyn,

In order to alter how much equips can gain per level, you need to use the note tags.

so for example, in the staff note box you can do something like:

<agi gain: 1>
<spi gain: 3>

They need not be numbers. They can also be equations like:

<agi gain: @level + 3>
----------------------------
Some useful info:

For Weapons, they will gain 1 atk per level default without doing anything to the note boxes.

For Armors, they will gain 1 def per level default without doing anything to the note boxes.
Go to the top of the page
 
+Quote Post
   
Dyrnwyn
post Sep 20 2010, 05:28 AM
Post #17


Level 4
Group Icon

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




Sweeeeet! That is amazingly simple! You should make sure to include it in your instructions on the script. I hunted for ages to find the proper reference in it, figuring you already had it in there.

This script is absolutely great so far! Does everything you advertise and warns about potential issues you're already working on.

I especially love that it is compatible with Yanfly's Battle Engine Melody! Really nice touch there that most don't do. smile.gif
Go to the top of the page
 
+Quote Post
   
Dyrnwyn
post Sep 20 2010, 08:30 AM
Post #18


Level 4
Group Icon

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




EDIT: Deleted prior text.

It's not a bug with the party system like I thought. It's erroring out when I try to level up a shield on one of my characters. All I have for the stats on the shield right now are:
<can level>
<max item level: 255>
<def gain: 3>
<wep exp: 1>

EDIT 2: Tried it with other armors and none of them are working. I'm getting a division by 0 error at line 2338 of your script.

QUOTE
gw = [[gb * (@item.now_exp) / (@item.next_exp), width].min, 0].max


This post has been edited by Dyrnwyn: Sep 20 2010, 08:51 AM
Go to the top of the page
 
+Quote Post
   
LordHeinrich
post Sep 20 2010, 09:00 AM
Post #19


Level 14
Group Icon

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




EDIT: How did you set up the max levels. Did you only use note tags, or did you also set something in the configuration of the script?

I'll look into this promptly. There is a chance I goofed on one of those two methods for armors tongue.gif

One thing though, I capped Equip levels at level 20, so <max item level: 255> will still cap the level at 20.

Edit II: I've duplicated the error. The reason is because you went past the allowed level max and I noticed that I didn't put a safety measure just in case that happened when using only configuration. It's a bug for now, but avoidable as long as MAX_WEAPONS or MAX_ARMORS is 20 or lower.

I'll change level caps to 1000 in the next release. Only thing is that I am not changing the amount characters can level up to, so I may include that in the script as well.
Go to the top of the page
 
+Quote Post
   
Dyrnwyn
post Sep 20 2010, 11:13 AM
Post #20


Level 4
Group Icon

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




Awesome. thanks for the fast reply. I think i actually know how to adjust the caps, but I'll let you do it proper so I don't blow up my game, again. smile.gif
Go to the top of the page
 
+Quote Post
   

4 Pages V   1 2 3 > » 
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: 23rd May 2013 - 04:23 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker