project-navigation
Personal tools

Author Topic: Medikits  (Read 75358 times)

Offline criusmac

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

Offline Winter

  • Captain
  • *****
  • Posts: 829
    • View Profile
    • Street of Eyes: The Writing of Ryan A. Span
Re: Medikits
« Reply #136 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

Surrealistik

  • Guest
Re: Medikits
« Reply #137 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?
« Last Edit: August 07, 2009, 03:35:29 am by Surrealistik »

Offline criusmac

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

Offline Winter

  • Captain
  • *****
  • Posts: 829
    • View Profile
    • Street of Eyes: The Writing of Ryan A. Span
Re: Medikits
« Reply #139 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

Offline criusmac

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

Offline criusmac

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

Offline homunculus

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

Offline Winter

  • Captain
  • *****
  • Posts: 829
    • View Profile
    • Street of Eyes: The Writing of Ryan A. Span
Re: Medikits
« Reply #143 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
« Last Edit: August 14, 2009, 09:20:33 am by Winter »

Offline BTAxis

  • Administrator
  • PHALANX Commander
  • *******
  • Posts: 2607
    • View Profile
Re: Medikits
« Reply #144 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.

Offline criusmac

  • Squad Leader
  • ****
  • Posts: 168
    • View Profile
Re: Medikits
« Reply #145 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).
« Last Edit: August 08, 2009, 04:09:03 pm by criusmac »

Offline criusmac

  • Squad Leader
  • ****
  • Posts: 168
    • View Profile
Re: Medikits
« Reply #146 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
« Last Edit: October 23, 2009, 05:13:27 pm by criusmac »

Offline geever

  • Project Coder
  • PHALANX Commander
  • ***
  • Posts: 2557
    • View Profile
Re: Medikits
« Reply #147 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

Offline geever

  • Project Coder
  • PHALANX Commander
  • ***
  • Posts: 2557
    • View Profile
Re: Medikits
« Reply #148 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

Offline criusmac

  • Squad Leader
  • ****
  • Posts: 168
    • View Profile
Re: Medikits
« Reply #149 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.
« Last Edit: August 08, 2009, 09:40:33 pm by criusmac »