Expert Slot Locking Techniques
Aizistral opened this issue ยท 4 comments
Please describe the new feature or change.
Another feature I for whatever reason totally thought of as totally present already, until I to my surprise discovered it isn't there. It should be possible to lock/unlock not all slots of the type at once, but instead only a certain amount. For instance - I want my mod to register the maximum of 3 ring slots available to player, but so that by default they will only have two of those, like most mods provide. Under specific conditions they will be able to unlock that one third ring slot, but otherwise it will not be available unless some other mods allows the same.
Please describe why you want this feature.
Because reasons. Really, why wasn't it there all along? I can think of endless instances it can be made use of.
If you want me to, I will try to do an implementation on both of the issues I posted here recently and pull request it to your repository.
As of Curios 4.0.6.0, I've successfully implemented a more robust slot modifier system that deprecates the current locking/unlocking and growing/shrinking methods.
More info here:
https://github.com/TheIllusiveC4/Curios/wiki/Slot-Modifiers
Due to this, the discussion here is either solved or fundamentally changed so I'll be closing this issue.
Some more investigation got me thinking on certain issues with what I want to do, that I'm not yet sure how those can be addressed. To be specific, Enigmatic Legacy currently adds a ring under the name of "Ring of the Seven Curses", which player cannot unequip once they wear it and which does persist on death. Later in the game, I want players that wear this ring to be able unlock additional ring slot to compensate for the fact one of their two available by default ring slots is permanently occupied by that cursed ring.
Now let's assume there is a hypothetical mod that wants to do the exact same. We will both attempt to register three ring slots, and both will have items that unlock third one, but then there are two rings that permanently occupy their ring slots, and only one additional slot that can be unlocked later. There is no way we can possibly resolve this unless we account for each other's existence and make specific compat on at least one of the sides, so that two additional locked ring slots are registered instead of one. This is weird example here but I believe you should be able to understand what I'm trying to tell.
I think it would make sense to have alternative way of registering slots, through new SlotTypeMessage type or something. Not by default behavior, where the amount of slots registered for identifier is completely defined by the biggest amount any of the mods sending registration message requests, but instead where requested slots for identifier will be "stacked on top" of whatever might have been registered by same mod or other mods. It would be a good way to have slots with very specific purpose in one mod, but which share generic identifier with many others; or to provide exclusive ways to expand usually fixed amount of standart slot types in way that ensures every mod willing to do so will have their bonus slot not overlapping with other mod's bonus slot.
My thoughts on this are pretty unprocessed yet and this whole topic might a subject to great doubt and debate, but I believe that feature this issue is dedicated to should be possible and will make sense to exist, it only requires some careful planning and design to function properly.
One question about this scenario: Why is unlocking two additional slots the intended behavior? If you both register three ring slots in this hypothetical scenario, and you both have an item that would unlock the third, my intuition as a player would tell me that I would just have to pick either one or the other rather than use both to exceed the intended max number of slots.
There are cases in which this might not be desired, but opposite might be true as well. Items that do unlock additional slots might have specific ways and conditions of obtaining and be intended to always give you bonus slot associated with them, not just be one of possible ways of unlocking them. You can think Terraria with Demon Heart for instance, a consumable item that is only obtainable in Expert Mode and which unlocks one additional accessory slot to player when used. There are Terraria mods that directly mimic this behavior and allow to unlock even more slots, and it is to be expected that their items unlock one more slot on top of additional one by Demon Heart rather than being an alternative way of unlocking the same slot, or possibly even more if there are more such mods in play.
This is something I've been mulling over for a while since it's become clear that the current system doesn't handle this kind of use-case very well. One way that might work is to introduce the concept of "slot modifiers", something that would be similar to attribute modifiers but wrapped with context about slot info. Developers could then add these modifiers to basically anything and Curios would check for these, in addition to the static slot registry, to determine the current number of slots. The fluidity of this would be one difficulty since Curios's slot system wasn't made for that sort of thing, but that depends on implementation details.
Now let's assume there is a hypothetical mod that wants to do the exact same. We will both attempt to register three ring slots, and both will have items that unlock third one, but then there are two rings that permanently occupy their ring slots, and only one additional slot that can be unlocked later. There is no way we can possibly resolve this unless we account for each other's existence and make specific compat on at least one of the sides, so that two additional locked ring slots are registered instead of one.
One question about this scenario: Why is unlocking two additional slots the intended behavior? If you both register three ring slots in this hypothetical scenario, and you both have an item that would unlock the third, my intuition as a player would tell me that I would just have to pick either one or the other rather than use both to exceed the intended max number of slots.