aliens

Author Topic: Soldier transformation capabilities  (Read 3219 times)

Offline vadracas

  • Colonel
  • ****
  • Posts: 285
  • Just another player/modder combo.
    • View Profile
Soldier transformation capabilities
« on: April 08, 2020, 07:34:59 pm »
Is there a way to overload a single transformation? For example, I have multiple unit types with different stats and I want a single transformation to be able to accept all of those soldier types and not produce a different soldier type, but I want the soldier transformation to not be applicable to any soldier above or below a certain percentage of max stats(which I would manually enter).

Problem is, I don't know how to do that without creating multiple different soldier transformations and having them clutter the soldier transformation toolbar.

My solution would be to have overloaded transformations if that is somehow possible without real code being involved. That would mean that I could have multiple different soldier transformations in the .rul files that have the same name and appear as one transformation in the scroll bar where the transformations appear.


P.S. As with my last request, please tell me if this should be put into the OXCE suggestions thread

Offline The Martian

  • Commander
  • *****
  • Posts: 754
  • "It implores you to listen to its arguments..."
    • View Profile
Re: Soldier transformation capabilities
« Reply #1 on: April 14, 2020, 12:37:42 am »
I'm still refamiliarizing myself with OpenXcom but I seem to remember there being a setting you could give Research topics that would make it so that if it was unlocked it would lock and remove it from the player's visible choices.

The catch to this is once locked a project could not be made available again for that specific research topic.

Perhaps you can use this method creating several manufacturing projects, each one containing all of the player's current transformations. Then only allow the currently researched max upgrade manufacturing project to be visible to the player.

(Example)

Code: [Select]
Manufacturing project:
Alter Soldier stats A

Manufacturing project:
Alter Soldier stats B

Manufacturing project:
Alter Soldier stats C

Manufacturing project:
Alter Soldier stats A
Alter Soldier stats B

Manufacturing project:
Alter Soldier stats A
Alter Soldier stats C

Manufacturing project:
Alter Soldier stats B
Alter Soldier stats C

Manufacturing project:
Alter Soldier stats A
Alter Soldier stats B
Alter Soldier stats C


After looking at the UFOpaedia, I think Research's "disables" variable may be what I was remembering... but I am unsure if this will lock previously completed research and thus remove any attached manufacturing option(s) or if it only disables currently unresearched topics from being displayed on the research screen.
« Last Edit: April 14, 2020, 12:47:31 am by The Martian »

Offline vadracas

  • Colonel
  • ****
  • Posts: 285
  • Just another player/modder combo.
    • View Profile
Re: Soldier transformation capabilities
« Reply #2 on: April 14, 2020, 01:05:34 am »
My examples seem to confuse people :(


What I want is the ability to have multiple soldier transformations of the SAME NAME, taking up ONE SPOT in the list of soldier transformations that perform different functions based on the soldier type input.

In my case I want to be able to set minimum stats for that transformation at 10 above the min stats of the soldier type, whose min stats differ between soldier types.

Did this make my intent clearer? If this is what you though I was saying then I need some clarification on how your idea helps me.

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11454
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Soldier transformation capabilities
« Reply #3 on: April 14, 2020, 12:16:27 pm »
What I want is the ability to have multiple soldier transformations of the SAME NAME, taking up ONE SPOT in the list of soldier transformations that perform different functions based on the soldier type input.

Just make 2 different transformations for different soldier types and give them the same string. Only relevant transformations for this soldier type are displayed anyway.

Having said that, while I get the elegance thing, it would probably confusing to the player to have (apparently) the same trasformation doing different things, seemingly at random.

Offline vadracas

  • Colonel
  • ****
  • Posts: 285
  • Just another player/modder combo.
    • View Profile
Re: Soldier transformation capabilities
« Reply #4 on: April 14, 2020, 01:22:46 pm »
Just make 2 different transformations for different soldier types and give them the same string.

I've tried this and the soldier transformation menu starts looking like this
Memorial
Other transformation A
Soldier Transformation B
Soldier Transformation B
Soldier Transformation B
Soldier Transformation B
Soldier Transformation B


Only relevant transformations for this soldier type are displayed anyway.

Wait a second, what method do you use to access soldier transformations in game, is there a way to access them from within the soldiers inventory, because that would also solve my problem!

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11454
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Soldier transformation capabilities
« Reply #5 on: April 14, 2020, 01:56:43 pm »
No, I'm doing it from the soldier list, like you do.

Have you restricted the transformation to a soldier type?

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8616
    • View Profile
Re: Soldier transformation capabilities
« Reply #6 on: April 14, 2020, 03:44:17 pm »
What I want is the ability to have multiple soldier transformations of the SAME NAME, taking up ONE SPOT in the list of soldier transformations that perform different functions based on the soldier type input.

No, this is not possible.

Offline vadracas

  • Colonel
  • ****
  • Posts: 285
  • Just another player/modder combo.
    • View Profile
Re: Soldier transformation capabilities
« Reply #7 on: April 14, 2020, 04:42:39 pm »
No, this is not possible.
Ok, I am using a statstrings workaround to tell me whether or not I am allowed to perform my transformation.

No, I'm doing it from the soldier list, like you do.

Have you restricted the transformation to a soldier type?

Ok, good to know I haven't been missing something, and I have been restricting the transformations by soldier type, that's what this problem was stemming from, my desire to have functionally the same soldier transformation for different soldier types based on the soldier types min/max stats.

Offline Ethereal

  • Commander
  • *****
  • Posts: 625
    • View Profile
Re: Soldier transformation capabilities
« Reply #8 on: April 16, 2020, 07:55:35 am »
What I want is the ability to have multiple soldier transformations of the SAME NAME, taking up ONE SPOT in the list of soldier transformations that perform different functions based on the soldier type input.

No, this is not possible.

And if through "soldierBonus"? Make the "soldierBonusType" multiple in "SoldierTransformation" so that only one available bonus is selected for the transformation, and in the "SoldierBonus" enter the option "requiredSoldierType". Is it possible?