Hey everyone, I was wondering if I could get a edit for Kread-EX's Runic Enchantment script. I was wondering if there was a way to have only certain runes applied to certain weapons. For example: The Rune, Scope, can be applied to all Gun weapons, but not to Melee weapons. It would really help me out if someone can make an edit for this. I can offer my services of writing, eventing, and translations (Only Spanish though).
Kread-EX's Possible Add-on
RGSSx Script SupportTry this script snippet. Put this below the Runic Enchantment script.
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# ▼ Runic Enchantment - Weapon Type/Armor Type Specific Patch
# Author: Moogle_X
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
=begin
Put this below Kread-EX's Runic Enchantment script. This patch will make
certain runes to be restricted to certain Weapon Type/Armor Type.
NOTETAG #1:
<weapon_rune>
<rune_etype: n>
"n" is the Weapon Type id. Look under the "Terms" tab in your database to know
your Weapon Type id. Don't forget to include the <weapon_rune> notetag. This
is to ensure that the script knows this rune is for weapon only instead of
armor.
NOTETAG #2:
<armor_rune>
<rune_etype: n>
"n" is the Armor Type id. Look under the "Terms" tab in your database to know
your Armor Type id. Don't forget to include the <armor_rune> notetag. This
is to ensure that the script knows this rune is for armor only instead of
weapon.
=end
#===============================================================================
# Don't edit anything below unless you know what you are doing!
#===============================================================================
module Moogle_X
module RUNES
ETYPE_NOTETAG = /^<rune_etype: (.*)>/i
end # RUNES
end # Moogle_X
$imported = {} if $imported.nil?
$imported["Moogle_X - Runes Equip Specific Patch"] = true
#===========================================================================
# ■ RPG::EquipItem
#===========================================================================
class RPG::EquipItem
#--------------------------------------------------------------------------
# ● Public instance variables
#--------------------------------------------------------------------------
attr_reader :rune_etype
#--------------------------------------------------------------------------
# alias method: load_sandal_notetags
#--------------------------------------------------------------------------
alias moogle_x_load_sandal_alias load_sandal_notetags
def load_sandal_notetags
moogle_x_load_sandal_alias
@rune_etype = nil
@note.split(/[\r\n]+/).each do |line|
case line
when Moogle_X::RUNES::ETYPE_NOTETAG
@rune_etype = $1.to_i
end
end # do
end
end # class RPG::EquipItem
#==========================================================================
# ■ Window_RuneList
#==========================================================================
class Window_RuneList < Window_ItemList
#--------------------------------------------------------------------------
# overwrite method: enable?
#--------------------------------------------------------------------------
def enable?(item)
return true if item.nil?
if item.rune_unique
ti = SceneManager.scene.target_item
container = ti.class == RPG::Weapon ? $game_party.enchants_w :
$game_party.enchants_a
slots = container[ti.id]
if item.rune_type == :weapon
return SceneManager.scene.target_item.class == RPG::Weapon &&
!slots.include?(item.id) if item.rune_etype == nil
return SceneManager.scene.target_item.class == RPG::Weapon &&
SceneManager.scene.target_item.wtype_id == item.rune_etype &&
!slots.include?(item.id)
elsif item.rune_type == :armor
return SceneManager.scene.target_item.class == RPG::Armor &&
!slots.include?(item.id) if item.rune_etype == nil
return SceneManager.scene.target_item.class == RPG::Armor &&
SceneManager.scene.target_item.atype_id == item.rune_etype &&
!slots.include?(item.id)
end
return !slots.include?(item.id)
end
# Equip Specific Patch
if item.rune_type == :weapon
return SceneManager.scene.target_item.class == RPG::Weapon if item.rune_etype == nil
return SceneManager.scene.target_item.class == RPG::Weapon &&
SceneManager.scene.target_item.wtype_id == item.rune_etype
elsif item.rune_type == :armor
return SceneManager.scene.target_item.class == RPG::Armor if item.rune_etype == nil
return SceneManager.scene.target_item.class == RPG::Armor &&
SceneManager.scene.target_item.atype_id == item.rune_etype
end
return true
end
end # class Window_RuneList
# ▼ Runic Enchantment - Weapon Type/Armor Type Specific Patch
# Author: Moogle_X
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
=begin
Put this below Kread-EX's Runic Enchantment script. This patch will make
certain runes to be restricted to certain Weapon Type/Armor Type.
NOTETAG #1:
<weapon_rune>
<rune_etype: n>
"n" is the Weapon Type id. Look under the "Terms" tab in your database to know
your Weapon Type id. Don't forget to include the <weapon_rune> notetag. This
is to ensure that the script knows this rune is for weapon only instead of
armor.
NOTETAG #2:
<armor_rune>
<rune_etype: n>
"n" is the Armor Type id. Look under the "Terms" tab in your database to know
your Armor Type id. Don't forget to include the <armor_rune> notetag. This
is to ensure that the script knows this rune is for armor only instead of
weapon.
=end
#===============================================================================
# Don't edit anything below unless you know what you are doing!
#===============================================================================
module Moogle_X
module RUNES
ETYPE_NOTETAG = /^<rune_etype: (.*)>/i
end # RUNES
end # Moogle_X
$imported = {} if $imported.nil?
$imported["Moogle_X - Runes Equip Specific Patch"] = true
#===========================================================================
# ■ RPG::EquipItem
#===========================================================================
class RPG::EquipItem
#--------------------------------------------------------------------------
# ● Public instance variables
#--------------------------------------------------------------------------
attr_reader :rune_etype
#--------------------------------------------------------------------------
# alias method: load_sandal_notetags
#--------------------------------------------------------------------------
alias moogle_x_load_sandal_alias load_sandal_notetags
def load_sandal_notetags
moogle_x_load_sandal_alias
@rune_etype = nil
@note.split(/[\r\n]+/).each do |line|
case line
when Moogle_X::RUNES::ETYPE_NOTETAG
@rune_etype = $1.to_i
end
end # do
end
end # class RPG::EquipItem
#==========================================================================
# ■ Window_RuneList
#==========================================================================
class Window_RuneList < Window_ItemList
#--------------------------------------------------------------------------
# overwrite method: enable?
#--------------------------------------------------------------------------
def enable?(item)
return true if item.nil?
if item.rune_unique
ti = SceneManager.scene.target_item
container = ti.class == RPG::Weapon ? $game_party.enchants_w :
$game_party.enchants_a
slots = container[ti.id]
if item.rune_type == :weapon
return SceneManager.scene.target_item.class == RPG::Weapon &&
!slots.include?(item.id) if item.rune_etype == nil
return SceneManager.scene.target_item.class == RPG::Weapon &&
SceneManager.scene.target_item.wtype_id == item.rune_etype &&
!slots.include?(item.id)
elsif item.rune_type == :armor
return SceneManager.scene.target_item.class == RPG::Armor &&
!slots.include?(item.id) if item.rune_etype == nil
return SceneManager.scene.target_item.class == RPG::Armor &&
SceneManager.scene.target_item.atype_id == item.rune_etype &&
!slots.include?(item.id)
end
return !slots.include?(item.id)
end
# Equip Specific Patch
if item.rune_type == :weapon
return SceneManager.scene.target_item.class == RPG::Weapon if item.rune_etype == nil
return SceneManager.scene.target_item.class == RPG::Weapon &&
SceneManager.scene.target_item.wtype_id == item.rune_etype
elsif item.rune_type == :armor
return SceneManager.scene.target_item.class == RPG::Armor if item.rune_etype == nil
return SceneManager.scene.target_item.class == RPG::Armor &&
SceneManager.scene.target_item.atype_id == item.rune_etype
end
return true
end
end # class Window_RuneList
You sir/madam are a life saver! If you ever need anything let me know.
Original thread: https://forums.rpgmakerweb.com/threads/kread-exs-possible-add-on.44386/