-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Infrastructure: Add max_worn field, migrate ONLY_ONE flag #79607
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Auto-requesting reviews from non-collaborators: @Standing-Storm
The JSON churn feels really unnecessary? Just give the pins a flag that lets you wear infinite amount of them. Why even stop at 18? If someone wants to wear a pin (even the same pin) 100 times, they should go wild. It's not any different from 18 |
Ok I have a couple of questions. 1. When this says Max worn does it mean the number of copies of that item that can be worn or does it mean the number of items in that slot? For example, currently you can wear two magical rings, they can be the same rings I believe but only two total. Another example would be helmets I believe you can only wear one helmet at a time currently is that still accurate in this? Probably controlled by rigid flags and whatnot right? |
My logic is that characters can currently wear either 1 of an item with a special flag or two of an item by default. Any other combination would require adding another individual flag per amount. Rather than flag-ifying a new amount whenever somebody wants to add an item that supports more than the existing presets, having an int field allows easily doing whatever the creator wants. As for the choice of 18 pins that was just because there was 18 defined types of pins, but I can adjust that up to another number.
Max Worn is for the number of copies of the item that can be worn. As an example, a backpack has the default max_worn value of 2 which means that a character can only equip 2 backpacks, but they an also equip 2 duffel bags and 2 hiking bags. For the magical rings, this won't touch how they work since their limits are made via their rigidity. Helmets are restricted in a similar way. |
Summary
Infrastructure "Add max_worn field, migrate ONLY_ONE flag"
Purpose of change
Some items should be wearable more than 2 times
Remove flag hardcoding for more modular decision on how many items of a type can be worn
In terms of player visible changes, allow wearing more than just two pins.
Describe the solution
Adds 'max_worn' field that allows defining how many instances of the item can be worn at once. Defaults to 2.
Allow wearing maximum integer pins at once to simulate ability to wear infinite pins.
Replace every instance of ONLY_ONE with "max_worn": 1
Deprecate ONLY_ONE flag
Describe alternatives you've considered
N/A
Testing
With max_worn = 18 for the pins and the replaced flag value for the solar backpack
Additional context