aliens

Author Topic: [Suggestion] First Aid Skill  (Read 1990 times)

Offline NineCoronas

  • Squaddie
  • *
  • Posts: 8
    • View Profile
[Suggestion] First Aid Skill
« on: March 19, 2024, 10:15:54 pm »
I'd like to add a new skill, First Aid, that improves upon successful use of items marked as 'First Aid'. Ideally the formula to decide how much extra HP is restored would be on the individual items marked 'First Aid'. It's for a submod idea for X-Com Files with the idea of training dedicated medics (mirroring real life) being strategically beneficial instead of just 'roleplay'.

In reference to that specific mod, for example Trauma Kits and the manufactured Medikits would derive a comparitively significant bonus compared to say, Healing Gel (which is just gel that you slap on and doesn't really involve any skill).
« Last Edit: March 19, 2024, 10:18:50 pm by NineCoronas »

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9113
    • View Profile
Re: [Suggestion] First Aid Skill
« Reply #1 on: March 19, 2024, 11:18:07 pm »
Medikits are already fully scriptable, you can do whatever you like.

Offline Ethereal

  • Commander
  • *****
  • Posts: 684
    • View Profile
Re: [Suggestion] First Aid Skill
« Reply #2 on: March 20, 2024, 12:36:58 am »
Medikits are already fully scriptable, you can do whatever you like.

For example? I haven't seen such scripts yet.

Also, adding a bonus to medkit effects depending on the type of soldier is a good idea.

Offline NineCoronas

  • Squaddie
  • *
  • Posts: 8
    • View Profile
Re: [Suggestion] First Aid Skill
« Reply #3 on: March 20, 2024, 01:52:23 am »
Medikits are already fully scriptable, you can do whatever you like.

Can I script them to have a new skill appear on a soldiers skill list?

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9113
    • View Profile
Re: [Suggestion] First Aid Skill
« Reply #4 on: March 20, 2024, 08:48:38 am »
Can I script them to have a new skill appear on a soldiers skill list?

Scripts allow to override existing actions.

"Soldier skills" feature allows to add new.

Offline Finnik

  • Commander
  • *****
  • Posts: 508
  • Finnik#0257
    • View Profile
Re: [Suggestion] First Aid Skill
« Reply #5 on: March 26, 2024, 05:03:20 pm »
FtA has y-scrits for healing, that can be easily altered as a integer skill of a soldier.
As for adding a new stat - we have mana, that can do basically anything. Adding more on top of it is a HUGE pain. I did it in GTA and it was a big breaking change.
For instance, can you design a proper and consistent UI for a new stat? Giving how specific it is, you must take in consideration, how any other mod would handle it.

Offline HinterDemGlas

  • Captain
  • ***
  • Posts: 56
    • View Profile
Re: [Suggestion] First Aid Skill
« Reply #6 on: March 26, 2024, 05:50:53 pm »
Can scripts read the level of a commendation? Not sure about that... If so you could make a commendation with totalWoundsHealed and maybe some other conditions, then use a script to add extra HP to every heal depending on the level of the commendation.

Online Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3358
    • View Profile
Re: [Suggestion] First Aid Skill
« Reply #7 on: March 28, 2024, 12:34:27 pm »
commendation can run arbitrary code through soldier bonuses on created unit, this allow you to add custom tags like "better healing" that will be read by medkit script hooks.

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9113
    • View Profile
Re: [Suggestion] First Aid Skill
« Reply #8 on: March 28, 2024, 12:40:18 pm »
or you can forget commendations completely and just track the number of heals in your own custom soldier tag?

(not sure if the soldier is ptr or ptre in this script hook)

Online Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3358
    • View Profile
Re: [Suggestion] First Aid Skill
« Reply #9 on: March 28, 2024, 12:53:12 pm »
`healUnit` hook get `ptre BattleUnit actor` that allow getting writable Soldier that use medkit from it.

Offline Finnik

  • Commander
  • *****
  • Posts: 508
  • Finnik#0257
    • View Profile
Re: [Suggestion] First Aid Skill
« Reply #10 on: March 28, 2024, 02:09:14 pm »
Alhough, the player would not be able to track it anyhow.

Offline HinterDemGlas

  • Captain
  • ***
  • Posts: 56
    • View Profile
Re: [Suggestion] First Aid Skill
« Reply #11 on: March 29, 2024, 03:48:50 pm »
commendation can run arbitrary code through soldier bonuses on created unit, this allow you to add custom tags like "better healing" that will be read by medkit script hooks.
I tried this and I think it works; neat!

or you can forget commendations completely and just track the number of heals in your own custom soldier tag?
This plus a "book keeping" commendation is probably the more elegant way, but I want a script I (or anybody else) can just dump in a mod and then simply adjust the commendation.