[VXAce]Modification equipment requirements

Hi again,

I tested the script from Fomar called Equipment requirements. It works well but we have no way of knowing requirements in game. We can't equip this equipments but we can't know why. I wanted to put indications in description but there is not enough space.

Is it possible to modify this script to include this add ?

The script is here :

Spoiler
=beginEquipment Requirements
by Fomar0153
Version 1.2
----------------------
Notes
----------------------
Adds a level requirement to equipment.
----------------------
Instructions
----------------------
Notetag the weapons/armors like so:












----------------------
Change Log
----------------------
1.0 -> 1.1 Added stat requirements
Changed script name from Equipment Level Requirements
to just Equipment Requirements
1.1 -> 1.2 Added switch and other equipment requirements
----------------------
Known bugs
----------------------
None
=end

class Game_BattlerBase
#--------------------------------------------------------------------------
# ● If set to true then it compares the requirement with the actor's base
# stat rather than their current.
#--------------------------------------------------------------------------
EQUIPREQ_USE_BASE_STAT = true
#--------------------------------------------------------------------------
# ● Check the requirements
#--------------------------------------------------------------------------
alias level_equippable? equippable?
def equippable?(item)
return false unless item.is_a?(RPG::EquipItem)
return false if @level < item.levelreq
return false if reqstat(0) < item.mhpreq
return false if reqstat(1) < item.mmpreq
return false if reqstat(2) < item.atkreq
return false if reqstat(3) < item.defreq
return false if reqstat(4) < item.matreq
return false if reqstat(5) < item.mdfreq
return false if reqstat(6) < item.agireq
return false if reqstat(7) < item.lukreq
if item.switchreq > 0
return false unless $game_switches[item.switchreq]
end
if item.wepreq > 0
e = []
for equip in @equips
if equip.is_weapon?
e.push(equip.object.id)
end
end
return false unless e.include?(item.wepreq) unless equip.object.nil?
end
if item.armreq > 0
e = []
for equip in @equips
if equip.is_armor?
e.push(equip.object.id) unless equip.object.nil?
end
end
return false unless e.include?(item.armreq)
end
return level_equippable?(item)
end
#--------------------------------------------------------------------------
# ● New Method
#--------------------------------------------------------------------------
def reqstat(id)
if EQUIPREQ_USE_BASE_STAT
return param_base(id)
else
return param(id)
end
end
end

module RPG
#--------------------------------------------------------------------------
# ● Equip Item is inherited by both Weapon and Armor
#--------------------------------------------------------------------------
class EquipItem
def levelreq
if self.note =~ //i
return $1.to_i
else
return 0
end
end
def mhpreq
if self.note =~ //i
return $1.to_i
else
return 0
end
end
def mmpreq
if self.note =~ //i
return $1.to_i
else
return 0
end
end
def atkreq
if self.note =~ //i
return $1.to_i
else
return 0
end
end
def defreq
if self.note =~ //i
return $1.to_i
else
return 0
end
end
def matreq
if self.note =~ //i
return $1.to_i
else
return 0
end
end
def mdfreq
if self.note =~ //i
return $1.to_i
else
return 0
end
end
def agireq
if self.note =~ //i
return $1.to_i
else
return 0
end
end
def lukreq
if self.note =~ //i
return $1.to_i
else
return 0
end
end
def switchreq
if self.note =~ //i
return $1.to_i
else
return 0
end
end
def wepreq
if self.note =~ //i
return $1.to_i
else
return 0
end
end
def armreq
if self.note =~ //i
return $1.to_i
else
return 0
end
end
end
end
Why not include it in the weapon description?

Like you can do /i[xx] y /i[xx] z

Replace the x with an icon ID and y/z with a number.

For example:

Great Axe of Doom

An axe forged in darkness and deceit.

/i[100] 50 /i[125] 25

The icon could be like a sword for attack requirement or a shield for defense requirement.
I wanted to put indications in description but there is not enough space.
Also tried, I would rather that these requirements are displayed somewhere else.
Setup a common event on the item being equipped and set a conditional branch.

If the actors stats aren't high enough have a text box explaining what they need.
With the script, we can't select an equipment on which we don't have the required conditions.

A possible solution would be for example to generate a window parallel to the description which would display requirements (in red for those not reached, in white for those reached). You think that it's feasible ?
Up
Up
Up
Up
Up
Up
Up
Up

Original thread: https://forums.rpgmakerweb.com/threads/vxace-modification-equipment-requirements.38967/