-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Capacity-based storage system #10095
Conversation
|
||
//src.boxes.screen_loc = "4:16,2:16 to [4+cols]:16,[2+rows]:16" | ||
var/icon/I = new(src.storage_box_continue.icon) | ||
I.Scale(storage_box_length-4,32) |
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.
ew icon procs :(
Please do not generate and manipulate new icons every time the inventory is displayed. |
As mwerezak said, don't do |
Yes! I know it! Someone make system what i offered. |
Use
and |
You may want to reduce storage capacities across the board with this, as it represents an overall buff to the amount of things that people can easily store (which itself has been creeping up with widespread webbings and security now having pockets in their armour vests). Making backpacks able to carry 3 or 4 large items (instead of 7) seems like a reasonable place to start IMO. |
underlay_end.Shift(EAST,endpoint-object_offset-2) | ||
O.underlays += underlay_start | ||
O.underlays += underlay_continue | ||
O.underlays += underlay_end |
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.
In theory, this should give items an underlay in the storage menu. Nothing is showing up, though. Any idea what might be the problem?
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.
I would hazard a guess that it is because underlay_start, end, and continue are icons, not images.
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.
@mwerezak as far as I'm aware the overlays and underlays lists can contain the following:
- Images
- Icons
- Appearences (
overlays += "state"
adds an Appearence not an icon or image) - Objects (Byond will deal with it)
I wonder, does this support items with separate 'pockets'? Because the dual slots for storage in most storage-type coats seem to represent two pockets, and purely volumetric storage means instead of a cigarette packet and a lighter, you may elect to store a twice as large cane (I don't know actual sizes, but you get the idea), presumably with each end in a separate pocket and the middle just kinda hanging there. |
Right now, I'm planning for some storage items like belts, excavation kits and coats to still use slot-based storage |
Yes it does. In fact, this is the same system we have currently, with some parameters tweaked and a new UI. So it should support everything the existing system does. |
Managed to get the bars representing storage cost to work. Mostly a matter of balancing and modifying other systems to fit now |
Icons appear a bit too bunched up and messy, is the interface a work in progress? |
@SkowronX No no. I'm sure as intended. If you stick a bunch of things in a backpack will be difficult to pull something one, it presents it. |
Then that should be changed. It's not aesthetically great looking. |
I agree with @SkowronX - While i like the general idea, the visual look of the UI is not good. The items are too close together and overlap the boxes, that should not happen. |
@atlantiscze @SkowronX It only one way to show many icons of many obj in one row. |
I counted about 60 lines in that, each 7 items. That is a total of 420 items. Even with tiny ones, nothing should fit that many items at once. For example a backpack with 7 slots /as it is now/ would store 7 large items (wclass 4), therefore 7*4 tiny items (wclass 1). Four rows. Not sixty. Your argument is not valid in this case. And of course, we can always have limit to amount of items in one storage if we ever have storages that are so large they would take up whole screen. EDIT: I also don't think that "ICly backpack full of small stuff would mean it will be hard to pull something out of it" warrants creating UI that is uncomfortable to use. Keep IC things IC, and keep mechanical changes OOCly comfortable to players. |
I actually really like the way it looks. It's not as parsable as the previous version but that's kind of a good thing, and it does give you an immediate indication of how much space something is taking up. |
And that's why you enable item stacks for storage =V |
@atlantiscze A w_class 4 item takes up eight times the space as a w_class 1 item. |
@@ -10,7 +10,6 @@ | |||
throw_speed = 1 | |||
throw_range = 7 | |||
w_class = 4 | |||
max_w_class = 3 |
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.
Why are you removing these?
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.
Having a max_w_class makes sense when storage is slot-based, but with capacity-based storage, it no longer makes sense to arbitrarily limit the size of items that can be put in when this is already balanced by storage capacity.
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.
That's not true at all. For instance, items should not be able to fit in a container the smaller than them. And storing items involves more than pure volumes - things like the shape of the items being stored and the size of openings matter as well.
I'm not sure if you've taken any time to think about this at all. Fire axes, shotguns and similar items should not fit in backpacks and similar containers, both for balance reasons and because otherwise it does not "make sense." Being able to store infinite amounts of backpacks/toolboxes/anything else inside each other hardly "makes sense" either.
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.
Except it's not balanced, because if you have containers with combined w_class more than 4 you can stack them inside each other forever.
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.
Plan is to give storage items a "storage_cost" value one greater than their max_storage_capacity. I'm still tweaking the values to keep things balanced.
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.
That seems like an inelegant solution.
Either you are going to have storage items that are bizarrely humongous compared to every other item in the game, or your storage item capacities are going to become very small.
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.
Also i think it was a nice feature how using boxes to organize the contents of your backpack would yield more storage space. Under your system that would be impossible to implement.
It just seems like pointless cutting away of design space for no good reason. With max_w_class we already achieve the same thing and have more control over how the storage item behaves.
Backpack not is box, it don't hold his volume. Empty backpack can be pasted into another backpack. Tool belt with tools must have more volume when 1 slot and less when empty. For security, must completely cut inserting objects in container, that in container. |
Having slept on it, I've realized that my biggest objection to this PR as-planned (because as-is it is completely broken) is the fact that it will make organizing the contents of a backpack using boxes provide no benefit whatsoever. I'm not happy with this feature being axed with little to no justification whatsoever. Especially since the only argument for removing it is on the grounds of "making sense" and I would argue that organizing your backpack using smaller containers to gain extra storage space does in fact make a good deal of sense - In addition to the gameplay aspect that rewarding players for taking a little bit of extra effort gives boxes a purpose and provides players with the choice to use them or not. As far as I can tell, max_w_class does everything we need and works very well for the purposes that we want of it. Replacing it with a new system, especially deciding that it should go when it's replacement has not even been fully fleshed out yet seems unsettling and... like a waste of effort, honestly. Still, as long as whatever new system you are playing with allows for players to be rewarded with some extra storage space for organizing their backpacks using boxes, then I guess I'm not one to tell you that you can't do that. |
Busy at the moment, but I'll get back to this in a few weeks. |
Fixed |
A decision is needed for this. |
All the yes! |
I'm happy to update and balance this as soon as you folks decide that it should go in |
Another two weeks ;) |
Asked how it was working out for Yonagoni/Europa. Quick answer was that while no intensive testing has been done things do seem to work fine with some minor concerns of some sprites being larger than their storage slot. |
@@ -12,10 +12,16 @@ | |||
var/list/can_hold = new/list() //List of objects which this item can store (if set, it can't store anything else) | |||
var/list/cant_hold = new/list() //List of objects which this item can't store (in effect only if can_hold isn't set) | |||
var/list/is_seeing = new/list() //List of mobs which are currently seeing the contents of this item's storage | |||
var/max_w_class = 2 //Max size of objects that this object can store (in effect only if can_hold isn't set) | |||
var/max_w_class = null //Max size of objects that this object can store (in effect only if can_hold isn't set) |
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.
This change removes size restrictions from a bunch of subtypes that don't have max_w_class
set.
Found so far: boxes, bibles, and first aid kits.
…um w-class set to 4 and 3 respectively. Storage box sprite made lighter to improve visibility against dark backgrounds.
Updated and balanced. |
As far as I can tell, this means you can fit two backpacks inside a backpack or two boxes inside a box. I don't think infinite fractal storage is desirable, balance wise. |
It doesn't allow containers to be placed inside other containers with equal or lesser w_class. I initially made containers always have equal or less storage space than they take up, but this would have made boxes useless for increasing storage capacity, among other changes to gameplay balance. |
Ah. Thanks for clarifying that. |
👍 |
Oh well what can possibly go wrong |
Storage system for backpacks, boxes, etc. altered to be storage-capacity based. Items take up space based on w_class by default, with custom storage costs also possible. Space in container represented as a bar, with each stored item positioned along the bar with an overlay representing how much space they are taking up.
Backpacks have a capacity of 16, boxes have a capacity of 8 and toolboxes have a capacity of 14. A backpack can store 2 spacesuits, 4 fire extinguishers, 8 emergency oxygen tanks or 16 pens.
Belts, excavation kits and some other containers still use the slot system.
Current screenshots (5 January 2016):
Backpack with various items
Backpack with spacesuit
Box
Toolbox