Jump to content
Sign in to follow this  
Tsukihime

Equippable Limits

Recommended Posts

This script allows you to limit how many instances of item any actor can equip at the same time. For example, if you have three accessory slots, you might disallow equipping more than one exp bonus accessory at any given time.

 

equippablelimits1.jpg

 

Download

 

Get it at Hime Works!

 

Installation

 

Place this script below Materials and above Main

 

Usage

 

equippablelimits2.jpg

 

Note-tag equips with

<equippable limit: x>
An actor cannot equip more than x instances of those equips.

 

You can also limit equips by type.

 

<equippable limit: x type>
For example, suppose you can only equip at most one katana at any given time (meaning, you can't equip two katana). You can tag every katana type weapon with

 

<equippable limit: 1 type>
And then whenever you equip a katana, all of the other katana can no longer be equipped until you remove it. Edited by Tsukihime

Share this post


Link to post
Share on other sites

Super-useful! I had to use various equip type workarounds to create a similiar mechanic until now, so thanks a lot!

 

Edit: Ah, unfortunately it doesn't seem to work in combination with Fomar's Dual Wield to Free Hands script. Put below that one, VXA gives an error in the Fomar script, put above it ignores the limit. But anyway, I'll see if I can somehow make it work.

Edited by Caveras

Share this post


Link to post
Share on other sites

Fomar is using the one of the methods I also use, but he's changing the method signature (sort of...well not really since it's pretty much a new method I guess)

 

line 53

 

def equippable?(item, slot = nil)
  unless slot.nil?
    if slot == 1 and dual_wield?
      return (super(item) and not equip_type_sealed?(1)) if item.is_a?(RPG::Weapon)
    end
  end
  return super(item)
end
You can resolve this by changing my script to say

 

line 89

def equippable?(*args)
  return false unless equippable_limit_ok?(args[0])
  th_equippable_limits_equippable?(*args)
end
That still assumes the item is the first argument but at least I am passing stuff I don't need on transparently.

 

Some people do this for EVERY method. I just don't like it because when I look at the code it isn't obvious what "args[0]" is supposed to be unless I make a note of it.

Edited by Tsukihime

Share this post


Link to post
Share on other sites

The script has been updated with a new type of limit.

For example, suppose you cannot equip more than one axe at the same time. You can tag all axes with

<equippable limit: 1 type>
This means that whenever one axe is equipped, all other axes will no longer be available until you take it off.

Share this post


Link to post
Share on other sites

Finally. Now when I let those players use my overpowered weapons, they will be very disappointed to see that you can only wear the ultimate weapon once as a 1h.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted