Author Topic: Limiting access to some armours?  (Read 2761 times)

Offline Keth01

  • Captain
  • ***
  • Posts: 50
    • View Profile
Limiting access to some armours?
« on: April 17, 2018, 01:19:22 pm »
Hi all,

I'm mulling over having constructable android soldiers in my mod who are recruitable after certain research is unlocked. To balance them and add uniqueness I was thinking of building a lot of their abilities into their armour stats (and thus preventing them from wearing other armour as a balancing strategy).

Is there an elegant way to accomplish this in any of the current builds?

Offline ohartenstein23

  • Commander
  • *****
  • Posts: 1933
  • Flamethrowers fry cyberdisk circuits
    • View Profile
Re: Limiting access to some armours?
« Reply #1 on: April 17, 2018, 01:54:27 pm »
Yes, this is done already in Piratez with many different soldier types and in X-Com Files with dogs and tanks. The most important part is maintaining a list of unit types on each armor that can wear it.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9091
    • View Profile
Re: Limiting access to some armours?
« Reply #2 on: April 17, 2018, 02:02:47 pm »
Yes, it is available in all current builds.

Just define (for each armor), which soldier types are allowed to use it (attribute "units").

E.g.

Code: [Select]
armors:
  - type: STR_MY_SPECIAL_ARMOR
    units:
      - STR_SOLDIER_TYPE_A
      - STR_SOLDIER_TYPE_B

soldiers:
  - type: STR_SOLDIER_TYPE_A
    requires:
      - STR_TECH_TO_UNLOCK_SOLDER_TYPE_A

Offline Keth01

  • Captain
  • ***
  • Posts: 50
    • View Profile
Re: Limiting access to some armours?
« Reply #3 on: April 18, 2018, 07:57:50 am »
That's beautifully straightforward. Thanks guys!