aliens

Author Topic: [DONE][Suggestion] Allowed soldier groups per craft  (Read 5756 times)

Offline thusky

  • Sergeant
  • **
  • Posts: 29
    • View Profile
[DONE][Suggestion] Allowed soldier groups per craft
« on: July 24, 2022, 10:17:23 pm »
Hey there!


I've been messaging Yankes and Meridian by PM and got recommended to make an official request here so everyone can estimate whether or not such feature would be nice for their mods (and thus be implemented, potentially).

I've been making a "Play as the aliens" mod for the past 3 weeks or so, as such I would like to force the player to only be able to have 1 alien race per craft, the feature would work like this:
Go to craft loadouts -> craft crew -> load 1 aquatoid soldier (now craft will only accept aquatoid units (soldiers/terror units)). -> Throw error message when trying to load a different race. -> Unload all  soldiers (empty craft) to accept other races again.

It is, in some way, similar to requiresBaseFunc but for crafts and would only trigger once a unit type is loaded (this could also be applied to armors for other mods).


Having soldier types limited per craft could be useful for mods restricting unit compositions, do tell me if I missed an additionnal benefit of such a feature though!

Do you guys think this would be an interesting enough feature to be added, could this be useful to you as a modder?



Cheers,
Nils

Offline bulletdesigner

  • Commander
  • *****
  • Posts: 685
    • View Profile
Re: [Suggestion] allowedSoldierType function for craft
« Reply #1 on: July 24, 2022, 10:31:20 pm »
I would love also that additon, to have  craft by soldier type, meaning that i have issue making loyaist use heritical crafts(40k mod)

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9047
    • View Profile
Re: [Suggestion] allowedSoldierType function for craft
« Reply #2 on: July 24, 2022, 10:32:20 pm »
Go to craft loadouts -> craft crew -> load 1 aquatoid soldier (now craft will only accept aquatoid units (soldiers/terror units)). -> Throw error message when trying to load a different race. -> Unload all  soldiers (empty craft) to accept other races again.

"allow only 1 soldiertype/race" as described by the example is relatively easy to do

I don't have any particular feelings about the feature myself, feedback welcome

I would love also that additon, to have  craft by soldier type, meaning that i have issue making loyaist use heritical crafts(40k mod)

"allow only 1 particular soldiertype/race" is a bit different, but also doable

Offline thusky

  • Sergeant
  • **
  • Posts: 29
    • View Profile
Re: [Suggestion] allowedSoldierType function for craft
« Reply #3 on: July 24, 2022, 10:42:46 pm »


"allow only 1 soldiertype/race" as described by the example is relatively easy to do

I don't have any particular feelings about the feature myself, feedback welcome

"allow only 1 particular soldiertype/race" is a bit different, but also doable
Awesome!

I wanted to give further details on the feature as someone asked a question on the discord servers, the question was:

"Interesting idea. Not one I can see myself using, but nothing wrong with it as an idea. Although, would that not prevent you from carrying an HWP in addition to the soldiers, as they're two different things?"

My answer was:

"One wouldn't go without the other in a sense, once you bring a HWP of type A you can only load soldiers of type A and vice versa.
Much like requiresBaseFunc except the "service" becomes available as soon as a unit type is loaded"

It then returns nothing if the craft is empty, thus allowing for loading a new unit type again

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9047
    • View Profile
Re: [Suggestion] allowedSoldierType function for craft
« Reply #4 on: July 24, 2022, 10:50:14 pm »
One wouldn't go without the other in a sense, once you bring a HWP of type A you can only load soldiers of type A and vice versa.

True vanilla HWPs don't have a soldier type, they are not soldiers.
This would work only if you created soldiers that look like vehicles (btw. many mods already do this).

Which brings up a question: what should happen to the true vanilla non-soldier HWPs? are they all allowed? or are they all disallowed?

Offline thusky

  • Sergeant
  • **
  • Posts: 29
    • View Profile
Re: [Suggestion] allowedSoldierType function for craft
« Reply #5 on: July 24, 2022, 10:57:17 pm »
True vanilla HWPs don't have a soldier type, they are not soldiers.
This would work only if you created soldiers that look like vehicles (btw. many mods already do this).

Which brings up a question: what should happen to the true vanilla non-soldier HWPs? are they all allowed? or are they all disallowed?

True they are items, I thought "services" as race categories I guess (since I use base services this way pretty much).

So there isn't a way to link soldiers and items to have both interact with each other in terms of service required?

If so yes, HWPs would be disabled and some soldiers would be used as "fake" HWPs,

In my case I thought HWPs would be terror units, if it's too much of a bother it's far from a deal breaker for sure! The most important part is really to have only 1 soldier type allowed per craft, that is the most important.

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9047
    • View Profile
Re: [Suggestion] allowedSoldierType function for craft
« Reply #6 on: July 24, 2022, 11:09:56 pm »
Which brings me to another question (related to fake HWPs).

You can have only 1 soldier type of a given soldier type :)
I know, sounds weird, don't know how to write it better.

Two different unit types cannot have the same soldier type... maybe that's clearer.

So, what did you mean in your original request?
Use the existing soldier type attribute, this one:
Code: [Select]
soldiers:
  - type: STR_SOLDIER
    costBuy: 40000
    costSalary: 20000
...

...or do I need to introduce something new? So that you can have more than one unit type in your "alien race"...

Same question for bulletdesigner: Is "loyalist" just one soldier type? Or multiple?

Offline thusky

  • Sergeant
  • **
  • Posts: 29
    • View Profile
Re: [Suggestion] allowedSoldierType function for craft
« Reply #7 on: July 24, 2022, 11:20:12 pm »
So, what did you mean in your original request?


My apologies, still a noob modder over here (I have a tendency to not use the right words either ahah), I'll try my best to explain through the code snippet you provided:

Code: [Select]
soldiers:
  - type: STR_SOLDIER_AQUATOID
    costBuy: 40000
    costSalary: 20000
    craftRace: Aquatoid
...

So not a new "type" just a "category" or "service" (I don't know how to call it really), that would be set once you crew that soldier into a craft.


...or do I need to introduce something new? So that you can have more than one unit type in your "alien race"...


I guess it could be a boolean for 1 single "type" like STR_SOLDIER for certain mods as well but that would be a different feature yes! Sorry for the missunderstanding.

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9047
    • View Profile
Re: [Suggestion] allowedSoldierType function for craft
« Reply #8 on: July 24, 2022, 11:32:44 pm »
ok, understood

Offline Delian

  • Colonel
  • ****
  • Posts: 458
    • View Profile
Re: [Suggestion] allowedSoldierType function for craft
« Reply #9 on: July 24, 2022, 11:42:07 pm »
I think features which are designed to be used only in a single mod aren't useful enough to implement.

So, I think the solution that adds a new property to crafts called allowedSoldierTypes (array of strings), makes the most sense, because it would also be usable by other mods.

If you have 10 different alien races, then thusky would need 10 different crafts, each restricted to a single alien race. So the player(alien) would have to buy/manufacture the craft specific for the race that they'd want to use on that craft.

Offline thusky

  • Sergeant
  • **
  • Posts: 29
    • View Profile
Re: [Suggestion] allowedSoldierType function for craft
« Reply #10 on: July 24, 2022, 11:48:02 pm »
I think features which are designed to be used only in a single mod aren't useful enough to implement.

I completely agree with this!


So, I think the solution that adds a new property to crafts called allowedSoldierTypes (array of strings), makes the most sense, because it would also be usable by other mods.


Sure this could be a "related" feature, definitely not what I'm asking but this could be useful for sure!


If you have 10 different alien races, then thusky would need 10 different crafts, each restricted to a single alien race. So the player(alien) would have to buy/manufacture the craft specific for the race that they'd want to use on that craft.

That's the thing, I'm not asking for 1 craft=1 race here but soldiers with "tag A" can only be crewed with "tag A" soldiers, this could still prove useful to other mods, don't you think?

Offline Delian

  • Colonel
  • ****
  • Posts: 458
    • View Profile
Re: [Suggestion] allowedSoldierType function for craft
« Reply #11 on: July 25, 2022, 12:22:12 am »
soldiers with "tag A" can only be crewed with "tag A" soldiers

The "allowedSoldierTypes" solution would allow you to do this just fine. Since the property is a list, you simply add all soldiers, that are allowed on the same craft, to that list.

Offline thusky

  • Sergeant
  • **
  • Posts: 29
    • View Profile
Re: [Suggestion] allowedSoldierType function for craft
« Reply #12 on: July 25, 2022, 12:23:27 am »
The "allowedSoldierTypes" solution would allow you to do this just fine. Since the property is a list, you simply add all soldiers, that are allowed on the same craft, to that list.

So your example wouldn't force the player to manufacture a specific craft for each soldier type then?

If that's the case, I'm in, for sure!

Offline Delian

  • Colonel
  • ****
  • Posts: 458
    • View Profile
Re: [Suggestion] allowedSoldierType function for craft
« Reply #13 on: July 25, 2022, 12:35:16 am »
Not for each soldier type, but for each soldier type group. The crafts would still be restricted to their respective races.

If you'd construct a terror_ship_for_ethereals (this ship would have allowedSoldierTypes of ethereal soldier, ethereal leader, sectopod, etc..), then sectoids wouldn't be allowed on this craft. But if you added a manufacture design that takes terror_ship_for_ethereals as material and produces terror_ship_for_sectoids, then it wouldn't be a problem. Well, besides needing a lot of manufacturing designs for all combinations heh.

Offline thusky

  • Sergeant
  • **
  • Posts: 29
    • View Profile
Re: [Suggestion] allowedSoldierType function for craft
« Reply #14 on: July 25, 2022, 12:41:05 am »
Not for each soldier type, but for each soldier type group. The crafts would still be restricted to their respective races.

If you'd construct a terror_ship_for_ethereals (this ship would have allowedSoldierTypes of ethereal soldier, ethereal leader, sectopod, etc..), then sectoids wouldn't be allowed on this craft. But if you added a manufacture design that takes terror_ship_for_ethereals as material and produces terror_ship_for_sectoids, then it wouldn't be a problem. Well, besides needing a lot of manufacturing designs for all combinations heh.

So restricting a group of soldiers for specific crafts would help more modders than having tags directly placed on soldiers themselves then? Fair enough, I could work around this restriction, I aim to make races a meaningful strategic choice anyways, the only reason I wanted this feature to allow for any race on any ship was mainly to be less restrictive at this level of play, but it doesn't hurt going deeper.

If more people prefer craft restriction (all the way as you propose here), I'm perfectly fine transforming that request to fit that criteria for sure!

It's a good call in the end anyways since I have alien ranks (which aren't "ranks" per say but different soldiers [Transformed, just have the rank in their name+stats really]). I could prevent certain soldiers (like terror units) from crewing a small scout ship for instance with your idea, since it's basically a list of allowed soldiers. Nice catch!
« Last Edit: July 25, 2022, 12:42:41 am by thusky »