UFO:Alien Invasion

Technical support => Feature Requests => Topic started by: homunculus on March 22, 2012, 12:17:18 pm

Title: Bleeding wounds
Post by: homunculus on March 22, 2012, 12:17:18 pm
I wonder what became of the wounds system that was attempted a few years ago?
I remember it was attempting to implement wounds by bodypart, with each bodypart wounds having special effects.

As back then, I would still suggest a simpler generic wounds level that would be simple enough to display to the user as a bar in battlescape HUD, rather than making the user open a special window to see the details.
The basic idea is to add a blood pressure bar and to split the health bar into:
1) undamaged health points--undamaged vs total health points affect general efficiency of the soldier's stats.
2) bleeding wounds--reduce blood pressure (quickly enough, so that treatment must be urgent).
3) treated wounds--do not bleed but also do not count as undamaged health points as far as soldier stats are concerned, and needs to heal in a hospital.
The additional blood pressure bar might have some effect on stats, and would cause unconsciousness and death if it drops low.
Title: Re: Bleeding wounds
Post by: geever on March 22, 2012, 01:31:17 pm
The guy started implementing the system has disappeared...

He uploaded the half-patch to the tracker, but noone has picked up the line yet.

-geever
Title: Re: Bleeding wounds
Post by: Kahvipannu84 on April 10, 2012, 06:00:20 pm
How about making Medikits one time use items? Or have them have clipsize of 1, and make the clip so big you couldn't carry it with soldiers, so that using it on field would make it empty without reloading possibility, but in base they could be "recharged" instead just making new ones, if it is possible.  ???

They are easilly exploited now on battlefield, since you can heal all soldiers there completelly, and no healing is needed at base. Ofcourse it's up to player if to use them or not, but something like this would make temporary solution for it.
Title: Re: Bleeding wounds
Post by: DarkRain on April 10, 2012, 10:01:31 pm
In fact in my game I’ve modded the medikit to have only 5 shoots per battle (recharged at the base) and halved effectiveness, it's still overpowered  :-\ maybe one use per battle would work indeed (keeping the halved effect otherwise even a single heal can recover nearly 50% HP of a soldier).

It's a simple mod, as it only needs a little tweak to the scripts, but adding ammo to the medikit also renders it un-throwable, but it's a minor concern as all my soldiers carry a medikit, you see, tough I consider it an exploit it doesn't prevent me from using it (it's the devs fault for making the system exploitable :P), tough all my dropship bases have a hospital and any soldier that happens to return wounded (like getting shoot while killing the last alien) stays for a medical leave.

One of these days I might hack a simple bleeding wounds system into my game and stop myself from using exploits :)

Edit: I forgot to mention  that my modifications also render the medikit unusable in skirmish (same problem than the stun rod)... that idea of the un-equipable clip might help.
Title: Re: Bleeding wounds
Post by: Kahvipannu84 on April 12, 2012, 10:36:29 pm
Yeah, I too know it's a exploit, but still use it in the battlefield.. I play "no reloading a game" style, and try to keep my veteran soldiers alive anyway possible. It would be dumb to not use med-kit at all, since on hard difficulty aliens seem to wound a lot of your soldiers on the battlefield, but using it feels cheating.. :/

If you do changes that make it one use, lowers it effectiveness, bleeding wounds, or similar, could you post them here to the forums?
Title: Re: Bleeding wounds
Post by: homunculus on April 13, 2012, 12:12:27 am
As far as I remember the previous bodypart wounds attempt, coding started when the idea was still underspecified, and ran into a lot of clarifications about contradictions and special cases.
And, I may be confusing it with some other project, but as far as I remember, the coder quit when he was asked to follow formatting conventions.

Myself I do not quite believe 1 to 3 hp bleeding per turn would have the desired bleeding effect (that is strictly my opinion, though).
Therefore I think a wounds system should make the difference between unharmed health points and treated wounds, at least (with the stat reduction effects).
Title: Re: Bleeding wounds
Post by: DarkRain on April 13, 2012, 07:19:16 pm
@Kahvipannu84
Attached is what I'm currently using: 5 shoot per medikie per battle -reloaded at the base-, with halved effectiveness, but makes it un-throwable and does not work in skirmish mode, just uncompress and drop it in your <ufoai install dir>\base\ufos (if there isn't an ufos dir just create one) OR in %APPDATA%\UFOAI\<version>\base\ufos (again create "ufos" if needed).

You can also tweak it to your liking, just open the .ufo file with a plain text editor (with utf-8 support), you'll see the first entry is the one for the medikit, you can change
Code: [Select]
ammo 5 to something else to change the shoots per battle and
Code: [Select]
damage "-20 10" to change how much it heals (original was "-40 20" so it would heal between 20 an 60 HP)

Adding bleeding wounds, requires changing the game's code, what I  have in mind is pretty simpler than the official design (http://ufoai.org/wiki/index.php/Gameplay_Proposals/Medikits), but still would require you to be able to recompile the game
Title: Re: Bleeding wounds
Post by: Kahvipannu84 on April 13, 2012, 07:27:49 pm
Thank you, exactly what I looking for  :D One thing, will these changes be save-game compatible, or do I have to start new game?
Title: Re: Bleeding wounds
Post by: DarkRain on April 13, 2012, 07:35:40 pm
Adding them to an existing campaign shows no ill effects, tweaking them afterwards also works well, removing the changes only breaks the HUD (it keeps showing the ammo count) but I've experienced no other ill effect.
Title: Re: Bleeding wounds
Post by: DarthLuca on April 18, 2012, 11:07:11 am
I can see that an overhaul of this is on the proposal list but I just wanted to add my 2pw.
The primary use of the medikit should be to heal 'fatal wounds'. Obviously means that a 'wounding' or 'Bleeding' system IS needed. A Medikit should not be able to heal faster than the hospital at least not once a mission is finished (i.e. Tempory battlefield healing could be allowed simulating painkillers and stimulants), wounds taken to a battle can NOT be healed.
Title: Re: Bleeding wounds
Post by: homunculus on April 18, 2012, 06:31:56 pm
In my mind the main flaw of the current system is that after getting a few band-aids, the soldier is "as good as new".
Therefore, in my mind the most straightforward change would be:

treated wounds != healthy

Treated wounds would not be getting worse, but they would still need to be healed in hospital.
And stats would depend on the healthy part.
I think it would do the trick.

I might be willing to specify this kind of wounds (generic wounds, not wounds-by-bodypart which is imho too complicated), with blood pressure bar and without, and post it here for public review and input (I don't believe very much in such kind of spec coming from the top of the head of one person).
That is, if someone is interested in implementing a wounds system and would find such spec useful, either as a spec for implementing generic wounds, or even as just another opinion about the wounds system (= for diversity).
(I might do some battlescape GUI things, but I am definitely not going to dive into the C part of the game)
Title: Re: Bleeding wounds
Post by: DarkRain on April 18, 2012, 09:50:48 pm
Well in my personal implementation (yes I just made a simple one) the basic purpose of wounds is to limit medikit usage: only wounded soldiers are actually healed and wounds disappear on treatment or end of battle, but that combined with the above nerfing of the medikit should mean that soldiers have to heal most of the HP lost form all but the lightmost injuries in the hospital, or that's the plan, it probably isn't the best system (and still needs tweaking) but is enough while I wait for the official one.
Title: Re: Bleeding wounds
Post by: MCR on April 18, 2012, 10:49:22 pm
Well in my personal implementation (yes I just made a simple one) the basic purpose of wounds is to limit medikit usage: only wounded soldiers are actually healed and wounds disappear on treatment or end of battle, but that combined with the above nerfing of the medikit should mean that soldiers have to heal most of the HP lost form all but the lightmost injuries in the hospital, or that's the plan, it probably isn't the best system (and still needs tweaking) but is enough while I wait for the official one.

Where is the patch ?   ??? ;)

You are the one to bring us the first part of "the official one". Congratulations .  8)
Title: Re: Bleeding wounds
Post by: DarkRain on April 19, 2012, 08:10:46 pm
Wait what? Hold on! You want me to create a patch? But... but...

Didn't the last one to make a patch about this just suddenly disappear without trace?

...

NOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO I don't want to disappear without trace!!!!! :'(

...

...

Ok, maybe that was exaggerated.
Hmmm... I need to fix one little problem, and test it some more, and then I might have a patch to show (If I don't disappear in the process :-\)
Title: Re: Bleeding wounds
Post by: geever on April 19, 2012, 08:57:49 pm
Wait what? Hold on! You want me to create a patch? But... but...

What about continuing the lost one's?

Ofc. I'm interested in your implementation, just it had more features planned. Well, any patch is welcome!

-geever
Title: Re: Bleeding wounds
Post by: DarkRain on April 20, 2012, 12:21:27 am
Well, guess that I could do both, start with a very basic implementation and then add more features as needed.
Title: Re: Bleeding wounds
Post by: ShipIt on April 20, 2012, 06:46:13 am
Wait what? Hold on! You want me to create a patch? But... but...

Didn't the last one to make a patch about this just suddenly disappear without trace?

...

NOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO I don't want to disappear without trace!!!!! :'(

...

...

Ok, maybe that was exaggerated.
Hmmm... I need to fix one little problem, and test it some more, and then I might have a patch to show (If I don't disappear in the process :-\)

There is only one answer to this. Listen (http://www.youtube.com/watch?v=bSWVi3X1ho4).
Title: Re: Bleeding wounds
Post by: DarkRain on April 22, 2012, 06:25:52 am
Guess what, I haven't disappeared yet (OK, enough of that joke)

After some git problems I present "Very basic bleeding wounds" v1.3, now with more tweaks, more comments and a bugfix:
Warning: Only tested in 2.5 skirmish and briefly in a mid-game 2.4 campaign (which is where it started) no idea how will this mix with the new 2.5 weapon balance in a campaign game (I'm specially concerned about early game)

Now if I'll continue to add features to this I'd like t ask some questions, which I forget, its getting late, maybe I'll ask tomorrow, in he mean time:


The idea being that each Phase is fully functional when finished, in case I disappear (OK, seriously enough of that disappearing stuff)

Feedback welcome.

Note: the attached patch was made from three local commits squashed together.

PPE: Ugh, do you know how hard is to type while sleepy? Please excuse any typos, weird grammar, etc
Title: Re: Bleeding wounds
Post by: ShipIt on April 22, 2012, 09:11:35 am
Thats really great news.  :D
Title: Re: Bleeding wounds
Post by: Mattn on April 22, 2012, 11:22:37 am
great - i've added it to the patch tracker: https://sourceforge.net/tracker/?func=detail&aid=3520253&group_id=157793&atid=805244
Title: Re: Bleeding wounds
Post by: Mattn on April 22, 2012, 11:47:07 am
fix for bug #3322633 is now in master and ufoai_2.4 branch
Title: Re: Bleeding wounds
Post by: DarkRain on April 22, 2012, 04:28:39 pm
Been thinking, the official design for the health system call for randomly localized wounds, will this info (wounded body part) be shown to the player? I'd say don't because I can totally see a complaint in these lines:
Quote
My guy just was shoot by an alien with a plasma pistol, from a lower level, throughout a window, while he was crouched (ie, he could only have been headshot) and he was wounded in the foot! err... I mean the legs! How come?
On the other hand showing the player the penalties caused by the wounds might be necessary, so instead of having head wounds, arm wounds, torso wounds and leg wounds we could have sight impairing wounds, grasp impairing wounds, reaction impairing wounds and movement impairing wounds, what do you think?
Title: Re: Bleeding wounds
Post by: H-Hour on April 22, 2012, 04:58:28 pm
Personally, I think localized wounds would be a very interesting addition to the battlescape, but they need to be done correctly to avoid exactly the kind of situation you describe (when a soldier is injured somewhere they shouldn't be). There is also the issue of properly displaying this to the player.

However, I think neither problem is surmountable assuming the wounds are implemented correctly. And it would allow for opportunities in the future for things like you mention: localized wounds leading to localized problems. A leg injury could increase TU cost of movement. An arm would could reduce accuracy.
Title: Re: Bleeding wounds
Post by: homunculus on April 23, 2012, 11:09:54 pm
Personally, I think localized wounds would be a very interesting addition to the battlescape [...]
that's sad, i feel it might shift the focus of the game to a hospital/first-aid tycoon type of game.

and, as far as i remember that current spec, there will be some harassment to the player, like maybe the soldier lost his arm and leg, and got bitten by a mosquito.
as far as i understand, there is a case where the mosquito bite would have to be be treated first.

and not only that, but what if the first priority is that the soldier just needs to shoot accurately, or else maybe the first priority is that the soldier needs to move somewhere.
if the treatment of the wounds depends on the order the wounds were inflicted, the player cannot make the choice.

and isn't it so that the location of the wound is chosen randomly, regardless of where the soldier actually got hit?
if that is the case, why not be honest and show things the way they really are?
and avoid the rolleyes like 'the soldier only had head visible but got shot in the legs'.

not only does this look too much (imho) like a first-aid tycoon, but also it seems largely broken, at least the way it is speced now (the way i remember), and also defeats the purpose of 'interesting' to a considerable extent by not really enabling any tactical decisions.

i wonder what it would end up like, when fully specified without those (and probably some more) problems, and what the gui would be like (recently someone complained about having to click 13 times to use a medkit).
looks bit scary/discouraging to me, while on the other hand sometimes less can be more.

i think so far no one has really tried to explain why localized wounds would be a good thing and what it would add to the game, compared to generic wounds.
maybe someone could make a start, and hopefully the whole thing would get clarified in the process?
Title: Re: Bleeding wounds
Post by: Mattn on April 24, 2012, 07:12:10 am
we are doing traces to determine a hit or no hit - these traces can also be used to determine the location of the hit - if the face is not visible, the face can't get hit (because the trace doesn't hit)
Title: Re: Bleeding wounds
Post by: ShipIt on April 24, 2012, 09:33:13 am
Personally, I think localized wounds would be a very interesting addition to the battlescape, but they need to be done correctly to avoid exactly the kind of situation you describe (when a soldier is injured somewhere they shouldn't be). There is also the issue of properly displaying this to the player.

However, I think neither problem is surmountable assuming the wounds are implemented correctly. And it would allow for opportunities in the future for things like you mention: localized wounds leading to localized problems. A leg injury could increase TU cost of movement. An arm would could reduce accuracy.

I remember a game using a system like that. Of course in this game it is also possible to aim at a certain body part. Sick, but lot of fun.

For UFO AI, if localized wounds are implemented, it should be like H-Hour said. Of course it would be needed to visualize this for the player. Not only for his own squad, but also for visible enemies.
Title: Re: Bleeding wounds
Post by: DarkRain on April 28, 2012, 03:53:57 am
I decided that for now I will stick with the official design (which is here (http://ufoai.org/wiki/index.php/Gameplay_Proposals/Medikits) just for reference) as much as possible, so random body parts wounded it is -- at least for now --, if I manage to implement all (or most) that is planned I'll see what improvements can be done afterwards.

So first question, what does people (devs) say:
a) Wounds with flat penalties and bleeding rate, regardless of the severity of the hit that caused the wound or
b) Wounds have different severities depending on the severity of the hit that caused the wound with penalties and bleeding rate varying accordingly.

Second: What does this mean?
Quote from: BTAxis (wiki)
Wounds on the torso increase the amount of TUs needed for reaction fire.
a) More TUs spent for each reaction fire shoot
b) Enemy needs to use more TUs before soldier can make a reaction fire shoot
c) Both?

Also, since project just switched to C++
linkedList_t or C++ containers?
struct or class?
(in case I need to store more info on the wounds and/or a list of them)


Seems my previous question stirred things more than I intended...
as far as i remember that current spec, there will be some harassment to the player, like maybe the soldier lost his arm and leg, and got bitten by a mosquito.
as far as i understand, there is a case where the mosquito bite would have to be be treated first.
Assuming wounds differ from each other in severity, what if all of them have the same bleeding rate, losing an arm could be as threatening as a mosquito bite, the spec says nothing about this.

Quote
what if the first priority is that the soldier just needs to shoot accurately, or else maybe the first priority is that the soldier needs to move somewhere.
if the treatment of the wounds depends on the order the wounds were inflicted, the player cannot make the choice.
No, first priority is survival of the patient, so worst wound gets treated first (assuming wounds have different degrees of severity), no choice to make here.
Problem is, the current system has people used to think "oh my soldier almost dies from that shoot, I'll just patch him up so he can keep fighting as if nothing happened", when in fact they should be in dire risk of dying, and unable of shooting accurately, moving freely, seeing clearly and/or reacting quickly.
*unless all wounds have the same severity, then you would probably be right

Quote
(recently someone complained about having to click 13 times to use a medkit).
I remember this one, he got his count wrong, you need up to 11 clicks only, count them in his very example (http://ufoai.org/forum/index.php/topic,5266.msg42278.html#msg42278), but note that using a sidearm requires the same number of clicks, and using a grenade requires up to 8, problem is in the UI in general not just the medikit.
Title: Re: Bleeding wounds
Post by: homunculus on April 28, 2012, 08:44:51 am
my highest priority question: "what is to be gained by individual bodypart wounds over generic wounds?" seems to be answered almost not at all (the only relevant statement was that the bodypart that gets hit must at least be visible to the shooter, and maybe it could be understood as the shooting visual also matches where the wound will be).

I sort of hoped that this question would not be considered as my personal perverted interest in such things, but rather as a question that the coders and designers might want to have a clear answer to, before deciding this way or that.

sadly, it seems i was wrong, and the decision seems to be made without.

that being said, i am not going to start a holy war about it, it would only do more harm rather than benefit.
[...]Seems my previous question stirred things more than I intended[...]
no need to panic, that is just the way i post.
I see some arguments against bodypart wounds, and i just listed what came to mind at that moment.
no more, no less.

anyway, there is something else:
the more severe the bleeding, the less damaging the initial hit can be without compromising firepower too much.
afaik, it is desired that there should be less 1-hit kills.
i read people posting about 1-3 health points bleeding damage, i don't think that would be enough for this insta-kill reduction effect.
Title: Re: Bleeding wounds
Post by: DarkRain on April 28, 2012, 06:55:49 pm
my highest priority question: "what is to be gained by individual bodypart wounds over generic wounds?" seems to be answered almost not at all
Well since I'm not a game designer I expect to gain the answer to that once I'm done with the implementation ;D

[...]Seems my previous question stirred things more than I intended[...]
no need to panic, that is just the way i post.
I see some arguments against bodypart wounds, and i just listed what came to mind at that moment.
no more, no less.
I didn't say that only because of your post mind you, the fact that I only replied to your post is because I managed to accidentally delete a good part of my post while typing, and wasn't in the mood to write everything again.

we are doing traces to determine a hit or no hit - these traces can also be used to determine the location of the hit - if the face is not visible, the face can't get hit (because the trace doesn't hit)
I knew about the traces, but I don't feel like implementing localized hits at this time (just as I don't feel like implementing the visibility system, just for the visibility penalty specified for head wounds), maybe after I finish the current spec I can take a look at those traces...
Also that won't help with AOE attacks (spldmg)

I remember a game using a system like that. Of course in this game it is also possible to aim at a certain body part. Sick, but lot of fun.
Well IIRC it was decided that in UFOAI there will be no aiming at body parts.

Quote
Of course it would be needed to visualize this for the player. Not only for his own squad, but also for visible enemies.
I think showing this info for enemies would be too much problem for little gain, add to that I'm not very good with UIs and....
Title: Re: Bleeding wounds
Post by: homunculus on April 29, 2012, 02:01:45 pm
I remember a game using a system like that. Of course in this game it is also possible to aim at a certain body part. Sick, but lot of fun.[...]
[...]Well IIRC it was decided that in UFOAI there will be no aiming at body parts.[...]
i think that there might have been a misunderstanding here.
ShipIt wrote 'a certain body part', not 'bodyparts', and i don't think this would necessarily mean the same thing.
afaik, some aliens don't even have that bodypart, afaik specifically ortnoks are castrated, so there would certainly be a problem with that in ufo:ai.

(and i wonder if there will be any opinions by anyone on the severity of bleeding?)
Title: Re: Bleeding wounds
Post by: DarkRain on April 29, 2012, 05:40:13 pm
ShipIt wrote 'a certain body part', not 'bodyparts', and i don't think this would necessarily mean the same thing.
So? No aiming to bodyparts in general, and certainly no aiming for that certain bodypart, I won't code it anyway (least I'll need to get some huge armoured diapers for my soldiers ::) )

Quote
(and i wonder if there will be any opinions by anyone on the severity of bleeding?)
I want to know this too, I'm of the opinion that a bleeding of 1-3 HP might not be enough for a sense of urgency, on the other hand, its not very likely that soldiers survive more than a couple shoots in a row with the new weapons balance, and if they get down to 4-6 HP after one shoot (I've seen it happen) a bleeding of 3 HP could kill them in a couple turns...
Title: Re: Bleeding wounds
Post by: H-Hour on May 01, 2012, 09:57:20 pm
Hi Darkrain. Thanks for taking on this project. My thoughts on your questions:

1. I would like wound severity to be based on severity of hit -- but with a minimum threshold. What I mean is: an unarmored human who takes a hit to the torso should not develop a wound unless that hit is larger than, say, 15-20 damage. Then it could scale up depending on severity. (A later implementation could scale the threshold based on the armor -- an armor that protects the head but doesn't protect the arms might only need 20 damage to get a wound on the arm, but 50 to get a wound on the head, etc.). (Actual numbers will need to be tested and balanced.)

2. I believe the original intention was for both, but I'm not sure if this is possible with aDuke's recent implementation of reaction fire -- which is a straight up TU-for-TU comparison. If you have trouble with implementation it might be worth discussing other wound possibilities for torso.
Title: Re: Bleeding wounds
Post by: DarkRain on May 02, 2012, 12:06:21 am
Ok, then most work on phase two is done just need to tweak the different formulae for the various penalties and bleeding, and the chances of each type of wound appearing, and the client side stuff, will also need to double-check if things are working as expected for the reactionfire stuff...
Title: Re: Bleeding wounds
Post by: TrashMan on May 02, 2012, 10:24:51 am
http://ufoai.org/forum/index.php/topic,6568.0.html
Title: Re: Bleeding wounds
Post by: MCR on May 02, 2012, 12:48:55 pm
Darkrain, is there an ETA for that feature ?

If you need help with coding UI or HUD features, just shout. :)
Title: Re: Bleeding wounds
Post by: DarkRain on May 02, 2012, 08:43:14 pm
@MCR: you know how this works, it's done when it's done (read: when I have the time and mood to do it), but I could use some ideas for the UI and HUD parts of the project.
Title: Re: Bleeding wounds
Post by: homunculus on May 02, 2012, 10:25:01 pm
Quote from: wiki
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.
so, there is first, second, third and fourth health bar for the bodyparts (arms, legs, body and head), and the fifth health bar (= the main health bar) for blood pressure, right?
Quote from: wiki
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.
that sounds good, and as i understand the wiki spec, the main health bar (the blood pressure bar) is healed instantly by blood transfer (at least i don't see any mention of healing the main health bar in hospital).
Quote from: wiki
Wounds are treated in the order they were inflicted.
me suspicious about this one.
1. what if soldier got hit in the arm, and then leg, and then arm again?
will there be two wounds on the arm, or will the existing wound on the arm get more severe?
if there will be a second wound on the arm, the wound list might get long.
if the wound on the arm will get more severe, the spec is ambiguous about which wound should be treated, arm or leg.
2. the soldier might be bleeding to death from another wound while some smaller wound is being treated first.

[...]1. I would like wound severity to be based on severity of hit -- but with a minimum threshold.[...]
should this depend also on damage type, like suggested by TrashMan in the other thread?
maybe some damage types might have higher % of damage as wound?
that would mean those damage types that have lower wounding % should have higher hit damage, though, and more 1-hit kills.

--------
edit: another question here:
Quote from: wiki
Wounds are treated in the order they were inflicted.
3. what happens when the arm has wound, the arm wound is treated, and the soldier gets hit in the arm again?
will there be 0..n wounds on the arm, or will the old wound on the arm become untreated or will there be a wound on the arm that is half-treated and half-bleeding?
Title: Re: Bleeding wounds
Post by: DarkRain on May 12, 2012, 03:25:54 pm
Hey people, you thought I had disappeared didn't you? ;)
Well I didn't, I've just had some very hard days, the worst seems to be over so I should be able to come back to this project in the next days, just thought I'd let you know.
Title: Re: Bleeding wounds
Post by: H-Hour on May 12, 2012, 03:33:11 pm
Nice to see you back!
Title: Re: Bleeding wounds
Post by: Mattn on May 12, 2012, 06:20:32 pm
nice to hear that - we are waiting for bleeding wounds ;)

btw. decals in the renderer to show the bleeding wounds in the map would be nice, too
Title: Re: Bleeding wounds
Post by: Crystan on May 12, 2012, 06:59:34 pm
we are waiting for bleeding wounds ;)

That sounds a little bit awkward :D
Title: Re: Bleeding wounds
Post by: DarkRain on May 12, 2012, 11:44:43 pm
While working on my patch the following part of the code catched my attention:

In AI_SearchBestTarget() (g_ai.cpp):
Code: [Select]
501                         /* take into account armour */
502                         if (CONTAINER(check, gi.csi->idArmour)) {
503                                 ad = CONTAINER(check, gi.csi->idArmour)->item.t;
504                                 dmg *= 1.0 - ad->protection[ad->dmgtype] * 0.01;
Note: I'm pretty sure that this should be fd->dmgweight instead here ^

I don't think that the objDef for an armour is meant to have a damage type, in any case it could be fd->obj->dmgtype for the weapon's damage type, but the armour's?
Title: Re: Bleeding wounds
Post by: Mattn on May 12, 2012, 11:54:24 pm
you are right - please post a patch that we can give the credits to you ;)
Title: Re: Bleeding wounds
Post by: DarkRain on May 13, 2012, 12:03:17 am
Patch attached, I'll post it in the patch tracker if needed when I'm back home later

Ok, I moved the patch to the tracker.
Title: Re: Bleeding wounds
Post by: DarkRain on May 15, 2012, 07:22:40 pm
Hmm...
Seems that each time I go to test my recent modification of this patch I find some new bug... and I haven't yet got to the bugs that I'm no doubt introducing with my changes:

When I made the medikit have limited ammo, I stumbled on bug #3322633...
I try to test the new fire mode for revitalizing stunned actors, and I'm hit with bug #3510632...
That's out of the way, but now:
Did you know that it is currently impossible to shoot (and thus use the medikit on) a stunned actor?
*mumble mumble mumble*

I'm starting to understand why the others that tried this disappeared...
(Just kidding)
Title: Re: Bleeding wounds
Post by: kurja on May 15, 2012, 08:06:43 pm
is it possible to target someone on the ground if you change aim elevation with shift?
Title: Re: Bleeding wounds
Post by: DarkRain on May 15, 2012, 08:25:24 pm
is it possible to target someone on the ground if you change aim elevation with shift?
You might think so, but as far as the game is concerned both dead and stunned actors are immaterial (they aren't solid objects) so your shoot will go right through them and to the ground.

I can fix this, I think, if I can avoid a regression of bug #3053299 (http://sourceforge.net/tracker/index.php?func=detail&aid=3053299&group_id=157793&atid=805242)

PPE: you can still hurt them with splash damage weapons, as AOE damage doesn't use traces to hit targets
Title: Re: Bleeding wounds
Post by: Kildor on May 16, 2012, 04:45:18 am
DarkRain, we believe in you! :-)
Title: Re: Bleeding wounds
Post by: DarkRain on May 17, 2012, 11:10:03 pm
Hi again,

If there are any beta-testers out there that can help me test the attached patch, I'd be glad to have feedback from you, it makes it possible to hit stunned actors with direct fire weapons, in my tests it seems to work right, without any of the nasty side effects of the bug I posted above, but I've tested it mostly firing at my own soldiers in skirmish mode, so if anyone can test how does it work with aliens, I'd like to hear your results just to be sure.
Title: Re: Bleeding wounds
Post by: Mattn on May 17, 2012, 11:24:23 pm
what happens if a living actor is standing on a stunned actor? and does a stunned actor now block fire if i try to shot an opponent behind it?
Title: Re: Bleeding wounds
Post by: DarkRain on May 17, 2012, 11:46:02 pm
what happens if a living actor is standing on a stunned actor?
In my test both the living and the stunned actor are possible to hit, depending on the height of the shoot.
If the shoot goes above the bbox of the stunned actor, the living actor should be hit, otherwise any of the two, presumably the first one entity-wise.

Quote
does a stunned actor now block fire if i try to shot an opponent behind it?
Only if the shoot goes close to the ground.
Title: Re: Bleeding wounds
Post by: geever on May 18, 2012, 02:11:19 am
Promising...

-geever
Title: Re: Bleeding wounds
Post by: Mattn on May 18, 2012, 06:15:09 am
indeed - we can apply it to master to get some feedback.
Title: Re: Bleeding wounds
Post by: DarkRain on May 18, 2012, 05:17:17 pm
Well, I wanted it to be tested more before submitting it for inclusion, but if you think its good enough to go in master, that certainly should provide some good feedback.
Title: Re: Bleeding wounds
Post by: Mattn on May 21, 2012, 09:26:06 am
@DarkRain: the patch is in master now
Title: Re: Bleeding wounds
Post by: DarkRain on May 25, 2012, 02:30:47 am
Hi, guys

The second phase of the 'bleeding wounds' patch is nearly done, wounds now cause penalties to the injured actors, currently everything is hardcoded and wounds -- and their penalties -- will disappear after battle, in phase three I intend to address the later issue and make wounds last after battle in the case of the campaign, but before that, its time for some questions:

1.) What do you think the penalties should be, percentages or some fixed (within a set range) values? Right now I have movement, visibility, and accuracy based on percentages; while shooting and reaction are based on defined amounts.
2.) The same with bleeding, percentages or set amounts? (Currently percentage based).
3.) And the threshold for receiving a wound? (Currently percentage based as well).
Better to get it right now than changing the formulae later.

Also the patch is growing rather large and I'm still in phase two of at least four...
Code: [Select]
git diff --stat origin/master
<snip>
38 files changed, 722 insertions(+), 116 deletions(-)
Title: Re: Bleeding wounds
Post by: H-Hour on May 25, 2012, 02:44:52 am
Personally, I'm in favor of percentages in most cases. I don't like the raw numbers system we use for damagetypes and resistances, because it's very hard to balance properly with different damage levels.

That said, I think that movement penalty should have set penalties. TU cost per grid should be like: unwounded = 2, wounded = 4, severely wounded = 8. The player spends a lot of time estimating movement costs and I'd like to keep it at simple integer addition if possible.

Most other aspects are calculations behind the scenes anyway -- visibility, accuracy, reaction.

Could you explain more about how the shooting penalty based on definite amounts works? Also, I'd be curious to hear more about the threshold percentage. Is it a percentage of the soldier's HP (current/max)?

Looking forward to seeing this in-game!
Title: Re: Bleeding wounds
Post by: DarkRain on May 25, 2012, 03:58:16 am
Personally, I'm in favor of percentages in most cases.
Yes, me too.

Quote
That said, I think that movement penalty should have set penalties. TU cost per grid should be like: unwounded = 2, wounded = 4, severely wounded = 8. The player spends a lot of time estimating movement costs and I'd like to keep it at simple integer addition if possible.
The problem with that, is that adding a 'per grid' penalty requires cutting very deep into the pathing code, (I ran in that problem when I tried to implement an encumbrance system before) so instead I opted for a percent based approach, with a tweak: the percentage is rounded up to the next multiple of 50%, that has a result pretty similar to what you said (currently its equivalent to: unwounded = 2, wounded = 3, severely wounded = 4, but doubling the penalty would have exactly the effect of your example) -- with straight standing moves that is, diagonals and crawling are not so simple due to rounding errors... maybe I could revisit the problem...

Quote
Could you explain more about how the shooting penalty based on definite amounts works?
Since the spec calls for increasing the TU cost for shooting I simply add a penalty of 1 to 5 TU depending on the severity of wounds, I tried a percent based penalty but I felt it was too harsh on the more expensive firemodes -- and since the reaction penalty affects the cost of reaction fire shoots it suffered of the same problem, so I took the same approach for both, but maybe I was just ramping the penalties too high...

Quote
Also, I'd be curious to hear more about the threshold percentage. Is it a percentage of the soldier's HP (current/max)?
Based on soldier's max HP, thought I'd make more sense, specially since aliens can be wounded too, I assumed that sturdier creatures (lots of HP) would be more resistant to wounds.
Title: Re: Bleeding wounds
Post by: H-Hour on May 25, 2012, 11:20:02 am
The problem with that, is that adding a 'per grid' penalty requires cutting very deep into the pathing code, (I ran in that problem when I tried to implement an encumbrance system before) so instead I opted for a percent based approach, with a tweak: the percentage is rounded up to the next multiple of 50%, that has a result pretty similar to what you said (currently its equivalent to: unwounded = 2, wounded = 3, severely wounded = 4, but doubling the penalty would have exactly the effect of your example) -- with straight standing moves that is, diagonals and crawling are not so simple due to rounding errors... maybe I could revisit the problem...

That sounds good, too. If possible, can we make it always round to an integer for each tile? I just want to avoid something where moving 1 tile = 2 TU and moving 2 tile = 5 TU because behind the scenes one tile = 2.4, so two tiles = 4.8. In other words, it should scale from 1 tile to several in a way that is clear to the player.

Since the spec calls for increasing the TU cost for shooting I simply add a penalty of 1 to 5 TU depending on the severity of wounds, I tried a percent based penalty but I felt it was too harsh on the more expensive firemodes -- and since the reaction penalty affects the cost of reaction fire shoots it suffered of the same problem, so I took the same approach for both, but maybe I was just ramping the penalties too high...

I know this just a first-pass and values can be adjusted, but I would recommend a higher penalty. Keep in mind that healing with the medikit costs 20 TU, so the trade-off of using one soldier's entire turn just to avoid a 1-5 TU penalty when firing is not great. You're right, though. With higher penalties wounds will be a big deal for high-TU firemodes, making some weapons virtually unusable (sniper rifles, rocket launcher). I'm not sure that's such a bad thing -- it will effect aimed sniper firemodes, full-auto machine gun, rocket launcher, etc. All of these are firemodes that would be very difficult to do well if wounded.

With a percentage mode, it would mean that a pistol is still able to fire without a great TU penalty, which might be a nice benefit to taking and using low-TU firemodes. But it will introduce irregularities -- like why a wounded soldier should be able to fire a powerful shotgun with little penalty. I could go either way on this.

* Random, overcomplicated idea: might be cool if weapons had a "handling" parameter, that effected reaction fire, wound penalty, etc for difficult to handle weapons. *

Based on soldier's max HP, thought I'd make more sense, specially since aliens can be wounded too, I assumed that sturdier creatures (lots of HP) would be more resistant to wounds.

Sounds good.
Title: Re: Bleeding wounds
Post by: DarkRain on May 25, 2012, 10:39:51 pm
I just want to avoid something where moving 1 tile = 2 TU and moving 2 tile = 5 TU because behind the scenes one tile = 2.4, so two tiles = 4.8.
That's exactly what I meant with rounding error, for example while crouched (or moving in diagonal) moving 1 tile: 3 * 1.5 = 4.5 but due to rounding error becomes 4, but moving 2 tiles: 6 * 1.5 = 9, that might be a problem, hmm... I have an idea.

Quote
Keep in mind that healing with the medikit costs 20 TU, so the trade-off of using one soldier's entire turn just to avoid a 1-5 TU penalty when firing is not great. You're right, though. With higher penalties wounds will be a big deal for high-TU firemodes, making some weapons virtually unusable (sniper rifles, rocket launcher). I'm not sure that's such a bad thing -- it will effect aimed sniper firemodes, full-auto machine gun, rocket launcher, etc. All of these are firemodes that would be very difficult to do well if wounded.

With a percentage mode, it would mean that a pistol is still able to fire without a great TU penalty, which might be a nice benefit to taking and using low-TU firemodes. But it will introduce irregularities -- like why a wounded soldier should be able to fire a powerful shotgun with little penalty. I could go either way on this.
Good points on both options, anyone else has a comment on this?

Quote
* Random, overcomplicated idea: might be cool if weapons had a "handling" parameter, that effected reaction fire, wound penalty, etc for difficult to handle weapons. *
I'm sure its not the first time I hear this idea... Oh yeah, Yatta tried something similar (along with many other tweaks) before: weapon mobility (http://ufoai.org/forum/index.php/topic,4564.msg35244.html#msg35244).
Title: Re: Bleeding wounds
Post by: Mattn on May 31, 2012, 04:06:32 pm
http://ufoai.org/forum/index.php/topic,6728.0/topicseen.html

this might be due to the changes on the target abilities (just a guess)
Title: Re: Bleeding wounds
Post by: DarkRain on June 11, 2012, 10:25:27 pm
Ok, I'm done with wound penalties, and almost done with the campaign side of the patch.
Question: Would be worth it to add wounds to automission?
Title: Re: Bleeding wounds
Post by: kurja on June 11, 2012, 10:46:33 pm
imho, no, if it's not quick and easy to do.
Title: Re: Bleeding wounds
Post by: H-Hour on June 12, 2012, 08:53:00 am
Ok, I'm done with wound penalties, and almost done with the campaign side of the patch.

Nice, looking forward to checking this out.
Title: Re: Bleeding wounds
Post by: Ajpe on June 12, 2012, 02:27:33 pm
Here is my idea for wound system in the game. I'm warning you, my English is not so good and things I want to say are a bit complicated.

1
Everything deals random damage. Of course not flat random, but something like normal/Gaussian distribution.
I don't know, maybe it is already in the game.

2
If HP drops to 0 character is unconscious or dying (same effect for the game mechanics). He just lies and can't do nothing, even can't observe the area. Or even if he can, he can't talk, so others soldiers can't see what he sees, so for the game mechanics he can't see.
I really want more unconscious in battles.

3
If HP drops below -1/2*maxHP character is dead.
Even dead he still should be visible on the soldier list. I hate when I lose a soldier and I don't know or don't remember which one because he is simply evaporated.

4
When character takes single damage (from weapon etc. not from bleeding) there is a chance for taking a wound.
An example formula:
(after taking damage from every single bullet)
damage/maxHP*maxHP/currentHP
Three things should count: power of damage (it's obvious), maxHP (bigger is less vulnerable)  and current HP (because minor wounds, not taken into account by the game mechanics, can become a "real" wound).

I don't know how damages from explosives weapon should exactly work. It would be good if from one explosing character can take more than one wound.

5
Type of wounds:
Location - random, let's say: 15% head, 30% torso, 25% legs, 15% right arm, 15% left arm.
Wounds can be: Light or serious (random). Serious = bleeding, character is loosing some random HP each turn.
Effect from location (examples):
Legs - Light: move cost is double. Serious: character can only crouch, move cost is quadruple.
Head - Light: some penatly to overall accuracy, maybe some chance for stun effect (but I don't know nothing about stun in this game). Serious: same but more, maybe automatic stun or unconscious.
Torso - Light/Serious: character loses some amount of TUs.
L/R Arm - Light: using items and weapon costs more TUs, for weapon less accuracy, for items less effect (for example med kit). Serious: character can't use this hand at all.

Edit:
Medkit - stopping bleeding (x% chances for use).
Drugs - adds some temporary HP (only one effect per battle).
After battle - best medic in team automatically tries to stop bleeding (from most wounded soldiers to least) with bonus for not battle situation and for super medkits in the dropship. Or just blooding is automatically stopped after battle.
Hospitals in bases - heals HP (relatively fast) and makes wounds disappearing (serious to light and light to none). Wounds are healing slower than HP.

Title: Re: Bleeding wounds
Post by: H-Hour on June 12, 2012, 09:41:06 pm
<sarcasm>Hmm, yes, Ajpe is right. DarkRain, please rewrite your wound system from scratch.</sarcasm>
Title: Re: Bleeding wounds
Post by: Crystan on June 13, 2012, 02:53:28 am
<sarcasm>Hmm, yes, Ajpe is right. DarkRain, please rewrite your wound system from scratch.</sarcasm>
(http://images2.wikia.nocookie.net/__cb20120214224911/how-i-met-your-mother/de/images/3/35/Trollface-small-normal2pl7-1.png)
Title: Re: Bleeding wounds
Post by: Ajpe on June 15, 2012, 01:51:42 pm
LOL I just discovered my "invention" here http://ufoai.org/wiki/index.php/Gameplay_Proposals/Medikits It's almost the same, written in 2009.
Title: Re: Bleeding wounds
Post by: DarkRain on June 17, 2012, 06:34:39 pm
It lives!!!
Ok I'll be play-testing for a while before moving to trying to make thing scriptable (or maybe I just want an excuse to relax and play :) )

In the mean time, what do you want to be scriptable? We have wound threshold, the penalties, the bleeding factor, the chance for each part to be wounded (random for now), maybe something else you can think of?
Title: Re: Bleeding wounds
Post by: H-Hour on June 17, 2012, 07:31:28 pm
So, you've got the wounds system implemented then? What's the status? We can apply your changes before you get things scriptable as well. I want to play with it. :)

I think the three things you listed to make scriptable would all be good. Maybe also make hospital heal speed scriptable?

This may be more ambitious than you want to do, but I'd like a system that allowed me to define each wound location and specify both the type and values of penalty, like this:

Code: [Select]
wound leg
{
type tu // can be tu, accuracy, reaction, etc.
value 1  // adds 1 TU to each movement, for example (each type different)
threshold 15 // did we decide percentage of HP integer?
bleed 25 // is this a percentage of the wound's initial damage or what?
}

That way we wouldn't be locked into the existing wound penalty distribution if we decided to change it in the future, add a new type of penalty, etc. Ideally, we could even assign multiple penalty types to one wound type. But only if this gels with your implementation. If it requires a major rewrite of parts of your wound system, then I would say just make scriptable what you can so that we can get it in-game. You can always make improvements or changes at a later stage.
Title: Re: Bleeding wounds
Post by: DarkRain on June 17, 2012, 09:50:13 pm
Current status: Playtesting (aka: catching the nastier bugs that creeped in)

The system already allows to assign any combination of penalties to any body part (just not scriptable ATM), in fact it should be simple to have different properties for different species (it would be even not that hard to have completely different bodyparts for different species if that is desirable, but bear in mind that would probably complicate the UI implementation -- that I'm leaving for last till I know exactly what I have to work with)

Also your example has per-location bleeding factor and threshold, I assume you prefer it that way, instead of a general factor for all body parts? (easy to change -- I had planned for that eventuality)
Title: Re: Bleeding wounds
Post by: H-Hour on June 17, 2012, 10:37:45 pm
Also your example has per-location bleeding factor and threshold, I assume you prefer it that way, instead of a general factor for all body parts? (easy to change -- I had planned for that eventuality)
If we can script wounds per-location, then including per-location bleeding factor and threshold would be nice. If we're not going to have per-location scripting in the first stage (which is perfectly fine), then scripting those elements per-location is not necessary.

And also, thanks for making it scriptable on its first-run. I'd like to see more of our development progress implemented with scripting built in from day one.
Title: Re: Bleeding wounds
Post by: DarkRain on July 01, 2012, 05:00:02 pm
Hey, I'm not dead yet,

and my bleeding wounds systems seems to be playable already! Of course there are at least a couple bug left (that I know of anyway)

first: if someone dies or falls unconscious due to bleeding, the victory screen won't show the right numbers for deaths/stuns

second: "ERROR: Game Error: stuns counter out of sync", in fact this one isn't caused by my modifications (you can get this in master, but some slight modifications make it very easy to reproduce it on demand), but they seem to exacerbate the problem
Title: Re: Bleeding wounds
Post by: ShipIt on July 01, 2012, 08:18:55 pm
Hey, I'm not dead yet,

Thats indeed good news.

And even better, you´re still working on this.

:)
Title: Re: Bleeding wounds
Post by: DarkRain on July 15, 2012, 10:40:52 pm
Hi! I'm back (again)

You can play with the attached patches: there are 15 patches in the attached zip meant to be applied in order, but if you really want to get a single massive patch I can easily provide it

if someone dies or falls unconscious due to bleeding, the victory screen won't show the right numbers for deaths/stuns
I haven't fixed this, the game only keeps count of deaths/stuns caused by shooting, that seems to be by design, but it might need changing, after all if fire fields caused by incendiary weapons are ever enabled to kill things (or if stun gas fields are ever implemented) we'll have the same issue.

Anyway, I'm not completely satisfied with the patch (specially the scripting part), but if you test or take a look at the it feel free to comment.
Title: Re: Bleeding wounds
Post by: Mattn on July 16, 2012, 07:04:10 am
patch 17 can be applied to master already, no?

maybe you want an extra branch for your work? or are you done and only finetuning is left?
Title: Re: Bleeding wounds
Post by: DarkRain on July 16, 2012, 04:37:30 pm
Yes, patch 17 is good to go, it isn't directly related to the wounds system, it was just to make my game less prone to error out of battlescape during testing and I thought it would be nice to include it.

As for the rest, the features of the wiki proposal should be implemented with only some slight modifications (that I deemed necessary), so its pretty much finished, the only part that needs some serious work is the UI part, as it stands it was just for me to have a quick visual of how things were doing during testing.
Title: Re: Bleeding wounds
Post by: Mattn on July 16, 2012, 10:19:22 pm
some style notes:

bodyPartData_t should be named BodyPartData - the getters should be const and inlined

Code: [Select]
- } else if (damage < 0) {
+ } else if (damage < 0){

this patch part is not needed ;)



other than that i really like it. i will try to apply this to master in the next days to get some playtesting feedback.
Title: Re: Bleeding wounds
Post by: DarkRain on July 16, 2012, 10:53:04 pm
some style notes:

bodyPartData_t should be named BodyPartData - the getters should be const and inlined
Speaking of style... did you agree on the new coding guidelines already?

Quote
Code: [Select]
- } else if (damage < 0) {
+ } else if (damage < 0){

this patch part is not needed ;)
:o What the... that obviously wasn't meant to happen :-[

edit:
Ugh I knew I was forgetting something...
I had some AI tweaks in my working branch and patch #8 also touches g_ai.cpp, as a result it won't apply cleanly to master, use the one attached here instead, sorry about that.
Title: Re: Bleeding wounds
Post by: Mattn on July 17, 2012, 08:32:22 am
Speaking of style... did you agree on the new coding guidelines already?

not yet - as i did not yet read everything of it. but the classnames should be upper camel case (we are using this for radiant already, too - just not for the ui (there it's lower camel case and should be fixed))
Title: Re: Bleeding wounds
Post by: Mattn on July 17, 2012, 10:28:08 pm
the patch is applied to master now - thanks again

i've made some minor modifications in an appended patch.
Title: Re: Bleeding wounds
Post by: Sandro on July 18, 2012, 04:55:12 pm
Great! Thanks to DarkRain we finally have a working wounds system :)

But, there are few things that concern me after reading the the patches:

0) Not really related to patch, but "hurt aliens in ufo crash missions" code does not match it's comments -- they assume 5% 15% 30% distribution, while code generates 5% 10% 15%
1) Network protocol has been changed, but it's version is not bumped. If changes are final, we should bump it to avoid misconnections.
2) Maybe that also applies to saved games (not sure, never really checked the code)
3) IMHO, decision to have non-integral TU costs for moving (if I understood the code right) is very, VERY questionable. IIRC there were bugs related to it before. My opinion -- just keep the fixed costs and limit movement by capping max TUs.

Title: Re: Bleeding wounds
Post by: Mattn on July 18, 2012, 09:40:30 pm
0 and 1 are fixed already
2 works - as the wounds system only added new stuff
3 might indeed be a problem - though the code looks sane
Title: Re: Bleeding wounds
Post by: homunculus on July 23, 2012, 02:18:47 pm
@ H-Hour and Crystan being sarcastic @ Ajpe:
well, ajpe was perfectly on-topic : ) except that the thread had turned into a dev thread which is also nice.

tried the 2.5 dev in the weekend, and it seems there is functional wounds system there.

some wounds took several medkit applications to cure, but it was difficult to tell the health points of the wound, or whatever it would be that would let the player estimate how many medkit applications would be needed to stop bleeding.

there were different penalties for wounds on different bodyparts, but the gui just seemed to show exclamation mark icons for wounds, with no visible indication of the bodypart.
i guess the bodypart indication in the icons, or at least in a tooltip that would show the bodypart and the effect (because player might not remember the bodypart--effect table by heart), is probably planned, and the situation will get alleviated.

the differentiation between movement costs and shooting costs (rather than generic stat and time units reduction) seemed too much micromanagement for my taste and felt bit like first-aid tycoon as i expected earlier (movement cost to the next soldier with medkit was the only serious concern, as first aid felt nicely urgent).

and, as far as i understood, there is no such thing as soldier becoming unconscious before death.

the bleeding rate felt high enough, and i guess that fulfills the main purpose (together with medkit not healing a soldier to full health).

btw, i am currently taking another look at my battlescape hud mod from about half a year ago, and i might want those wounds visible in the main screen (preferably as bars), which cvar-s are involved?
Title: Re: Bleeding wounds
Post by: DarkRain on July 24, 2012, 12:40:38 am
[...]
the gui just seemed to show exclamation mark icons for wounds, with no visible indication of the bodypart.
i guess the bodypart indication in the icons, or at least in a tooltip that would show the bodypart and the effect (because player might not remember the bodypart--effect table by heart), is probably planned, and the situation will get alleviated.
[...]
the only part that needs some serious work is the UI part, as it stands it was just for me to have a quick visual of how things were doing during testing.
I'm not good at all with UI design, specially when it comes to creating the art assets needed for it...

Quote
btw, i am currently taking another look at my battlescape hud mod from about half a year ago, and i might want those wounds visible in the main screen (preferably as bars), which cvar-s are involved?
There are no cvars involved at all, I added a callback which is called on opening the window or when the cvar storing the soldier name changes (only works for the currently selected actor) it checks the actor wounds and passes the data to the confunc in charge to display the correct icons.

Quote
as far as i understood, there is no such thing as soldier becoming unconscious before death.
Nope, I considered adding a little stun damage each time a soldier is wounded to get a similar effect, but dropped the idea because stunned soldiers are treated as dead (they are removed form the UI) and there's no way to tell dead units from stunned ones in the field
Title: Re: Bleeding wounds
Post by: Mattn on July 24, 2012, 08:01:57 am
a decal system in the renderer would be cool to get the bleeding visible on the ground surfaces of the map. but that's something for the future.
Title: Re: Bleeding wounds
Post by: homunculus on July 26, 2012, 09:12:42 am
ok, made some icon previews.

1) while it is possible to create somewhat recognizable icons for most bodyparts at that scale, the body wound icon would probably be a trouble.
therefore, i thought that
-in the background there is panel or something, that shows tooltip which lists current wounds and their effects.
-on top of that panel there are images (ghosts) of the bodyparts, colored green, red, or white (which is possible based on grayscale images, afaik).

2) the grown-up human proportions, and even in-game unt proportions made the head too small at that scale, so thought of either abstract (which looked boring) or infant images (a lot of material in public domain fine arts).

i have not tried out how the recoloring works in-game, and if the contrasts are right, etc, because unfortunately, i think i should first try to update my 2.4 hud mod which is broken with the recent reaction fire changes.

and here are some previews with recolored bodyparts (i have the grayscale pieces in xcf files, atm i wonder what peoples opinions are, maybe peeps will tell me that anything but stick figures is not ok):
Title: Re: Bleeding wounds
Post by: homunculus on July 27, 2012, 02:46:50 pm
hmm.. no opinions, which might mean:
1) both are ok
2) both totally suck
3) people are waiting for me to create more variations until i arrive at something agreeable
4) it normally takes at least a month of pondering before taking the responsibility for having an opinion
5) no one is interested in scripting the gui at the moment (and i am busy elsewhere) and therefore this set of images wouldn't be needed immediately (but when those images will be needed one day, then we are not worried about them being ready before that time).

i guess the last option is probably the most likely, so it doesn't make sense to ask if an infant image would be suitable, or if it should be a stick figure.
which, of course, i cannot know for certain, really, as no one has said anything about it.

that being said, i guess i'll drop the matter for now.
i guess i'll check back some time next week maybe, just in case someone has developed some kind of a response by that time.
no guarantee that i am not drawing flying pigs then, and have no interest in cutting infants to pieces :P
Title: Re: Bleeding wounds
Post by: H-Hour on July 27, 2012, 03:55:12 pm
You would probably get more useful comments if you created an image that showed them in-game. You don't have to do the scripting but a screenshot with your stuff pasted in where you want it.

But I feel pretty confident in saying we're not interested in infants, and definitely not in cherubs (or, according to wikipedia, puttos (http://en.wikipedia.org/wiki/Putto)), which you have used here.
Title: Re: Bleeding wounds
Post by: Nokim on July 27, 2012, 09:16:52 pm
i would prefer something in Fallout style but given small size it will be enough abstract...
Title: Re: Bleeding wounds
Post by: Wirelizard on July 29, 2012, 03:00:37 am
Given how small the images are likely to be on the HUD, I'd go with a simple human outline, more like what you see on bathroom doors:

(http://216.92.160.187/wp-content/uploads/2007/12/bathroom-sign-mens-womens.jpg)
(image yanked from somewhere random on the internet, courtesy Google Image Search)

The putti are interesting, but simpler is probably better.
Title: Re: Bleeding wounds
Post by: homunculus on August 01, 2012, 02:30:37 pm
[...]But I feel pretty confident in saying we're not interested in infants[...]
lol, wasn't that difficult, was it : )

i was thinking of this being displayed in the same area where i saw the exclamation mark icons for wounds in a 2.5 hud in physdat window (the one with soldier stats).
but now i think of it, maybe the size and location was a temporary solution, and i might have overdone with the size constraints.
Given how small the images are likely to be on the HUD, I'd go with a simple human outline, more like what you see on bathroom doors:[...]
actually i did already try a very similar thing (searched for icons), but the parallel limbs did not look very good when recolored.

all in all, i understand abstract is the way to go then, or maybe a soldier model from the game if it can be larger than 32x32.

edit: found some better ones, i think:
http://www.easyicon.cn/language.en/icondetail/543273/ (http://www.easyicon.cn/language.en/icondetail/543273/)
http://www.easyicon.cn/language.en/icondetail/543072/ (http://www.easyicon.cn/language.en/icondetail/543072/)

edit:
as a fully patched up soldier would look something like this:
(https://wiki.eee.uci.edu/images/c/c1/Kidsgames07.gif)
then for anything more than just recolored, it might sense to use mummy pictures.

and a  preview of recolored abstract human that i think i rather like myself, with those not parallel limbs, and i think it is easily identifiable.
made the hands slightly longer than original, and i think i might also enlarge the head a bit.
Title: Re: Bleeding wounds
Post by: Unisol on July 14, 2013, 05:27:39 pm
Hello.

First, I want to apologize for necroposting.

Second, I'd like to point out that even though nearly a year has passed, no one bothered to make(or include) bleeding icons.

Third, I present you a set of icons (https://dl.dropboxusercontent.com/u/62073545/ufoai/icons/png/example.png) i prepared today. They are 16x16 and follow current style of "exclamation mark" icon. I have separate hi-res sources for each, so rearranging them or adding to another image (like it's done in /base/pics/banks/pack_message.png) won't be a problem.
Title: Re: Bleeding wounds
Post by: Mattn on July 14, 2013, 06:09:35 pm
cool. thanks. what's the license and where to get the sources. i would like to see them ingame to judge whether they would fit.
Title: Re: Bleeding wounds
Post by: Unisol on July 14, 2013, 07:32:15 pm
Archives with the images can be found here: icons (https://dl.dropboxusercontent.com/u/62073545/ufoai/icons/png/icons.tar), sources (https://dl.dropboxusercontent.com/u/62073545/ufoai/icons/icons%20sources.tar).
These images were created from scratch by myself, and I hereby release them into the public domain.
Title: Re: Bleeding wounds
Post by: DarkRain on July 15, 2013, 05:01:22 pm
I was bored, so I decided to test this, what do you think?
Title: Re: Bleeding wounds
Post by: Mattn on July 15, 2013, 09:32:11 pm
nice, go for it
Title: Re: Bleeding wounds
Post by: DarkRain on July 18, 2013, 07:28:48 pm
Ok, I've added them to master, thanks