1
The X-Com Files / Re: Want to help?
« on: April 08, 2024, 03:30:49 pm »
Neat! I'm happy to hear that.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Thanks for this modification. Enclosed a translation into Russian for version 0.1.1.Very cool, I put it in there and added a German translation as well.
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.
commendations:
- type: STR_MEDAL_MEDICAL_STAT #healed lethal wounds
description: STR_MEDAL_MEDICAL_STAT_UFOPEDIA
sprite: 5
soldierBonusTypes: [STR_MEDIC_BONUS_1,STR_MEDIC_BONUS_1,STR_MEDIC_BONUS_1,STR_MEDIC_BONUS_1,STR_MEDIC_BONUS_1,STR_MEDIC_BONUS_1,STR_MEDIC_BONUS_2,STR_MEDIC_BONUS_2,STR_MEDIC_BONUS_2,STR_MEDIC_BONUS_3]
criteria:
totalWoundsHealed: [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]
extended:
tags:
RuleSoldierBonus:
TAG_MEDIC_PLUS: int
BattleUnit:
TAG_MEDIC_STAT: int
scripts:
applySoldierBonuses: # apply tag
- offset: 14
code: |
var int bonus_temp;
var int soldier_temp;
soldier_bonus.getTag bonus_temp Tag.TAG_MEDIC_PLUS;
unit.getTag soldier_temp Tag.TAG_MEDIC_STAT;
if gt bonus_temp soldier_temp;
unit.setTag Tag.TAG_MEDIC_STAT bonus_temp;
end;
return;
healUnit:
- offset: 15
#*** extra Healing ***
code: |
var int medic_stat;
actor.getTag medic_stat Tag.TAG_MEDIC_STAT;
if gt medic_stat 0;
if eq medikit_action_type 1;
add health_recovery medic_stat;
debug_log "Medic Stat used. " medic_stat " extra HP for a Total of " health_recovery;
end;
end;
return;
soldierBonuses:
- name: STR_MEDIC_BONUS_1
tags:
TAG_MEDIC_PLUS: 1
- name: STR_MEDIC_BONUS_2
tags:
TAG_MEDIC_PLUS: 2
- name: STR_MEDIC_BONUS_3
tags:
TAG_MEDIC_PLUS: 3
Of course, you can get improvements from panicking, getting wounded and for example by using pepper spray.Also, importantly, healing items except sprays. I think it's a 9% chance for improvement per wound healed. When I have an experienced agent with a guts deficit I make them a medic.