Page 2 of 2

Re: Coders Wanted for Cuboid Resurrection

Posted: Tue Nov 26, 2013 5:09 pm UTC
by Ishq

I was a cuboid contributor. Kinda. Contributed a few fixes here and there. Was hoping they would drop the uBP model.


Re: Coders Wanted for Cuboid Resurrection

Posted: Wed Nov 27, 2013 1:52 am UTC
by ViruS
Viech wrote:
ViruS wrote:

We tried to find where the damage calculations for armour was located but never found it

In Unvanquished, I found it and ripped it out. The code for nonlocational damage protection was horrible, I had to find the old values by playtesting. Per-class damage reduction can now be found in main/configs/classes/human_(naked|light|medium|bsuit).locdamage.cfg and allows you to set nonlocational protection independently.

Oh sweet. Iirc (it may have been a dream), it had some weird decimal number involved... I'll check it out later :thumbup:


Re: Coders Wanted for Cuboid Resurrection

Posted: Wed Nov 27, 2013 9:02 am UTC
by Viech

It looked like this.


Re: Armour Calcs

Posted: Thu Nov 28, 2013 12:16 pm UTC
by ViruS
Viech wrote:

It looked like this.

Wait, I already knew that. I remembered some other complex calculation, and it was different to the 1.1 format too...

Edit: I just did a sample calculation, and sort of got an answer similar to what I saw in-game.

The reason why it seems dodgy from what I see is because of this:

Code: Select all

scale += region->modifier * region->area;

and this:

Code: Select all

 area += region->area;

and the modifier becomes

Code: Select all

1.0f + ( modifier / scale - 1.0f ) * area;

which makes this complicated.

Scrap calculations don't read this, I'll edit when I find a better way:

Code: Select all

damagemod += area(region) *modifier(region);
square(damagemod)
damagemod = 1/damagemod
 e lh3eb
WHY YOU READ THIS?!? :^(

.[/size]

Anyway, the sort of armour system I want for non-locational damage, is where if a bsuit (full body, uniform protection) that has a modifier 0.2 only, to only receive 20% damage, and where if a human is wearing light armour, the helmet will have a 0.3 modifier while the body armour would have 0.4, making average damage 31%. And if we still had the light armour separate from the light helmet, the human should receive 46% damage, and if it was raw helmet only, 93%.

In other words, they actually correspond nicely to the config modifiers.


Re: Coders Wanted for Cuboid Resurrection

Posted: Thu Nov 28, 2013 3:19 pm UTC
by Viech

This sounds nice in theory but there are a few issues. First of all human damage regions don't have the same size, so for the average body protection you would want to take this into account. On the other hand, such a naive average (which is still different from the old nonlocational calculation) has nothing to do with the actual average, where players usually aim for the head but hit the body or legs ocasionally. So what I did is using the technical average as well as the old protection values as a reference but allowing arbitrary reduction values anyway. This makes it easier to predict how much damage will be done with a certain attack and gives us another variable for balancing.

For those interested, here are the current values. Please resist the urge to discuss them here, let's not take over this thread completely which was supposed to be about Cuboid. If you have any more feedback or questions please use the Feedback or Genral Discussion forum, respectively.