project-navigation
Personal tools

Author Topic: Medikits  (Read 93675 times)

Offline criusmac

  • Squad Leader
  • ****
  • Posts: 168
    • View Profile
Re: Medikits
« Reply #120 on: July 31, 2009, 08:32:42 am »
Before I forget, I'd like to mention I can't see any way to do this completely via the weapons.ufo file. These changes seem too complex to allow the medikits to operate like any common weapons.

I've also been unable to find any code for medikits in any of the files, so it looks like the medikit was used completely based on the weapons.ufo file, which indicates it does -40 hit points of damage for 20 turn units.

Offline homunculus

  • Sergeant
  • *****
  • Posts: 387
    • View Profile
Re: Medikits
« Reply #121 on: July 31, 2009, 10:06:54 pm »
[...]
1) high damage shot --> has little health left in the main bar and is bleeding a lot.
2) low damage shot --> has much health left in the main bar and is bleeding a little.
Both can be true.. But it is more likely 2, since damages will be less after balancing.
[...]
actually i meant this more like... even if the damages are reduced, shots will still have different damages, some higher, some lower.

so, the "main" health bar shows the sum of damage to all bodypart health bars?

trying to think along, some points seem to attract attention:

given enough time you should be able to bleed to death from any untreated bleeding wound.
therefore, if your total health is 100, your arms should have health 100 too, right?
otherwise you couldn't bleed to death from a shot to the arms.
but if your arms get blown off in an instant (100+ points of damage to arms), i somehow feel that it should still be possible to save you if bleeding is stopped quickly.

also, wound grows as it bleeds, but i somehow feel that bleeding has a tendency to stop instead.
when you cut your finger and the wound was untreated, what happened?
the bleeding stopped by itself, right?

and one more thing, maybe i missed it somehow, but is there any idea how bleeding wounds and treated wounds will be shown to the player?

to summarize:
1) is it correct that you are instantly dead when your arms get blown off?
2) what about doing it so that bleeding creates treated wounds, not bleeding wounds?

Offline criusmac

  • Squad Leader
  • ****
  • Posts: 168
    • View Profile
Re: Medikits
« Reply #122 on: August 01, 2009, 01:54:29 am »
actually i meant this more like... even if the damages are reduced, shots will still have different damages, some higher, some lower.

so, the "main" health bar shows the sum of damage to all bodypart health bars?

Basically, yes. Although the bodyparts do not have health bars that are visible to the user.

trying to think along, some points seem to attract attention:

given enough time you should be able to bleed to death from any untreated bleeding wound.
therefore, if your total health is 100, your arms should have health 100 too, right?
otherwise you couldn't bleed to death from a shot to the arms.
but if your arms get blown off in an instant (100+ points of damage to arms), i somehow feel that it should still be possible to save you if bleeding is stopped quickly.

It might be possible to save a person who has had their arms blown off in real life.. I'm not sure of this. I didn't plan to allow it in the game however. Arms get blown off, you're dead was the plan..

also, wound grows as it bleeds, but i somehow feel that bleeding has a tendency to stop instead.
when you cut your finger and the wound was untreated, what happened?
the bleeding stopped by itself, right?

Yes, if you cut your finger, you will usually stop bleeding and be ok. This was the plan as well in the game. If you suffer a wound of less than 10 points, you will not bleed from that wound. It isn't treated, but it won't get worse by itself, no matter how much time passes.

Since a human can survive more than 10 cut fingers, I will assume each wound from a cut finger is less than 10 hit points of damage. Once you start getting into the higher damages, you start to encounter things like internal bleeding (which doesn't stop as far as I know), or actual bullet holes in the body (which you will tend to die from before it can naturally stop bleeding), etc.

and one more thing, maybe i missed it somehow, but is there any idea how bleeding wounds and treated wounds will be shown to the player?

Yes, the idea was that you would see your main health bar decrease.. You wouldn't see the individual wounds however. There was no plan to show the player any of the wounds, but this may need to be changed..

to summarize:
1) is it correct that you are instantly dead when your arms get blown off?
2) what about doing it so that bleeding creates treated wounds, not bleeding wounds?

1) Yes. The proposal is you are instantly dead if your arms get blown off.
2) This is an interesting idea. This should be asked of the developers.

Offline BTAxis

  • Administrator
  • PHALANX Commander
  • *******
  • Posts: 2607
    • View Profile
Re: Medikits
« Reply #123 on: August 01, 2009, 06:51:02 pm »
criusmac: If you feel you should do things differently than mentioned in the article (e.g. wound treatment order), simply go ahead but note your deviation on the article's talk page. I think it's better to document amendments that way than to change the article every time, to avoid forcing people to read the article over and over again.

I realize you may not be able to do everything in the scripts, but try to script as much as you realistically can. Easy tweaking is never a bad thing. Otherwise, I think you're on the right track. Carry on.

Offline homunculus

  • Sergeant
  • *****
  • Posts: 387
    • View Profile
Re: Medikits
« Reply #124 on: August 02, 2009, 06:49:52 pm »
if bleeding creates treated wounds

maybe you would like such idea that bleeding damage goes not only to the wounded bodypart, but to all bodyparts.
assuming the soldier has 100 health points and gets damaged for 30 points, and will bleed for 3 points each turn, you know, that is really not a lot of bleeding (it will take more than 20 turns to die, i assume you are not concerned with balancing).

so you should have enough space to increase bleeding by, say, doing 3 points treated wound damage to all bodyparts (total 12).
(now, why should bleeding damage affect all bodyparts not just the one with the wound? lol)

actually, according to my own wounds proposal that i posted in this thread a while ago i was assuming that 30 points of wounds would have 30 points of bleeding per turn, so your soldier would be conscious for 3 more turns (though barely able to do anything after 1 turn) and then would be unconscious for 1 turn and then the soldier would be dead.

so, hopefully it is obvious that i think bleeding 3 points from 30 points wound is not much, increasing it to 12 points is also not much.
that is, if you like the idea of doing the bleeding damage to all bodyparts.

actually, even if bleeding caused 3 treated wound damage to all bodyparts, there would still be a lot of opportunity to say how this would be weird, for example, bleeding should damage to all bodyparts depending on how much health those bodyparts have (damage would be proportionate).
i wonder what was originally meant by this:
Quote
[...]Bleeding takes health directly from the health bar[...]
whatever way i think of it, in the end it seems more natural to forget about "bodypart health points" and just have a number there for wounds, from 0 to positive infinity, and then the health bar would be blood pressure bar.
« Last Edit: August 02, 2009, 07:35:05 pm by homunculus »

Offline geever

  • Project Coder
  • PHALANX Commander
  • ***
  • Posts: 2561
    • View Profile
Re: Medikits
« Reply #125 on: August 02, 2009, 10:40:36 pm »
Then bodyparts would have no use. 30/turn? That's damn much! Note that the hit not only create wounds but removes HP so it's not 3 turns even.

-geever

Offline homunculus

  • Sergeant
  • *****
  • Posts: 387
    • View Profile
Re: Medikits
« Reply #126 on: August 03, 2009, 03:33:42 am »
Then bodyparts would have no use. 30/turn? That's damn much! Note that the hit not only create wounds but removes HP so it's not 3 turns even.

-geever
lol, in that proposal i didn't have blood splash when getting hit.
the people who like bodyparts rather than generic wound level are not me, btw.

Surrealistik

  • Guest
Re: Medikits
« Reply #127 on: August 04, 2009, 04:02:48 pm »
Quote from: criusmac
When you get hit with any weapon, laser, projectile, explosion, whatever, I pick a random body part that it will hit. There will be an equal chance to hit any body part. That chance is 25% for each location since there are 4 possible locations that can be hit. For example, if you walk up to some person, and hold a shotgun to their chest, you stand an equal chance of hitting their chest, legs, head, or arms. We can say this might be realistic since the person getting shot doesn't want to, and may grab the shotgun aiming it down, or block with their arms, or start to duck, or something.

I disagree with this, yes you can introduce some element of randomness to the wound location by way of various maneuvers and movements, but the body parts with larger surface areas and sizes are still more likely to be hit than say, the head. Second, aimed shots are probably significantly more likely to hit vital body parts than automatic fire or snap shots.

Second, if a body part is outright destroyed, I think that the subsequent bleeding/gradual hp loss incurred from the wound should just be rapid and overwhelming, such that it must be addressed immediately or death ensues, rather than being terminal outright.
« Last Edit: August 05, 2009, 03:44:13 am by Surrealistik »

Offline criusmac

  • Squad Leader
  • ****
  • Posts: 168
    • View Profile
Re: Medikits
« Reply #128 on: August 04, 2009, 06:44:49 pm »
I disagree with this, yes you can introduce some element of randomness to the wound location by way of various maneuvers and movements, but the body parts with larger surface areas and sizes are still more likely to be hit than say, the head. Second, aimed shots are probably significantly more likely to hit vital body parts than say automatic fire or a snap shot.

That's true. Hmm. I should go with different set values then. I'm not sure what the chances of hitting someone in a specific body part are, but how about:

head  10%
chest 50%
arms  15%
legs   25%
?

I hesitate to change the values due to aimed shots since, as far as I know, you aren't aiming for a specific body part... Except for head shot, which is/was some sniper rifle thing.. Though I'm not certain that'll stay.

Second, if a body part is outright destroyed, I think that the subsequent bleeding/gradual hp loss incurred from the wound should just be rapid and overwhelming, such that it must be addressed immediately or death ensues, rather than being terminal outright.

Right now, I'm playing this as "the person is dead because no amount of treatment from a medikit is going to be enough to save the soldier's life anyway". It's also simpler since I don't need to develop or introduce new code for how people can still move around with no arms, or no head, and do something like chickens do. In that much pain, I'm not sure the person could do anything meaningful anyway, except act like a distracting target, and remember it applies to aliens too. Right now aliens don't use medikits, but if you could save someone's life even after they had their limbs blown off, just imagine the alien's advanced technology for doing so... If they cared enough to anyway. I don't know why they don't, except it might be rather complicated to make AI that would...

I suppose I could try to make it so people didn't die immediately, but you'd have to be really lucky to be able to save them anyway. Would only happen if you could reduce the wounds to under their maximum hp. Seems a bit complicated to implement, so unless a developer really wants this, I'll continue to have them die outright...

On the other hand, if you can get the developers to want this, I can change it so the person falls unconscious, but can still be saved until the healing of *all* of their wounds wouldn't make their current hp less than their maximum hp. (IE, they'd still be dead if you healed all of their wounds).

Offline Hertzila

  • Sergeant
  • *****
  • Posts: 469
    • View Profile
Re: Medikits
« Reply #129 on: August 04, 2009, 08:23:21 pm »
Will each bodypart have their own health meter? I understood that there will still be only the main health bar with wounds being more of a cosmetical thing. But it seems that people talk like each has its own one.

Offline criusmac

  • Squad Leader
  • ****
  • Posts: 168
    • View Profile
Re: Medikits
« Reply #130 on: August 06, 2009, 12:35:20 am »
Will each bodypart have their own health meter? I understood that there will still be only the main health bar with wounds being more of a cosmetical thing. But it seems that people talk like each has its own one.
None of the body parts will have a health bar. The main health bar is the only health bar.

I believe people talk like each body part has its own because depending on which body part gets hit, it affects the person in different ways:

Quote
    * Wounds on the arms reduce accuracy with all weapons, and increase TUs needed to shoot.
    * Wounds on the legs increase the amount of TUs needed to move.
    * Wounds on the torso increase the amount of TUs needed for reaction fire.
    * Wounds on the head decrease visibility and accuracy with all weapons.

Offline criusmac

  • Squad Leader
  • ****
  • Posts: 168
    • View Profile
Re: Medikits
« Reply #131 on: August 06, 2009, 02:24:37 am »
On my initial looking at the code, I found something that looks wrong:

In g_combat.c, in the G_Damage function

Code: [Select]
/* Apply armour effects. */
if (damage > 0) {
if (target->i.c[gi.csi->idArmour]) {
const objDef_t *ad = target->i.c[gi.csi->idArmour]->item.t;
Com_DPrintf(DEBUG_GAME, "G_Damage: damage for '%s': %i, dmgweight (%i) protection: %i",
target->chr.name, damage, fd->dmgweight, ad->protection[fd->dmgweight]);
damage = max(1, damage - ad->protection[fd->dmgweight]);
} else {
Com_DPrintf(DEBUG_GAME, "G_Damage: damage for '%s': %i, dmgweight (%i) protection: 0",
target->chr.name, damage, fd->dmgweight);
}
} else if (damage < 0) {
/* Robots can't be healed. */
if (isRobot)
return;
}

The problem I see is:
Code: [Select]
damage = max(1, damage - ad->protection[fd->dmgweight]);
This means no matter how good the armor is, the actor will *always* take damage. Armor can't stop the projectile completely.
This feels like it should be:
Code: [Select]
damage = max(0, damage - ad->protection[fd->dmgweight]);
instead.
Otherwise, we could have actors wandering around with dozens of wounds which would take a lot of medikit uses to fix.
Should I make this change, so that armor can completely block damage if it is good enough?

Surrealistik

  • Guest
Re: Medikits
« Reply #132 on: August 06, 2009, 02:55:31 am »
Yes. It only makes sense to me, and besides, if the game is well-paced there should never come a time where your armour completely and consistently overwhelms alien weaponry except perhaps on the easiest difficulties.

Also, I've noticed that there is no method to heal robots. Perhaps some sort of nanite fueled repair kit could work to repair armour and machinery?
« Last Edit: August 06, 2009, 02:57:20 am by Surrealistik »

Offline criusmac

  • Squad Leader
  • ****
  • Posts: 168
    • View Profile
Re: Medikits
« Reply #133 on: August 06, 2009, 04:43:52 am »
Also, I've noticed that there is no method to heal robots. Perhaps some sort of nanite fueled repair kit could work to repair armour and machinery?

Well, the code specifically prohibits the repair of robots. I think, if you want that to be changed, it should be in a new topic somewhere. For now, I don't plan to make medikits able to fix droids...

Offline Winter

  • Captain
  • *****
  • Posts: 829
    • View Profile
    • Street of Eyes: The Writing of Ryan A. Span
Re: Medikits
« Reply #134 on: August 06, 2009, 03:34:24 pm »
1. No droid repair.

2. Body part wounds are special, like fatal wounds in X-COM, and are not percent-based; not every hit should cause one.

Regards,
Winter