Technical support > Feature Requests

Smooth encumbrance system

(1/4) > >>

Norby:
In Ufoai 2.5 soliders suffered -12TU over 50% of the maximum weight of equipments and this is the same up to 100%. Imho not the best that a 40kg pack allow the same speed than 20.1kg.

The simplest solution would be a new highest level of encumbrance, for example -24TU over 80% weight. In this case the kg could be red in the inventory screen.

The encumbrance modifier of strength skill could be the same as now (0.4) to prevent faster improvement, or anything what developers like, I will accept the decision. :)

Update: I attached the solution of the smooth encumbrance system discussed below in a zip file to this post. I also uploaded a patch into the issue tracker.

Rodmar:
If a new level of encumbrance was to be implemented, I'd rather be for a much higher penalty.

Given a new recruit with 24 TUs is reduced down to 12 TUs, with current system, I'd have a faster soldier with say 36 TUs reduced to about 12 TUs as well when 80% encumbered. That would mean a -24 TUs penalty. That would also mean that slow recruits would be unable to move before reaching 100% encumbrance.

Norby:
Right, -24TU sounds better, especially when 100% weight mean the man can not make any steps. If I calculate well a rookie with 15 speed (I never seen less) keep 3 TU only and a superman with 100 speed still get 23TU.

Sandro:
IMHO, the best version could be a smooth encumbrance increase instead of increasing in steps.

Norby:
A smooth solution mean more steps where each cause 1 TU change. If we keep the effect of 50% weight at +0TU and 20% at +12TU then each 2.5% change should result an 1TU change. This mean +20TU at 0% and -20TU at 100%.

Alternatively if a step happen at every 2% then 0% mean +25TU and 100% is -25TU. This is closer to Rodmar's notice.

My problem is anything over the +12TU bonus looks unfair when I use experienced soliders.

How about this:
- below 50% weight give +1TU after every -4%, up to +12TU in 0%-2%,
- 0 TU between 46.01%-50%,
- 50.01%-52% give -1TU, then -1TU for each +2%, down to -25TU in 98.01%-100%.

You can test this formula if you replace the similar line in ufoai/src/game/q_shared.h to this:
--- Code: ---#define GET_ENCUMBRANCE_PENALTY(weight, max)    (1.0f - ((weight) > (max) * WEIGHT_FACTOR * WEIGHT_HEAVY ? 12.0f/MIN_TU+(((weight/(max*WEIGHT_FACTOR))-0.5f)/0.02f)/MIN_TU : 12.0f/MIN_TU-((0.5f-(weight/(max*WEIGHT_FACTOR)))/0.04f)/MIN_TU ))
--- End code ---
Now this is working in my machine. :)

The following change show TU next to the kg. Better than always using the popup on weight to know the bonus or penalty.
File: ufoai/src/client/cl_inventory_callbacks.cpp
--- Code: ---Com_sprintf(label, sizeof(label), "%g/%i %s  %i %s (%+i)", invWeight / WEIGHT_FACTOR, maxWeight, _("Kg"), tus, _("TU"), tuPenalty);
--- End code ---

The red color still could be added over 80% but just as a spice.

Navigation

[0] Message Index

[#] Next page

Go to full version