Equipment Level Base

I have a bit of a question, I'm using an action battle system in my game (Falcao Pearl ABS), so the battles don't take place in the battle scene. I'm using the AP level up module, so I was wondering if there was either:


1. Any way to make the AP be given outside of the battle scene? 


Or


2. Is there a script call that I can use to give AP to the party?
The code used to give AP to the battle party at the end of the battle is


$game_party.battle_members.each do |actor|
actor.gain_equip_ap($game_troop.ap_total) unless actor.death_state?
end


I just checked and it works fine as a script call.  Simply change $game_troop.ap_total to however much ap you want to give to the party.  However I imagine the equip level up message would be a hindrance in an action battle system so if needed then within the Leveling by AP script find line 64 which should be i.equip_level_message(self.name, i) and either remove it or comment it out.


I'm not all that familiar with Falcao's ABS so I haven't tested it with that to see if there's anything else that needs doing but I hope this helps.
The code used to give AP to the battle party at the end of the battle is



$game_party.battle_members.each do |actor|
actor.gain_equip_ap($game_troop.ap_total) unless actor.death_state?
end


I just checked and it works fine as a script call.  Simply change $game_troop.ap_total to however much ap you want to give to the party.  However I imagine the equip level up message would be a hindrance in an action battle system so if needed then within the Leveling by AP script find line 64 which should be i.equip_level_message(self.name, i) and either remove it or comment it out.


I'm not all that familiar with Falcao's ABS so I haven't tested it with that to see if there's anything else that needs doing but I hope this helps.i am using the exp not ap
That reply was for Vis_Mage but due to design decisions the instructions for the exp version is almost identical.  As for your other problem I think it would be caused by a change to the leveling base script line 46.  By default it is


Level_Prefix = ' +%s'


Where the % is where the equip's level would end up.  If you removed the % then the level wouldn't show.
That reply was for Vis_Mage but due to design decisions the instructions for the exp version is almost identical.  As for your other problem I think it would be caused by a change to the leveling base script line 46.  By default it is


Level_Prefix = ' +%s'


Where the % is where the equip's level would end up.  If you removed the % then the level wouldn't show.OH sorry

That reply was for Vis_Mage but due to design decisions the instructions for the exp version is almost identical.  As for your other problem I think it would be caused by a change to the leveling base script line 46.  By default it is


Level_Prefix = ' +%s'


Where the % is where the equip's level would end up.  If you removed the % then the level wouldn't show.

Thanks that help
Is there a script call that I can use to reference the level of an armor? You'll only ever get one of them through the whole game, and there's a point where you need a certain level of the armor in order to get something else.
What precisely does the "price" thing do in the leveling base scripts? Is it as simple as it sounds (how much exp/gold/whatever needed to level up) or is it something more complicated?
Price in the Base scripts is simply how much the equipment is worth, an adjustment to how much money you earn from selling it after each upgrade.

The Shop Upgrade Scene has a Price Mod which determines how much each upgrade costs, determined by said price.
Sorry for bumping an old thread, but I'm using the equipment upgrade scene for a blacksmith type store... And whenever I bring up the scene, it's all empty even though my character has all of his armor and weaponry equipped.

I have to unequip his items in order to see them. Any idea what might be causing this?
Found Error in your Upgrade Scene...
To prevent odd behavior of crash when you click on the the blank entry
No_Selected_Item = "Have anything for me to see?", crashes if allowed.

def enable?(item)
return false unless item # I added this
return true if item.is_a?(RPG::EquipItem) && item.can_level unless item.level == 0 or item.max_level == 10
end

Alternate Fix

def include?(item)
if item.is_a?(RPG::EquipItem) && item.can_level
!item.is_a?(RPG::Item)
end
end

Additional Fix, for reverse repair, Upgrade Scene

def pre_upgrade_corrections
item.exp = 250 * (item.level-1) if $imported[:Sel_Equip_Exp_Leveling]
#item.exp = item.exp_to_level if $imported[:Sel_Equip_Exp_Leveling]
end
end

#--------------When Using The Level Down or Up Too I guess ---------------
ef on_item_ok
$game_party.lose_gold(item.level_upgrade_price) unless item.level == (item.max_level-9)
pre_upgrade_corrections
item.level_down # item.level_up
@gold_window.refresh

#----FOR Script: Instance Equip Leveling by Exp Ver. 1.03----
Default_Exp_Curve = '(level+1)*250'

---Lastly a patch for TheoAllen - Limited Inventory
# Version : 1.4c---
ForceGain = true

----REMOVE THE OVERWRITE WITH #'s--------# Overwrite : Trade item with party---------

#----Add #'s----This fixes alot of conflicts

#def lose_item(item, amount, include_equip = false)
#force_gain_item(item, -amount, include_equip)
#end


---------------------------------------------------------
UPGRADE SCENE allows all items to be treated as Durability Repairing.
While Keeping EXP AMOUNT TO ADD LVUP WORKING, so you just need...

Level_Prefix = -'%s'
Or Level_Prefix = '%s' Just # as I'm doing, where I simply marked all repairable equips with a - in their name directly which bypasses the issue of adding a custom lvl up, place a +in the name such as "Sword+"

For "Sword-"These Blades Need to be Repaired.
<can level>
<mult level atk: 0.70>
<mult level mat: 0.70>
if say<max level: 9> is default
For "Sword+"These Blades Need to be Repaired.
<can level>
<static level atk: 10>
<static level mat: 2>
<max level: 10> or whatever #

You can follow up with codes like in Upgrade Script
def enable?(item)
return false unless item
return true if item.is_a?(RPG::EquipItem) && item.can_level unless item.level == 0 or item.max_level == 10
end

def update_help#Modified :If Can_Not_Upgrade, item lv/max lv == #'s
else
if !item.can_level || item.level == 0 or item.max_level == 10
@help_window.set_text(TH_Instance::Scene_EquipUpgrade::Can_Not_Upgrade)

FINALLY EDIT THE ARROWS IN UPGRADE SCRIPT

def draw_param_name_arrow(x, y, param)
draw_param_name(x, y*line_height, param)
draw_right_arrow(x+172, y*line_height)
end

def draw_param_name(x, y, param_id)
change_color(system_color)
draw_text(x, y, 160, line_height, Vocab:😛aram(param_id))
end

def draw_current_param(x, y, param)
change_color(normal_color)
draw_text(x, y, 160, line_height, param.to_s, 2)
end

def draw_right_arrow(x, y)
change_color(system_color)
draw_text(x, y, 22, line_height, "→", 1)
end

def draw_new_param(x, y, old_param, new_param)
change_color(param_change_color(new_param - old_param))
draw_text(x, y, 10, line_height, new_param, 2)
end

-----------------------------------------------
Weapon Evolutions can be tossed in for good measure for special weapons.
<exp to evolve: 50000>
<evolve to: 29>
Which won't conflict, then if you have another crafting SCRIPTto can make
TEMPERED +1 WEAPONS EXAMPLES SUCH AS....
ID 24"Sword+1"
ID 25"Sword+2"
ID 26"Sword+3"
ID 27"Sword+4"
ID 28"Sword+5"
ID29"Magic Sword" Text Does Not Break.
^These are the same as the Exp LVing + Weapons above where + is in the name, as these at +1. custom database items not Instance Items, & to lv them down you simply as <exp to evolve: 29>weapon
<evolve to: 27># whatever data base.

Now you have a repair & fortify system using -/+names & set upgrade pathes & special evolutions, all which are pretty complex uses of your scripts combined with each other working in conjunction to setup a system that normally doesn't work. well, which is why I opted not to use your default DURABILILTY SCRIPTS.
Sorry for bumping an old thread, but I'm using the equipment upgrade scene for a blacksmith type store... And whenever I bring up the scene, it's all empty even though my character has all of his armor and weaponry equipped.

I have to unequip his items in order to see them. Any idea what might be causing this?

Yea from what I can tell thats how it works by default, & if you added "Script Theo Inventory" to the mix, you end up able to see the items in the Store if equipped but if you upgrade them they cause a glitched item dup to appear & you can't properly discard them, I'm not sure how to work around that as of yet.

Sorry if this isn't helpful to anyone having the same issue, 3 years a bit to late.
1: Using items/materials in the upgrade process (like metals, and other whatnot like that).

If I can figure out how to implement it properly I'll do it, been kind of stuck on some parts of the planning, so I can't give any guarantees. You are free to request the changes to the provided scene from someone else, or even a completely different scene(if moving windows and such to fit stuff is unavoidable) from someone else if I keep drawing blanks. Maybe if I looked at how crafting scripts do their checking...

Since it seems this has never been added on, and I need it for my project, I went ahead and wrote a small add-on that allows some basic item requirement. Code below, also Pastebin link to it. Would be nice to get it added to first post.

Spoiler: Addon Code
Ruby:
=begin
 
  Addon to Selchar's Weapon Level Up + Weapon Upgrade Scene
  Allows setting up item requirement for weapon levelling
 
  by Ekhart
 
=end
 
module TH_Instance
  module Scene_EquipUpgrade
    
    # Upgrade Cost Array
    # UpgradeCost = { level => [item_ID, item_Quantity]}
    UpgradeCost = {
      1 => [90,1],
      2 => [90,1],
      3 => [90,2],
      4 => [90,2],
      5 => [90,3],
      6 => [91,1],
      7 => [91,1],
      8 => [91,2],
      9 => [91,3],
      10 => [92,1]
    }
  end
 
end

class Window_EquipUpgradeSelect < Window_Selectable
 
  def enable?(item)
    if item.is_a?(RPG::EquipItem) && item.can_level && item.level < item.max_level &&
      $game_party.gold >=  item.level_upgrade_price && has_material?(item.level)
      return true
    else
      return false
    end
  end
 
  def has_material?(item_level)
    # Check for Upgrade Material and Quantity
    material = TH_Instance::Scene_EquipUpgrade::UpgradeCost[item_level+1][0]
    material_quantity = TH_Instance::Scene_EquipUpgrade::UpgradeCost[item_level+1][1]
    return $game_party.items.include?($data_items[material]) &&
      $game_party.item_number($data_items[material]) >= material_quantity
  end
end

class RPG::EquipItem
 
  #Call this to increase an equip's level
  def level_up
    return unless can_level
    return if @level == @max_level
    @level += 1
    # Removes QTY of Upgrade Material, then levels up the weapon
    material = TH_Instance::Scene_EquipUpgrade::UpgradeCost[@level][0]
    amount = TH_Instance::Scene_EquipUpgrade::UpgradeCost[@level][1]
    $game_party.lose_item($data_items[material], amount)
    level_update
  end
end

Usage is pretty simple (and basic so far) - in Module on top of script there's a variable UpgradeCost. It's a hash of arrays, UpgradeLevel => [Item_Required, Item_Quantity]. The script will check if player has enough of said item when wanting to level up the weapon/armor, if not the option will be blocked. If they do, said quantity will be removed, and weapon will be upgraded. Currently it's not displayed anywhere though, I'll have to add it eventually though
Since it seems this has never been added on, and I need it for my project, I went ahead and wrote a small add-on that allows some basic item requirement. Code below, also Pastebin link to it. Would be nice to get it added to first post.
...
Usage is pretty simple (and basic so far) - in Module on top of script there's a variable UpgradeCost. It's a hash of arrays, UpgradeLevel => [Item_Required, Item_Quantity]. The script will check if player has enough of said item when wanting to level up the weapon/armor, if not the option will be blocked. If they do, said quantity will be removed, and weapon will be upgraded. Currently it's not displayed anywhere though, I'll have to add it eventually though

Why don't you create a new thread and promote it as an add-on? You're totally free to do that.

Original thread: https://forums.rpgmakerweb.com/threads/equipment-level-base.22013/