Author Topic: Temporary boosting stats just for a mission.  (Read 3821 times)

wcho035

  • Guest
Temporary boosting stats just for a mission.
« on: September 20, 2019, 09:36:22 am »
I have read in the rulesets that medikit is the one item for boosting or recovering certain damage stats like Morale.

Is it possible to boost stats temporary for Psi defense as well? Without resorting to coding those bonuses in the armour the soldier is wearing?

If not can item be coded to have permanent stats bonus like armour does? If it is in the soldiers inventory?

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9098
    • View Profile
Re: Temporary boosting stats just for a mission.
« Reply #1 on: September 20, 2019, 10:08:36 am »
Is it possible to boost stats temporary for Psi defense as well? Without resorting to coding those bonuses in the armour the soldier is wearing?

How/when?

If not can item be coded to have permanent stats bonus like armour does? If it is in the soldiers inventory?

Yes, using scripts.

wcho035

  • Guest
Re: Temporary boosting stats just for a mission.
« Reply #2 on: September 20, 2019, 10:35:53 am »
Interesting, I was expecting the usual no. This is an important feature I would like in my mod.

How/when? during a battlescape mission. I am happy with a drug that boost a soldier’s psi defense for the duration of a mission.

Is this possible?

If not, then with item bonus, are we talking about using armour segmentation like shield and armour segments seperate from main armour type bonuses or what kind scripts in ruleset can do the job?

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9098
    • View Profile
Re: Temporary boosting stats just for a mission.
« Reply #3 on: September 20, 2019, 11:05:15 am »
I am happy with a drug that boost a soldier’s psi defense for the duration of a mission.
Is this possible?

You could use "mana" resource that can be increased upon item use/consumption and change the psi defense of all relevant armors to consider the value of mana too (in addition to psi strength and psi skill).

If not, then with item bonus, are we talking about using armour segmentation like shield and armour segments seperate from main armour type bonuses or what kind scripts in ruleset can do the job?

There are no armor segments.

The scripts you need depend on how you want to implement it. With scripting, you're the developer, not me.

wcho035

  • Guest
Re: Temporary boosting stats just for a mission.
« Reply #4 on: September 20, 2019, 11:46:59 am »
I see, thanks for the info. So the existing feature doesn’t exist for item permanent stats boost.


Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9098
    • View Profile
Re: Temporary boosting stats just for a mission.
« Reply #5 on: September 20, 2019, 11:53:42 am »
You can partially reuse scripts from other mods, don't have to start from scratch.

I think there are for example items increasing/decreasing armor resistances in PirateZ...

wcho035

  • Guest
Re: Temporary boosting stats just for a mission.
« Reply #6 on: September 20, 2019, 01:13:28 pm »
If you are referring to C++ scripts, should this need to be complied with the main executable? Or OXCE has support for external scripts? Just kind of confuse.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9098
    • View Profile
Re: Temporary boosting stats just for a mission.
« Reply #7 on: September 20, 2019, 01:18:28 pm »
If you are referring to C++ scripts, should this need to be complied with the main executable? Or OXCE has support for external scripts? Just kind of confuse.

It's not C++.

It's OpenXcom scripts, which are written in the ruleset (and compiled by OpenXcom). No need for new executable.

wcho035

  • Guest
Re: Temporary boosting stats just for a mission.
« Reply #8 on: September 20, 2019, 01:26:20 pm »
Interesting.. I have a look. Thank you as always Meridian.

wcho035

  • Guest
Re: Temporary boosting stats just for a mission.
« Reply #9 on: September 20, 2019, 01:33:55 pm »
I just remember something, recently, you have included soldier bonuses and commendation.  Personally, I am still not 100% of how the ruleset works. Can you treat commendation kind of like an item? You are wearing it? Or how is this commendation awarded? I can do a stat boost by awarding the soldier something.

« Last Edit: September 20, 2019, 01:35:33 pm by wcho035 »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9098
    • View Profile
Re: Temporary boosting stats just for a mission.
« Reply #10 on: September 20, 2019, 02:22:44 pm »
I just remember something, recently, you have included soldier bonuses and commendation.  Personally, I am still not 100% of how the ruleset works. Can you treat commendation kind of like an item? You are wearing it? Or how is this commendation awarded? I can do a stat boost by awarding the soldier something.

Commendations are awarded automatically, based on soldier's performance. You can try for example this mod: https://openxcom.org/forum/index.php/topic,3048.0.html

If you want to award something manually, use soldier transformations.

wcho035

  • Guest
Re: Temporary boosting stats just for a mission.
« Reply #11 on: September 20, 2019, 02:34:27 pm »
Thanks Meridian, I have to down grade my inclusion of this feature until when I have more time to commit to it. Somewhere in the future I will revisit this again