public

Rpg Maker Developers Group

Simple enough for a child, powerful enough for a developer

2 Followers

Adding item.params to Kread-Ex's Rune Enchantments

BMM Archive · July 15, 2026

Preserved forum archive. This topic stores the original first post and locally mirrored RPG Maker Web attachments when available. It is posted by the BMMPlay archive account, not by the original creator.

Original Source

  • Original title: Adding item.params to Kread-Ex's Rune Enchantments
  • Original author: Hero_Claive
  • Original date: July 13, 2018
  • Source thread: https://forums.rpgmakerweb.com/threads/adding-item-params-to-kread-exs-rune-enchantments.97675/
  • Source forum path: Game Development Engines > Ruby Game System (RGSS) Scripts > RGSSx Script Support

Summary

After a few days trying to work this out, I've pretty much run out of ideas. First, here's the title script I'm referencing: https://github.com/Archeia/Kread-Ex...Scripts/Gameplay Scripts/Runic_Enchantment.rb Anyways, there's a snippet that Kread-Ex adds which aliases "feature_objects," a method in Game_Actor that gathers all of the traits from their equipment ("equips"). The snippet can be found at line 198: Code:

Archived First Post

After a few days trying to work this out, I've pretty much run out of ideas. First, here's the title script I'm referencing:

https://github.com/Archeia/Kread-Ex...Scripts/Gameplay Scripts/Runic_Enchantment.rb

Anyways, there's a snippet that Kread-Ex adds which aliases "feature_objects," a method in Game_Actor that gathers all of the traits from their equipment ("equips"). The snippet can be found at line 198:
Code:
class Game_Actor < Game_Battler
  #--------------------------------------------------------------------------
  # ● Returns the list of traits
  #--------------------------------------------------------------------------
  alias_method(:krx_sandal_ga_fo, :feature_objects)
  def feature_objects
    runes = []
    equips.compact.each do |equip|
      container = equip.is_a?(RPG::Weapon) ? $game_party.enchants_w :
      $game_party.enchants_a
      next if container[equip.id].nil?
      ids = container[equip.id]
      ids.each do |id|
        next if id.nil?
        runes.push($data_armors[id])
      end
    end
    krx_sandal_ga_fo + runes.compact
  end
end
What the script does essentially is allowing your characters to equip "Runes" (notetagged armors) to their weapons. Then, the traits on those runes are applied to the actor using the above method. What it doesn't do is add the parameters from those armors onto the character. That makes sense because this isn't what "feature_objects" does; it only stores the actor's "traits" in an array. The method for adding equipment parameters is found in Game_Actor, on line 377:
Code:
  #--------------------------------------------------------------------------
  # * Get Added Value of Parameter
  #--------------------------------------------------------------------------
  def param_plus(param_id)
    equips.compact.inject(super) {|r, item| r += item.params[param_id] }
  end
This is where things get confusing. I'm trying to make it so that equipped runes have their parameters added to their respective actor via the above method. But this is proving extremely complicated for me because I'm not very keen on method values, which is what "equips" and "param_plus" return basically. I don't know how to access or edit the equips hash. I also don't understand what inject(super) means... Is that just injecting the following hash into the superclass method "param_plus"?

Any and all help is much appreciated. I'm trying to solve as many things on my own as I can, but this problem in particular is very difficult and an explanation on how to achieve what I want would be great.

Features Mentioned

  • Code:
  • #
  • # * Get Added Value of Parameter
  • def param_plus(param_id)
  • equips.compact.inject(super) {|r, item| r += item.params[param_id] }
  • end
  • This is where things get confusing. I'm trying to make it so that equipped runes have their parameters added to their respective actor via the above method. But this is proving extremely complicated for me because I'm not very keen on method values, which is what "equips" and "param_plus" return basically. I don't know how to access or edit the equips hash. I also don't understand what inject(super) means... Is that just injecting the following hash into the superclass method "param_plus"?
  • Any and all help is much appreciated. I'm trying to solve as many things on my own as I can, but this problem in particular is very difficult and an explanation on how to achieve what I want would be great.

Downloads / Referenced Files

Log in to download

Log in, then follow the RPG Maker Developers Group to see these download links.

Log in to download
Creator Claims / Removal

If you are the original creator and want this listing reassigned, edited, or removed, join BMMPlay and contact the moderators with proof that matches the original RPG Maker Web profile, linked GitHub, itch.io page, or another public creator identity.

#039#rpg-maker-archive#rgss-support

Replies (0)

No replies yet.

0 replies 1 view

Log in to reply.

User Avatar