The Cathedral of Attnam

Iter Vehemens ad Necem (IVAN)
Login
Username
Password


 Valid CSS  Valid HTML 4.01 Strict

Endurance

The Cathedral of Attnam  >  Programming
Print

View profile
Send messageSend email
Find posts Find topics
 
Apr 17, 2009 at 1:32 pm #1  !
Serefan's Avatar
Serefan
kobold lord


Joined: Dec 15, 2008
Occupation: Making IVANOV.
Location: Behind your back everytime.
Interests: Shit nobody cares about
Posts: 100
Endurance
Little question...

Does anyone know how HP is calculated exactly using the endurance stat (or is it using more stats?), and how it is distributed among the bodyparts?

EDIT: So far I have found this:


Quote


bodypart::CalculateMaxHP(ulong Flags)

{

int HPDelta = MaxHP - HP;
MaxHP = 0;

if(Master)

{

if(!UseMaterialAttributes())

{
long Endurance = Master->GetAttribute(ENDURANCE);

MaxHP = GetBodyPartVolume() * Endurance * Endurance / 200000;

}

else

{

long SV = GetMainMaterial()->GetStrengthValue();

MaxHP = (GetBodyPartVolume() * SV >> 4) * SV / 250000;

}


if(MaxHP < 1)

MaxHP = 1;


if(Flags & MAY_CHANGE_HPS)

HP = Max(MaxHP - HPDelta, 1);


if(Flags & CHECK_USABILITY)
SignalPossibleUsabilityChange();

}

}



Which implies that HP is determined by Endurance, and body part volume. Then I went looking for the GetBodyPartVolume() function, and I found this:


Quote


long humanoid::GetBodyPartVolume(int I) const

{

switch(I)

{

case HEAD_INDEX: return 4000;

case TORSO_INDEX: return (GetTotalVolume() - 4000) * 13 / 30;

case RIGHT_ARM_INDEX:
case LEFT_ARM_INDEX: return (GetTotalVolume() - 4000) / 10;
case GROIN_INDEX: return (GetTotalVolume() - 4000) / 10;

case RIGHT_LEG_INDEX:

case LEFT_LEG_INDEX: return ((GetTotalVolume() - 4000) << 1) / 15;

}

ABORT("Illegal humanoid bodypart volume request!";

return 0;

}





Which implies that the head volume doesn't change, for one, and the rest of the volume is divided under the remaining body parts (note that it isn't properly divided, a portion of the number of gettotalvolume is unused for some reason?). But now I can't find that GetTotalVolume() function... So I still don't know exactly how everything works.

EDIT2:

I reverse-used the calculations, and found out that the main player has a total volume of 76. Does anyone know if the devs just gave all humans a volume of 76 (which will probably correspond to 76 kg, a bit around the average weight of a human), or is there more to it? (I'm kinda thinking right now about how a bloated player has increased hp on his torso, but reduced agility/dexterity )
 
Last edited by Serefan : Apr 18, 2009 at 2:29 pm. Edited 2 times total
 
View profile
Send message
Find posts Find topics
 
Apr 18, 2009 at 8:01 am #2  !
chaostrom's Avatar
chaostrom
Mage Prophet


Joined: Dec 3, 2007
Occupation: Standing between all life and death.
Posts: 2038
Groups:
Ahoy Serefan! Still working on IVANOV? I'm of no help but good luck all the same.
 
image
 
View profile
Send messageSend email
Find posts Find topics
 
Apr 18, 2009 at 10:06 am #3  !
Serefan's Avatar
Serefan
kobold lord


Joined: Dec 15, 2008
Occupation: Making IVANOV.
Location: Behind your back everytime.
Interests: Shit nobody cares about
Posts: 100

chaostrom wrote   >

Ahoy Serefan! Still working on IVANOV? I'm of no help but good luck all the same.



Not still working, I quit around new year, 'cause of some personal problems & stuff, and I've restarted just this week, with some major refactoring and I must tell you I'm really proud that everything is still running smoothly, and it's being completed piece by piece.

It won't be like the original IVAN. I knew that from the beginning (some small changes I already made: scrollbar at the messages screen, player is always in the middle of the screen). The hardest part will be getting the calculations for everything, or at least get some with the same game balance.
 
Introducing the IVANOV text-based trailer:

You hear someone screaming: "Surpriiiiise buttsecks!"
You hear a faint thump.
One of your comrades has fallen in battle. (Death message: Raped to death by a whip mistress' dirty attack below the belt in Gloomy Torture Chamber #1)
-
The ghost of EagleV touches you in the groin!
You feel quite happy.
 
 Print


The Cathedral of Attnam  >  Programming  >  Endurance

Jump to