UFO:Alien Invasion

Development => Design => Topic started by: alinour on February 06, 2008, 09:37:25 am

Title: Medikits
Post by: alinour on February 06, 2008, 09:37:25 am
hi,

I'm designing new medikit working principle (http://ufoai.ninex.info/wiki/index.php/TODO/2.3 (http://ufoai.ninex.info/wiki/index.php/TODO/2.3))

I was thinking to implement something alike original X-COM games.
In particular:

Of course, these things will be introduced slowly, my daughter doesn't leave me a lot of spare time...

Let me know what you think about it, or if you have any other idea

_________________

Alinour
Title: Re: Medikits
Post by: BTAxis on February 06, 2008, 12:15:04 pm
I see no problem with this setup, in principle. Keep in mind, though, that we don't have any code to check which part of a soldier is getting hit. Nor do we have code to allow aiming for a specific body part, as was (apparently) the case in Jagged Alliance. Me, I don't see the point in having that, anyway. My experience with all games is that shooting to kill is always more effective than shooting to cripple.
Title: Re: Medikits
Post by: alinour on February 06, 2008, 01:58:39 pm
I agree. I wasn't thinking to aiming to parts, it'll be just a probabilistic approach.

The part of the body hitten, but for realistic purposes, would also be useful to determine which characteristic will be affected by maluses.

Alinour
Title: Re: Medikits
Post by: Zorlen on February 06, 2008, 02:39:38 pm
Nor do we have code to allow aiming for a specific body part
I disagree - sniper rifle can do headshots, regardless of body part hit :-)
Title: Re: Medikits
Post by: BTAxis on February 06, 2008, 02:58:41 pm
I was never too happy with the head shot fire mode, really.
Title: Re: Medikits
Post by: kracken on February 06, 2008, 05:56:15 pm
  • medikits can be used in two ways: to recover HP or to treat a wound
  • an untreated wound means loosing HP every turn
  • only a level of wound can be healed through medikits, the rest need hospital degency

A problem might be that the dropship flying back to base will travel a few hours before arriving to base. If soldiers loose HP every turn, they will be dead by the time they arrive to base.

Furthermore, I agree with BTAxis and I don't think body part implementation is really needed here.

Here's another proposition:
But i like the idea of loosing HP while a soldier is not healed. So we could add:
Title: Re: Medikits
Post by: alinour on February 07, 2008, 09:45:24 am
Quote
A problem might be that the dropship flying back to base will travel a few hours before arriving to base. If soldiers loose HP every turn, they will be dead by the time they arrive to base.
I assume that when the area is clean, the first thing soldiers would do is tend to companions wounds... but your observation is useful: at mission end, all untended wounds levels should automatically decrease of one.

For the rest of your proposed approach, I don't know whether the reality level of such system is high enough... I mean:
 

at last: the one you proposedit is just an alternative to the method I mentioned, What is the added value? (Consider that in wound system I thought there is no need to aim a body part, it is random selection)
Title: Re: Medikits
Post by: kracken on February 07, 2008, 12:00:41 pm
I assume that when the area is clean, the first thing soldiers would do is tend to companions wounds... but your observation is useful: at mission end, all untended wounds levels should automatically decrease of one.
Wait, I think I misunderstood your basic idea. when you said "an untreated wound means loosing HP every turn", you didn't meant that you needed to heal every level of wound, but that you just need to heal at least one level of wound, right ?
If yes, then forget what I said about soldiers dying while returning to base ;)

the method you mentioned would create almost immortal soldiers, in theory... something like hit and heal loop.. Personally I don't like it...[/li][/list]
No because medikit HP are limited: you can't healed more HP that this limited value (some balancing may be needed to know how many maximum HP can be healed). Furthermore, the more you heal a soldier, the less UTs he has, so an healed soldier is not as usefull as an healthy one.
If you find that medikits are still too powerful this way, just change my previous post with: 'real' HP + 2 * medikit 'HP' can't be greater than max HP

at last: the one you proposedit is just an alternative to the method I mentioned, What is the added value? (Consider that in wound system I thought there is no need to aim a body part, it is random selection)
Yes, this is just an alternative method, where the only significant modification is the removal of body part.
Except for body part removal, there is not really any added value in my proposition compared to yours. This is an alternative method, where what I called medikit 'HP' is similar to what you called wound levels (depending of how you want to implement wound levels: is there a maximum wound level (if you exceed this number, soldier die) ? Do you increase 1 level per wound whatever the number of HP you lost ? Or does the wound level increase by number of HP you lost ?). I have no problem with your "wound level" method rather than my "medikit HP".

Concerning body part, I think that added value of what I proposed is simplicity ;). There's a balancing to choose between simplicity and realism. IMHO, the reality level of your system is either too high or too low. Let me explain:
If a soldier is shot through a window, he may be wounded to legs with the implementation you described. This is not realistic, because the wounded body part would be randomly chosen. So well, we could say that your proposal is not realistic enough, and that we need to implement non-random wounded body part (depending on the position of attacking alien and soldier, weapon used, ...). And then, we'd probably need to implement aiming body part, because I can already hear people on forum saying "Hey, what is the use of having body part if you can't aim them... please implement this". ;).
(well, to be honest, most of the people will probably ask for being able to aim alien body parts... but not for alien being able to aim their soldier's body parts, so this is not really a problem for medikits :P)

IMHO, either we choose simplicity and random body part localization is not needed, either we choose realism, and then we would need to implement a full body part localization code (without randomness).
My personal taste here is simplicity. So I'd rather be for a general wound level (only one per soldier), rather than one per body part.

Having said that, I'm not the one who is going to implement this ;) I'm just giving my opinion here, if you prefer a in-between solution like the one you proposed, that's OK for me. Implementing one wound level per body part will ask you probably more time than only one general wound level (for implementing body part, showing player what body parts are injured on a given soldier, implementing different effect of wound given the localization, maybe changing armour code so that protection on body part may differ ?, ...). Maybe a good solution is starting with general wound level, and see afterwards if using 1 wound level per body part is needed ?
Title: Re: Medikits
Post by: alinour on February 07, 2008, 02:34:21 pm
I see...
you are right about randomness issues...
and I'd avoid the  "implement body part aim" request...

I think that I'll stick to single wound level for whole body for now.

Thanks

(other point of views are always welcome... before I start coding preferably)
Title: Re: Medikits
Post by: sirg on February 08, 2008, 12:40:26 am
My experience with all games is that shooting to kill is always more effective than shooting to cripple.

Shooting an alien in the head, or in the eye  :o (Fallout) would be fatal, compared to a burst in its armored torso which would barely do any harm. So, such a shot should require a higher accuracy skill to perform, like competent or better, which would be a nice addition to the gameplay, making veterans even more valuable.
Title: Re: Medikits
Post by: alinour on February 08, 2008, 08:30:17 am
Oh my God, I created a monster!
I didn't want people to start requesting aimed shots...
Even if it is an interesting topic, this Topic isn't designed to discuss about it, but about medikits and health.

If, from another Topic, community will decide to implement aimed shots, health status code will be updated accordingly, promised (well, if I'll take the action).
Title: Re: Medikits
Post by: sirg on February 08, 2008, 11:13:16 am
Well, the aimed shots and targeting body parts was present in XCOM, and it isn't implemented yet.
Speaking of medikits, yes, their use it's a bit unrealistic, given the fact that plasma weapons and such are extremely lethal, and any hit would cripple if not kill any solider, regardless of armor.

So, this brings 2 issues - make the game more realistic, by making the alien weapons able to one shot kill any soldier, which would mean that all alien weapons will be the same and very powerful, or add some armor that can take the hits, without hurting the soldier.

The medikit should be used for curing burns and wounds from area damage, but nothing more than painkillers and 1st aid.

Maybe the devs should consider giving some hitpoints to armor pieces instead of copying the system from X-COM, where a soldier could have had a leg wound or whatever. So if the armor plate is damaged by shots, then the next shot would instantly kill the soldier.

The part of the body where the soldier is hit could be picked up randomly, ofc, torso having the highest chance, and if the head is hit, then the damage should be multiplied..
Title: Re: Medikits
Post by: BTAxis on February 08, 2008, 12:44:47 pm
We won't be having armour failure, as explained on the wiki (http://ufoai.ninex.info/wiki/index.php/Gameplay_Proposals/Armour).

I agree, though, that soldiers wearing armour should be able to take some hits before dying, or armour and the medikit will be useless.

alinour: Please proceed with the medikit code as you have it in mind.
Title: Re: Medikits
Post by: sirg on February 08, 2008, 01:46:37 pm
I see you made up your mind on armor, yet it isn't quite realistic. Actually a kevlar vest stops the bullets, preventing them from harming the body, instead of reducing their speed so the impact on the body to be less destructive. If a bullet gets through the vest, the soldier is dead, because the bullet will tumble in the body causing severe trauma.

The armor could be more vulnerable or more effective against certain types of attack, but (as stated in UFOpedia) if a plasma burst hits the body it would severely cripple the body, beyond any cure or treatment... so it's more realistic to have an armor that takes the damage instead of the soldier.

Medikits can be used also, when the soldier is wounded by splash damage, fire or melee attacks, but a direct hit unprotected by armor should be fatal. I think this is the realistic approach.. and from what I see, you ppl, are quite focused on that :)
Title: Re: Medikits
Post by: Surrealistik on February 08, 2008, 10:57:55 pm
Armour failure or degredation should be implimented, precisely because soldiers can and will take several hits, especially when healed with the medikit, so this mechanic, realistically, would certainly come into effect. This is doubly true given the capability of certain damage types to absolutely chew up protective gear. Secondly, it adds an interesting additional tactical component and consideration. If your opponent is heavy on strong armour, you may want to opt for weapons that are effective at negating it (the plasma as opposed to laser family).
Title: Re: Medikits
Post by: BTAxis on February 08, 2008, 11:44:23 pm
The medikit will change, so that argument is invalid. More importantly, the decision has been made. No amount of arguing here is going to change it.
Title: Re: Medikits
Post by: Surrealistik on February 09, 2008, 12:44:19 am
Lol, even if the medikit changes, armour damage is still a meaningful factor in so long as soldiers can survive several hits, but if you're adamant on sticking with the status quo, so be it, I have better things to do with my time than chew you out about something you refuse to budge on.
Title: Re: Medikits
Post by: eleazar on February 09, 2008, 12:50:14 am
  • having wounded body parts, the maximum number of HP is limited and some modifiers are applied to other stats (like accuracy for head or arm injuries)

I would recommend that these modifiers range in severity all the way to: unconsciousness for the rest of the mission.  Of course if the damage is too great, death would result as it does now.

IMHO if a highly (but not horribly) damaged soldier would fall down and be out for the rest of the mission, it would keep much of the drama of your team being picked off one by one, without the player quitting whenever a good soldier goes down.

Also the amount of space between death and consciousness could be based in part on the difficulty level, so the new player might not need so many other things nerfed to survive.
Title: Re: Medikits
Post by: SpaceWombat on February 09, 2008, 01:45:20 am
Considering that minor wounds will not bleed you to death and some wounds (like secondary injuries by fire) would cauterize the tissue and prevent you from dying this way I would like to discuss the possibility to set that "bleeding flag" only on soldiers who have taken a serious injury (more than x hitpoints lost at once).

I would really be p***ed if one of my soldiers gets a 1 hitpoint shrapnel into his butt and turns out to be a TU eater because the mission takes that long he would end up crippled/dead.
Title: Re: Medikits
Post by: kracken on February 09, 2008, 08:46:19 am
I would recommend that these modifiers range in severity all the way to: unconsciousness for the rest of the mission.  Of course if the damage is too great, death would result as it does now.
Also the amount of space between death and consciousness could be based in part on the difficulty level, so the new player might not need so many other things nerfed to survive.

I would really be p***ed if one of my soldiers gets a 1 hitpoint shrapnel into his butt and turns out to be a TU eater because the mission takes that long he would end up crippled/dead.

Those 2 points can be easily handled with Alinour proposition: 1 level of wound doesn't need to correspond to 1 HP.
You can increase 1 level of wound each time you lose for example 20 HP (this value may depend on soldier strengh, difficulty setting, ...) , and become unconscious if wound level become higher than 4 (for example).
Title: Re: Medikits
Post by: sirg on February 09, 2008, 06:37:33 pm
The medikit will change, so that argument is invalid. More importantly, the decision has been made. No amount of arguing here is going to change it.

You are still developing the game, and you aren't even close to a beta or a pre-release. Why are the devs so neutral to the players' input, when alot of valuable comments are being made, some based on a strong background with similar games.

How can you decide upon a game mechanic so early on in the development stage when you aren't even done with the testing phase, and still are experimenting with stats and models? You are all saying that you want a realistic game, yet when realistic models are being proposed they are dismissed.
Title: Re: Medikits
Post by: BTAxis on February 09, 2008, 06:56:04 pm
I've explained this to people many times, but fine, here goes one more time.

We make this game as a community effort, but that doesn't mean the community dictates how we make it. We make design decisions, and we stick with them. Why? Because if we are going to change something just because people are complaining about it, then we'll keep changing everything and never get anything new done. Plus we'd most likely end up with an unplayable game.

That is not to say we won't listen to anything people say. Take the civilian death penalty. It was obviously ill-received and clearly hampered the game experience for many people, so we did something about that. But this is a different issue altogether. The game is perfectly playable with armour working this way.

As for realism... We do try to keep it realistic, yes. But that doesn't mean we have to make a whole simulator for everything. It's a game. It abstracts from reality. There's a lot in real life that's not in the game. That will always be the case.

If you don't like it, make a mod that implements armour failure. Go ahead, the source is open.
Title: Re: Medikits
Post by: Sacrusha on February 09, 2008, 08:26:29 pm
You are still developing the game, and you aren't even close to a beta or a pre-release. Why are the devs so neutral to the players' input, when alot of valuable comments are being made, some based on a strong background with similar games.
The problem I observed with this* is not that players' input is not valued - actually most suggestions will be at least considered. Based mostly on those suggestions, forum discussions, and sometimes even polls, design decisions are made.

But once design decisions are made, the same discussions will pop up again before the decisions which have been made are fully implemented. In that case it is usually more reasonable to stick with the decisions that have been made and fully implement/balance them first. After that is done it will be far easier for everyone to judge the design decision and provide feedback - what might lead to the change that had been proposed on the forum long ago, or show that the implemented version works far better than expected by some people, or lead to a completely different system being implemented.

Personally, I don't like the way armour currently works. I think it is unintuitive, and am of the opinion that it is implemented differently in most other games for a reason. But I'd like to see how it works when it is somewhat more balanced, so I can provide better feedback.

BTW, BTAxis, do you happen to have a link to a discussion that lead to the current implementation of armour? I'd like to read some more about the reasonings behind it, if possible.


*Long time ago I participated actively in the development of this project, but dropped out because of a lack of spare time. In the meantime changes may have occured that make some of my statements outdated.
Title: Re: Medikits
Post by: BTAxis on February 09, 2008, 08:33:32 pm
BTW, BTAxis, do you happen to have a link to a discussion that lead to the current implementation of armour? I'd like to read some more about the reasonings behind it, if possible.

The discussion you refer to happened on IRC. I've pastebinned it:
http://pastebin.com/maa72307
Title: Re: Medikits
Post by: Sacrusha on February 09, 2008, 08:37:02 pm
Thanks a lot :)
Title: Re: Medikits
Post by: eleazar on February 09, 2008, 10:38:15 pm
But once design decisions are made, the same discussions will pop up again before the decisions which have been made are fully implemented.

Over at "Battle for Wesnoth (http://www.wesnoth.org/forum)" we made an FPI list (Frequently Posted Ideas).  Basically it listed common ideas that people posted, which we had already decided against, with a brief explanation why.

While many users didn't read it, it's easier to point them there than explain something for the Nth time. It also had some effectiveness in channeling the forum populace into brainstorming in useful directions.

I'm not sure if this project has grown enough for that to be worth the work, but it's something to think about.
Title: Re: Medikits
Post by: alinour on February 12, 2008, 11:36:40 am
Those 2 points can be easily handled with Alinour proposition: 1 level of wound doesn't need to correspond to 1 HP.
You can increase 1 level of wound each time you lose for example 20 HP (this value may depend on soldier strengh, difficulty setting, ...) , and become unconscious if wound level become higher than 4 (for example).

Right, this is exactly what I had in mind. For unconsciusness I'm gonna evaluate it still
Title: Re: Medikits
Post by: burns77 on February 27, 2008, 09:02:14 pm
Sorry if this is a re-post, but I timed out last time I tried and can't find my original...

How about wound levels (say 1-5) and medikits use 1 use per injury level starting with level 2.  Multiple use of the kits cannot be used to
fully restore wounded soldiers.  One use per injury. So a soldier who sustains a level 3 wound can only be improved once, however, if the same soldier takes additional damage resulting in a level 4 wound, they can be stabilized, or if they took another level 3 wound it could be healed to reduce penalties, but the two wounds would stack for a further reduced TU count, morale, and accuracy. Rendering the soldier less effective than they were with only one wound.

Wounds:

Level 1:  Minor HP loss from damage, no wounding, no penalties - Doesn't need treatment.

Level 2: More HP loss, minor loss of movement (TUs or can make normal movement like crouched movement), no wounding damage, and
            minor morale loss. - Treatment can fix the TU penalty and boost morale.

Level 3: Significant HP loss, minor wounding damage, major loss of movement, major loss of morale, and penalty to accuracy
           (more so with 2 handed weaponry). - Treatment would remove wounding damage, restore some movement (not all),
           improve morale and lessen the accuracy penalty.

Level 4: Major HP loss, significant wounding damage, unconsciousness. - Treatment would stabilize injured soldier, barring taking further
           damage, but unconsciousness would last until hospital treatment. 

Level 5: Critical HP loss, major wound damage, unconsciousness. - Treatment would use up the medikit, and only have a chance to fully
            stabilize an injured soldier.  Preferrably the field medic should have to stay near the injured soldier, but not sure how that would
            implement, so the % chance of losing the soldier even after treatment is an ok way to go.


-Burns77
Title: Re: Medikits
Post by: alinour on February 27, 2008, 09:34:17 pm
Good ideas burns77...

I'll implement something alike, and then write rules description on forum... then I'll collect advices and modify accordingly. It's a pity, but I have so few time spare... my daughter is a very demanding kid... so don't expect update so soon (at least if someone doesn't want to do it before me...)

Title: Re: Medikits
Post by: burns77 on February 27, 2008, 09:48:44 pm
I hear you alinour, my daughter is that way too.

Also I just thought of this... might not be your area...is there a way to implement moving an unconscious soldier.... the originals allowed you to pick up fallen comrades and move them to safety.  That would be a nice implimentation with this if this is the road you want to go down.


-Burns77
Title: Re: Medikits
Post by: Panthera Leo on February 28, 2008, 12:38:55 am

...
  • ...
  • imagine a soldier is on the edge of death due to a wound at the chest. If he is hit again he will die. Can you imagine a mechanical device that completely heals him, so that he can be again hit from beginning as before?
  • ...
 
....

Truthfully? Yes.

Biologically, just because the human body has degraded to it's sorry state doesn't mean it's not near fictional in it's ability to self repair. Where do you think we learned all of our medical knowledge to build mechanical medical equipment? We observed the body in action under stress,  and said "Cool! Can we do that?" :P There's more information to the single strand of DNA that exists in non-living material in the universe as a whole. Even in all our accumulated knowledge no one has even successfully designed anything approachable to the complexity  and resilience of one single human cell.

You'll never see in anywhere in the main stream media even alluding to it (It would be akin to an admission of the existence of God.), but what is dubbed "miraculous" healing is common place.

So yes, I see the only technical hurdle to a complete reconstruction any cell, tissue, organ, structure ,or resurrection is our lack of knowledge on how to do it.

Things you'll never see unless you look for. (http://www.answersingenesis.org/home/area/bios/)

A cartoon I thought was funny, wile on the subject, I found wile poking around: After Eden "Show and Tell" (http://www.answersingenesis.org/aftereden/view.aspx?id=222)
Title: Re: Medikits
Post by: vadim on February 28, 2008, 01:15:56 am
Me, I don't see the point in having that, anyway. My experience with all games is that shooting to kill is always more effective than shooting to cripple.

I like the option to shoot at the head. In Jagged Alliance a headshot is pretty much a guaranteed kill. If you could sneak up on someone to the point a knife is an option (note: in JA using a knife isn't a guaranteed hit, an agile adversary is hard to hit), then you'd shoot at the head and even a pistol would do fine.

Lack of this in UFO AI puts you in a strange situation. You can shoot with powerful weapons (even plasma blasters) at point blank range and still NOT kill the alien. A plasma blaster to a head that's not fully covered by some sort of helmet should be an instant kill to any vaguely human-like lifeform. Even if you're dealing with something with bones of adamantium, a plasma blaster to the face is something that should have an incredibly gory effect (along the lines of melting the face off, destroying the eyes, and frying the brain).

It is VERY weird that when face to face with an alien I have to dig out a kerrblade out of a backpack for a guaranteed kill because the incredibly high tech gun would get used in about the least efficient way possible for the situation. The alternative is a multishot, but it's wasteful of ammo, takes many TUs, and is very inaccurate.

Reasons I see to shoot at specific body part:
Head: Guaranteed kill at short distance. Worthy target for a well trained sniper.
Torso: Default for shooting from a distance. Easiest hit.
Legs: Reduces mobility/eliminates ability to move
Arms: Reduces accuracy/eliminates ability to use a weapon

The last two wouldn't be very useful against aliens (since they're dime a dozen), but it's much different for multiplayer. If you know you can't kill with one hit, crippling the enemy sniper who just made the mistake of showing up in the open, or reducing a short range/melee user's ability to move would have much better effect than simply reducing HP a bit. Additionally shooting to the legs would mess with a squad's organization, by making the wounded one unable to keep up with the rest.
Title: Re: Medikits
Post by: burns77 on February 28, 2008, 04:30:48 am
ok I don't think this is the place to post this, but it is already going, so here goes. 

In this game you have the option of taking all your turns before the enemy does.  Thus if one soldier sees an enemy, your entire team can take shots at him, this is unrealistic, but its game dynamics.  If you were a soldier in real life, and you encountered an enemy at a range where they could easily see you as well and reactions matter... trying to target any body part in particular is extremely difficult... even for expert marksmen, thus the rule of aiming for center mass taught to all soldiers and police units throughout the world.  This is also why armor is used to cover torsos.  Your head is a very valuable part of your anatomy... but also makes up about 10% (less actually) of your total body mass.  The only units that could conceivably deliver head shots should be the sniper, which amazingly enough have a head shot ability already.  Not to mention that it would be much more difficult to design a body part damage system.  Sounds good to players... but how would it affect you when the aliens shoot you... you want to let a measly pot shot that normally wouldn't kill you be a head shot for an instant death?  I wouldn't... I only have 8 guys out there and they are thin enough without that, and almost no aliens use reactionary fire yet...so imagine when they do have that ability.  I'd try to focus on a wound per damage taken in one shot level of penalties.

Not trying to argue or start a fight, just food for thought

-Burns77
Title: Re: Medikits
Post by: eleazar on February 28, 2008, 06:45:39 am
* Not to mention that it would be much more difficult to design a body part damage system...

* Sounds good to players... but how would it affect you when the aliens shoot you... you want to let a measly pot shot that normally wouldn't kill you be a head shot for an instant death?...

IMHO those are the argument-ending points.
Title: Re: Medikits
Post by: vadim on February 28, 2008, 05:40:13 pm
ok I don't think this is the place to post this, but it is already going, so here goes. 

In this game you have the option of taking all your turns before the enemy does.  Thus if one soldier sees an enemy, your entire team can take shots at him, this is unrealistic, but its game dynamics.
Not entirely unrealistic, no. If you walk into a room and it turns out that in every corner there's an alien just waiting for you to appear, well, you're screwed. They're not taking shots at you either, they're shooting simultaneously, it's just a turn based game. Could be implemented differently. IIRC in Laser Squad Nemesis you first give everybody orders, then they're all executed at once.

  If you were a soldier in real life, and you encountered an enemy at a range where they could easily see you as well and reactions matter... trying to target any body part in particular is extremely difficult... even for expert marksmen, thus the rule of aiming for center mass taught to all soldiers and police units throughout the world.  This is also why armor is used to cover torsos.  Your head is a very valuable part of your anatomy... but also makes up about 10% (less actually) of your total body mass. 
Completely true. But don't tell me that if you have a pistol and find an alien a square away you're going to shoot at the body. Yes, the body is a better target. But it also guarantees that the alien won't die, then you're screwed next turn.

Sounds good to players... but how would it affect you when the aliens shoot you... you want to let a measly pot shot that normally wouldn't kill you be a head shot for an instant death? 
Not a whole lot actually, since even with nanocomposite armor the aliens have single shot instant death weapons. Kerrblade, plasma blade, and the bigger plasma and particle guns. A headshot would have low chances of succeeding at low distances anyway, so I might even get killed less, due to aliens missing more often.

In practical terms, a face to face alien vs me encounter would probably go like this:
Alien's turn: Alien just blasts my head off with a particle weapon instead of using a kerrblade/plasma blade or auto for the same effect. Not a whole lot of difference. I find it that if you're at a few squares of an alien who noticed your presence, the chances of survival are minimal.

My turn: When faced with an alien at a nearby range, having a plasma blaster, and not enough TUs for auto, I'd go for the headshot instead of shooting a plasma ball and possibly killing myself with it (no better choice there, since a single shot won't work for sure).

Not trying to argue
People are strange these days, I love a good argument. When it's for the purpose of getting something decided and not for just the sake of being contrarian of course.
Title: Re: Medikits
Post by: burns77 on February 28, 2008, 07:26:30 pm
I know how aggravating it is in close combat with aliens, or if you leave your troops in the open, but the only 2 weapons that have ever one-shot killed me, as of the 2.2 release while my troops are wearing nanocomposite armor are the partical beam cannon and the plama cannon. 

You are right, the aliens have the distinct advantage in armor and in weaponry, but should enjoy a technological advantage for the majority of the game.  Also there will be other armor types implemented, which will greatly improve your troops survival chances.  Until then long to medium range support for close combat troops is essential... many times an alien pops out of hiding and my snipers or assault troops will drop him before he gets the chance to harm the guy up front with the sub-machine gun.  Any troop going toe-to-toe with an alien is at an extreme disadvantage... and yes I've seen an armored alien take 3 full auto blasts form a sub machine gun and kill the guy who shot him.

Your opinion for a body part system isn't a bad one, it is just very hard for a programmer to code, and even much more so to code realistically.  These guys are doing this out of the goodness of their hearts with their free time.  They even made the code open source, so if this body part system is near and dear to you, give em a hand and code it... they will at least take a look at it and then accept or reject it based on the scope they set aside for this project, which I believe both of us would say they are doing an outstanding job with.

Oh and I'm not against arguing for a valid point... but I don't think these guys will actually do the body part system coding, because it require a rewrite from a very early part of the coding process.


-Burns77
Title: Re: Medikits
Post by: vadim on February 28, 2008, 09:29:34 pm
You are right, the aliens have the distinct advantage in armor and in weaponry, but should enjoy a technological advantage for the majority of the game. 
No argument there.

Also there will be other armor types implemented, which will greatly improve your troops survival chances.  Until then long to medium range support for close combat troops is essential... many times an alien pops out of hiding and my snipers or assault troops will drop him before he gets the chance to harm the guy up front with the sub-machine gun.  Any troop going toe-to-toe with an alien is at an extreme disadvantage... and yes I've seen an armored alien take 3 full auto blasts form a sub machine gun and kill the guy who shot him.
No argument here either, it's expected.

The thing is that I'd expect the soldiers to know that as well. A soldier would need to be outright demented to know that the alien's armor can take a full auto blast to the chest and still shoot at it instead of the smaller but much more vulnerable head. First option has no chances of success while the second does, it's rather obvious which is the smarter choice.

Your opinion for a body part system isn't a bad one, it is just very hard for a programmer to code, and even much more so to code realistically.  These guys are doing this out of the goodness of their hearts with their free time.  They even made the code open source, so if this body part system is near and dear to you, give em a hand and code it... they will at least take a look at it and then accept or reject it based on the scope they set aside for this project, which I believe both of us would say they are doing an outstanding job with.
Oh, I understand that very well, I've got an Open Source project of my own.

Whether I contribute a patch or not though, I still think discussion is a good thing, as long as there are chances of something getting done.

The first post of this thread suggests precisely that a per-body part damage system is going to be implemented. It's then only natural that it should be possible to pick which to shoot at. Maybe alinour will think I have a point and implement my idea, I don't think anything is lost by making a suggestion.

And if I'm going to do the coding myself, it's still worth discussing, as there's no point in coding something nobody wants. At the very least I think determining whether it's a "this idea sucks" vs "this idea is fine but nobody wants to work on it" is a good thing.

Oh and I'm not against arguing for a valid point... but I don't think these guys will actually do the body part system coding, because it require a rewrite from a very early part of the coding process.
Disclaimer: I haven't read the source. But no rewrite should be required.

Granted, it's not a tiny change, but it shouldn't be a huge one either. It would involve some UI changes and a tweak to hit probability calculation. Not a lot, since most of the rest seems to be going in anyway.

A rewrite is almost never required for any project, excepting very large changes (2D to 3D conversion, switch to a radically different engine, maybe addition of multiplayer mode to a game coded in such a way that it can't be easily adapted for it). Things like damage calculation are really a quite minor thing relatively speaking.
Title: Re: Medikits
Post by: shevegen on March 01, 2008, 01:47:51 pm
"every actor will have a structure for body parts with the level of wound"

I think that is a great idea. I missed that a bit
Title: Re: Medikits
Post by: TrashMan on June 04, 2008, 11:24:09 pm
Sorry if I'm brining this back from the dead.
After reading some of this (skied something, there's a lot) I can only say this:

Realism is OK, but don't overdo it.
The game is hard enough as it is (no saving during battle, not even at turn start, hospitals heal slowly).
Medikits are the only thing that keeps soldiers alive currently.

While they can be abused (overuse) that can be fixed without nefring medikits to oblivion. Fixed number of charges, fixed amount of HP it can heal (2/3 max HP was proposed if I'm not mistaken?) and it will even things nicely without turning battles into replaying loops of hell.
Title: Re: Medikits
Post by: A Few Good Mutons on June 13, 2008, 11:04:42 am
Noticed this near the top and thought I'd toss in my two credits...

How about a JA2-style medikit system?  For those unfamiliar with it, it essentially works like this:
Merc A has 90 HP when completely healthy.
Merc A gets shot for 40 points of damage.  He starts bleeding. Remaining HP = 50, wound points = 40
Merc B dashes over and starts performing first aid on him.  He quickly patches him up.  Remaining HP = 50, wound points = 0.  Since he no longer has any "wound points", he stops bleeding.
Later, back at town, Merc A goes under medical care and slowly recovers his real HP.

What this does is make damage a very real threat; even getting healed only stops further blood loss and helps counteract some of the shock that reduces combat effectiveness.

In UFO:AI this could be maybe taken a bit further, since the tech in question is much more advanced than field first aid kits.  So in this case, medikits might be able to restore a soldier to near full capacity (only slight combat penalties) and maybe heal a bit of actual damage (say, 1/5 of the "wound points" are healed as actual HP), but he'd still be badly hurt and require proper medical care back at base to fully recover his lost health.
Title: Re: Medikits
Post by: Winter on June 13, 2008, 06:06:55 pm
Noticed this near the top and thought I'd toss in my two credits...

How about a JA2-style medikit system?  For those unfamiliar with it, it essentially works like this:
Merc A has 90 HP when completely healthy.
Merc A gets shot for 40 points of damage.  He starts bleeding. Remaining HP = 50, wound points = 40
Merc B dashes over and starts performing first aid on him.  He quickly patches him up.  Remaining HP = 50, wound points = 0.  Since he no longer has any "wound points", he stops bleeding.
Later, back at town, Merc A goes under medical care and slowly recovers his real HP.

What this does is make damage a very real threat; even getting healed only stops further blood loss and helps counteract some of the shock that reduces combat effectiveness.

In UFO:AI this could be maybe taken a bit further, since the tech in question is much more advanced than field first aid kits.  So in this case, medikits might be able to restore a soldier to near full capacity (only slight combat penalties) and maybe heal a bit of actual damage (say, 1/5 of the "wound points" are healed as actual HP), but he'd still be badly hurt and require proper medical care back at base to fully recover his lost health.

I've always liked the JA2 medical system, but a direct or near-direct translation wouldn't work as well since you don't have to assign your troops as patients or doctors whilst paying them exorbitant amounts of money.

BTAxis and I will redesign the medical system properly at some point soon.

Regards,
Winter
Title: Re: Medikits
Post by: stevenjackson on June 13, 2008, 10:57:25 pm

So this piece of work got dropped?

Also i dont think hospitals are that bad, even the worst hurt soldier will be healed in a hospital within 30 days.

Steve
Title: Re: Medikits
Post by: DanielOR on June 14, 2008, 12:12:26 am
I also think speed of recovery is OK, maybe it can be slowed down to the X-COM-ish speed - ~ a month for grave injuries.

The described JA2 medkit system makes a lot of sense to me.  Stabilize in the field, heal up a bit, pump full of stimulants to keep 'em going with minimal degradation of abilities.  After the battle they drop - if not from wounds, than from comedown off the chemicals, for sure.

AF pilos ('specially long range patrol folk) take "concentration enhancers" routinely, for what I hear.  A chemist I work with says it is amphetamines, plain and simple, similar to Ritalin, what they prescribe to ADD patients.  methamthetamine was used since WW2 for improved battlefield performance.
Title: Re: Medikits
Post by: Nevasith on June 14, 2008, 01:37:51 pm
what about unconsciousness? It would be good  if the badly wounded soldiers fell unconscious instead of dying- than he would be out of combat with lets say 5 turns for someone to patch him up (number of turns would vary depending on difficulty)
As for the time of returning to base it shouldnt matter- every dropship should be equipped with the best medical equipment available- bondages that hold bleeding are already used. Until 2084 the medicine should make significant progress and recreating even a limb should be possible by that time- it would just be a matter of time to "breed" and install such a new limb.

Targeting body parts would be great for multiplayer, but in single it doesnt look that nice. Dont forget, that aliens have special body structure- some have scull reinforced with implants or mutated bones- like Shevar, so even a direct burst from SMG might not be enough to kill it. Ortonoks often wear partial face mask, and tamans often have helmets probably made of alien alloy.
Title: Re: Medikits
Post by: ghosta on June 14, 2008, 08:09:12 pm
what about unconsciousness? It would be good  if the badly wounded soldiers fell unconscious instead of dying- than he would be out of combat with lets say 5 turns for someone to patch him up (number of turns would vary depending on difficulty)

I would like to see this feature too. Something like the grey bar under your health in the original X-Com.
For example:
1. If you get hurt, you loose every 10 lost health another 1 per round. With the medikit you can stop the bleeding --> you are not loosing more and more health.
2. Every 2? damage you get your grey bar under your health grows by 1. If this grey bar (representing your consciousness) reaches your actual health your soldier passes out (with 2/dmg u would pass out at 1/3 of your soldiers health). <-- Can be healed by medikit. (Additionally you can implement weapons/smoke/gas doing extra damage to your consciousness-bar)
3. MAYBE: Every 3? damage you loose a random skillpoint like speed/accuracy/grenades.  <-- Can be healed by medikit.

I recommend to make every damage taken on the battlefield just temporary and just keeping the "normal" damage for the guys in the hospital.
Title: Re: Medikits
Post by: Nevasith on June 21, 2008, 01:37:50 am
in real life there already are bondages that stench bleeding just by pressing it to the wound. How about assigning each soldier such a bondage- so he or she would be able to stop the bleeding on their own if conscious.
Losing conciousness instead of dying is a GREAT idea- it would but an entirely new taste into the game- you must make choice either you rush to save a veteran soldier or kill aliens faster.
Title: Re: Medikits
Post by: BTAxis on June 21, 2008, 02:31:58 am
You might want to consider not misspelling "bandages" that way.
Title: Re: Medikits
Post by: Nevasith on June 21, 2008, 12:41:40 pm
sorry English is not my mother language and when the dictionary didnt treat it as a mistake i left it thinking its ok - after checking bondage and bandage in wiktionary i think it was not the best word :D Thanks, ill remember!
Title: Re: Medikits
Post by: Shak on June 22, 2008, 01:17:57 pm
I also think soldiers dying in combat missions is a little harsh and abrupt. Many of the idea's already given are very good though i fear would mean a considerable amount of work to implement.
Adding a simple equation to deal with whether the downed soldiers survive after the mission should prove easier to do.


After a mission is completed, some equation to give a % chance of downed troops to survive and/or heavily wounded troops to die during the flight back.

Base chance   - calculated using a predefined value + possible modifiers (advanced tech/hospital/medics on staff etc)
Mind stat     - Soldiers stat divided by an arbitery number
Strength Stat -Soldiers stat divided by an arbitery number
Distance to Friendly medic - penalty unless friendly trooper is nearby with medi-pac in hand

The values above can be calculated using different numbers but i've thrown some in to make the following example of how it could work.


Using a percentile scale with the chance of the casualty surving being greater the larger the number is(0.43 = 43% chance of recovery)

Jens Sohal the Rifleman

Base chance = 0.2  (No hospital at base)
Distance to friendly medic = -0.1  (No-one near him at the end of battle)
Mind 28 /250 = 0.112
Str 25 /250 = 0.1

0.2 -0.1 +0.112 +0.1 = 0.3112

so Rfm Jens has a survival chance of 31.12%


To reflect some possible advances and ways to improve your troopers odds at surviving an incapacitating wound, this second example is set at a later stage in the game.


Col Jens Sohal
Base Chance = 0.35 (Has staffed hospital and has researched the  tech "Deadmans Medic"( a Concoction of drugs released slowly into the disabled body)
Friendly Medic = 0.1   (Medic was nearby and performed some medical aid on him during the mission. )
Mind 55 /250 = 0.22
Str 29 /250 = 0.116

0.35 +0.1 +0.22 +0.116 = 0.786

so Col Jens survival chance is 78.6%



I dont know the specifics on coding this, so I've tried to lay it out open to change and interpretation.

Having a trusted trooper dying ingame is a bitter pill to swallow, having some chance no matter how slim would increase the enjoyment of each combat mission greatly.
Knowing a chance exists to recover downed troopers would make the combat missions less prone to reloading.
Title: Re: Medikits
Post by: Kildor on June 22, 2008, 01:30:27 pm
If aliens kill soldier (it has less than 0 HP), than soldier is dead. without any "berserkers", cloning, miracle-heals, etc.
Title: Re: Medikits
Post by: Shak on June 22, 2008, 01:42:00 pm
I'm trying to show a distinction between Fatal wounds and Incapacitating wounds. A stronger soldier with good medical backup has a good chance of recovering.
Title: Re: Medikits
Post by: Telok on June 23, 2008, 12:55:31 am
We currently have no equipment for the 'Extension' slot on soldiers. While I am unsure what that item slot is going to be used for there is a possibility of a life-sign monitor with an attached automatic drug injector. This might make a good option for nano or power armors and could give a soldier a chance to be revived at the end of a mission.

Without thinking about it give a soldier a 50% chance -1% per point of 'excess' damage beyond what was needed to down them. That shouldn't be too difficult to code, just track how much a soldier was over-killed and if they had a auto-med extension on the armor check when the mission success/fail screen comes up. If they survive put them in the hospital with one health point instead of deleting them.
Title: Re: Medikits
Post by: sirg on June 25, 2008, 10:48:53 am
From what I read in the wiki and in the game's ufopedia, the plasma effects on humans are so severe that any kind of bandage or treatment is almost useless. So I guess it's quite unrealistic to say that you might treat plasma burns with a medikit, or heal :)

Imo, the model should be something like - soldier's armor get's damaged to the point where it's destroyed and any other hit will kill the soldier or make him lose an arm, leg, etc :( ... if the hit isn't lethal.
Title: Re: Medikits
Post by: shevegen on June 30, 2008, 11:18:07 pm
Actually not all wounds should be fatally dead. There should be an extended "unconscious" state where they can be rescued/revived.

This way the medical equipment in a base could be more important too btw
Title: Re: Medikits
Post by: Sophisanmus on July 01, 2008, 12:04:13 am
Of course, getting hit by a big ball of plasma-y goodness while running around stark naked would be a good way to get dead fast, and while lower-level armor should diminish damage somewhat, instant death should still be a danger until you start getting into heavy full-body power-armor suits.  There could well be an 'incapacitation' range, with potential for bleeding to death, but also the possibility of getting hit hard enough to skip that stage entirely. 

Of course, I love the idea of limb damage, and possible amputation (in-battle or in-hospital, either works), and, of course, the resultant bionic replacement!  Look out, here comes Billy the Fighting Torso! 
Title: Re: Medikits
Post by: Another Guy on September 08, 2008, 06:38:04 am
Its been a long way since I played X-COM for the last time, but from what I remember, the damage system with medikit usage included was very nice. I'm aware this game is not a copy of old X-COM, but it can give us some ideas. I'll list how I remmember it (% values are just guesses. As for the rest of it, please correct me if I'm wrong):


-ANY damage would lower all soldier stats for the rest of the battle, in a random (but still proportional to the amount of damage taken) magnitude for each stats. Stat loss was cumulative for each hit taken. Medikits wouldn't help with that stat loss (remember this loss is just until the end of the mission or until the soldier gets fully healed at the hospital).

-ANY damage would have a chance of inflicting fatal wounds of some level, but engine worked in a way that it was not that common to happen and when it did, in most cases was related to a massive loss of HP. Depending on the magnitude of the damage, it would toke up to 3 levels of fatal wounds on a single, massive damage dealing shot.

-Fatal wound system was simple: On the end of each player round (when clicking the end turn button), the soldier on fatal wound takes 1*(lvl of fatal wound) damage until he dies, mission ends or is healled by a medikit.

-Medikit interface did have a screen that displayed the hurt body parts, but it was just for the realistic feel and didn't really matter for any effect of the stat loss or healing system. It just was cool to see a random limb, head or torso in need of treatment, improving sense of reality.

-Medikit had 3 modes: one for improving lost morale one to wake stunned soldiers, and one for healing fatal wounds.

-Fatal wound heal required one use of the medikit per level of fatal wound and restored a small amount of HP (usually no more than 20% of all damage taken once all levels of wounds was patched up). It had no effect if no fatal wound was inflicted or if it was already healed (thus preventing medikit abuse).

-I don't remember any limit on morale raising mode usage.

-"Unstunning" mode simply healed a random small amount of stun damage (and ONLY stun damage) each use. When stun damage<current HP, soldier wakes up

-From what I remmember, every hit would deal, as well as its regular damage on its damage type category, a small amount of stun damage (10%-30%). If stun damage at any moment heppened to be = or > than CURRENT HP (not max) of the soldier, it would faint. The same for aliens. Some weapons like explosive types would be better to stun a target with the same amount of real damage dealt, rather than other weapons. This way there was always a small chance of getting a live alien even without any "stun equipment".

This info is probably not very accurate, but this should help discuss the damage/stat loss/fatal wound system and the medikit usage.

IMHO, this system is very good and balanced, being realistic, simple and preventing medikit abuses at the same time.
Title: Re: Medikits
Post by: Sarin on September 08, 2008, 03:16:39 pm
I agree that old XCOM way was good. You really can't expect wounds to be fully treated on battlefield, not even with 2084 technology. Just to add, when soldier or alien fainted, his stun damage started to drop slowly, making him wake up after some time.

As for limb loss, seeing bionic replacements would be nice, but it would be more realistic if the soldier was relieved after battle, and could be hired again only after like...1, maybe two years.

One of other things related, armor should get damaged when soldier is hit, decreasing its armor value and forcing you to repair or replace it.
Title: Re: Medikits
Post by: TrashMan on September 08, 2008, 06:05:39 pm
I must also say that I hate the idea of cyborgs. Not only would I hate it for it to be forced on me, military cyborgs make no sense whatsoever.

No army would give dangerous and expensive equipment to a soldier on a permanent basis.
Power armor is so much better, since it can be taken off after duty. When a soldier returnes, you take his armor, his weapons and his mostly harmelss - he can function as a civilian again. A cyborg can't.

Artificial limbs will never exceed normal human limits, nor will they have integrated weaponry.
Title: Re: Medikits
Post by: Sarin on September 08, 2008, 08:53:20 pm
Not exactly true, artificial limbs WILL exceed human limits, and very soon. Remember that affair with footless runner just before olympics? He was rejected because they discovered that he actually required much less energy for running. And for those cyborgs...well, who said it has to be permanent? The whole arm replacement, for example, doesn't have to be one piece. There can be some "hub" at elbow that provides interface between nerves and electronics, and required arm replacement can be easily inserted into it. And when you make an arm with a gun, result will be much better response time and accuracy with little training. And when such cyborg is relieved from duty, his arm can be removed just like normal rifle.

Don't take me wrong, I wouldn't like to see cyborgs in UFO:AI just like you, but I'm saying that it is very likely that in the next century we will see some...
Title: Re: Medikits
Post by: TrashMan on September 08, 2008, 10:34:08 pm
What makes you think that the response time and accuracy would be better? Nerve impulses travel at a set speed, you can't go faster than that.

Also, would military and civilian limbs have the same interface (attach part)? If they do, it presents a problem since any civy can attach the Harmbringer cannon. If it's not then making military cyborgs would cost more for the operation of changing the limb attachchment section and probably other parts. Then removing them again when the war cyborg retires.

A power armor is simply a better all-around solution.
Title: Re: Medikits
Post by: Sarin on September 08, 2008, 11:42:29 pm
The electric impulse travels at faster speed via electronic parts than through biologic nerves, also do you realize how many muscles are involved in simple pressing the trigger? Yes, the difference will be a few miliseconds at most, but that can be difference between life and death.

And getting a gunhand, well, that will be MUCH more difficult than getting a normal gun. And without proper training, it would be more dangerous to user than to anyone else. That's not a problem. And who said powered armor and implants can't be used at same time?

By the way, I doubt such thing would ever be main gun. The gunhand will more likely be a sidearm.
Title: Re: Medikits
Post by: TrashMan on September 09, 2008, 01:00:07 am
There is another forum where a long winded, detailed discussion was held on the same subject..

Take a look if you will:
http://www.kerberos-productions.com/forum/viewtopic.php?f=9&t=8696&st=0&sk=t&sd=a&hilit=cyborg&start=90

The real good stuff starts at pages 9-10
Title: Re: Medikits
Post by: Another Guy on September 10, 2008, 02:04:46 pm
Cyberweapons and implants aside, it would be nice to hear what devs think about using old XCOM damage/stun/morale/fatal wounds/medikit system as coding reference.
Title: Re: Medikits
Post by: shevegen on September 12, 2008, 02:13:42 am
I agree that armour failure and degradation should work or be implemented, but as a general rule to simplify it for now, we could just agree that depending on how many shots someone take, he would have to pay a little sum to repair armour or clothes he was using. Not too much money, but a little bit to simulate that (if it would be too expensive, they would just buy a new armour anyway)
Title: Re: Medikits
Post by: Chriswriter90 on October 24, 2008, 08:46:57 pm
In 2.2 Medikits could be used over and over,

In 2.2.1 Medikits could be re-used, but each soldier could only be healed once per mission.

What are they going to be like in 2.3?

I'm not going to talk or complain about implants until they are implemented.

My Idea: Can soldiers with higher "Mind" Skill heal more than 20 HP in future installments (2.3.1 or afterwards)
Title: Re: Medikits
Post by: zinder on November 26, 2008, 04:58:50 am
This is probably too late, but i just recently found this.

The system i'll describe is based on a number of squad level tactics games i liked. It is a bit more abstracted than the wounds level system, but otherwise similar.

There are four pools of hit points, healthy (real) HP, mission-recoverable HP, mission-recovered HP and lost HP. The sum over all four pools is constant during a mission.

Healthy HP are the points the soldier starts out with, if he is fully healed at base.
Mission-recoverable HP are lost during a mission and can be restored by a medkit or similar device (for example an armor extension) or by medical attention on base.
Mission-recovered HP have been restored by a medkit and require medical attention on base heal.
Lost HP can only be restored by medical attention on base and take the most time to heal.

If a soldier is hit, the loss is divided according to severity in lost and mission-recoverable HP. Severity can for example be influenced by the armor, the total amount of damage done, or where hit(if implemented).
Side effects like dizziness, sensory loss(eye or ear), stamina loss, bleeding wounds, loss of function in limbs, etc are separate conditions and require extra attention, ie they need a dedicated use of the medkit or maybe even specialized equipment or training.
A soldier is unconscious if he either has no healthy or mission-recovered HP, or stun damage is higher than healthy and mission-recovered HP combined.

Title: Re: Medikits
Post by: Crinos512 on November 26, 2008, 06:03:03 am
My experience with all games is that shooting to kill is always more effective than shooting to cripple.

In actuality shooting to maim is by far a more effective tactic assuming
  A. an injured team member can die from blood loss, and
  B. the other team mates care if he dies.

from another viewpoint:

just my 2 cp on the matter.
Title: Re: Medikits
Post by: BTAxis on November 26, 2008, 10:59:14 am
Quote
from another viewpoint:
  • if I headshot a foe and he dies... That's one less foe gunning at me.

How is this NOT shooting to kill?

Seriously, I can't think of any game where shooting to cripple was actually useful in any way, except maybe Jagged Alliance. Haven't played a lot of that one, so I don't really know. But I can say that in the latest game to feature this, Fallout 3, it's 100% useless.
Title: Re: Medikits
Post by: Destructavator on November 26, 2008, 12:33:18 pm
In real life (to compare), I can tell you that I've heard various people from law enforcement and military explain that shooting people to cripple or disable just isn't done, it isn't something officers or soldiers are trained to do with firearms.  Unless using a taser or weapon specifically designed to stun or be non-lethal, I've been told that when such people do resort to opening fire on a person, the intent is to kill.

On the same page (real life), there are many people who survive gunshot wounds, but many such survivors have permanent injuries that can be very debilitating.  It's only in the movies and fiction where you can see a hero eat a bullet one day, spend a short time in a hospital, and then next week be running around chasing bad guys again.  I know of one case where a police officer survived a single bullet, but was in a wheelchair for the rest of his life.

It might in fact make sense to implement something like this in the game:  A soldier surviving a hit from an alien attack, but being permanently disabled, or at least disabled for a long time until some type of cybernetic / bionic / whatever implant can be done.  Of course, such recovery to eventually go back in action should take a *long* time if realism is desired.
Title: Re: Medikits
Post by: zinder on November 26, 2008, 12:57:59 pm
The only game i can remember off the cuff, where aiming for body parts was useful, is Silent Storm. But there you also got hit zones and partial cover. Somebody half around a house corner or behind a tree had lower hit probability on the covered body parts and any attacks you put through the cover lost power.

Or if you had a good positioning of the enemy, you could put one round through multiple targets if you aimed for the right body part.
Title: Re: Medikits
Post by: Winter on November 26, 2008, 02:27:29 pm
In actuality shooting to maim is by far a more effective tactic assuming
  A. an injured team member can die from blood loss, and
  B. the other team mates care if he dies.

from another viewpoint:
  • if I headshot a foe and he dies... That's one less foe gunning at me.
  • if I cripple a foe and he can die from blood loss then SOMEONE has to come save him with a medkit. ...That's TWO less foes gunning at me.

just my 2 cp on the matter.

Rubbish. As Destructavator said, you never, ever shoot to cripple unless you're a sniper on a war footing and have a very specific plan in mind. Just like a tank with its tracks blown off, a wounded enemy can still shoot at you.

Jagged Alliance 2 featured aiming for 3 body parts (head, torso, legs) but crippling still never came into it. You could make an enemy fall down temporarily by shooting him in the legs, but it always did less damage than a torso or headshot. JA2's enemies never bothered with giving each other medical attention either making the crippling strategy completely useless. Our aliens, being the cold calculating sort they are, certainly wouldn't take away their attention from killing the hell out of you.

Regards,
Winter
Title: Re: Medikits
Post by: TrashMan on November 26, 2008, 03:36:12 pm
How is this NOT shooting to kill?

Seriously, I can't think of any game where shooting to cripple was actually useful in any way, except maybe Jagged Alliance. Haven't played a lot of that one, so I don't really know. But I can say that in the latest game to feature this, Fallout 3, it's 100% useless.

I have. JA2 is a sweet, sweet, sweet game (1.13 mod make things even better). I luv it to death.

Shooting for the legs could not only slow down the enemy, but also cause the enemy to collapse, and he was vulnerable when lying on hte floor..and it took AP's for him to get back on his feet.
Shooting for the arms massed up his aim and could cause him to drop his gun.
Shooting for the chast was the most secure, and if you used a shotgun or some other weapon with a kick, you could kick the air out of his lungs, causing him to loose energy (not HP) and fall on the ground, loosing all of his AP's.
A headshot didn't do extra damage, it confused the enemy (he could turn around like he's disoriented and loose wisdom), affected his aim, and could also lower his energy. But there was a slighly increased chance of a critical if you shot him in the head.
Title: Re: Medikits
Post by: homunculus on December 01, 2008, 08:37:26 pm
imho the main point against the traditional health point system from the 1980-s would be that it is not a boxing match where you can try to score points and the referees are going to decide who wins.
if the damage does not stun or is not crippling or does not cause bleeding, then i think it should be a morale loss at best, am i missing something?

therefore, at a lesser level of abstraction, i would suggest that a non-missed shot would cause a random amount of crippling, bleeding and stun, based on its damage types.
the randomness would come from the chance that the bullet hole in your body not only makes you look ugly but actually damages something vital.

we could say that a shot from a gun  that causes crippling usually also causes bleeding, and with that assumption all the effects could be incorporated into just those two bars we already have.
the blood pressure would go into stun bar, and wounds would go into crippling (health points) bar.

so, in the health points bar we would have undamaged health points, bandaged wounds and bleeding wounds, the total would be the max health points stat of the soldier.

in the consciousness bar we would have blood pressure and stun, and those would be overlapping.
Title: Re: Medikits
Post by: Winter on December 01, 2008, 08:55:41 pm
*SNIPPED a whole lot of conversation and not much action*

Mmmmmmmmmmmmno.

Regards,
Winter
Title: Re: Medikits
Post by: homunculus on December 01, 2008, 10:44:48 pm
Mmmmmmmmmmmmno.

Regards,
Winter
the intended purpose was to try to put as much gameplay and realism into as simple health bars as i could.
what you call conversation and what you call action is for me to figure out yet, i guess?
Title: Re: Medikits
Post by: Winter on December 02, 2008, 12:01:30 pm
Regardless of realism, your idea is vastly overcomplicated for a computer game. Tracking five different stats just for a generic wounds system is really bad design. It would give most players severe headaches trying to understand how it works, and adds nothing that would actually enhance the play experience over a more abstract system.

There are far better uses for our coders' time and energy.

Regards,
Winter
Title: Re: Medikits
Post by: homunculus on December 02, 2008, 04:12:01 pm
well, i think it would be nice if players would be motivated to avoid any kind of damage in a soft cap way instead of letting the soldier drop to 1 health point and be totally cheerful about it, or else reloading because the soldier died.
loosing consciousness and bleeding before death is also one of my favorites, because it make the wounded soldier a low priority target and will create a high priority surprise objective to save your bleeding soldier.

you are certainly right about the complexity thing, saying that

"stimulants reduce stun by 50% and temporarily increase stats by 10%"

is vastly more easy to understand and manage than

"the effects of stimulants is an emergent property of the stun and blood pressure system, and the exact result depends on the condition of the soldier"
Title: Re: Medikits
Post by: Chriswriter90 on December 03, 2008, 02:00:47 am
well, i think it would be nice if players would be motivated to avoid any kind of damage in a soft cap way instead of letting the soldier drop to 1 health point and be totally cheerful about it, or else reloading because the soldier died.
loosing consciousness and bleeding before death is also one of my favorites, because it make the wounded soldier a low priority target and will create a high priority surprise objective to save your bleeding soldier.

you are certainly right about the complexity thing, saying that

"stimulants reduce stun by 50% and temporarily increase stats by 10%"

is vastly more easy to understand and manage than

"the effects of stimulants is an emergent property of the stun and blood pressure system, and the exact result depends on the condition of the soldier"
This is a strategy game not an RPG. Valkyria Chronicles blends the two well, but this is a pure Strategy/ Tactics game.

loosing consciousness and bleeding before death is also one of my favorites, because it make the wounded soldier a low priority target and will create a high priority surprise objective to save your bleeding soldier.
In Valkyria Chronicles, you get 3 turns to rescue someone before they die, I like this Idea :)
Title: Re: Medikits
Post by: Borsti67 on April 20, 2009, 11:27:05 pm
This issue still seems to be actual?
Just my 2 ct...

I'd prefer a solution which is not too complex (e.g. bleeding may be more realistic but also extremely difficult to handle IMHO). Unconsciousness could be a nice idea, though. May be both could be options for the higher game-skill levels (above "normal")...?

On the other hand, the medikit should be quite helpful but not too powerful (like having more hitpoints after a battle than before).

I don't have in mind how exactly the healing value is currently calculated; but what about simply limiting the maximum effect?
Let's say, the first application to a soldier heals him UP TO 75%, the next UP TO 50%, the last UP TO 25%. Another "heal" wouldn't have any affect on this person...

Also, I like the idea of having medikit-healing only temporary. The soldier is pushed, so he can still fight, but after the battle he needs a REAL medication (in fact, the medikit could make things even worse in the long term)...
Title: Re: Medikits
Post by: TrashMan on April 21, 2009, 12:30:05 am
Given that this is a turn based games, calculations and the system can be as complex as they need to be. Number crunching is done by the CPU anyway and doesn't slow the game down at all.

now, if this was a pen-and-paper game....


F'course, just case you can do something doesn't mean you should. But the system shouldn't be too simplistic either. At least some different states would be nice..
Stunned, confused, paralyzed, unconcious, etc...
LEARN FROM JAGGED ALLIANCE 2, X-COM, UFO, etc...
Title: Re: Medikits
Post by: geever on April 21, 2009, 05:15:50 pm
Stunned, confused, paralyzed, unconcious, etc...
LEARN FROM JAGGED ALLIANCE 2

BUT DO NOT COPY IT!

-geever
Title: Re: Medikits
Post by: Another Guy on June 05, 2009, 10:45:43 pm
In fact, copy X-COM damage/medikit system is perfect. No need to reinvent the wheel.

Its balanced, realistic, and medikit offer no real benefits to the player other than preventing soldiers imediate death (Soldiers would still remain severelly crippled, TU cost is high and only really heal was the actuall bleeding and a very small amount of HP).

Impossible to use to heal soldiers to full health, because its only usable if soldier has bleeding points. Usefullness on unconcious and low morale soldiers was very limited in terms of gameplay (more like used in despair to bring a extra gun back to action when u r probably already loosing the battle).

Slow stun recover every turn adds challenge too, as it gets a lot more dificult to capture aliens alive.

If the pourpose of the game is cause the scarry danger feeling on the player, the X-COM system gets it done. and best of all... its already designed since the 1980s!
Title: Re: Medikits
Post by: domein on June 14, 2009, 10:10:29 pm
Here are my thoughts on damage\healing system:

Solder has three values:
1) Base hit points - Fully healed solder's "Max hit points", and a stat to be improved by training and exp. 
2) Max hit points - Value that reflects overall state of recovery from long-term wounds, increases up to value of "Base hit points" during rest(slowly) or treatment(faster) at medical facility at the base.
3) Current hit points - Reflects immediate condition and fitness for combat. If number is 0 solder is disabled\unconscious.

While being hit, subtract 100% "short-term damage" right from current hit points, get 50% of that amount rounded down as "log-term" damage to "max hit points", get 10% extra "bleeding" damage rounded down every turn to current hit points.

If current hit points is zero, solder is disabled until the end of combat, bleeding and all other damage subtracted from max hit points. When "max hit points" is 0, solder is dead.

Medical kits can:
1) Basic Med Kit: Stop bleeding damage.
2) Improved Med Kit: Same as Basic + increase "current hit points" up to "max hit points"
3) Advanced Med Kit: Same as Improved + administer stimulants to return "disabled" solder in action.

This scheme will allow a realistic, yet not too complex for understanding and implementation damage\healing system, with respect to both minor wounds and overkills.
Title: Re: Medikits
Post by: criusmac on June 16, 2009, 05:00:04 am
Just a note, Domein's suggestion is what UFO: Aftershock's (and possibly with other UFO After games) currently does.

In UFO: Aftershock
Max hp is what is damaged slowly each hit. It requires a treatment facility to restore. If you are unconscious, all damage is done directly to Max hp, and if this max hp reaches 0, you're dead. While you are unconscious, your max hp slowly decreases until you are revived by a medikit, or completely dead.
Current hp is the amount of hp you have that keeps you conscious. It is damaged by every hit, explosion, and whatnot a lot faster than max hp. If current hp reaches 0, you are unconscious.
Stun reduces current hp only, and has no effect on max hp.
Acid and fire and other things rapidly reduce both current and max hp (current still faster though). This is sorta like bleeding while still conscious.
You can't bleed while conscious though, only when you fall unconscious do you bleed to death.
Medikits can't raise your current hp above your max hp.


Just thought I'd mention where this idea has already been implemented..
One other note is, if the mission ends, and any of your soldiers are stunned or bleeding, they are considered lost. I didn't like this idea so much, but that's how it was implemented. Unconscious soldier = dead soldier, whether the mission was a success or failure.
Title: Re: Medikits
Post by: TrashMan on June 16, 2009, 02:19:41 pm
Actually, UFO: AS has 3 types of damage

Max
Current
Stun (re-generates automaticly over time)

Weapons do different quantities of each. Some specific weapons are designed to stun.

http://img.hexus.net/v2/gaming/screenshots/ufo_aftershock/ufo_aftershock_9.jpg (http://img.hexus.net/v2/gaming/screenshots/ufo_aftershock/ufo_aftershock_9.jpg)
You got your basic health bar. Once you get hit by a regular weapon you loose a little bit of each (healt bar becomes shorter - the black part is Max HP you lost, the red is current HP you lost and the grey is stun HP you lost)
Title: Re: Medikits
Post by: domein on June 17, 2009, 04:13:01 pm
Criusmac is right, but i never realized in time of writing my post that i was actually stealing the idea from after* game series. Silly me then, duh :D

Still that kind of damage\healing system would work great in turn-based environment i think.
Title: Re: Medikits
Post by: TrashMan on June 17, 2009, 07:21:29 pm
You can go deeper really.

Frankly, I'd keep stun separate.
I'd add an endurance/energy bar - just like JA2. Makes sense. If someone hits you with stun gas, you're going down, but you are perfectly healthy.
Title: Re: Medikits
Post by: criusmac on June 18, 2009, 08:50:47 am
If you keep the stun damage separate, it means injured people can not be stunned more easily than healthy people (assuming you don't decrease the size of the endurance bar based on damage, which is added complexity).

On the other hand, if you are adding an endurance bar, it might make more sense to get tired as people run around swinging swords and shooting guns. Would that make them more easily stunned?
Title: Re: Medikits
Post by: TrashMan on June 18, 2009, 01:24:51 pm
Yes. Overload your soldier with heavy equipment, have him run around and his energy (endurance) drops.

Available energy should also affect the number of Action Points. If you're out of breath you don't have as many Max HP.

Not moving a soldier for a turn or two restores some energy. Drinking water fro ma canteen restores even more.

If it reaches 0 your soldier drops on the ground out of breath for 2-3 turns, after which is re-charges at an increased rate back to what it was (or 50%).

Also, getting hit by a weapon can damage energy (a little), so injured soldiers are easier to stun (but not by much)
Title: Re: Medikits
Post by: MXcom on June 19, 2009, 12:26:43 pm
[...]
Not moving a soldier for a turn or two restores some energy. Drinking water fro ma canteen restores even more.
[...]

This is not Jagged Alliance.
I seriously doubt devs want something like a canteen in the game...
Title: Re: Medikits
Post by: TrashMan on June 19, 2009, 12:44:43 pm
What's the problem?
It's just a simple item.

Not that you even need it. Just standing still for a turn could re-charge some energy.
Title: Re: Medikits
Post by: homunculus on July 02, 2009, 06:17:53 pm
|                   xxxxxxxxxx¿¿¿¿¿|

this is what my favorite health bar would look like (simplified version without stun and blood pressure).
x -- bandaged wounds
¿ -- bleeding wounds (can be bandaged)
the rest is healthy hit points.
damage turns both healthy hit points and bandaged wounds to bleeding wounds.
bleeding wounds can, naturally, be bandaged.
soldier's ability would depend on healthy hit points.
effective_stats = healthy_hit_points_% * base_stats
Title: Re: Medikits
Post by: Titan on July 02, 2009, 09:24:48 pm
Are critical hits going to be added?
Title: Re: Medikits
Post by: odie on July 06, 2009, 08:19:28 am
Oooo......argggggh,

My dear folks. This is beginning to sound very RPG (my fav genre btw). But lets all be reminded that this is 4x strategy game...... lets keep the concept perhaps down to a couple of simpler terms like:

Health (Max bar).
Remaining health (green?).
Lost health (Red?).
1/2 (or a defined %) of that lost health per battle can be healed, remaining ones in hospital.
Healing in battle limited to medikits (and skill level of medic will increase / decrease tat %).

Simple enuf? :P
Title: Re: Medikits
Post by: homunculus on July 06, 2009, 11:22:21 pm
Oooo......argggggh,

My dear folks. This is beginning to sound very RPG (my fav genre btw). But lets all be reminded that this is 4x strategy game...... lets keep the concept perhaps down to a couple of simpler terms like:

Health (Max bar).
Remaining health (green?).
Lost health (Red?).
1/2 (or a defined %) of that lost health per battle can be healed, remaining ones in hospital.
Healing in battle limited to medikits (and skill level of medic will increase / decrease tat %).

Simple enuf? :P
lol, your rpg paranoia is impressive.
believe me, it is not so easy to turn a game into a rpg.
even games that are meant to be rpg-s like the popular mmorpg-s fail at it practically all the time.

for example, i once played a mud (text-based mmorpg) and gave a dwarf his brains that i got from our previous encounter.
and people said: "oh, you can even roleplay in an rpg!"

i think that if ufo-ai wasn't overdoing the k.i.s.s. rule, this discussion would not be spammed with those "overly complicated and rpg" proposals so much.

the ai right now, once you have set up some los in the tactical field, gives all the initiative to the player to kill the aliens when the player is prepared.
what's the fun of it?
assuming that
1) ai changes in the future will make the aliens more dangerous.
2) the maps where there is so much open ground that the tactical missions become a tedious but otherwise boring logistics task, will be more rare.
there will still be people that want more challenge, and certainly not in the form of more tedious running from cover to cover under the watchful eyes of your snipers on extra large maps.

now, as masochistic it might sound, bleeding on the battlefield is a fairly simple concept that can create some more chaos.

and, as far as i remember, someone among the devs has written here in the forum that he would like the soldiers to be able to take more than one hit before they die.
but, to keep the game more challenging, what i feel is that those soldiers that got the hit that did not kill them should not be very useful for the rest of the battle.
and this is exactly the reason why i very sincerely and very humbly suggest that wounded soldiers should have really low stats or even become unconscious, nothing very mysterious about it.

as for the medikits, as far as my own personal opinion goes, if there is no bleeding, the medikits might be removed altogether.
the soldier got hit, but the soldier does not become crippled until the end of the battle and there's even no increased risk of loosing the soldier after a few rounds of medikitting.

if a mission briefing would say that "your mom is among the civilians and you might want to consider being more careful with the grenade launchers this time" then that would be rpg imo.
uhh....
Title: Re: Medikits
Post by: odie on July 07, 2009, 07:02:52 am
lol, your rpg paranoia is impressive.
believe me, it is not so easy to turn a game into a rpg.
even games that are meant to be rpg-s like the popular mmorpg-s fail at it practically all the time.

Haha on that point. :D I am an RPG HUGE fan. :P

the ai right now, once you have set up some los in the tactical field, gives all the initiative to the player to kill the aliens when the player is prepared.
what's the fun of it?
assuming that
1) ai changes in the future will make the aliens more dangerous.
2) the maps where there is so much open ground that the tactical missions become a tedious but otherwise boring logistics task, will be more rare.
there will still be people that want more challenge, and certainly not in the form of more tedious running from cover to cover under the watchful eyes of your snipers on extra large maps.

Hehe, actually, its very realistic..... in large fields cover, thats exactly what it is..... What we need are perhaps more trees / bushes, broken walls and stuff in fields, for cover fire.... (aka varied landscape in HUGE maps).

In FIBUA (Fighting in Built Up Areas) or otherwise known as urban warfare, it is also the case of painstakingly clearing rooms by rooms that makes FIBUA so exciting. Hehe. Been in war before? I have not in real ones, but at least in army trainings in such. Hence, i can understand how it is to be ambushed (and more often, the one ambushing with my semi-autos). I am sure the aliens understand this concept too of ambushing.... hence we should be careful. (Again, this boils down to alien AI script, which isnt really balanced and perfected yet, so lets be patient).


now, as masochistic it might sound, bleeding on the battlefield is a fairly simple concept that can create some more chaos.

and, as far as i remember, someone among the devs has written here in the forum that he would like the soldiers to be able to take more than one hit before they die.
but, to keep the game more challenging, what i feel is that those soldiers that got the hit that did not kill them should not be very useful for the rest of the battle.
and this is exactly the reason why i very sincerely and very humbly suggest that wounded soldiers should have really low stats or even become unconscious, nothing very mysterious about it.

as for the medikits, as far as my own personal opinion goes, if there is no bleeding, the medikits might be removed altogether.
the soldier got hit, but the soldier does not become crippled until the end of the battle and there's even no increased risk of loosing the soldier after a few rounds of medikitting.

Well, about reduced stats due to injury - i agree, then again, this does not equate to the dev team thinking so. This is after all a game. Yupz. A simple way to work this out might simply to tag your health to a percentage of the total multiplying across all stats.

Ie. All stats have a max and a current value (and it varies with the % multiplier of your health/max health). If that is to be adopted at all......

hence, this would make medikits very very critical and useful..... (soldier wounded can still be patched up and do suppressing / cover fire role then).

Still on medikits, i still do not like the idea of fully 'patching up' the soldier in the field. Maybe only 50% of the health that is lost can be patched this way, and i would still press my point of full recovery only possible in the hospital (perhaps couple of hrs to 2,3 days would be good, since medicare would be MUCH superior in 80 years time / PLUS, did u read in the wiki somewhere that u can actually artificialise even eyes and stuff? lol. I read all my wikis and research proposals ok.)


if a mission briefing would say that "your mom is among the civilians and you might want to consider being more careful with the grenade launchers this time" then that would be rpg imo.
uhh....
Ah, too complicated. Lol. But yes, that is EXACTLY RPG. And its not wat i would like to see, and i dun thnk the devs would like to see tat too. :P

And yes, after all these, i am STILL RPG fan. Lol. :P
Title: Re: Medikits
Post by: TrashMan on July 13, 2009, 06:24:36 pm
IMHO, the HP of everyone - civies, alines and phalanx - should be doubled. Dying from one hit or killing an enemy easily is not really fun.
Title: Re: Medikits
Post by: Another Guy on July 13, 2009, 06:34:24 pm
Dying in one hit adds a realistic touch and will probably be avoided with the use of better armour.
Title: Re: Medikits
Post by: odie on July 14, 2009, 06:46:38 am
Dying in one hit adds a realistic touch and will probably be avoided with the use of better armour.

Agreed agreed.

After all, even with today's firearms, u DO die after a hit. Lol.

And for alien's wpns, i am already surprised the civi were not vaporised (mars attack, day after tomorrow, etc, tons more sci fi).

:P

Armor will definately and has already proven to defray this 1-hit-n-die thing. :D
Do some serious research.
Title: Re: Medikits
Post by: criusmac on July 16, 2009, 03:43:01 am
I'm willing to try to code this. It looks a ton easier to implement as opposed to visibility, which is something I want to eventually do. This is on the todo list, so it looks like people want this done. I did not see any indication that this is already being coded.

Has a decision been made on how this is to be yet? I've read every post, and there seems to be some disagreements still.

I would like to keep this system simple. As stated previously, tracking 5 different values is painfully complex.
I agree with the 1 hit kill problem.
Hopefully someday armor becomes good enough that it'll take 2 hits to kill you.
If you want medikits to return only a percentage of hp lost, a new variable will need to be saved for how much medikit hp is currently present. Is 50% what is wanted? Or 75%? Or does this need to be configurable?
Is stun going to be included?
Is bleeding going to be included?
Are we planning to give 3 turns to revive someone? I think that's rather unrealistic, but realism may not be this game's goal... Fun is, right?
Are we reducing stats based on damage?
How well can armor protect against a hit? Today we have armor that can stop most of our weapons effectively, right? Alien weapons maybe ought to kill us easily, but currently, I think our own weapons kill us easily. (Not sure on this though). Should this be changed?

And more, but you get the idea..

Basically, I'm willing to attempt coding this, but I will need a decision on how it should be implemented.

Unfortunately, the dev version I downloaded crashes every time I try to enter combat, so until this is fixed, I won't be able to test any changes I make.

In general, this looks like an easily coded change, and should not take long to implement, if it is decided what exactly medikits will do. Please let me know. (I'm just asking for horror spam, aren't I? ; ;)
Title: Re: Medikits
Post by: Another Guy on July 16, 2009, 05:06:50 pm
I'm willing to try to code this. It looks a ton easier to implement as opposed to visibility, which is something I want to eventually do. This is on the todo list, so it looks like people want this done. I did not see any indication that this is already being coded.

Has a decision been made on how this is to be yet? I've read every post, and there seems to be some disagreements still.

I would like to keep this system simple. As stated previously, tracking 5 different values is painfully complex.
I agree with the 1 hit kill problem.
Hopefully someday armor becomes good enough that it'll take 2 hits to kill you.
If you want medikits to return only a percentage of hp lost, a new variable will need to be saved for how much medikit hp is currently present. Is 50% what is wanted? Or 75%? Or does this need to be configurable?
Is stun going to be included?
Is bleeding going to be included?
Are we planning to give 3 turns to revive someone? I think that's rather unrealistic, but realism may not be this game's goal... Fun is, right?
Are we reducing stats based on damage?
How well can armor protect against a hit? Today we have armor that can stop most of our weapons effectively, right? Alien weapons maybe ought to kill us easily, but currently, I think our own weapons kill us easily. (Not sure on this though). Should this be changed?

And more, but you get the idea..

Basically, I'm willing to attempt coding this, but I will need a decision on how it should be implemented.

Unfortunately, the dev version I downloaded crashes every time I try to enter combat, so until this is fixed, I won't be able to test any changes I make.

In general, this looks like an easily coded change, and should not take long to implement, if it is decided what exactly medikits will do. Please let me know. (I'm just asking for horror spam, aren't I? ; ;)

Good to have a new coder willing to join he team! Two thumbs up.  :D

About implementation, there are a lot of ideas on this topic, but Devs seem not to have decided anything yet (or made it public). They would have to state what they want done (and what they wouldn't mind if we want to add some feature on top of it).

Personally, I'd support the idea of a potential small stun damage on every hit on every weapon (and morale loss) and bleeding, as well as stats loss during the remaining of that mission. About the amount of HP recovery, limiting medikit to only heal bleeding (and a small portion of HP with it) would prevent medikit abuse. Maybe heal stun and morale too as separate medikit abilities.
But again, it's only my personal opinion.

About armour, I think that would be a separate discussion... Armor system is not even ready yet (see wiki armour section (http://ufoai.ninex.info/wiki/index.php/Equipment/Armour)).
Title: Re: Medikits
Post by: criusmac on July 16, 2009, 09:25:38 pm
Great! ^^

I wasn't clear on my actual plans of what I was going to do -- sorry about that.

I won't be changing how weapons affect people, only how medikits affect people. If weapons do not already add stun damage, they won't add stun damage after I'm done either.
I won't be affecting how damage affects people. If they do not lose stats yet, they won't lose stats when they are injured when I'm done either.
I will not be adding bleeding damage to how people are injured. If bleeding damage already exists, I will code medikits to be able to heal it, if that is wanted. Pretty sure it doesn't exist yet though.

What I am willing to add is a new variable to track how much healing a medikit has applied to someone so far, and limit how much more healing it can do based on that.
I am willing to see if stun damage exists, and if it does, medikits can heal some stun damage, if this is what is wanted. If stun damage does not exist yet, my changes will not allow medikits to heal non-existant damage. That will need to be added when stun damage is added.
I am willing to change how many hit points a person will need to recover in a hospital after a medikit has healed them.

I'm sorry about my post, most of that post does seem to suggest I would have been coding everything. I was very specifically only willing to change how medikits worked though, in my mind. >.<
Title: Re: Medikits
Post by: odie on July 17, 2009, 05:31:59 am
*snip*

I won't be changing how weapons affect people, only how medikits affect people. If weapons do not already add stun damage, they won't add stun damage after I'm done either.
I won't be affecting how damage affects people. If they do not lose stats yet, they won't lose stats when they are injured when I'm done either.
I will not be adding bleeding damage to how people are injured. If bleeding damage already exists, I will code medikits to be able to heal it, if that is wanted. Pretty sure it doesn't exist yet though.

What I am willing to add is a new variable to track how much healing a medikit has applied to someone so far, and limit how much more healing it can do based on that.
I am willing to see if stun damage exists, and if it does, medikits can heal some stun damage, if this is what is wanted. If stun damage does not exist yet, my changes will not allow medikits to heal non-existant damage. That will need to be added when stun damage is added.
I am willing to change how many hit points a person will need to recover in a hospital after a medikit has healed them.

I'm sorry about my post, most of that post does seem to suggest I would have been coding everything. I was very specifically only willing to change how medikits worked though, in my mind. >.<

Ah, nonetheless criusmac,

Its a good effort.

Maybe once u r done with the coding, get mattn and geever to have a look and see what they say. :)

I am sure BTAxis is also somewhere here, and he's a great help if u can get him to have a look too. :D

Toodles!
Title: Re: Medikits
Post by: criusmac on July 17, 2009, 10:26:19 am
Ok, here is my proposal then:

Medikits can be used to restore all the hit points of a soldier they are used on.
I will change it so that they can not restore more hit points than their maximum.
If stun damage exists, they will reduce stun damage by the same number as hit points.
If bleeding damage exists, they will reduce bleeding damage the same way as stun damage.
If stats are decreased when hit, there will be no change to them upon healing.
A new variable will be created to keep track of the number of medikit hit points restored.
Any medikit hit points on a person will be removed upon mission ending. Full recovery must be done in a hospital.
If medikit hit points exceeds maximum hit points at mission end, the soldier will be reduced to 1 hit point, and death will not occur.
If a soldier enters a mission with under full hit points, they will have no medikit hit points. They can be healed to full hit points upon use of a medikit (more than one use may be required). (This one I'm having trouble with since it would make more sense for a soldier to start with full hit points, and possibly be healed on the way, for example. I don't know how we should handle this.)

This ends my proposal...
As an alternative, to help prevent over use of medikits, I can have medikits heal only up to 50% of hit points instead, and the rest be marked as medikit hit points. (Medikit hit points would not be added to current hit points in this case, but would accrue at only 50% the proposed rate)
Under this alternative, medikit hit points would still vanish on mission end, but the soldiers would not be as badly hurt since the current hit points would be 50% higher, in general. This means getting treatment in the field would reduce hospitalization time, which it wouldn't under the original proposal.

Please let me know if you want the original proposal, or the alternative (and if a different percentage is wanted for the alternative).
Title: Re: Medikits
Post by: geever on July 17, 2009, 10:38:05 am
Seems to be (over)complicated.
I asked BTAxis to write the official design to the wiki[1] (http://ufoai.ninex.info/wiki/index.php/Proposals).

-geever
Title: Re: Medikits
Post by: criusmac on July 17, 2009, 11:25:38 am
Might be, maybe it will seem simpler if I list the differences from the 2.2.1 (and probably the development version) instead?

Differences from stable version:
New variable that tracks how many hit points a person has been healed in the mission so far.
Remove ability for people to be healed to over their maximum hit points. (bug fix)
All hit points healed by a medikit will be removed on mission end, but they can not die from this.

Those are the total differences from the stable version, as far as I can tell.

If we go with the alternative proposal, then it starts getting a bit complicated, but that was based on the threads listing what people wanted.
Title: Re: Medikits
Post by: geever on July 17, 2009, 11:37:21 am
Remove ability for people to be healed to over their maximum hit points. (bug fix)

This one was fixed already.

-geever
Title: Re: Medikits
Post by: Mattn on July 17, 2009, 12:46:34 pm
All hit points healed by a medikit will be removed on mission end, but they can not die from this.

not all of them - but maybe dependent from the skill of the medic (but yes- the biggest part should be removed after a mission)
Title: Re: Medikits
Post by: TrashMan on July 17, 2009, 03:39:17 pm
Dying in one hit adds a realistic touch and will probably be avoided with the use of better armour.

If you're hit in the head, probably. If you're hit in the foot, no.

And while I'm normally the first to support realism, there are always some boundries after which it may start to interfere with the gameplay (depending on game type)


I vote for a stamina bar since it adds more realism and tactics. Weight and strength come into play. Injuries come into play even more. Various weapons, especially stun types,  have an added benefit. (a shotgun to the chest, even in heavy armor, WILL knock out all the air out of you and make it hard to breathe.)

Now you have 2 bars and very different effects that weapons have.

Projectile weapons cause bleeding, medikits can stop the bleeding and patch some small amount of HP.
Lasers don't cause bleeding.

Every weapons does some amount of stun damage (reduces stamina bar). The less stamina, the less Action Points a soldier has. If a stamina bar falls to 0, the solider falls unconcious (for 2-3 turns)

Basicly, just look at how Jagged Alliance 2 did it. Simple, intuitive, effective, tactical.
Title: Re: Medikits
Post by: odie on July 21, 2009, 06:58:21 am
If you're hit in the head, probably. If you're hit in the foot, no.

And while I'm normally the first to support realism, there are always some boundries after which it may start to interfere with the gameplay (depending on game type)


I vote for a stamina bar since it adds more realism and tactics. Weight and strength come into play. Injuries come into play even more. Various weapons, especially stun types,  have an added benefit. (a shotgun to the chest, even in heavy armor, WILL knock out all the air out of you and make it hard to breathe.)

Now you have 2 bars and very different effects that weapons have.

Projectile weapons cause bleeding, medikits can stop the bleeding and patch some small amount of HP.
Lasers don't cause bleeding.

Every weapons does some amount of stun damage (reduces stamina bar). The less stamina, the less Action Points a soldier has. If a stamina bar falls to 0, the solider falls unconcious (for 2-3 turns)

Basicly, just look at how Jagged Alliance 2 did it. Simple, intuitive, effective, tactical.

Trashman,

Take note that this is UFO: Alien Invasion. Not jagged alliance. Haha. There have been many many diff types of suggestions like this (emulating a certain game's behaviour here, including JG2). I believed that as much as we all like JG2, and even XCOM, lets just be unique and keep our stats as per it is proposed, ok? Haha, if u really liked that behaviour, well, thats THAT game (JG or whatever for that sake). :)

BTAxis, whom i believe is now writing the proposal as geever suggested, will probably give us (definately after all the inputs PLUS the dev team's directions) what is the accepted behaviour.

I still think we should keep it simple enuf, lest we even further delve into the idea of separating the body into different parts, with diff parts having diff types of injuries, with HP for each part, possibly maiming of part, loss of functions, bleedings, shock, etc, etc - i can go on and on, cos i am a very old time and trained first aider + hardcore RPG gamer. (All the way back to the good ol' D&D paper and dice RPG days). lol. But wats the point? No point.

Simplicity is virtue. Lol.

Toodles! :P
Title: Re: Medikits
Post by: homunculus on July 22, 2009, 06:21:11 am
so, you claim people die from one shot.
true, but if it's not a head shot or to the heart or something else that almost instantly shuts down the brain, they should still be bleeding for a few seconds before they die, isn't it so?
they do die from one shot, though.
[...]But wats the point? No point.[...]
if you ask it this way, i think there is a point, and in most part it is about gameplay.

if your veteran gets hit by some accidental shot and gets killed, it is right now very easy to reload and do the mission again, and it is comparatively very difficult to train a new veteran.
the gameplay problem is that, as it is right now, the veteran didn't get shot at all!

if soldiers do not die from one hit, i would suggest that the one hit would still make the player say 'ouch'.
no matter how this is done.
the bleeding to death (preferably very quickly) and creating some chaos trying to save your bleeding soldiers could be one way.
reducing stats of the soldier until healed in hospital could be another.

right now the soldier either gets totally annihilated or else it runs around with, say, 1 health point, and shoots and throws grenades like a maniac, just with some increased danger of getting annihilated with the next shot.

it is a matter of taste, i know, but i would like the deaths to be less instant, and i would like there to be a mess that might interfere with the player's tactics.

@criusmac
as i understand, the basics of what you want to say is something as simple as that medikit-healed health
1) is limited to 50%
2) disappears after mission
and also, stat reduction could be added on top of that, if desired.

now, if you try to specify it in such detail that you would be ready to code it, the same idea will certainly sound complicated.
;)

actually wasn't the first version just that:
'medikit-healed health would disappear after mission'?
Title: Re: Medikits
Post by: odie on July 22, 2009, 06:46:09 am
so, you claim people die from one shot.
true, but if it's not a head shot or to the heart or something else that almost instantly shuts down the brain, they should still be bleeding for a few seconds before they die, isn't it so?
they do die from one shot, though.if you ask it this way, i think there is a point, and in most part it is about gameplay.

if your veteran gets hit by some accidental shot and gets killed, it is right now very easy to reload and do the mission again, and it is comparatively very difficult to train a new veteran.
the gameplay problem is that, as it is right now, the veteran didn't get shot at all!

if soldiers do not die from one hit, i would suggest that the one hit would still make the player say 'ouch'.
no matter how this is done.
the bleeding to death (preferably very quickly) and creating some chaos trying to save your bleeding soldiers could be one way.
reducing stats of the soldier until healed in hospital could be another.

right now the soldier either gets totally annihilated or else it runs around with, say, 1 health point, and shoots and throws grenades like a maniac, just with some increased danger of getting annihilated with the next shot.

it is a matter of taste, i know, but i would like the deaths to be less instant, and i would like there to be a mess that might interfere with the player's tactics.

@criusmac
as i understand, the basics of what you want to say is something as simple as that medikit-healed health
1) is limited to 50%
2) disappears after mission
and also, stat reduction could be added on top of that, if desired.

now, if you try to specify it in such detail that you would be ready to code it, the same idea will certainly sound complicated.
;)

actually wasn't the first version just that:
'medikit-healed health would disappear after mission'?

Ah, if its the one hit and killed soldier issue, i guess this come down to balancing the game then.

Right now, balancing is not yet done, (be it wpns or armors, aliens' or humans'), hence it might result in too lousy armor or overpowered wpns.

All these will definately change once balancing is done then. :D
Title: Re: Medikits
Post by: homunculus on July 22, 2009, 07:30:15 am
Ah, if its the one hit and killed soldier issue, i guess this come down to balancing the game then.
[...]
actually i don't think it's exactly this 'one hit and killed' issue nor a matter of balancing.

with bleeding, you can have practically any shot resulting in one hit kill.
in this sense, it is about making weapons more powerful.

and i would say it is not about balancing, it is rather about 1-hp-lucky-and-happy or else instantly annihilated.
realism would be an additional benefit but main reason would be gameplay.

bleeding would let you make weapons more powerful, but without motivating reloading.
so the soldiers _do_ get hit and it matters (but when the mission is reloaded because of veteran death, they effectively _don't_ get hit).
Title: Re: Medikits
Post by: geever on July 29, 2009, 01:53:48 pm
@criusmac: The official design for Medikits (http://ufoai.ninex.info/wiki/index.php/Gameplay_Proposals/Medikits) finished. Have a look.

-geever
Title: Re: Medikits
Post by: odie on July 29, 2009, 06:23:26 pm
@criusmac: The official design for Medikits (http://ufoai.ninex.info/wiki/index.php/Gameplay_Proposals/Medikits) finished. Have a look.

-geever

Quote
Wounds and Medikits

Author: BTAxis

This article describes the system of soldier wounds, bleeding and the use of medikits as per official design. The purpose is to create a realistic yet simple system that allows players to tend to the wounded on the battlefield without unbalancing the game.

It is assumed soldiers will almost always be wounded before they are killed; weapon and armour balancing will have to ensure that this is the case. In general weapon damage should be lowered; the reduction in killing power is compensated by bleeding.
Wounds

A soldier, when taking damage, will also be wounded. As it is currently not possible to determine where the soldier was hit, the location of the wound will have to be randomized, with each body part having a set chance of getting the wound. This chance may be subject to factors such as armour and implants. The possible locations are head, torso, arms and legs. There is no distinction between the right and left limbs.

Each wound inflicts a penalty on the soldier, depending on which body part is wounded.

    * 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 (http://ufoai.ninex.info/wiki/index.php/Gameplay_Proposals/Visibility) and accuracy with all weapons.

Each wound also bleeds, steadily taking health from the soldier until the battle is over, the wounds are healed or the soldier dies. Bleeding takes health directly from the health bar; there is no "second" health bar of any kind.

Wounds treated with a medikit do not disappear. Instead they are considered "treated". A treated wound does not bleed and only incurs half of its normal penalty. However, treated wounds can only be fully healed by spending time in a PHALANX base hospital. A soldier with wounds that is sent out on a new mission will start that mission with the penalties associated with those wounds.

When the player wins a mission, all untreated wounds will be automatically treated.

Aliens are subject to wounding just like humans, but the specific race of aliens may affect the chance of taking wounds, the penalties and the rate of bleeding.
Functions of the medikit

The medikit has three uses: treatment of wounds, recovery of morale and revival of stunned actors. All three functions draw from the same ammunition pool, for simplicity. Each of these functions is a separate firemode on the medikit. Note that the medikit may not be used on robotic targets for any purpose.
Treatment of wounds

Each use of this firemode treats a single wound on the target actor. Wounds are treated in the order they were inflicted. When the wound is treated it ceases to bleed and its penalties are halved. In addition, the actor being treated recovers a small amount of health. This firemode can not be used on actors that have no untreated wounds.
Recovery of morale

Each use of this firemode will raise the target's morale by a fixed amount. Useful to prevent soldiers from panicking.
Revival of stunned actors

When used on a friendly target, each use of this firemode will remove a fixed amount of stun damage. Once stun damage falls below health, the actor is revived. When used on a stunned alien target, this firemode will actually increase stun damage, keeping the target sedated. However, this function may not be used until Live Alien (http://ufoai.ninex.info/wiki/index.php/Research/Live_Alien) has been researched.

Civilians count as friendly targets.

This firemode may not be used on conscious enemy targets.

I like this final proposal that is accepted. :D

Was wondering if the medikit is a standard 5/5 10/10 (X/X) usage kind, or will it be like old XCom - where there are 3 diff types of 'medicine' for treating each of the 3 wounds respectively, with limited usage? :D
Title: Re: Medikits
Post by: criusmac on July 29, 2009, 11:21:14 pm
Herein lies my current proposal, let me know if it is ok:

I will create a linked list of wounds in the actor object.
I will change the medikits to have 3 different firing modes.
--I will base this on weapons.
--All medikit modes will take the same number of turn units.
--Reaction fire will not affect enemies (to stun them more). They will only affect allies.
--The player must set the reaction fire mode of the medikits in the same manner as weapons.
I will add bleeding to actors.
--The bleeding will add additional damage to the wound that is bleeding.
I will try to add ammo capacity to the medikits.
--I will set the initial amount to 10, since this is a common number of uses of medikits in most games I've played.
I will code in the effects of Treatment of wounds.
I will code in recovery of morale.
I will try to code in stunned friendly recovery.
I'm thinking it might be too tough to code in stunning of enemies, but I'll give it a try for now.
I will try to add the effects of wounds on the body (reduced abilities).
--The amount of reduced abilities will be the current value of the wound as a percentage.
--IE: If the wound currently is 20% of a person's total hp, they will receive a 20% penalty to all associated abilities.

I won't balance the weapons.
I won't balance the armors.
I won't add wounding to the weapons for now.
I won't change the size and weight of the medikits.

Someone else will need to look into the things I won't be doing.. Or, given enough time, I might eventually try to do it myself. All these decisions have been made without looking at the code at all though.
Title: Re: Medikits
Post by: geever on July 30, 2009, 12:37:25 pm
I will create a linked list of wounds in the actor object.

"object" :) We're in pure C.. but okay (we have list handlers (in src/common/common.c)).

I will change the medikits to have 3 different firing modes.
--I will base this on weapons.
--All medikit modes will take the same number of turn units.

That is/should be scriped (base/ufos/weapons.ufo)

--Reaction fire will not affect enemies (to stun them more). They will only affect allies.
--The player must set the reaction fire mode of the medikits in the same manner as weapons.

Reactionfire for a Medikit? It made me thinking. Maybe for a dedicated medic, yes. What I worry about is how it can be done without hacking the code. I don't know RF code myself but I doubt it would fit. I suggest to drop this idea from the first round. We can consider/discuss this later.

I won't add wounding to the weapons for now.

Why? How can you test healing wounds wo. inflicting them?

-geever
Title: Re: Medikits
Post by: criusmac on July 30, 2009, 04:29:28 pm
It's a good point, how to test the wounds without inflicting them. :) I decided every hit would create a wound, so I will be adding wounds to weapons, I just didn't change that in the post.

Thanks, I couldn't find the medikits anywhere (And oddly I thought I had looked right inside weapons.ufo).

Ok, I'll drop the reaction fire from medikits for now then.
Title: Re: Medikits
Post by: homunculus on July 30, 2009, 09:43:06 pm
Quote
[...]Bleeding takes health directly from the health bar; there is no "second" health bar of any kind.[...]
*cough*, couldn't we rather say that the main health bar, in this case _is_ the "second" health bar?
actually now that there are bodyparts it is the fifth, but whatever.
and the stun thing somewhat reminds me of how soldier looses consciousness when blood pressure drops below stun level (the earlier too complicated suggestion).

i didn't quite get it clear if shot damage is applied as wounds to bodyparts only, or also to the main health bar.
if shot damage is also applied to the main health bar (which is likely the case), when your soldier gets shot, it is as if he lost some amount of blood in a splash, and then continued bleeding.
so, the soldier gets shot and
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.
actually idk how you meant it, i am just making assumptions.

if shot only created wounds on the body (the main bar is affected only by bleeding) then weapon damage would have less brisk effect than in the case of directly damaging the main health bar.

so, in addition to creating bleeding wounds, does the shot directly damage the main health bar?

as you can guess, i am certainly waiting with anticipation to try the new system.
Title: Re: Medikits
Post by: criusmac on July 31, 2009, 08:07:02 am
My fault since I did not explain the exact mechanics I was expecting to implement at first.

My plan is:
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.

When the person is hit, there is damage done to their body part that was hit. This will always create a wound of a certain amount, unless the armor completely blocks the damage. This wound will (for now) always bleed, and the additional damage done each turn will be equal to 10% of the wound's damage. This damage is truncated, so any wound under 10 hp will not cause blood loss. (Let me know if you want this changed). Even if the wound is caused by laser, it will still be bleeding. (If you want, I can look into making all laser wounds already treated, but for now I won't).

I disagree with treating the wounds in the order they were created -- I feel it would be better to treat the worst wounds first, but I will do as the proposal states. Please change this though. It feels silly to treat a non bleeding 5 hit point arm wound when there's a 30 hit point head wound gushing blood just because the head wound was done after the arm wound.

The hit points of the person will decrease with any wound suffered, no matter where it is. If the total number of hit points in wounds equals/exceeds the total number of hit points the person has, they will die. No matter where the wounds are. IE: If the person gets shot in the arm for 50 hit points of damage, and they only have 30 left, they're dead.

To find out how much a skill has decreased due to damage, you take the total number of wounds on the body part, and divide that by the total number of hit points the person has. The result of this division is the percentage of skills reduced. IE: If the person has 100 hit points total, and has 20 hit points of damage in the arms, they will have a 20% decrease in their accuracy with any weapon, and a 20% increase in the turn units needed to use any weapon/item. If they have 50 hit points total, and 10 hit points of damage in the arms, they will be affected the exact same amount as the person with 100 hit points total, and 20 hit points of arm damage.

When they are cured with a medikit, they will recover 20% of the hit points of that wound, and the wound will be considered treated. This is subject to change, but it's the number I randomly picked. IE: If they have 100 hit points total, and have an untreated arm wound of 20 points of damage, that is immediately treated by a medikit, they will then have an 16 hit point arm wound that is now treated, and will no longer bleed. They skills will increase by about 4% accuracy for all weapons as well, and their turn units for using the weapons will decrease by 4%.

So, in summary of my current plans:
If they have 100 hit points total, and a 20 hit point arm wound that's untreated, they will lose 2 hit points per turn until they are treated. They will have a 20% decrease in accuracy with all weapons, and a 20% increase in turn units to use any weapon/item. If a medic doesn't arrive for 5 turns, the wound will have reached 30 hit points of damage, and the person will start losing 3 hit points per turn until they are treated. When the finally get treated on the 6th turn, the will then have a 24 hp arm wound that is treated, and they will have a 24% accuracy decrease, and a 24% increase in turn units to use any weapon rather than 30% (before treatment).

I would like to change it so that people can treat their own wounds, but last I saw, this can't be done, and there's probably a reason.. So I won't change this unless asked to.

So, to answer your questions directly:
Every hit causes a wound. The shot damage is applied to the body parts. All damage done to body parts is subtracted from the main health bar. There is only 1 health bar. You can do unlimited damage to any body part, and the person will die only when all the body part damages equals or exceeds the main health bar's hit points.
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.

The shots create wounds on the body, but the wounds affect the health bar as well. IE: If you take a 20 point wound in your arms, your main bar is decreased by 20 as well. Bleeding affects both the wound, and thus the health bar as well. If you bleed and your wound is 2 points worse, your health bar also decreases by 2 points.
You can calculate the value of the health bar by:
The max hit points of the person minus the value of each wound on every body part.

Shot damage directly affects the main health bar. Since there is only 1 health bar, it may be confusing to keep calling it the main one.
There is a second bar, a stun bar, but it has nothing to do with the health bar. In other words, the stun bar also takes the same amount of damage to deplete, regardless of the health of the individual. There already appears to be some stun code in place, so it will probably just use that.

Please let me know of any changes that need to be made, or if you have any other questions about my plans.
Title: Re: Medikits
Post by: criusmac 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.
Title: Re: Medikits
Post by: homunculus 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?
Title: Re: Medikits
Post by: criusmac 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.
Title: Re: Medikits
Post by: BTAxis 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.
Title: Re: Medikits
Post by: homunculus 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 (http://"http://ufoai.ninex.info/forum/index.php?topic=2216.msg21423#msg21423") 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.
Title: Re: Medikits
Post by: geever 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
Title: Re: Medikits
Post by: homunculus 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.
Title: Re: Medikits
Post by: Surrealistik 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.
Title: Re: Medikits
Post by: criusmac 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).
Title: Re: Medikits
Post by: Hertzila 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.
Title: Re: Medikits
Post by: criusmac 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.
Title: Re: Medikits
Post by: criusmac 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?
Title: Re: Medikits
Post by: Surrealistik 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?
Title: Re: Medikits
Post by: criusmac 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...
Title: Re: Medikits
Post by: Winter 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
Title: Re: Medikits
Post by: criusmac on August 06, 2009, 08:36:49 pm
2. Body part wounds are special, like fatal wounds in X-COM, and are not percent-based; not every hit should cause one.

I'm currently coding it so every hit produces a wound. I'm not sure how this could be avoided... I mean, even cutting your finger is a wound.... Is there a problem with every hit that causes damage producing a wound?
Title: Re: Medikits
Post by: Winter on August 06, 2009, 11:54:57 pm
I'm currently coding it so every hit produces a wound. I'm not sure how this could be avoided... I mean, even cutting your finger is a wound.... Is there a problem with every hit that causes damage producing a wound?

You don't need a nanobot-equipped medikit to fix a cut on your finger. Only hits that deliver 10 or more HPs of damage should cause wounds to body parts.

Regards,
Winter
Title: Re: Medikits
Post by: Surrealistik on August 07, 2009, 03:33:32 am
Yes, I agree that some damage threshold must be surpassed in order for a chance of a serious, potentially terminal wound to be inflicted. The probability of such a wound occurring should scale with damage.

Also, why no repair kits for mechanical objects/armour?
Title: Re: Medikits
Post by: criusmac on August 07, 2009, 05:58:37 am
Ah, well, the reason I wanted a wound on even 1 hp of damage is it's still distracting pain that I feel would affect a person's abilities. It won't bleed enough to cause them to lose more hit points at under 10 though.

A wound where 100 of them (or less) will kill you if untreated is probably bigger than most cuts we receive in everyday life, and even stubbing a toe is enough to slow me down for walking/running... (0 damage)

But maybe I'm looking at this the wrong way. Wounds of 0 damage won't cause any loss of attributes at least, for our soldiers...

You don't need a nanobot-equipped medikit to fix a cut on your finger. Only hits that deliver 10 or more HPs of damage should cause wounds to body parts.

Is this really what people want? I'd hope for more opinions...

Yes, I agree that some damage threshold must be surpassed in order for a chance of a serious, potentially terminal wound to be inflicted. The probability of such a wound occurring should scale with damage.

Also, why no repair kits for mechanical objects/armour?

This is my current plan. 10 hit points (1/10 of a fatal would to the healthiest, most fit soldier) is the currently set threshold. Under that and you will not even bleed from the wound at a rate that may kill you, eventually, if untreated.  I'm not sure if having random possibilities of wounds. From what I gather, the developers don't like randomness much...

There are no repair kits for armor since, if I recall right, some developer didn't want armor to get damaged, and need to be fixed on the fly. Was too complicated he felt.
Mechanical objects are probably repaired to full upon returning to the base. Do you really need field repairs? If you do, should probably create a new topic for that request...
Title: Re: Medikits
Post by: Winter on August 07, 2009, 10:43:28 am
Ah, well, the reason I wanted a wound on even 1 hp of damage is it's still distracting pain that I feel would affect a person's abilities.

Not really. Modern special forces have to continue after some pretty bad injuries.


Quote
Is this really what people want? I'd hope for more opinions...

It's what the design team wants, for obvious gameplay reasons. I don't see what more opinions would be good for...

Regards,
Winter
Title: Re: Medikits
Post by: criusmac on August 07, 2009, 03:56:24 pm
It's what the design team wants, for obvious gameplay reasons. I don't see what more opinions would be good for...

Ok, I have no idea who you are, but since you have 'administrator' by your name, I'll assume you are a developer or something, and I'll do as you ask.

Only damages of greater than 9 hit points will cause a wound then. Any damages greater than 9 hit points will cause a wound though, unless you want this to be changed as well.
Title: Re: Medikits
Post by: criusmac on August 07, 2009, 04:49:04 pm
Upon closely studying the proposal again, I see under wounds directly:

Quote
A soldier, when taking damage, will also be wounded.

Perhaps I am misunderstanding it, but it appears to suggest all damage causes a wound..

There is still plenty of time before I am ready to begin coding this. I am in the planning stages still. Does the design team agree with the development team on how wounds are to be implemented?
Title: Re: Medikits
Post by: homunculus on August 08, 2009, 09:00:31 am
Upon closely studying the proposal again, I see under wounds directly:

Perhaps I am misunderstanding it, but it appears to suggest all damage causes a wound..

There is still plenty of time before I am ready to begin coding this. I am in the planning stages still. Does the design team agree with the development team on how wounds are to be implemented?
i guess it means that if a damage doesn't cause a wound, then it is not damage.
therefore, if minimum damage that causes a wound is 10, then all damage less than 10 is 0 *wink*.
makes sense, we don't need to count all the scratches on a soldier.
Title: Re: Medikits
Post by: Winter on August 08, 2009, 10:21:09 am
Ok, I have no idea who you are, but since you have 'administrator' by your name, I'll assume you are a developer or something, and I'll do as you ask.

I'm the design lead. Have been for a few years now. BTAxis and I wrote the medikit proposal, although he didn't show me the bits I've taken issue with here, they were added later. My apologies for any confusion.


Perhaps I am misunderstanding it, but it appears to suggest all damage causes a wound..

There is still plenty of time before I am ready to begin coding this. I am in the planning stages still. Does the design team agree with the development team on how wounds are to be implemented?

I'll get BTAxis to come and post here if you like, or I can amend the proposal on the wiki. I think the reasoning behind this is pretty self-evident. Small hits should not create wounds or bleeding, it's not realistic for them to do so and it's not good for gameplay.


Quote
Only damages of greater than 9 hit points will cause a wound then. Any damages greater than 9 hit points will cause a wound though, unless you want this to be changed as well.

That should be fine. There's always a chance to review things after some testing if it's really necessary.

Regards,
Winter
Title: Re: Medikits
Post by: BTAxis on August 08, 2009, 11:47:56 am
criusmac: The proposal doesn't state how and when exactly wounds are inflicted, but it does stand to reason that there would be a damage threshold for bleeding wounds. Consider the 10HP minimum accepted design, though if possible it would be nice if this was scripted somewhere.
Title: Re: Medikits
Post by: criusmac on August 08, 2009, 03:41:16 pm
Please feel free to script it somewhere. That is something I haven't figured out yet -- how to read and work with scripts without the source code.

My todo list is nearly complete, should I post it somewhere? And if so, where?

criusmac: The proposal doesn't state how and when exactly wounds are inflicted, but it does stand to reason that there would be a damage threshold for bleeding wounds. Consider the 10HP minimum accepted design, though if possible it would be nice if this was scripted somewhere.

Aye, and not all wounds were going to bleed. Only those of 10 hit points or greater were going to bleed, but originally all wounds were going to affect skills or turn units... Also, all wounds could be treated.

Basically, the change that has been proposed by Winter will mean the following changes from my original implementation...

Original:
Only wounds of at least 10 hit points could bleed.
Every hit by a weapon that causes any damage will cause a wound.
All wounds reduce accuracy or increase turn units to do things as indicated in the proposal.
All wounds can be treated, which reduces their damage and effects by 20%.

Winter new change:
Only wounds of at least 10 hit points could bleed. (unchanged)
Every hit by a weapon that causes any damage will cause a wound. (unchanged, see explanation below)
Only wounds of originally at least 10 hit points reduce accuracy or increase turn units to do things as indicated in the proposal.
Only wounds of originally at least 10 hit points can be treated, which reduces their damage and effects by 20%.

note, any hit of under 10 hit points are not considered wounds, and thus can not be treated. This means soldiers are *slightly* more likely to die, but since they aren't wounds, they don't decrease accuracy or skills any, and do not increase turn units for anything, which means they might be *slightly* less likely to die. No sure which will be more likely in the end...

This change does introduce some rethinking on how to implement hospital changes however. Originally, wounds themselves would slowly heal (or so it was planned), so a person with a whole bunch of small wounds would heal a lot faster than a person with one gigantic wound, even if the total hit points lost were the same. Since I still want to keep this true, what I will do is introduce a new variable to keep track of if a wound will reduce skills or not. In this way, I can easily still keep track of how fast a person should heal, and be able to accurately keep track of their skills/turn units based on their wounds. So, it's only a bit more complicated this way. The person will still receive a wound from every hit, but skills will not decrease, and turn units will not increase, and the wound will be considered treated when received (unable to be treated again) unless the wound was originally at least x points of damage (where x=10 for now).
Title: Re: Medikits
Post by: criusmac on August 08, 2009, 05:27:17 pm
Here is my first draft of my todo list. So far it does little more than indicate what steps need to be accomplished, and where. Not sure this should be posted here since it's very code oriented, but thought you guys might need to know in case I missed something. It's subject to change as I see more, but this is what I saw on my first quick look...

By the way, nothing needs to be done with this list if you don't want, it's mainly just for your information...

TODO:
(+) 1) Add wounds to the save games. (cl_team.c:CL_SaveCharacterXML).
(+) 2) Load wounds from the save file. (cl_team.c:CL_LoadCharacterXML).
(+) 3) Add wounds to actors. This can be done in entity_t, or character_t. Not sure which. For now assuming character_t.  (inv_shared.h:character_t)
(+) 4) Add a function that adds wounds to actors. (g_actor.c:G_ActorDamage)
(+) 5) Research all locations that need to add wounds to actors. (g_combat.c:G_Damage)
(+) 6) Add a function that treats wounds. (g_actor.c:G_ActorTreat)
(+) 7) Research all locations that need to treat wounds on actors. (g_combat.c:G_Damage)
(+) 8) Add a function the heals wounds. (cp_hospital.c:HOS_Heal)
( ) 9) Research all locations that heal wounds on actors. (cp_hospital.c:HOS_HealCharacter) (cp_hospital.c:HOS_HealAll_f) (g_combat.c:G_Damage)
(+) 10) Research all location where morale damage can be fixed by medikits. (g_combat.c:G_Damage)
(+) 11) Research all location where stun damage can be fixed by medikits. (g_combat.c:G_Damage)
( ) 12) Research all locations where we can use a medikit to stun an enemy. (g_combat.c:G_Damage)
(+) 13) Modify weapons.ufo with the new medikit script. (0ufos.pk3:weapons.ufo)
(+) 14) Research how to interpret the new medikit script. (scripts.c:Does not exist!) .. Initial examination suggests 'name' is not used. May need to use different -damage amount to specify what we are attempting to do with the medikit.
( ) 15) Apply wound damage to weapon accuracy for head and arm injures. (g_combat.c:G_ShootSingle) (g_combat.c:G_ShootGrenade)
( ) 16) Apply wound damage to TUs needed to shoot (arms). (g_combat.c:G_ClientShoot)
( ) 17) Apply wound damage to TUs needed to move. (legs). (cl_actor:CL_MoveLength)
( ) 18) Apply wound damage to TUs needed for reaction fire (chest). (g_reaction.c:G_ResolveRF) (cl_actor.c:CL_SetReactionFiremode)
( ) 19) Ensure if a person is shot in the chest not on their turn, we update the reaction fire turn units needed. (g_reaction.c:G_GetFiringTUs)
( ) 20) For each combat turn, make any big wounds bleed. (g_client.c:G_ClientEndRound)
( ) 21) Set the wounds whenever a character's values are usually set. (g_client.c:G_ClientTeamInfo)
( ) 22) Set all wounds to treated when combat ends. Do not heal any hp though. (Assume 1 turn to treat all the wounds) Should this be changed? Should it be 1 turn for each wound? If so, they can bleed to death even after mission has ended... For now, they can't.

+Coded
*Tested
Title: Re: Medikits
Post by: geever on August 08, 2009, 08:38:24 pm
Please feel free to script it somewhere. That is something I haven't figured out yet -- how to read and work with scripts without the source code.

Scripts are parsed on startup, data filled into in-game structures.

Every hit by a weapon that causes any damage will cause a wound. (unchanged, see explanation below)

note, any hit of under 10 hit points are not considered wounds...

Is it mean you add the wound into the list (alloc memory) then not using it anywhere? I don't see what would it be good for. Please enlighten me.

-geever
Title: Re: Medikits
Post by: geever on August 08, 2009, 08:40:42 pm
3) Add wounds to actors. This can be done in entity_t, or character_t. Not sure which. For now assuming character_t.  (inv_shared.h:character_t)

As we wanna save it (for campaign) character_t. entity_t is battlescape only AFAIK.

Also 3) should/will happen before 1) and 2). You cannot save what you don't have. :)

-geever
Title: Re: Medikits
Post by: criusmac on August 08, 2009, 09:38:37 pm
Is it mean you add the wound into the list (alloc memory) then not using it anywhere? I don't see what would it be good for. Please enlighten me.

Yup, basically. The wound will no longer be used as far as the battle is concerned. It will only be used for healing via the hospital, or standing around in base, as stated via the below quote...

This change does introduce some rethinking on how to implement hospital changes however. Originally, wounds themselves would slowly heal (or so it was planned), so a person with a whole bunch of small wounds would heal a lot faster than a person with one gigantic wound, even if the total hit points lost were the same. Since I still want to keep this true, what I will do is introduce a new variable to keep track of if a wound will reduce skills or not. In this way, I can easily still keep track of how fast a person should heal, and be able to accurately keep track of their skills/turn units based on their wounds. So, it's only a bit more complicated this way. The person will still receive a wound from every hit, but skills will not decrease, and turn units will not increase, and the wound will be considered treated when received (unable to be treated again) unless the wound was originally at least x points of damage (where x=10 for now).

Also 3) should/will happen before 1) and 2). You cannot save what you don't have. :)

Sounds good. :) I was actually implementing 3 first, and then starting on 13. Hmm, maybe I should figure out what order I need to do them in. Right now, the list was just what I have to do eventually, and I didn't think about the order of any of it. Thanks. :)

As we wanna save it (for campaign) character_t. entity_t is battlescape only AFAIK.

Sweet! That's something that might be helpful in the newbie coders forum, or something.

Scripts are parsed on startup, data filled into in-game structures.

Hmm, that's the concept, the work done feels much more complicated though. I suspect it will take me a long time to figure out.. I've looked at it a lot, and it seems rather foreign still.
Title: Re: Medikits
Post by: gerald on August 13, 2009, 04:59:16 pm
way medikits worked in x-com was ok but i think hitting certain parts of body there was just random i got situation when my soldier crouched behind box and he was shoot in the legs heh when all up half of body was opened to fire weird a bit so if ufo ai no have code for aiming certain parts why no left medkits as they are maybe i no played much yet but they works ok as for me anyway i no found in ver 2..2.1 option to "wake up" unconcious soldiers is that implemented in 2.2.3 so i readed something about in research if remember
Title: Re: Medikits
Post by: criusmac on August 14, 2009, 05:16:40 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?

I am asking again, to a developer or design person, should I make the above change which makes armor possibly 100% effective if the shot is particularly weak? I am currently recoding this function to add wounds to the damage done.
Title: Re: Medikits
Post by: Mattn on August 14, 2009, 08:52:33 am
I am asking again, to a developer or design person, should I make the above change which makes armor possibly 100% effective if the shot is particularly weak? I am currently recoding this function to add wounds to the damage done.

i think that was intentional - but that's something winter or btaxis can answer better
Title: Re: Medikits
Post by: Winter on August 14, 2009, 09:16:55 am
I am asking again, to a developer or design person, should I make the above change which makes armor possibly 100% effective if the shot is particularly weak? I am currently recoding this function to add wounds to the damage done.

Yes, that's right. Sorry, I didn't actually understand what you were asking the first time.

This thread is about to get a clean-up.

[Update] Done. Please try to keep things on-topic from now on, guys.

Regards,
Winter
Title: Re: Medikits
Post by: criusmac on August 14, 2009, 09:42:19 am
Yes, that's right. Sorry, I didn't actually understand what you were asking the first time.

So, what is the answer? Yes, that's right, make the change? (My analysis is correct)
Or yes, that's right, don't make the change? (The code is already correct)
Title: Re: Medikits
Post by: criusmac on August 14, 2009, 10:32:11 am
Code: [Select]
target->HP = max(target->HP - damage, 0);
if (damage < 0) {
/* The 'attacker' is healing the target. */
/* Update stats here to get info on how many TUs the target received. */
if (target->chr.scoreMission)
target->chr.scoreMission->heal += abs(damage);

/** @todo Do the same for "attacker" but as "applied" healing
* e.g. attacker->chr->scoreMission.healOthers += -damage; ? */

/** @todo Also increase the morale a little bit when
* soldier gets healing and morale is lower than max possible? */
} else {
/* Real damage was dealt. */

/* Update overall splash damage for stats/score. */
if (!mock && damage > 0 && fd->splrad) /**< Check for >0 and splrad to not count this as direct hit. */
G_UpdateHitScore(attacker, target, fd, damage);
}

It appear there is a todo written into the code:
Code: [Select]
/** @todo Also increase the morale a little bit when
* soldier gets healing and morale is lower than max possible? */

Is this todo still wanted? It was not listed in the medikit proposal to do so, but I am currently writing the wound treatment function, so it would be easy to add in at this time. If it is wanted, what should the value be? I would like it to be based on the current wound being treated, or some fixed amount since I can not pass in additional values easily via the script method.
Title: Re: Medikits
Post by: Winter on August 14, 2009, 12:46:33 pm
So, what is the answer? Yes, that's right, make the change? (My analysis is correct)
Or yes, that's right, don't make the change? (The code is already correct)

Yes, please make the change.

Regards,
Winter
Title: Re: Medikits
Post by: criusmac on September 15, 2009, 02:48:53 pm
I'm unclear on how much a wound is going to affect accuracy, and turn units.

If a person has a 10 point untreated arm wound, how much will their accuracy suffer?
If a person has a 10 point untreated arm wound, how much will their turn units to shoot increase?

If a person has a 10 point untreated leg wound, how much will their turn units to move increase?

If a person has a 10 point untreated chest wound, how much will their turn units for reaction fire increase?

If a person has a 10 point untreated head wound, how much will their accuracy suffer?
Title: Re: Medikits
Post by: geever on September 16, 2009, 12:10:54 am
I'm unclear on how much a wound is going to affect accuracy, and turn units.

If a person has a 10 point untreated arm wound, how much will their accuracy suffer?
If a person has a 10 point untreated arm wound, how much will their turn units to shoot increase?

If a person has a 10 point untreated leg wound, how much will their turn units to move increase?

If a person has a 10 point untreated chest wound, how much will their turn units for reaction fire increase?

If a person has a 10 point untreated head wound, how much will their accuracy suffer?

Make them scripted.

-geever
Title: Re: Medikits
Post by: criusmac on September 16, 2009, 12:24:36 am
Reading and using scripts goes well beyond my abilities. I've stared at that code for hours and made no progress. This is the main reason I had to stop working on the visibility stuff too.

Ok, I'll have to leave it to someone else then. I'll simply create the functions and put them into the proper places, and someone else can add the scripting. Should be easy if someone else knows how, for now the functions will simply return 0, and so skills will not be affected by wounds. That's the best I can do.
Title: Re: Medikits
Post by: criusmac on October 16, 2009, 08:30:47 am
Tortoisesvn keeps reverting my files without my telling it to, and thus I keep losing all my changes (I'm assuming). I have recoded things a few times now, only to lose them again. This is really slowing down my medikit updates. Is there a way to fix this? Am I doing something wrong?

For example, my latest changes to g_combat.c have completely vanished again. I get a nice green checkmark by the file, and it's the original file without any of my changes.

It's bugging me a lot now, and I've had to make several copies of my medikit changes, and keep reapplying my changes, again and again. Sadly, g_combat.c changes got completely lost this last time.

What am I doing wrong?
Title: Re: Medikits
Post by: Borsti67 on October 16, 2009, 09:16:41 am
may be you're using a wrong checkout mode (if some exist)? On a normal one I see those changes and can interactively apply what I need.
In case there's a bug somewhere, I'd recommend to make a backup of your sources before any SVN-updates.
For debugging, you could make a checkout so you're up-to-date, then change one file so TortoiseSVN will mark it. Now do a checkout again and see what happens - anything in the log?
Title: Re: Medikits
Post by: criusmac on October 16, 2009, 12:11:24 pm
I doubt it's a bug, because someone would have noticed it before it got released.

I'm fairly sure it's me doing something wrong.

My changes are easily replaced, sorta. I just hope I don't introduce old bugs where I had fixed them before.

It's slowing me down a bit, but with how little time I spend coding these things, I doubt it'll be missed.

I spend 2 hours tonight trying to catch up to where I was. I haven't succeeded yet, but in another 2 hours I should have g_combat.c caught back up. Not sure how many other files got lost, but most of them are still present.

As far as I know, if you downloaded the latest copy via update, it won't do a thing since you have the same revision as was last reported on the server. It saves the revision numbers in hidden directories for each file. I have noticed that a full update and revert does not seem to fix problems as well as redownloading the entire trunk/latest revision does. This confuses me, since it really should.
Title: Re: Medikits
Post by: criusmac on October 23, 2009, 05:03:10 pm
I have caught up to where I was coding now, and am starting to advance again.

I wanted to issue a warning about how fast hospitals might be healing now, it may need to be lowered.
As mentioned earlier in these posts, wounds will heal individually, which means:
If you have:
one person with 5 wounds with 5 hit points per wound
versus
one person with 1 wound with 25 hit points in that wound

the person with 5 wounds will heal 5 times faster than the person with 1 wound.

I don't know if this is realistic or not, so let me know if it isn't too.

I really wanted to stress this and make certain it is understood since it is a fairly big change that will likely need balancing, or other code changes.
If you want me to make the code changes to hospitals to lower their rate of healing or something, please let me know.
Title: Re: Medikits
Post by: criusmac on October 23, 2009, 05:19:24 pm
While I was updating my TODO list in this forum, I noticed I have earlier mentioned that percentage of wound damage is the % it affects skills. I read all the following posts again, and saw no one had issue with that.

So, for now that's how I'll implement it, and someone else can add scripts later if they so desire.

I will try to add the effects of wounds on the body (reduced abilities).
--The amount of reduced abilities will be the current value of the wound as a percentage.
--IE: If the wound currently is 20% of a person's total hp, they will receive a 20% penalty to all associated abilities.
Title: Re: Medikits
Post by: criusmac on October 23, 2009, 05:44:51 pm
While adding in accuracy decrease due to head and arm injuries, I noticed in g_combat.c:G_ShootSingle:

Code: [Select]
/* Calculate spread multiplier to give worse precision when HPs are not at max */
injurymultiplier = GET_INJURY_MULT(ent->chr.score.skills[ABILITY_MIND], ent->HP, ent->chr.maxHP == 0 ? 100 : ent->chr.maxHP);
Com_DPrintf(DEBUG_GAME, "G_ShootSingle: injury spread multiplier = %5.3f (mind %d, HP %d, maxHP %d)\n", injurymultiplier,
ent->chr.score.skills[ABILITY_MIND], ent->HP, ent->chr.maxHP == 0 ? 100 : ent->chr.maxHP);

anyways, the code I'm adding to this function before this call is:

Code: [Select]
/* Get accuracy value for this attacker. */
acc = GET_ACC(ent->chr.score.skills[ABILITY_ACCURACY], fd->weaponSkill ? ent->chr.score.skills[fd->weaponSkill] : 0);

acc -= ((G_ActorAccuracyDecreaseByWounds(ent) / 100) * acc);      <-- This line only.

/* Get 2 gaussian distributed random values */
gaussrand(&gauss1, &gauss2);

Let me know if I should do this a different way, for now injuries will be counted twice -- once due to arm and head injuries, and a second time via total hp missing.. Not sure if that's too much or not.

(Edit) This is appearing on page 12, so I'd like to mention I posted 2 other posts on page 11 today, be sure to check them out too since I doubt the board will show them...
Title: Re: Medikits
Post by: criusmac on November 04, 2009, 04:59:08 am
It's going to be a long time before I can get back to working on this, so here is the work I've done so far.

None of it has been tested successfully (mostly due to my version of the game just not working right), and it is far from complete, but if someone else feels the want to continue with this, here it is. I will probably be able to return to this eventually, but I can't for now.
Title: Re: Medikits
Post by: Mattn on November 04, 2009, 07:07:38 am
opened a patch tracker item for this: https://sourceforge.net/tracker/?func=detail&aid=2891685&group_id=157793&atid=805244
Title: Re: Medikits
Post by: criusmac on December 11, 2009, 06:15:03 am
I have finally gotten some more free time, but I suspect this will only last for about 3 weeks. I'll see what I can complete in this time.

First off, I'll need to figure out how to modify the people you look at so you can tell how much they are wounded. This is going to be a fairly time consuming change though, since it needs to be reflected both during battle, and in the geoscape.
Title: Re: Medikits
Post by: theotherhiveking on December 11, 2009, 05:26:56 pm
Oh well, Near the crouching icon theres some empty space, you could add little icons there representing the damaged part, of a color dependant of the severity of the wound so the info is obvious and easily accesible. Putting it only in the status tab could be confusing for new players.

For eye candy we can have idle animations for wounded and very wounded soldiers, but those would need to be very generic.
Title: Re: Medikits
Post by: criusmac on December 11, 2009, 10:00:37 pm
Hmm. Maybe it would be confusing..

Well, it sounds like you are suggesting a basic colour coded picture depicting the injured parts of the body. Since there are only 4 parts that have any effect (head, arms, chest, legs), this wouldn't be too hard to do... It would however take some time and rearranging to figure out.

It may make more sense to have a popup on the picture to indicate the actual damage, if they are interested.. But I'm probably getting too far ahead of myself. I'll look into it more to see if there's an easy way to do this. It does sound more involved than displaying more information on the status screen, but it does sound better.

As for idle animations, that is not something I will ever touch. Such a change will work fine even without my medikit changes, and it would not need to be changed. So, this sounds more like an unrelated feature request, and I'm all for it.
Title: Re: Medikits
Post by: homunculus on December 19, 2009, 12:24:32 am
in my mind the main problem with bodypart wounds (rather than just one total wound level bar) is that the bodypart wounds need some screen to be opened and are not immediately visible for the player.
therefore i would say i am somewhat excited about theotherhiveking's suggestion.