Author Topic: [DONE] Soldiers and vehicles as modifiable craft stats  (Read 1366 times)

Offline Ethereal

  • Commander
  • *****
  • Posts: 684
    • View Profile
[DONE] Soldiers and vehicles as modifiable craft stats
« on: December 16, 2023, 06:31:41 pm »
Thank you for the update!

Can you tell me a little more about -

- Soldiers and vehicles as modifiable craft stats (by WarStalkeR):

That is, you can create a module with the following content:

Code: [Select]
  - type: STR_TRANSPORT_MODUL
    hidePediaInfo: true
    sprite: 420
    weaponType: 6
    launcher: STR_TRANSPORT_MODUL_LAUNCHER
    stats:
      maxSmallUnits: 8
      maxLargeUnits: 2

And this will increase the ship's capacity by 8 slots?
I understand that this will require changing the ship maps, but first I want to make sure that it is worth it so as not to waste time.

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3349
    • View Profile
Re: Soldiers and vehicles as modifiable craft stats
« Reply #1 on: December 16, 2023, 06:38:34 pm »
Code: [Select]
craftWeapons:
  - override: STR_STINGRAY
    stats:
      soldiers: 2
  - override: STR_AVALANCHE
    stats:
      soldiers: -4
  - override: STR_CANNON_UC
    stats:
      vehicles: -4
Change can be positive or negative. This mean some weapons (when negative) eatup unit storage in craft.
By default when you set `soldiers` in craft, it become and you can't go higher. You need add `maxUnitsLimit` to override this limit and
have more potential space for solders if you add "cargo pods".

Offline Ethereal

  • Commander
  • *****
  • Posts: 684
    • View Profile
Re: Soldiers and vehicles as modifiable craft stats
« Reply #2 on: December 16, 2023, 06:58:56 pm »

Change can be positive or negative. This mean some weapons (when negative) eatup unit storage in craft.
By default when you set `soldiers` in craft, it become and you can't go higher. You need add `maxUnitsLimit` to override this limit and
have more potential space for solders if you add "cargo pods".

Even like that. This is even more interesting. Thanks for the answer.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9084
    • View Profile
Re: [DONE] Soldiers and vehicles as modifiable craft stats
« Reply #3 on: December 26, 2023, 11:07:13 am »
Code: [Select]
crafts:
  - type: STR_SKYRANGER
    soldiers: 6
    maxUnitsLimit: 11
    weapons: 2

craftWeapons:
  - type: STR_STINGRAY
    stats:
      soldiers: 2

I have to say I'm not very amused that the very first test I made already produced a bug, after 10 seconds of testing.

I guess I'll have to test the whole PR after all :(
« Last Edit: December 26, 2023, 11:10:05 am by Meridian »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9084
    • View Profile
Re: [DONE] Soldiers and vehicles as modifiable craft stats
« Reply #4 on: December 28, 2023, 06:22:35 pm »
Fixed in OXCE 7.10.1

Offline Ethereal

  • Commander
  • *****
  • Posts: 684
    • View Profile
Re: [DONE] Soldiers and vehicles as modifiable craft stats
« Reply #5 on: December 28, 2023, 07:22:42 pm »
Fixed in OXCE 7.10.1

What about my request?

I suggest adding “maxItems” and “maxStorageSpace” there too, for a complete set. :)

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9084
    • View Profile
Re: [DONE] Soldiers and vehicles as modifiable craft stats
« Reply #6 on: December 28, 2023, 07:32:20 pm »
What about my request?

The request is OK.

I have other priorities right now, but I'll get to it eventually.