-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Rebalance stamina and pain penalties for dragging wheeled vehicles #37787
Rebalance stamina and pain penalties for dragging wheeled vehicles #37787
Conversation
rebalanced hauling pain penalty and gave a stamina discount to dragging wheeled vehicles
So I like the sound of this in general but I'm curious why you choose half the stamina drain for wheels. I don't know the exact real value but pulling a wagon with stuff on it takes way less than half the energy of carrying it. Maybe 1/5? |
I don't know if there's a realistic way to relate stamina consumed by hauling x kg to the stamina consumed by rolling x kg on a wheeled vehicle. I imagine it depends on stuff like the axle friction. I mainly set the stamina cost to 50% to give a lower-weight wheeled vehicle a sizable advantage over carrying the equivalent amount of mass by hand. It could be higher or lower depending on what other folks think. |
Gotcha, I was just figuring that if i was playing a 4str char and a cart only let me carry things twice as far I would be disappointed and think that's a bit small. That said I don't have numbers of science to back me up so w/e. |
Before I noticed this PR I was approaching this issue, and taking a dive into that code area, it really needs some fixing up, its all a bit weird, and now we have wheel width on vehicle parts etc, we can do a proper algorithm, though in the meantime, as things stand, this does at least fix the issue, though probably not in the way we eventually want. Wheels dont always make things easier, depending on the type of wheel and type of terrain, we would want something reasoned out, not just "strength 4 characters cant do this currently, so we should make it possible for them to do it" But I would consider this acceptable to clear the blocker, until we can approach this in more detail. |
I agree that this PR is more of a stopgap for fixing the immediate problem, and it would be much better to have stamina cost/strength requirements for dragging vehicles based a more realistic function of wheel diameter, number of wheels, etc. After 0.E we could collaborate on trying to fix up that area of the code if you want. |
One of the changes introduced in PR CleverRaven#37787 dropped the conditional check for character strength being *equal* to exertion required, and instead applied the "It takes some time" movement penalty to everyone (regardless of strength). And, due to the first `if` being changed to `ex >= u.get_str() + 1`, there was no case for `ex == u.get_str()`, allowing characters with a very specific strength, just 1 less than the strength needed, to avoid any movement penalty at all. Fixes CleverRaven#38104 The pain penalty is preserved (with comment), and a narrower condition (potentially matching 2 different strength stat values) gives the "It takes some time" message with the same movement penalty. Any character with sufficient (or more than sufficient) strength to drag the vehicle will see no message and receive no additional movement penalty.
Someone who is out of shape and unable to lift much of a heavy load (~40 kg max) can easily push or pull around a 700 kg pallet cart on flat terrain, to give you an idea of how much extra carrying capability wheels provide. |
Please back up your claims with sources, there's no reason to trust those figures. |
That is a false and ridiculous statement. 700 kg is a weight of a small car. Good luck pushing it if you can't lift 40 kg. |
Sorry, I actually underestimated the weight capacity of the pallet cart (Apparently they're also called pallet trucks or pallet jacks interchangably? I was told that trucks were the motorized ones and the carts were the ones that were a flatbed instead of the forks but were still manual, at my last warehouse job, so it could've just been just a local distinction); it's 34 kg (75 lb) push/pull force to move 4535 kg (10,000 lb). https://www.youtube.com/watch?v=v8UVuCgs7wo |
Please come again with formulas, not with some ads video. |
Performance of a pallet jack or pallet part that is designed and only capable of operating on a smooth concrete floor is not relevant here. This feature currently only supports general purpose wheels that are capable of traversing rough and soft surfaces. |
I did specifically state that it was only on flat terrain, not on rough or soft surfaces. Additionally, the video linked is not just an "ad video", but shows it in action, and also links to a sales page with specifications. There are also all-terrain variants, such as the three listed here from the same manufacturer as the 10K lb one: https://www.vestil.com/product.php?FID=335 though they can carry significantly less weight, between 1000 lbs and 2500 lbs depending on how high it has been jacked up (the lower the higher the load capacity). As for the numbers for push/pull capability required, 34 kg of force seems about accurate to the maximum recommended for any OSHA-compliant hand cart, which pallet trucks fall under: https://www.ccohs.ca/oshanswers/ergonomics/push2.html specifically the line, "The force needed for the initial movement – recommendations include a pushing or pulling force of no more than 320 N for males, and 220 N for females (N = Newtons, where 10 newtons is approximately 1 kg)". It also provides general statistics for various OSHA-compliant carts and their recommended travel distances to reduce strain, which could be converted to formula for stamina cost, if you so desired. |
Coefficients of rolling friction for common situations: But as he posted with the OSHA requirements, I think 200kg is very well within the limits of strain free feasibility on a decent surface with the rolling cart (not a pallet jack) The OSHA limits are obviously going to be set to ensure safety at a lowest common denominator. |
SUMMARY: Bugfixes "Rebalance stamina and pain penalties for dragging wheeled vehicles"
Purpose of change
Fixes #28816
As it stands, low-STR (4) characters dragging a 50kg cart will regularly get messages that they 'strained themselves', thus racking up pain. Also, the stamina penalty for hauling their vehicle is greater than carrying the equivalent mass of the vehicle. This is unrealistic since wheels are supposed to give you better leverage for moving things.
Describe the solution
In the section of game.cpp that computes the stamina burn penalty for moving an object you've grabbed, I added a 50% stamina discount to grabbing vehicles with any wheels. This means that whatever stamina drain an equivalent-mass block of steel would incur is divided by two. In my opinion, this is the simplest solution to the problem raised in the issue because it does not lower the move-time associated with dragging a cart (which should only depend on the object's mass).
I've also nerfed the part of vehicle dragging that can cause you to 'strain' yourself and take pain. The way it was before, you could have two more strength points than were required to pull the object and still take pain.
Describe alternatives you've considered
Considered trying to more specifically take vehicle weight/wheels into consideration when moving vehicles. The vehicle grabbing code just takes the mass of the vehicle, divides it by 25kg to get a starting point, and then goes from there.
Testing
Tested out feature to make sure grabbing vehicles still worked as intended. Stamina consumption and 'strained' dragging have been rebalanced.
Additional context
None