Kread-EX's Possible Add-on

Uzuki

Kawaii on the streets, Senpai in the sheets
Veteran
Joined
Aug 18, 2012
Messages
1,933
Reaction score
1,326
First Language
English
Primarily Uses
RMMV
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).
 

Moogle_X

Veteran
Veteran
Joined
Apr 25, 2015
Messages
157
Reaction score
318
First Language
English
Try 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
 
 

Uzuki

Kawaii on the streets, Senpai in the sheets
Veteran
Joined
Aug 18, 2012
Messages
1,933
Reaction score
1,326
First Language
English
Primarily Uses
RMMV
You sir/madam are a life saver! If you ever need anything let me know.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,849
Messages
1,016,977
Members
137,563
Latest member
cexojow
Top