Author Topic: [DONE][Suggestion]Two questions about Soldier Transformations.  (Read 791 times)

Online Nord

  • Commander
  • *****
  • Posts: 925
  • The Gate will open... someday.
    • View Profile
1. If i transform soldier with, lets say, psi str=34 and max Psi Str =50 into unit with max Psi Str =100, will his psi strength change? And if not - maybe it can be implemented?(like new random for new capabilities)
2. Idea - soldier transformation into item.
Possible use for me - contracts as instructors, psi-workers and so on. (and of course sacrifices)
« Last Edit: October 08, 2019, 07:56:13 pm by Meridian »

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 5557
  • Aaand we're back!
    • View Profile
    • My Wiki
Re: [Suggestion]Two questions about Soldier Transformations.
« Reply #1 on: June 17, 2019, 05:37:37 pm »
1. If i transform soldier with, lets say, psi str=34 and max Psi Str =50 into unit with max Psi Str =100, will his psi strength change? And if not - maybe it can be implemented?(like new random for new capabilities)

Isn't this the existing "useRandomStats" attribute?
https://www.ufopaedia.org/index.php/Ruleset_Reference_Nightly_(OpenXcom)#Soldier_Transformation

2. Idea - soldier transformation into item.

Meh.
That would have to be a really OP item to make me sacrifice an experienced soldier...
And sacrificing inexperienced soldiers makes no sense, you can just skip the unnecessary step of buying cannon fodder for sacrifice.

Possible use for me - contracts as instructors, psi-workers and so on. (and of course sacrifices)

I understand "sacrifice"... but what exactly is "contracts as instructors" and "psi-workers" ?

Online Nord

  • Commander
  • *****
  • Posts: 925
  • The Gate will open... someday.
    • View Profile
Re: [Suggestion]Two questions about Soldier Transformations.
« Reply #2 on: June 17, 2019, 05:44:47 pm »
Isn't this the existing "useRandomStats" attribute?
https://www.ufopaedia.org/index.php/Ruleset_Reference_Nightly_(OpenXcom)#Soldier_Transformation
Great, thanks!
Quote
I understand "sacrifice"... but what exactly is "contracts as instructors" and "psi-workers" ?
Situation 1. What i need.
A psi-capable unit leaves the field service, turning into civilian specialist in the psionic workshop. So now we can construct special facility to build items with psionic forging.
Situation 2. Goes in my mind just now.
Unit reached max stats can become trainer, so now we can build training facility.
And so on.

Upd.:
About useRandomStats: if i understand properly, this will reroll all unit stats?
« Last Edit: June 17, 2019, 05:56:09 pm by Nord »

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 5557
  • Aaand we're back!
    • View Profile
    • My Wiki
Re: [Suggestion]Two questions about Soldier Transformations.
« Reply #3 on: June 17, 2019, 06:15:29 pm »
Situation 1. What i need.
A psi-capable unit leaves the field service, turning into civilian specialist in the psionic workshop. So now we can construct special facility to build items with psionic forging.
Situation 2. Goes in my mind just now.
Unit reached max stats can become trainer, so now we can build training facility.
And so on.

Heh, ok :P
I'll see what I can do.

Upd.:
About useRandomStats: if i understand properly, this will reroll all unit stats?

Yes.

Online Nord

  • Commander
  • *****
  • Posts: 925
  • The Gate will open... someday.
    • View Profile
Re: [Suggestion]Two questions about Soldier Transformations.
« Reply #4 on: June 19, 2019, 03:28:32 am »
Any chances of "useRandomPsi" ?  ::)

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 5557
  • Aaand we're back!
    • View Profile
    • My Wiki
Re: [Suggestion]Two questions about Soldier Transformations.
« Reply #5 on: October 08, 2019, 08:48:43 pm »
Any chances of "useRandomPsi" ?  ::)

useRandomStats is now obsolete and has been replaced by rerollStats:

Code: [Select]
soldierTransformation:
  - name: STR_TEST_TRANSFORM
    rerollStats:
      tu: 0       # 0 = don't reroll (default), you don't need to specify this, it's here just as documentation example
      firing: 1   # 1 = reroll this stat
      throwing: 1

2. Idea - soldier transformation into item.
Possible use for me - contracts as instructors, psi-workers and so on. (and of course sacrifices)

If producedItem is defined, the transformed soldier is removed from existence and a new item is created and pushed into the transfer queue.

Code: [Select]
soldierTransformation:
  - name: STR_TEST_TRANSFORM
    producedItem: STR_MOTION_SCANNER

Test build: https://lxnt.wtf/oxem/builds//Extended/Extended-5.6.6-82ad50fea-2019-10-08-win32.7z

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 5557
  • Aaand we're back!
    • View Profile
    • My Wiki
Re: [DONE][Suggestion]Two questions about Soldier Transformations.
« Reply #6 on: October 08, 2019, 08:53:06 pm »
Also, it is now possible to define a range for stat improvements instead of just one value, and the game will choose something from that range randomly.

Example of existing one value setting:

Code: [Select]
soldierTransformation:
  - name: STR_TEST_TRANSFORM
    flatOverallStatChange:
      tu: 5
      stamina: 6
    percentOverallStatChange:
      tu: 10
      stamina: 20
    percentGainedStatChange:
      melee: 50

Example of new range settings:

Code: [Select]
soldierTransformation:
  - name: STR_TEST_TRANSFORM
    flatMin:
      tu: -5
      reactions: 7
    flatMax:
      tu: 3
      reactions: 7
    percentMin:
      stamina: -20
    percentMax:
      stamina: 4
    percentGainedMin:
      melee: -50
    percentGainedMax:
      melee: 10

You can use both old and new, they work together.

There is also an option to change the display of the stat improvement on the GUI:
1. either one line with random improvements displayed as "?"
2. or two lines, one displaying minimum possible improvement and the other displaying maximum possible improvement

Code: [Select]
soldierTransformation:
  - name: STR_TEST_TRANSFORM
    showMinMax: true            # false (default) = 1 line, true = 2 lines
« Last Edit: October 08, 2019, 08:58:47 pm by Meridian »

Offline Precentor Apollyon

  • Colonel
  • ****
  • Posts: 472
    • View Profile
Re: [DONE][Suggestion]Two questions about Soldier Transformations.
« Reply #7 on: October 09, 2019, 02:01:42 am »
Hi Meridian, thank you very much for implementing this very desired feature. Quick question for clarification.

What is the differences between

percentMin

and

percentgainMin?

They are the same, right?

Really looking forward in testing it.

I think this meets the request I raised of random stats variation if you wish to mark it as done.

Thank you kindly for this again.

Online Nord

  • Commander
  • *****
  • Posts: 925
  • The Gate will open... someday.
    • View Profile
Re: [DONE][Suggestion]Two questions about Soldier Transformations.
« Reply #8 on: October 09, 2019, 09:50:57 am »
This is wonderful! Many thanks.

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 5557
  • Aaand we're back!
    • View Profile
    • My Wiki
Re: [DONE][Suggestion]Two questions about Soldier Transformations.
« Reply #9 on: October 09, 2019, 10:12:22 am »
They are the same, right?

They are not the same, what reason would I have to add 2 identical things?

Difference is like the difference between older percentOverallStatChange and percentGainedStatChange.

Offline Precentor Apollyon

  • Colonel
  • ****
  • Posts: 472
    • View Profile
Re: [DONE][Suggestion]Two questions about Soldier Transformations.
« Reply #10 on: October 09, 2019, 10:37:37 am »
Thanks again Meridian, thank you very much for these.

Offline Precentor Apollyon

  • Colonel
  • ****
  • Posts: 472
    • View Profile
Re: [DONE][Suggestion]Two questions about Soldier Transformations.
« Reply #11 on: October 10, 2019, 12:19:11 pm »
Hi Meridian, I have tested this yesterday, I am getting some really weird stats generated with the

percentMin:
percentMax:

Here is my set up.

Code: [Select]
  - name: STR_CLONE_A_WARRIOR
    requiresBaseFunc: [CLONINGFACILITY]
    keepSoldierArmor: false
    createsClone: true
    requiredPreviousTransformations: STR_CLONE_A_SOLDIER
    forbiddenPreviousTransformations: STR_CLONE_A_SOLDIER
    producedSoldierArmor: STR_NONE_UC #
    allowsDeadSoldiers: false
    allowsLiveSoldiers: true
    allowsWoundedSoldiers: false
    allowedSoldierTypes:
      - STR_CLONE
    listOrder: 100
    cost: 50000
    transferTime: 0
    showMinMax: true
    rerollStats:
      tu: 1
      stamina: 1
      health: 1
      bravery: 1
      reactions: 1
      firing: 1
      throwing: 1
      strength: 1
      psiStrength: 0
      psiSkill: 0
      melee: 1
      mana: 0
    percentMin:
      tu: -1
      stamina: -1
      health: -1
      bravery: -1
      reactions: -1
      firing: -1
      throwing: -1
      strength: -1
      melee: -1
    percentMax:
      tu: 1
      stamina: 1
      health: 1
      bravery: 1
      reactions: 1
      firing: 1
      throwing: 1
      strength: 1
      melee: 1

Clone soldier stats is

soldiers:
  - type: STR_CLONE
    minStats:
      tu: 1
      stamina: 1
      health: -1
      bravery: 1
      reactions: 1
      firing: 1
      throwing: 1
      strength: 1
      psiStrength: 0
      psiSkill: 0
      melee: 1
      mana: 10
    maxStats:
      tu: 90
      stamina: 100
      health: 75
      bravery: 90
      reactions: 80
      firing: 90
      throwing: 90
      strength: 50
      psiStrength: 100
      psiSkill: 90
      melee: 80
      mana: 10
    statCaps:
      tu: 150
      stamina: 150
      health: 150
      bravery: 150
      reactions: 150
      firing: 150
      throwing: 150
      strength: 150
      psiStrength: 100
      psiSkill: 100
      melee: 100
      mana: 10
    armor: STR_NONE_UC
    standHeight: 22
    kneelHeight: 14
    femaleFrequency: 50
    soldierNames:
      - SoldierNameClan/
    deathMale: [41, 42, 43]
    deathFemale: [44, 45, 46]

In this example, I assume with percentMin: having -1

and percentMax: 1 for all their stats, The clone copies generated from its original template will have a range between

-1 to 1% more from the original donor's original geoscape live stats.

If you see the below screenshot, the clones I have generated from its original template are wildly fluctuated.

How can I correct this?
« Last Edit: October 10, 2019, 12:58:58 pm by Meridian »

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 5557
  • Aaand we're back!
    • View Profile
    • My Wiki
Re: [DONE][Suggestion]Two questions about Soldier Transformations.
« Reply #12 on: October 10, 2019, 12:57:33 pm »
psiStrength, psiSkill and mana are transformed (based on percentMin and percentMax)
all other stats are rerolled (based on minStats and maxStats)

I don't see anything wrong, it's doing exactly what you specified in the ruleset.

PS: also try at least 5%... 1% will in most cases just be rounded down to 0 stat change (for example 1% of 60 health = 0 health) and you will not see any change

Offline Precentor Apollyon

  • Colonel
  • ****
  • Posts: 472
    • View Profile
Re: [DONE][Suggestion]Two questions about Soldier Transformations.
« Reply #13 on: October 10, 2019, 01:30:33 pm »
So it is base on the soldier's min and max stats.. not the current generated geoscape stats.

If I want to do a +- range on the lived geoscape generated stats, not from ruleset. How would I do that?

For example from the screenshot above, I have Ho Clone Original Template.

His stats is,

TU 62
Stamina 59
Health 25
Bravery 80
Reaction 48
Firing Accuracy 55
Throwing Accuracy 72
Melee Accuracy 36
Strength 22

Those are lived geoscape generated stats. I want a +- % range. How could that be done?
« Last Edit: October 10, 2019, 01:37:40 pm by Precentor Apollyon »

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 5557
  • Aaand we're back!
    • View Profile
    • My Wiki
Re: [DONE][Suggestion]Two questions about Soldier Transformations.
« Reply #14 on: October 10, 2019, 02:02:23 pm »
If I want to do a +- range on the lived geoscape generated stats, not from ruleset. How would I do that?

By using percentMin and percentMax, and not using rerollStats.