public

Rpg Maker Developers Group

Simple enough for a child, powerful enough for a developer

2 Followers
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: Item Charges
  • Original author: Selchar
  • Original date: January 9, 2014
  • Source thread: https://forums.rpgmakerweb.com/threads/item-charges.22121/
  • Source forum path: Game Development Engines > Ruby Game System (RGSS) Scripts > RGSS3 Scripts (RMVX Ace)

Summary

Item Charges Selchar​Introduction This script allows for giving items multiple uses before they are consumed. It is to be used alongside Tsukihime's Instance Items. - Adds Item Charges

Archived First Post

Item Charges
Selchar
Introduction
This script allows for giving items multiple uses before they are consumed. It is to be used alongside Tsukihime's Instance Items.

Features
- Adds Item Charges
- Items can transform into other items when their charge reaches 0
- Items can be preserved with 0 charges(but unusable) if desired for some reason.

How to Use
Place the script below ▼ Materials, below Tsukihime's Instance Items, but above ▼ Main Process. Use the provided notetags to set individual item charge settings. Be sure to set Tsukihime's Instance Item's Enable Items to true.

Script
>Required<
Item Charges
Recharge Item Scene

FAQ
Q: What are the terms of use?
A: My terms are, anything goes, while the terms for Tsukihime's scripts can be found here

Q: Are there compatibility problems with any scripts?
A: None known at this time except for Kread's Actor Inventories, to which I have a patch for down below.

Credit and Thanks
- Selchar
- Tsukihime for the Instance Items Base

Compatibility Patches
Kread's Actor Inventory
Code:
#===============================================================================
# Selchar's Item Charges Compatibility Patch with Kread's Actor Inventory
#===============================================================================
class Game_Battler < Game_BattlerBase
  alias :kread_actor_inventory_sel_item_charge_consume  :consume_equip_item
  def consume_equip_item(item)
    return if self.enemy?
    return unless item.consumable
    item.current_charge -= 1
    item.refresh_name
    item.refresh_price
    if item.current_charge.zero?
      kread_actor_inventory_sel_item_charge_consume(item) unless item.no_charge_keep
      $game_party.gain_item(InstanceManager.get_instance($data_items[item.no_charge_transform]), 1) if item.no_charge_transform
    end
  end
end

class Game_Party < Game_Unit
  alias :kread_actor_inventory_sel_item_charge_consume :consume_item
  def consume_item(item)
    if $imported['KRX-ActorInventory'] && SceneManager.scene.is_a?(Scene_Battle)
      item_charge_consume_item(item)
    else
      kread_actor_inventory_sel_item_charge_consume(item)
    end
  end
end

class Window_ActorItem < Window_EquipSlot
  def enable?(index)
    item = @actor.equips[index]
    return false if item.is_a?(RPG::Item) && item.current_charge.zero?
    item.is_a?(RPG::Item) && item.battle_ok?
  end
end

Features Mentioned

  • Adds Item Charges
  • Items can transform into other items when their charge reaches 0
  • Items can be preserved with 0 charges(but unusable) if desired for some reason.

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

License / Terms Note

Q: What are the terms of use? A: My terms are, anything goes, while the terms for Tsukihime's scripts can be found here Q: Are there compatibility problems with any scripts? A: None known at this time except for Kread's Actor Inventories, to which I have a patch for down below.

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#rgss3#script-archive

Replies (0)

No replies yet.

0 replies 1 view

Log in to reply.

User Avatar