Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Equip slots: multiple equip types #28
Comments
|
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. |
|
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
endThat'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 |
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.