Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Equip slots: multiple equip types #28

Open
HimeWorks opened this issue Nov 15, 2013 · 2 comments
Open

Equip slots: multiple equip types #28

HimeWorks opened this issue Nov 15, 2013 · 2 comments
Labels

Comments

@HimeWorks
Copy link
Member

@HimeWorks HimeWorks commented Nov 15, 2013

http://himeworks.wordpress.com/2013/07/13/core-equip-slots/

The Core - Equip Slots script re-writes the equip slot system for actors by abstracting an equip slot into its own entity rather than using silly hardcoded arrays.

Multiple equip types can be supported as well, but because the default equip system assumes all equips have only one type, and all equip slots only take one type, I will have to overwrite a bunch of methods to do array inclusion checks rather than integer equality checks.

The implementation is very simple: you just indicate which equip types a slot can take, and it will automatically list all of the different equip types.

One of the features from the "Equip Manager" that I wrote previously was to allow an equip slot to pick specific weapon or armor types. This may be a more preferable approach.

@Roguedeus
Copy link

@Roguedeus Roguedeus commented Nov 15, 2013

I have been using Kread-EX's Multiple Equip Types. So the issue is item solved rather than slot solved.

I don't expect too many items to be multi-slot capable so it seems the less complex solution.

@HimeWorks
Copy link
Member Author

@HimeWorks HimeWorks commented Jan 27, 2014

I think regardless which direction you want to go (item-level or slot-level), you're going to basically overwrite the same thing:

class Game_Actor
  def change_equip(slot_id, item)
    return unless trade_item_with_party(item, equips[slot_id])
    return if item && equip_slots[slot_id] != item.etype_id ####### this line
    @equips[slot_id].object = item
    refresh
  end
end

That's...pretty much all that is needed for this. And this, for the window

class Window_EquipSlot
  def include?(item)
    return true if item == nil
    return false unless item.is_a?(RPG::EquipItem)
    return false if @slot_id < 0
    return false if item.etype_id != @actor.equip_slots[@slot_id]
    return @actor.equippable?(item)
  end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.