Wear Slot Modes #394
scionaltera
announced in
Blog
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In most MUDs a piece of equipment can take up one slot on your character. You wear a hat, it takes the "head" slot. You wear earrings and they take your "ears" slot. In some MUDs equipment can take up multiple slots. But what happens when you start to talk about large or bulky items and small or versatile items at the same time? Consider rings, and consider polearms. How do those work in this kind of system?
Many MUDs allow you to wear two rings at a time: presumably one on the ring finger of each hand. Your character has two "finger" slots, and each ring takes one of them. Some MUDs have a special "shield" slot that can only be used with shields, or special "dual wield" slots for weapons that take both hands. A lot of the time there is a bunch of conditional logic to deal with all of these different cases.
Here's what I'm doing with Agony Forge. There are actually two modes for wearing equipment:
Right now, characters all have two fingers. This will change in the future because I want wear slots to be defined by species and I want them to be able to be damaged or altered after character creation, but for the moment everybody has the same ones and that includes two fingers.
To create a ring, you'd set both finger slots on it, and set the wear mode to "SINGLE". When you do that, your ring would find the first "finger" that was available and occupy only that one slot. Your next ring would do the same, occupying the other slot, so you could wear two copies of the same ring or two different rings. You can equip and remove them separately because they're two different pieces of equipment.
Characters also all have two hands. This will also change in the future for the same reasons as above, but for now that's how the game works.
You can't create a polearm the same way as rings: it would only take one hand slot, and then you could have a second polearm in the second hand. While that would be awesome, it's probably just a little bit OP. So what you do is set it to use both hand slots, then change the wear mode to "ALL". When you wear the polearm now, it will occupy both hand slots, and it won't let you wear it if you're already holding anything in either of your hands.
This all works because the item has its possible wear slots defined on its
ItemComponent
(See the "Component Systems for Games" article for an explanation of what that is) but theLocationComponent
defines the wear slots that it is actually occupying right now. When you wear an item in SINGLE mode it only sets one of the slots that are available both on the character and the item. However, when you wear an item in ALL mode it copies all of the slots as long as all of them are available to use.I still have some things I'd love to add to this system, such as items that overlap other items. For example, you wear a shirt, then you put a jacket on over it. They occupy the same wear slot but the jacket prevents you from removing the shirt, and you can't wear two jackets but you could put on plate mail over the jacket? There are some complexities that I haven't fully worked out yet. It will probably be something like a "wear layer" where you can overlap things with a higher layer but not the same or lower.
Another possible future addition to the system is a size rating. Armor for halflings, for humans and for giants would more or less be shaped the same ways since all of those are humanoids, but their sizes are wildly different. A halfling could probably never wear a giant's armor without magic or so much alteration as to effectively make a new item. I think this could be a simple size rating on the item. Just a "small/medium/large" kind of thing would do. Maybe you could wear something in your size with no modifiers, and something one size up or down with a penalty, and farther away than that would be impossible. It would be really cool if there was magic that lets you break this rule, and tailors that could resize a garment into an equivalent one of a different size.
By supporting both SINGLE and ALL wear modes, Agony Forge has a very flexible model for equipment that should allow building almost any kind of item. It's also very dynamic, so that when we have characters with all kinds of different wear slots - more than two arms, no legs, several heads, tentacles, or whatever it is - the system still works without any special cases. Avoiding special cases is always one of my main goals in designing a system because it means the system will be resilient to change, and new things will work in sensible ways.
Beta Was this translation helpful? Give feedback.
All reactions