-
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
Inventory System Overhaul: High-Level Proposal #26726
Comments
The finding costs for grabbing an item from a container are nice, but maybe wait until 1 second game increments are implemented? I'm not sure how well it will work either adding increments of 0 or 6 seconds for a 2-4 second finding action. The tree-level interface for containers sounds really nice, I hope you allow it to be on the ground with stuff inside. |
I'm not a fan of the overloading concept. The fact that splitting up inventory means the player will have less capacity available is expected and intended. Food spoilage is currently based on most foods not being stored properly, adding better containers will generally extend it. In general I'd prefer to avoid adding extra features (overfilling, food spoilage adjustments, ecumbrance changes, access time changes) based on the inventory overhaul until the inventory overhaul is done. Doing everything at once is a recipe for completing nothing. Designing the system is fine, just dont implement it. In other words, don't implement anything outside of inference and management. |
Fair criticism, this can be something that is implemented later if it is deemed necessary. Food spoilage can proceed as outlined, just in an inverted fashion (bonuses for proper rather than penalties for improper). As for implementation, this was intended to be a comprehensive rework of the inventory based on the needs outlined in #23978; whether or not it is implemented all at once is irrelevant, assuming that this establishes an outline for future work. Although, I disagree with implementing just the management system - I would do access time as well, because that the simple inventory uses minimizing access time as an objective function. Doing the inventory inference mechanics without access time would require development of a throwaway algorithm, so I don't think it makes sense to do those asynchronously. However, the rest of the proposal can be implemented as needed. @CoroNaut I don't see what the problem with implementing access with 6 second turns is, seeing as how (as I understand it) the move points system effectively subdivides the turn already. If my understanding is incorrect, please elaborate further. |
When I wrote my previous comment, I was considering the extreme case of storing every unique lowest-volume item inside a single backpack that could fit, and finding it. I think I can say that the finding time will be very high for such a search, meaning your time will be close, if not above the 6-second increment (~100 move points) which is enough for enemies to move closer to you. any search cost below the amount of move points you have remaining would be free (allowing you to grab such an item, and defend yourself with ease). If 1-second increments were enabled, we would see the character have to make a choice on whether to actually grab whatever they wanted or prioritize fighting the enemy because they know that the time for finding such an item would allow the enemy to attack them. Of course my case is in the extremes, however, it can be applied to any case with a finding cost less than however many move points you have left (to not trigger the next turn). 1-second increments would eliminate this issue(mostly) because you know you would have a high chance of triggering the next turn for longer than average search actions. It's possible this is not an issue in your eyes, and is just a side affect of the turn system. |
Not really an issue so much as personal notes, if you return to work on it feel free to reopen. |
I have been giving this a good deal of thought in the last week or so, and decided to get all my thoughts down on paper. This is intended to be a comprehensive proposal for inventory overhaul, and is based on #23978.
Containers and Containing
Containers will see some minor changes, but the underlying mechanics will stay largely the same. Container flags for fluid containment will be expanded for general use with solids.
Overload Flag
This flag is intended to be used with wearable containers such as backpacks, to allow the transport of singular high-volume items. This is to compensate for the fact that the new inventory system will result in many, low-volume containers which could make transporting high-volume items impossible. The container can only be overloaded if it contains a single item whose volume is at least 0.5x that of the container’s maximum storable volume - you can’t put 10L of marbles in a 7L bag, but you can put a 10L log in if you let it poke out the top. Items can still be added to an overloaded container, as long as the resulting volume does not exceed 1.5x the base volume of the container. This will have to consider stacked items - such as rocks or marbles - ineligible for overloading, as the individual volume of a rock or marble should disqualify the entire stack. Overloaded containers will apply a significant encumbrance penalty, either a flat percent if the container is overloaded, or scaling with the excess volume. Example below:
Consider the following items:
Food
Food will have to be stored in a sealable container of a suitable size, or else will rot faster than normal. This will take advantage of the recent change which applied a shelf life to most forms of food. Certain tiles, such as a minifridge or root cellar will negate the unsealed rot penalty in addition to extending the shelf life. If the food is in a container with items of a dissimilar material, the penalty will still be applied. This allows for large containers such as backpacks to be considered sealable, but require the player to individually package fruits and meats contained within. OTOH, a backpack full of raw meat is a valid storage solution, and will not apply the rot penalty. The increased rate of rot, and the threshold for considering a container full enough will be an implementation decision, with the penalty itself possibly dependent on the food itself. This solution uses the rotting mechanic as a proxy for ‘dirtying’, which seems acceptable as the outcome of both is inedible food.
Worn Containers
Worn containers will behave much in the same way as other containers, with one major change. Each worn container can have distinct pockets, each with their own volume and flags. For instance, a camelback item would have one pocket with seals, watertight, expandable, and a storable volume of 1.5L to represent the ‘wet’ pouch, and another pocket with seals, expandable, and a storable volume of 1L to represent the ‘dry’ pouch. This removes some ‘special’ pockets such as a magazine pouch, and treats all pockets the same.
‘Special’ Pockets
Certain worn containers will remain as ‘special’ pockets, only able to carry a certain subset of items. These containers include scabbards, holsters, ammo bandoliers, and other wearable containers specifically suited to carry certain items.
Item Accessibility
Item accessibility determines the difficulty for the character to get the item from its container into their hands, in order to wield/wear/throw/reload/eat/use the item. For demonstration purposes, accessibility will be calculated in units of ‘accessibility points’ (APs), where more difficult to access items have more APs - these will be translated into move costs when the specific equations are created. Accessibility is calculated independently for each item, and is broadly dependent on three things.
Base AP of the Container
Base AP measures the ease of getting to the items in the container. Whenever a container is accessed, the container adds its base AP to the cost of access. For nested containers, the base AP for each is added to the pool, perhaps with a stacking penalty for deeply nested containers.
Volume of the Item
When selecting an item, the relative volume of the item versus the filled volume of the container will add APs. Additionally, the absolute volume of the item will add APs. This effect accounts for the time costs associated with both finding and removing an item:
The 'filled volume' will only consider dissimilar items, so 1 rock in a bag of rocks will be considered 100% volume, and incur no finding cost.
Encumbrance
Encumbrance penalties account for the loss of manual dexterity and flexibility necessary for manual actions.
Dexterity
Once the total cost in APs is calculated, the character’s dexterity stat would apply a percentage modifier to the APs - the actual percent would be capped with a lower and upper bound to prevent abnormal dexterity from totally negating/insanely inflating APs.
These three factors accounts for the main aspects of finding and removing and item in a container, i.e. effects from the container(s), effects from the item itself, and effects of encumbrance. Whether or not they linearly scale with moves (as this proposal outlines) or not is a design choice for the developers, in the interest of game balance I won’t attempt to determine this.
Storing Items and Inventory Management
The above mechanics detail item removal from containers, and should work adequately well for item insertion. For inventory management, the following modifications should be applied.
Inference and Management
This is perhaps the most challenging aspect, designing an system and interface which allows the user exactly enough control over their inventory. The original issue identifies three levels of management; inference, macro, and micro. I think these can be reduced into two concepts, simple and advanced, combining aspects of macro with the other two.
Simple Management Mode
Simple inventory mode lets the game decide where items go when they are added to the inventory. Containers can be tagged with item categories that the game will consider when filling containers, and tagged containers will try to be filled with items that they are tagged with before putting other items there. Certain items (mainly ammunition) will be placed in containers with lower base AP. Food will be placed in sealable containers, and the game will try to fill sealables with food first to negate the rotting penalty. If there are items of the same category in an existing container, try to put matching items there (category autotagging). After these rules, the game will try to minimize the number of moves/AP spent adding items to the inventory. If the accessibility algorithm is constructed well, using AP as the objective function should produce reasonable results. After an inventory operation, the player gets a free inventory sort action, allowing the player to correct the system if they didn’t like where some items went. This action replaces the pickup action’s move costs, allowing for more or less points to be spent, but must be taken immediately following the inventory operation.
Advanced Management Mode
Advanced inventory is similar to simple inventory, except items which do not meet container tags are explicitly placed by the player. Additionally, containers are not auto-tagged when they get something that is contained (could be an options menu option). For full manual control, the player set no tags on any container, and assigns each item to a container by hand. Players using auto-pickup are encouraged to set tags so that auto-pickup doesn't trigger the manual inventory insertion dialog every time.
The Interface
The inventory interface will have two modes, flat and tree, which can be toggled using TAB. Flat mode is essentially the current inventory interface, with items sorted by category on the left and clothing on the right, and is the default view when using simple management mode. This allows for a quick overview of the inventory, and quicker (fewer key presses, not fewer moves) access to specific items. Tree mode is a tree, where the top nodes are worn containers, and the leaves items or sub-containers. Containers with multiple pockets (e.g. backpack) will have one node for the container itself, followed by leaves for each pocket, each with its own contents. Singleton containers (e.g. can, box) will have one node for the container, and leaves for each item within. Worn clothing without storage appears at the bottom by default, but can also be moved around the inventory. If clothing is moved from the root level to a container, it will be take off, and worn if it is moved from a container to the root level.
Advanced uses of this include special nodes at the top of the inventory. In advanced management mode, when items are being manually added to the inventory, a node with the items will appear at the top. The currently wielded weapon will appear as a leaf to a ‘Wielded’ node. If desired, the 9 adjacent tiles can also have their own nodes, which allows for similar functionality to the current advanced inventory. This allows for the player to sort items in containers on adjacent tiles.
Key commands in tree mode are slightly different to accommodate the tree structure. All items can be examined using RETURN/ENTER, and examined pockets will show their parent item. Forward slash (replacing filter, in flat view) will open a mini-menu where containers can be tagged with item categories or specific items, which the game will consider when adding items to the inventory. In addition to manual tagging, the menu will have two auto-tag options which will 1) add a category tag for each item of that category in the container or 2) add an item tag for each item in the container. Containers can be collapsed/expanded to hide/show their contents using Left Arrow, and items are selected for movement using Right Arrow. Items can be moved up and down the inventory after being selected using Up and Down Arrows, and placed using Right Arrow again (a-la armor sort menu). While an item is selected, containers can still be collapsed and expanded to more easily allow for item movement. In the header, the total cost in moves is tabulated as the items are rearranged, so the player can see how expensive their inventory operation is. When the inventory is closed, move points are spent to rearrange the inventory based on the rules defined in Accessibility. The inventory will remember which containers are collapsed and expanded each time it is accessed.
Implementation Decisions
This is a list of all the proposed concepts whose values could be modified for balance, ordered by section.
This is quite the text dump, but I think it covers everything to an adequate level of detail.
The text was updated successfully, but these errors were encountered: