Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Fixing sizing issues with downsizing/upsizing items and refitting #28123
SUMMARY: Bugfixes "Fixing sizing issues with downsizing/upsizing when you are smaller/larger size"
Purpose of change
Describe the solution
Describe alternatives you've considered
There are several alternatives here. The encumberance does not have to be adjusted to consider oversized clothes but then there is a disconnect between the information presented to the player and the actual encumberance differences. It makes sense that gear sized for someone that stands 2 feet tall is nearly impossible to wear for someone who is huge (I imagine 10-12ft)
There are some questions here with things like security glasses or knit scarves. They sort of fall into the category of items like panties/bras etc. but with this rework, they now have encumberance penalities for Huge and Small characters. This makes sense in realism terms as if your head has grown 3 sizes or shrunk 3 sizes, glasses built for a normal human would not fit well.
Large Character with Various Gear
Large gear, fits
Large gear, doesnt fit
Zero encumberance, same across all character sizes
Normal sized gear, cannot be modified
Normal sized gear, doesnt fit
Normal Character with Various Gear
Normal gear, fits
Normal gear, poor fit
Normal gear, cannot be modified
Small Character with Various Gear
Normal sized gear, can resize
Normal sized gear, cannot resize
Small sized gear, fits
A zero encumberance item, same across all character sizes
changed the title
[WIP]Fixing sizing issues with downsizing/upsizing items and refitting
Feb 8, 2019
No they wont be but that is also existing behavior. At head right now, if you are small and craft safety glasses, you will get normal sized glasses and have an encumbrance penalty. However, at head right now, if you are huge and craft safety glasses, you will get normal sized glasses but not an encumbrance penalty.
The difference now is that, instead of the encumbrance penalty while small just happening without any information on it, you are being told that you have an encumbrance penalty and, to bring huge and small in line with each other, you now get an encumbrance penalty when huge and are also told about it
It may make sense, in a different PR more than likely, to decouple resizing clothes from VARSIZE since the intention there is fit/poor fit and not sizing and add a new flag, DOWNSIZABLE. Then, if present, any clothing that is downsizable would be able to go from normal to small and small to normal and if you are small and you craft gear that is DOWNSIZABLE, then it can automatically be made with UNDERSIZE as a flag on it. We could add UPSIZABLE but currently, following design of OVERSIZE, nothing is ever meant to be UPSIZABLE as defined as able to be made OVERSIZE or be made normal from OVERSIZE.
I would say this is beyond the scope of this PR unless the current fix is unacceptable.
It doesnt change any existing constraint on a small character with near sightedness. You at the moment on head will have increased encumberance from the goggles you make or find and will not be told that you cannot downsize it nor that they are too big. This change will now explicitly tell you they are too big and cannot be downsized.
I considered making crafted items be downsized when you craft them or making more items downsizable as outside the scope of this PR but im happy to revisit. The goal was keep scope only to fixing the lack of messaging but I also understand if that now surfaces some issues we may want to address
kevingranade left a comment
Something about this has changed effective encumbrance, causing some unit test failures.
AFAICT these are not intentional changes, so there's a bug somewhere in here that needs fixing.
The ranged test creates a shooter with a cloak_wool which has 5 encumbrance but is marked OVERSIZE. From my changes in
is that doubling shown from 10 to 5. This is working as intended by this PR
The wield time tests all involve the boxing_glove which is also an item that is marked OVERSIZE and so is beholden to the same rules. Instead of an expected encumbrance of 70, we get 140 which gets added to the base cost of handling something (100) to get our 240 moves instead of the expected 170. This is also working as intended for the PR.
The other tests are the same dealing with the boxing_gloves
I see 3 solutions:
What are your thoughts @kevingranade ?
Sorry I didn't get back to this sooner, I lost track of it.
Side note: Hooray, the test is working as intended by surfacing unexpected changes.
Also, my bad. The PR description says
But I can definitely see how that is not clear what is actually being changed. I will try to be clearer in the future.
I will make these changes now, fix conflicts, and roll out