project-navigation
Personal tools

Author Topic: Bleeding wounds  (Read 40954 times)

Offline kurja

  • Captain
  • *****
  • Posts: 504
    • View Profile
Re: Bleeding wounds
« Reply #45 on: May 15, 2012, 08:06:43 pm »
is it possible to target someone on the ground if you change aim elevation with shift?

Offline DarkRain

  • Project Coder
  • Captain
  • ***
  • Posts: 746
    • View Profile
Re: Bleeding wounds
« Reply #46 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

PPE: you can still hurt them with splash damage weapons, as AOE damage doesn't use traces to hit targets

Offline Kildor

  • Project Artist
  • Captain
  • ***
  • Posts: 757
  • Project mapper and some other stuff`er
    • View Profile
    • http://ufoai.nx0.ru
Re: Bleeding wounds
« Reply #47 on: May 16, 2012, 04:45:18 am »
DarkRain, we believe in you! :-)

Offline DarkRain

  • Project Coder
  • Captain
  • ***
  • Posts: 746
    • View Profile
Re: Bleeding wounds
« Reply #48 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.

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: Bleeding wounds
« Reply #49 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?

Offline DarkRain

  • Project Coder
  • Captain
  • ***
  • Posts: 746
    • View Profile
Re: Bleeding wounds
« Reply #50 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.
« Last Edit: May 17, 2012, 11:51:32 pm by DarkRain »

Offline geever

  • Project Coder
  • PHALANX Commander
  • ***
  • Posts: 2561
    • View Profile
Re: Bleeding wounds
« Reply #51 on: May 18, 2012, 02:11:19 am »
Promising...

-geever

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: Bleeding wounds
« Reply #52 on: May 18, 2012, 06:15:09 am »
indeed - we can apply it to master to get some feedback.

Offline DarkRain

  • Project Coder
  • Captain
  • ***
  • Posts: 746
    • View Profile
Re: Bleeding wounds
« Reply #53 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.

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: Bleeding wounds
« Reply #54 on: May 21, 2012, 09:26:06 am »
@DarkRain: the patch is in master now

Offline DarkRain

  • Project Coder
  • Captain
  • ***
  • Posts: 746
    • View Profile
Re: Bleeding wounds
« Reply #55 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(-)

Offline H-Hour

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1923
    • View Profile
Re: Bleeding wounds
« Reply #56 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!

Offline DarkRain

  • Project Coder
  • Captain
  • ***
  • Posts: 746
    • View Profile
Re: Bleeding wounds
« Reply #57 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.

Offline H-Hour

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1923
    • View Profile
Re: Bleeding wounds
« Reply #58 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.

Offline DarkRain

  • Project Coder
  • Captain
  • ***
  • Posts: 746
    • View Profile
Re: Bleeding wounds
« Reply #59 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.