Talk:Concepts/Strength, Weight and Equipment

From UFO:AI
Revision as of 05:24, 27 September 2012 by Mattn (talk | contribs) (Roadmap?)

Points to Consider

  • How should strength relate to weight threshold?
    • 1 strength == 1 weight? might need adjusting the strength stats in order to make sense, specially if using real life units (currently we have soldiers spawned with 15 to 25 strength)
    • Or maybe some non linear relation between them? (from experience I can tell you that a few kilograms can make a huge difference IRL)
  • How should the penalty calculated.
    • Flat penalty or based in the amount of overload.
    • In the later case linear penalty or some other formula.
  • A bonus for actors that are carrying a very low weight.
  • Maybe an absolute max to the weight an actor can carry, based on strength?
  • Also: revise the system for gaining strength experience

--DarkRain 04:53, 26 September 2012 (SAST)

  • What came to my mind first - Will a penalty only affect the soldiers ability to walk around or will it also prevent him from firing a weapon? E.g. a weak soldier picks up a Rocket Launcher and gets a penalty. Now he can (slowly, but he can) carry that weapon around the battlefield using the remaining TUs, but not fire it? --ShipIt 10:28, 26 September 2012 (SAST)
    • Yeah, this is an issue. It's possible that a soldier will have a TU penalty large enough to prevent him from firing a weapon (sniper rifle for instance) because he just doesn't have enough TUs. When we test if a weight leaves a soldier encumbered or not, we should also test whether a weight makes it impossible to use a firemode for an equipped item, and alert the player. I've put another error message text below. --H-hour 12:10, 26 September 2012 (SAST)

UI Suggestion

Here is a simple suggestion to display the weight. Putting it in this window makes it available in base and in the HUD, for campaign/multiplayer/skirmish. When weight is normal, text can be white. When weight is very light, it can be green with a little icon by it (I can supply icon, just ask). When weight is too heavy, it can be red with a little icon by it. Icons will have tooltips.

Weights ui proposal.jpg

Ideally, when adding an item to the soldier's inventory, if the weight will exceed his maximum capacity, it should pop up a small window alerting him to this and forbid him from adding the new item.

Text for the UI tooltips/errors:

light icon: "This soldier will gain * TUs because he is not carrying much."

heavy icon: "This soldier will lose * TUs because he is carrying too much."

capacity exceeded error: "This soldier can not carry anything else."

firemode can not be used error: "This soldier no longer has enough TUs to use the following items: \n\nWeapon: Firemode (TUs required)"

To implement the UI stuff, I would just need to know where in the code the soldier's weight is being totalled, when the game is checking the weight again (ie - when items are added/removed), and I can add the confunc's needed in.

--H-hour 12:27, 25 September 2012 (SAST)

I wouldn't insert UI calls directly in the inventory code, (the AI uses it too, for example) but the UI container nodes behaviours could be used for this. --DarkRain 05:02, 26 September 2012 (SAST)

Proper Weights

Doing some quick internet research, soldiers report up to 45kg of gear on long haul stuff. But our guys are rapid response, deployed to the battlefield. They don't carry rations or survival gear. I found a page on globalsecurity.org which showed a "Fighting Load" at around 18kg. Check the table near the bottom and the section titled "The bottom line" on this page globalsecurity.org/military/library/report/call/call_01-15_ch11.htm

Other things to keep in mind. An M4 Carbine is around 3kg loaded with 30 rounds. A Barrett M82 (50 cal sniper rifle) is 14kg. The Carl Gustav rocket launcher is 8.5kg, but most of the weight is probably in the rounds.

Since a soldier starts with 15-25, we could make it simple: 1 strength point = 1 kg capacity. However, the way the UI is done now, all the ability/skill bars use the same template, which means empty-to-full is expected to be the same. In other words, we may want a system where the soldier can grow his capacity to 75-100. In this case, we'd need a different equation between Strength value and kgs capacity.

Here is a quick, first pass at a rate: A soldier starts with 15kg maximum capacity. For every 5 strength points, he gets an extra kg. Encumbered when exceeds 75% of capacity. Extra speed when below 30% of capacity. That would work out to:

Str	Max	Enc	Extra  Speed
20	19	14.25	5.7
30	21	15.75	6.3
40	23	17.25	6.9
50	25	18.75	7.5
60	27	20.25	8.1
70	29	21.75	8.7
80	31	23.25	9.3
90	33	24.75	9.9
100	35	26.25	10.5

With this rate we can't really model realistic capacity. In reality, an average soldier COULD carry 50kgs (though he wouldn't typically fight with that, he could walk around alright). Another option would be to have a much lower encumbrance threshold (say, 50%) with a rate that starts at 30kg maximum capacity and gives an extra kg for every 3 strength points. Encumbrance at 50%, speed boost at 20%:

Str	Max	Enc	Extra Speed
20	36.6	18.3	7.3
30	40	20	8
40	43.3	21.6	8.6
50	46.6	23.3	9.3
60	50	25	10
70	53.3	26.6	10.6
80	56.6	28.3	11.3
90	60	30	12
100	63.3	31.6	12.6
Are we sure we want to have a soldier reach 75 - 100 strength? As with other abilities there are other actor kinds that will have a higher natural strength, like some aliens for example (I'm thinking ortnoks), and both humans and aliens share the same skill range (MAX_SKILL is defined as 100)
--DarkRain 04:50, 26 September 2012 (SAST)
I'm open to other possibilities. My first thought was to have all soldier skills and abilities follow the same general trajectory (rookies start around 20, elites end game around 70-100). This would avoid confusing the player, who might see his strength growing more slowly than other abilities and think he's doing something wrong. But your point about other actor kinds is good to keep in mind. It might be worth considering all abilities, where humans should max out, etc. I'm unfamiliar with how Speed and Mind work currently. In general, I favor consistency as a learning aid. --H-hour 12:10, 26 September 2012 (SAST)
Something to keep in mind: there is a hardcoded max for the experience a soldier can gain per mission in a given stat, this was originally calculated assuming an average career length of 100 missions for a PHALANX soldier
That means that in 100 missions a soldier can gain up to (assuming that they get max exp every time): 25 strength, 14 speed, 30 accuracy, 39, mind, 50 <weapon skill> and 99 max HP
See: G_CharacterGetMaxExperiencePerMission()

Penalty Suggestion

I am in favor of a flat penalty. If a soldier is encumbered, he loses 50% of TU. If soldier is below the light-weight threshold, he gains 50% of TU. (Actual numbers subject to adjustment, of course.) It has the benefit of being clear and consistent, so the player can more easily calculate the costs/benefits. Also, by nailing the full penalty/bonus around certain thresholds, it will encourage strategic thinking: how can I equip the maximum on this guy without exceeding this threshold. Or, since I'm already over the threshold, I might as well load him up with extra ammo for the snipers/scouts.

When we distribute the penalty/bonus throughout the weight, we force these kinds of decisions on every single piece of equipment the player is adding, which could be a little tedious. Furthermore, by distributing it evenly, there are no MOMENTS OF DECISION -- times and places in the game where the player feels like this decision is one of the important ones. If they're all equal, the game can feel a little flat. --H-hour 13:13, 25 September 2012 (SAST)

I mostly agree with H-Hour, although "gaining" TUs seems not very intuitive to me. I would assume the given TUs for a soldier are to be his maximum. If he adds weight, this number goes down.
I´d say: A soldier can carry some percentages additional weight without a penalty, as you add more weight on each threshold he loses some more percentages of his TUs. This means, if an actor has 20 Strength and 30 TUs, he could carry 100% (20 kg) additional weight without a penalty (loosing 0%), up to 120% (24 kg) losing 10% (3) of his TUs, 150% (30 kg) losing 30% (10) of his TUs up to were he simply cannot carry more weight. Numbers open for discussion and scriptable anyway.
--ShipIt 10:28, 26 September 2012 (SAST)
The reason I chose the system I did is to try to reinforce and communicate to the player a "normal" weight load. In order to gain the TUs, the soldier would need to carry very little. I don't want the player to react to a "normal" load as though he were suffering a penalty. I realize it's just semantics -- giving a TU "bonus" for low weight is functionally no different than the system you describe ShipIt. I'm more concerned about how to display to the player that it is normal for them to be in the middle and only in special circumstances would they want to be below or above certain thresholds. I'm not too concerned about precisely how the mechanics work behind the scenes -- starting with a maximum and working downwards seems fine to me -- but I do want to be clear with the player what they "ought" to do. --H-hour 12:10, 26 September 2012 (SAST)

Roadmap?

When this could/is expected to/should be included into the game? This seems easy enough to be ready soon, but the re-balancing for 2.5 is already huge, and I'm not sure how many balance-altering game mechanics should be included in a single release, especially since I'm not the one trying to keep the game balanced.

--DarkRain 05:31, 26 September 2012 (SAST)

I would say that this is up to Nate, but I would vote for a sooner than later implementation, because we would need this for the multiplayer balancing, too. The teams should be equally weighted.
--Mattn 09:58, 26 September 2012 (SAST)
I'm ok with quick. 2.5 is going to be a major release in terms of balance-altering changes. In some ways, it's easier (and better) to do all-in-one balancing than piece-by-piece balancing. I've rebalanced heavy weapons after removing the heavy weapon skill, and I'll need to rebalance them again after we implement the weight system. I think it's gentler on our users to put as much rebalancing in one major release as possible. They'll have to re-learn a lot of things with 2.5, and making them re-learn it all again in 2.6 would be annoying. --H-hour 12:10, 26 September 2012 (SAST)
Then go for it DarkRain, but please keep in mind while coding this that i need access in the multiplayer cgame implementation, too (via the cgame api of course, not cia direct calls - if you have questions about it, just ask) - because we plan to make multiplayer teams more fair and use the weight value (and other stuff) for this to ensure that a player does not carry too much equipment into a multiplayer round.