nrlulz / ACF

Combat damage system for Garry's Mod
110 stars 116 forks source link

Armour balance ~ideazone~ #37

Closed Bubbus closed 9 years ago

Bubbus commented 11 years ago

Moving the armour chat from the fuel issue (#35) over to here.

I figure we could replace the health/armour system with density/ductility sliders, something like this:

High density ductile has huge hp per volume, high density brittle has huge pen resistance per volume (not the same as RHA). Low densities have lower amounts of both, but lighter. Add value clamps on each side to keep things competitive. Then we add the new traced ballistics to convert those material properties into an eRHA upon impact. Highest ductility values can take additional health damage due to loss of structural integrity, highest brittle values can take extra rha degradation due to fractures.

You end up with a system pretty similar to the current one, but you now have two clamping numbers and two scaling numbers which totally control armour balance, along with damage behaviour which discourages super-biased materials (sponges get swiss-cheesed, ceramics get shattered). They still have a use though because their first-hit resistance will be higher than less biased props, letting them survive bigger explosions and shell hits at the expense of follow-up damage events. You also get the benefits of traced impacts: no weirdness with volume vs RHA (no more 250mm soda cans); side-on impacts get proper RHA values; pancake armour can't have physically impossible eRHA; and more... No need to stack a bunch of armour plates together too which is nice.

Crits?

Fervidusletum commented 11 years ago

Sounds quite a bit more flexible than previously. Density/ductility sliders would help smooth out the differences in physical armor thickness. I think this system has a lot of potential.

We could create a tool that allows the user to spawn custom sized plates with simple cuboid collisions. I know server stability was brought up when I mentioned this for ammo crates, but I really think it wouldn't be an issue as makespherical works just fine.

On the topic of limiting RHA based on physical dimensions, what about diminishing returns for increased weight, based on the smallest dimension of a prop? For example, take a 4x4 thin sprops plate (610x610x38 mm). The weight required for 38mm RHA (thinnest dimension) is 133 kg (assuming default ductility). Any weight over that would add increasingly less armor, say up to double or triple the thickness of the smallest dimension. Tanks in general should have to increase in size to accommodate the thicker plates needed for high armor, sacrifice internal volume, gain vulnerability to explosives, or lose armor:weight efficiency. This would also prevent tanks from having massive amounts of armor on thin plating (due to having increased armor capacity from low HP weight multiplier).

Amplar commented 11 years ago

Do it

Fervidusletum commented 11 years ago

Are you referring to Bubbus' trace system or the diminishing returns?

Amplar commented 11 years ago

Both ideas, just do it, and we'll see how it works

paralysis by analysis

Fervidusletum commented 11 years ago

Did a bit of playing around with functions; linear increase wasn't very appealing for small props, as you had to significantly increase mass to see an appreciable armor increase. I found that an inverse function had quite a nice falloff; you get an appreciable armor increase with 2x-4x base mass, but it quickly tapers off. When actual mass is below base mass, we'd just use current armor calcs.

local BaseArmor //thinnest dimension of prop in mm
local MaxArmor //multiplier that defines max armor thickness for a prop, 3 = 4*BaseArmor
local BaseMass //mass of prop when armor == thinnest dimension
local Mass //current mass of prop
local Falloff = Area / 2 //multiplier for how quickly armor tapers off, lower is faster
local Armor = BaseArmor * (1 + MaxArmor * (1 - Falloff / (Mass - BaseMass + Falloff) ) )

For the example of the 4x4 thin sprops plate, BaseArmor = 38.1, BaseMass = 133.5, MaxArmor = 3, Falloff = 5000 (red), Falloff = 500 (dark red). (Actual falloff for the plate based on area/2 would be 2252, so roughly in the middle of the lines). Blue line is current armor calculations. 0 to 50,000 mass range, armor 0 to 160 rha armorfalloff2

133.5 to 534 (1x to 4x base mass) mass range, armor 0 to 160 rha armorfalloff1

I may still need to tune it a bit further, as thick props get slighter higher armor efficiency initially, than they do with current calculations (24x96x12 gets at most 25mm rha (6%) more at 1.5x base weight). Might be good though, as it promotes larger tanks. If the extra rha is undesireable, can just use the the lower of current armor calc and falloff. Thoughts on it so far?

Amplar commented 11 years ago

Ideally, armor balance on tanks in real life comes from the mass itself and balancing the weight ballast, too heavy of frontal armor will make the suspension do bad things, wear components, etc...but we can't really run around with 80% physical tanks. Weldparenting doesn't lag really, but there's too much potential for idiots doing it wrong.

I don't really think the current armor scheme has any propblems, it's just the lack of other kinds of weight and components in vehicles that needs to be addressed. Fuel, Cooling, more detailed models (so inlines aren't so fucking flat) crew entities (i described these in great detail long ago, they wouldn't be required, but would offer bonuses if incorporated in a vehicle), etc.

Bubbus commented 11 years ago

See if you can find us a modeller. I can model but the time I spend in 3dsmax is time I'm not spending in notepad. You can remodel those inlines and then maybe get us some radiator models, fuel tanks and then maybe more shells, magazines, rockets/bombs? I've got some future plans for shells and mags in particular, and you all know what I want rockets and bombs for.

Amplar commented 11 years ago

don't need models for fuel tanks, shells , mags, bombs, or rockets.

Bubbus commented 11 years ago

not right now - for the future. you know why i need bombs and rockets, and mags/shells are for sweps + manually operated guns so yeah they're mostly for xcf stuff. doesn't invalidate the point that a coder who's modelling is not coding.

Redreaper commented 11 years ago

Why not add presets? For instance, aluminum, steel, uranium, tungsten, lead, ceramic, concrete, etc? So you could have ceramic ablatives, set to maybe -90 ductility, concrete to +200, aluminum at -50, steel at 0, lead at +75, uranium at -20, etc? We could leave ductility the tool, but add the presets as having a slight bias, like you get a +5% usefulness from the preset ceramic alloy. That way we don't break existing features, can motivate people and can use real materials. Everyone wins.

I can find most of these values with RL comparison, and quote a few off the top of my head. Uranium should be somehow extremely heavy, but have both high health AND RHAe. But for instance concrete with rebar is about 1/8 the weight-effectiveness of steel, making it a good filler. Not hard.

Amplar commented 11 years ago

yeah but armor is rated in equivalent, so the amount of health you set just makes it whatever material necessary