project-navigation
Personal tools

Author Topic: Medikits  (Read 93775 times)

Offline criusmac

  • Squad Leader
  • ****
  • Posts: 168
    • View Profile
Re: Medikits
« Reply #165 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...

Offline criusmac

  • Squad Leader
  • ****
  • Posts: 168
    • View Profile
Re: Medikits
« Reply #166 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.

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: Medikits
« Reply #167 on: November 04, 2009, 07:07:38 am »

Offline criusmac

  • Squad Leader
  • ****
  • Posts: 168
    • View Profile
Re: Medikits
« Reply #168 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.
« Last Edit: December 11, 2009, 06:16:35 am by criusmac »

Offline theotherhiveking

  • Rookie
  • ***
  • Posts: 14
    • View Profile
Re: Medikits
« Reply #169 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.
« Last Edit: December 11, 2009, 05:54:24 pm by theotherhiveking »

Offline criusmac

  • Squad Leader
  • ****
  • Posts: 168
    • View Profile
Re: Medikits
« Reply #170 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.

Offline homunculus

  • Sergeant
  • *****
  • Posts: 387
    • View Profile
Re: Medikits
« Reply #171 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.