OpenXcom Forum

Modding => OpenXcom Extended => OXCE Suggestions DONE => Topic started by: wcho035 on September 20, 2019, 01:54:26 pm

Title: [Done] Specific randomised stats for clones during Soldier Transformation.
Post by: wcho035 on September 20, 2019, 01:54:26 pm
Hi all, I wish for this request for my mod. It is for clone soldiers to have premature aging. How it works is, clone soldier has x days they can function at their peak before their genetic instability caught up with them and their stats starts to decay (age) until they are useless.

This is to add a mechanic to balance out for creating a super soldier, a price has to be paid for performance gain.

This add a dynamic that my elite soldier can’t go on forever. This request is central to the creation of elite soldiers in my mod.
Title: Re: [suggestion] Premature aging for clones.
Post by: krautbernd on September 20, 2019, 05:58:12 pm
IIRC last time you mentioned something like this scripts were brought up (i.e. lowering stats when deployed on the battlescape) - would this be enough of a stop-gap measure, taking into account the random time between missions? Not saying a feature like wouldn't be interesting, but seeing how the only use for soldiers are battlescape missions you could get pretty much the same effect (limit usefulness/number of possible deplyoments) by using scripts.
Title: Re: [suggestion] Premature aging for clones.
Post by: wcho035 on September 20, 2019, 06:30:36 pm
This is a simplified version of my original request.

Please clarify a few points of what you have here.

"would this be enough of a stop-gap measure, taking into account the random time between missions?"

"seeing how the only use for soldiers are battlescape missions you could get pretty much the same effect (limit usefulness/number of possible deplyoments) by using scripts."

What do you mean by stop gap measure? You mean soldier temporary looses their stats while deploy in battle?

I am seeking permanent reduction of stats, to the point even below of their starting stats.

The purpose of this is to make player appreciate that for any gain in performance, there is a cost.

For myself, this is more of an experiment. I want to ensure there's a life cycle to this cloning business. You clone X number of soldiers from a template,  X number of soldiers each have different stats from a generation. The soldier from that generation will prove themselves and only the best performing clones will get clone again for the next generation. The aging mechanic will ensure you get rid of the older generation for the next better performing batch.

This is more of an experiment for me.. in gameplay. How much management is required to manage these elite clones.. and appreciate of their mortality and etc. In a way, I feel of the character side of the clone, as they struggle to be the best through trials and battles.

Personally, I don't know of how the other modders would utilize this feature. This suggestion is more of a self fish request on my part. I always wanted this in a UFO mod. Genetic breeding to build the ultimate soldier, slowly with gradual improvement to fight the aliens. Not cheat crafting a super soldier straight away.

If I wanted any... ANY features in UFO, this is perhaps the strongest in my desires. If I have this, it is enough for me, beside the craft vs hanger size request I made for specialized craft docking certain size hanger. I have plans to stay quiet after getting these two request and move on with the completion of my mod.

Title: Re: [suggestion] Premature aging for clones.
Post by: ohartenstein23 on September 20, 2019, 06:58:30 pm
You can permanently alter the stats of a soldier during battle or coming back from a battle using script functions.
Title: Re: [suggestion] Premature aging for clones.
Post by: krautbernd on September 20, 2019, 07:20:40 pm
What do you mean by stop gap measure? You mean soldier temporary looses their stats while deploy in battle?

I am seeking permanent reduction of stats, to the point even below of their starting stats.
Yeah, sorry for that, I should have worded that better. I meant "enough to satisfy the underlaying idea you're trying to implement". Instead of having stats reduced every day, have them reduced after every deployment (akin to stats are improved/trained after every deployment). Continous drain would make sense if you had "continous" use for your soldiers. Seeing how the only use your soldier have is being deployed to (randomly appearing) missions it would make sense to compromise for having stats reduced after deployment (if the underlaying idea is to limit their usefulness).

That way you could at least implement something very much akin to your initial idea without being dependant on others coding it for you. It might not be ideal, but it's probably workable. If it helps you can 'pretend' that your soldiers are in stasis/frozen between missions. It's often easier to find lore/fluff explanations to work around engine limitations instead of waiting for a specific feature to be implemented.

Title: Re: [suggestion] Premature aging for clones.
Post by: wcho035 on September 20, 2019, 08:09:29 pm
This is more of a personal request. I understand the coding part. If I can avoid it I will. Unfortunately, there is not that I could think off.. I wanted this more than the other features in the game, aside from the hybrid game setup, bless Meridian for enable it for me. Not that I am ungrateful.
Title: Re: [suggestion] Premature aging for clones.
Post by: ohartenstein23 on September 20, 2019, 08:15:33 pm
You can permanently alter the stats of a soldier during battle or coming back from a battle using script functions.

This does not require any new C++ code. The script functions are available by writing a ruleset file and can be used to make a per-battle decay, though not a per-geoscape-time-period decay.
Title: Re: [suggestion] Premature aging for clones.
Post by: wcho035 on September 20, 2019, 08:40:14 pm
You can permanently alter the stats of a soldier during battle or coming back from a battle using script functions.

Okay, let me understand this, the decay stats of a soldier, you can permanently alter in a battle, but will this stats transfer to the next battle?

Like you posted, "though not a per-geoscape-time-period decay."

Sorry, I need more clarity on this detail. You mean on Geoscape, the decay stats not stored?

I had consulted with Meridian, once a soldier is clone, it is possible to put a market on the soldier.

I wanted only 3 outcome.

1) X days before decay starts.

2) Decay percentage per day.

3) Final stats before decay stops.

Although soldier can continue to gain stats again through battle, but ultimately the decay will over ride it. This kind of feature has application like realistic experience decay, should some one request that feature one day. A soldier could decay from not training or in constant battle.

Or have taken something to have stats gain and then loses it over the days or weeks.

I just wanted a more fun and realistic game play with the cloning feature.
Title: Re: [suggestion] Premature aging for clones.
Post by: Meridian on September 20, 2019, 09:01:04 pm
Okay, let me understand this, the decay stats of a soldier, you can permanently alter in a battle, but will this stats transfer to the next battle?

Yes, they will transfer to the next battle. That's what permanent means :)

I just wanted a more fun and realistic game play with the cloning feature.

Sorry, but what does "cloning" have to do with "realistic"?
Title: Re: [suggestion] Premature aging for clones.
Post by: ohartenstein23 on September 20, 2019, 09:04:29 pm
Per-battle decay would mean that at the end of a mission, your clone soldier would lose some amount of stats. The exact nature of how much and how that interacts with gaining experience is up to you in writing the script. These stats will be kept on the soldier in the geoscape and the next time the soldier enters battle. You can write custom tags or variables that tracks how much a soldier has decayed if you wish - these can also be kept outside of battle.

Numbers 1 and 2 of what you want are not available with script functions.
Title: Re: [suggestion] Premature aging for clones.
Post by: wcho035 on September 20, 2019, 09:06:20 pm
I will define the “realistic” part with clone gaining super superior stats and make game easy, vs slow increment stats growth through generation breeding with limited life span for clones.
Title: Re: [suggestion] Premature aging for clones.
Post by: wcho035 on September 20, 2019, 09:13:33 pm
The other option is the clone “dies” (fired) at x day. I suppose it dies rather than stats decay. Would this be easier than and the other feature? With a counter climbing from the day the clone is created?  Clone would “die” in and not in battlescape?
Title: Re: [suggestion] Premature aging for clones.
Post by: wcho035 on September 21, 2019, 05:07:57 am
This is the inspiration behind my request.

https://www.sarna.net/wiki/Way_of_the_Clans

Like 40k and other mods out there, I would like to forge the identity of my mod base of this feature.
Title: Re: [suggestion] Randomised Stats during Soldier Transformation.
Post by: wcho035 on September 25, 2019, 03:32:35 pm
Hi ohartenstein23, I wish your day is well.

I was able to meet most of my quest for this with a script generously provided by Firaa. However one feature scripting can't provide is randomized stats in the requirement I need.

I understand currently, in Soldier transformation, there is this feature useRandomStats: false. This would allow general randomized stats can be generated for a clone Soldier.

If I could ask for a small feature, like a more control form of randomization.

For example, there is a ranged in the randomization per stats, in form of percentage.

Using the  percentGainedStatChange:   
   
      tu: 0
      stamina: 0
      health: 0
      bravery: 0
      reactions: 0
      firing: 0
      throwing: 0
      strength: 0
      psiStrength: 0
      psiSkill: 0
      melee: 0

Can something be modified to

percentGainedRANDOMStatChangeMAX:   

      tu: 5
      stamina: 5
      health: 5
      bravery: 5
      reactions: 5
      firing: 5
      throwing: 5
      strength: 5
      psiStrength: 5
      psiSkill: 5
      melee: 5
      Mana: 0

percentGainedRANDOMStatChangeMin:   

      tu: -5
      stamina: -5
      health: -5
      bravery: -5
      reactions: -5
      firing: -5
      throwing: -5
      strength: -5
      psiStrength: -5
      psiSkill: -5
      melee: -5
      Mana: 0

This will generate a random number for each stats, which can be +- 5 percent from the current stats of the donor soldier except for Mana. Currently, the useRandomStats: false does it for all stats.

I ask of your kindness if you can implement this feature,ohartenstein23. I understand any extra request in coding is time investment on your side. This extra feature would give any modder an interesting in modding their soldiers.

I requested this for the reason that in genetic engineering, there is always the chance of nature. Results can't be certain in any outcome in cloning. If I could implement this in a script, I would not be requesting it. This is the final piece in this request I am asking.  I would wish to close off this suggestion/request made, if this important feature to me can be made available.

Thank you for reading.
Title: Re: [suggestion] Randomised Stats during Soldier Transformation.
Post by: ohartenstein23 on September 25, 2019, 04:14:08 pm
snip

Let me make sure I have this right - you'd like a parameter in the transformations ruleset such that the stat change parameters can have some variance? For example, the percentGainedStatChange being -5% to +5% instead of just +5%.

Would adding a variance to each stat field work for you? That is, instead of defining min and max rolls, you define the average roll and the amount it can change around that:
Code: [Select]
soldierTransformations:
  - type: STR_SOME_TRANSFORMATION
    percentGainedStatChange:
      tu: 0 # default, soldier will gain +0% of their trained TUs on average
      stamina: 10 # average of +10% stamina
    percentGainedStatChangeVariance:
      tu: 5 # the actual change will be within -5% and +5% of the average change, here just -5% to +5% overall
      stamina: 5 # actual stamina change is +5% to +15%
Title: Re: [suggestion] Specific randomised stats for clones during Soldier Transformation.
Post by: wcho035 on September 25, 2019, 04:46:53 pm
Hi Ohartenstein23,

Thank you kindly for the quick reply.

I am looking for a ranged feature in the random generation of a clone soldier’s stats.

For example, if I want a random number generated between plus and minus 5% (can be more or less, depending on the percentage you declare, or between 5% to 10%) of a soldier’s starting stats.

I can declare a RANGE in between where a number would be generated from. It has a lower bound for the percentage starts and upper bound. A range variance, of positive and negative numbers.

So the range or variance can be +-5%, -5% to -10 %, can be 10 to 20% in chosen stats, NOT for every stats. (Please forgive the upper case NOT shout)

I am not sure how you implement it. for example, if a donor soldier’s strength is 40. I would like the strength num of the clone to generate in the range between -5% and 5% of 40. So the new strength could come out less than or more than 40.

This random generation again, is for selected stats, for example I want to leave mana out and with everything else of the clone’s stat generated randomly..in between +- 5% of the clone starting stats. I don’t want all the stats randomised. Just selected ones. I hope I am able to write out my request with clarity.

Lastly, if you can kindly implement this request. If I want every stats of the soldier generate randomly, with the exception of MANA, I want it to have a specific value for it instead of a random one. Can the rule set handle this? 

Thank you kindly again for helping with my request. I am most grateful. If you are unsure of my examples above, , please ask and I will do my best to clarify.



Title: Re: [suggestion] Specific randomised stats for clones during Soldier Transformation.
Post by: ohartenstein23 on September 25, 2019, 06:32:57 pm
The variance example I wrote is mathematically equivalent to a range, and you can set variation to 0 if you want a single number instead of a range. For example:
Code: [Select]
soldierTransformations:
  - type: STR_CLONE_TRANSFORMATION
    percentOverallStatChange:
      strength: 0 # default, just showing for example
      health: 30
      firing: -5
      mana: 0 # default, just showing for example
    percentOverallStatChangeVariance:
      strength: 5
      health: 10
      firing: 0 # default, just showing for example
      mana: 0 # default, just showing for example

With this proposed code, your clone would get:

This will allow you to pick which stats are a randomized change, which are a fixed change, and which do not change at all (by this method).

If you want an exact amount of mana on the output soldier of a transformation (your clone), you handle that by setting it in the soldier type's minStats and maxStats, then using lowerBoundAtMinStats and upperBoundAtMaxStats to "clamp" it to an exact value. This is already available in the current code.
Title: Re: [suggestion] Specific randomised stats for clones during Soldier Transformation.
Post by: wcho035 on September 25, 2019, 07:21:00 pm
Mr Ohartenstein23

You are absolutely a wonderful human being! Thanks for the implementation of this feature! I look forward at testing it out in the coming days! Thank you truly for your kindness again!

Note. As Meridian has kindly pointed out I made assumption because of misreading the threads. I still wish to stick to these words I wrote, for the donated time in replying to my thread and giving my request some consideration .
Title: Re: [suggestion] Specific randomised stats for clones during Soldier Transformation.
Post by: Meridian on September 25, 2019, 07:51:23 pm
Mr Ohartenstein23

You are absolutely a wonderful human being! Thanks for the implementation of this feature! I look forward at testing it out in the coming days! Thank you truly for your kindness again!

Now I may be blind... but where exactly did Ohartenstein say that he will implement it?
Title: Re: [DONE!] Specific randomised stats for clones during Soldier Transformation.
Post by: wcho035 on September 25, 2019, 08:02:19 pm
Trust in faith and pray for the kindness of a man...
Title: Re: [DONE!] Specific randomised stats for clones during Soldier Transformation.
Post by: Meridian on September 25, 2019, 08:06:41 pm
It's rude.
Title: Re: [DONE!] Specific randomised stats for clones during Soldier Transformation.
Post by: wcho035 on September 25, 2019, 08:07:55 pm
How?  To be honest, it is late in the day. Maybe I made a few assumptions, yet it is kind of Ohartenstien to reply and propose a way to make it happen. I make mistakes at this time of the night.
Title: Re: [DONE!] Specific randomised stats for clones during Soldier Transformation.
Post by: Meridian on September 25, 2019, 08:13:12 pm
How?

Mr wcho035

You are absolutely a wonderful human being! Thanks for sending me one million dollars! I look forward at spending them in the coming days! Thank you truly for your kindness and generosity again!
Title: Re: [DONE!] Specific randomised stats for clones during Soldier Transformation.
Post by: wcho035 on September 25, 2019, 08:22:40 pm
Come on Meridian, it is simple exhilaration of gratitude. It may sound exaggerated, but it has been a bit of relief on my end to finally see this come to somewhere. I wish I am a big shot game developer, then I will be paying you a million dollar to write all the exciting features I want.  I can dream of what I want in this game.. but then if I do, I may just scare every one more than any soldier meeting a zombie in the game.

Some may call it Fear factor..  my flavour..
Title: Re: [DONE!] Specific randomised stats for clones during Soldier Transformation.
Post by: Meridian on September 25, 2019, 08:29:15 pm
I don't want a million dollars from you... I hope you understood that much.
I just used your words to thank you for something you haven't done and haven't promised to do... so that you see WHY such a statement is rude.


As for "a bit of relief on my end to finally see this come to somewhere"... NOTHING has happened yet... it has not come anywhere yet... if you got a different impression, then I would like to politely inform you that nothing has happened yet.
Title: Re: [DONE!] Specific randomised stats for clones during Soldier Transformation.
Post by: wcho035 on September 25, 2019, 08:32:41 pm
Point taken, I also need to read the thread more
 carefully. Again, late in the day.. the eyes are not 100% with age. However, sometimes it is worth noting kind person like yourself and ohartenstien are willing to devote time in help, no matter how trivial the question is. For that I wish to humbly thank you just the same. I know I do test the patience of people some times. None the less I do feel genuinely grateful for everything I get so far.
Title: Re: [Pending] Specific randomised stats for clones during Soldier Transformation.
Post by: Nord on September 25, 2019, 09:48:35 pm
Sorry, it is hard for me (and my language) to read these loooong posts, but idea about randomized stat changes is close with my hearth. Personally my request was about random psi strength change. But if this is too complicate,  i can do what i want with other tools (it will be ugly, but ok).
Thanks for attention.
Title: Re: [Pending] Specific randomised stats for clones during Soldier Transformation.
Post by: wcho035 on October 04, 2019, 03:39:59 pm
Hi  ohartenstein23

Any update please on this request? Thank you kindly.

Regards.
Title: Re: [Pending] Specific randomised stats for clones during Soldier Transformation.
Post by: Meridian on October 18, 2020, 12:34:14 pm
Sorry, it is hard for me (and my language) to read these loooong posts, but idea about randomized stat changes is close with my hearth. Personally my request was about random psi strength change. But if this is too complicate,  i can do what i want with other tools (it will be ugly, but ok).
Thanks for attention.

Just cleaning up my todolist.
This is implemented here: https://openxcom.org/forum/index.php/topic,7196.msg117768.html#msg117768

Removing this thread from my attention.