OpenXcom Forum
Modding => Help => Topic started by: robin on April 05, 2019, 12:19:07 am
-
In my mod aliens do the usual alien infiltration, but after succeeding a "subverted headquarters" is spawned instead of the normal alien base (it is a base-like kind of site, and if you beat that mission you can win the country back).
The subverted HQ is populated by mixture of humans and aliens, so it uses a different race from the infiltration UFOs (which is a aliens-only race); this can be obtained straightforwardly using the "race" parameter of the alienDeployment.
My problem is that I'd like the subverted HQ to have a bit of variation in that department, but the "race" parameter only takes one race which means a fixed race for all the subverted HQs ever.
So far the only turnaround I thought of is to duplicate everything: multiple identical alien missions, each with its identical subverted HQ, each with its own race. This would give me the result I want but it is quite inelegant with all that duplication. Is it my only option?
Thanks.
-
1/ A race can have random members: https://www.ufopaedia.org/index.php/Ruleset_Reference_Nightly_(OpenXcom)#Alien_Races
2/ I could easily add random race selection (from a list) to alien deployment too
Which one is better?
-
1/ I already use the random members feature (IIRC I was the one that first requested it :P). But it is not what I'm looking for in this case.
2/ This is the ideal solution. But.... are other modders interested in this too? Because I personally only need a random selection among few races, so the duplication is far from massive (I actually already duplicated everything). I don't really want to waste your time having you code for trivial stuff like this.
-
2/ This is the ideal solution. But.... are other modders interested in this too? Because I personally only need a random selection among few races, so the duplication is far from massive (I actually already duplicated everything). I don't really want to waste your time having you code for trivial stuff like this.
Done.
This was really just 10 minutes work.
-
Oh.
Thank you a lot.
-
alienDeployments:
- type: STR_TEST
randomRace: [STR_SECCTOID, STR_FLOATER, STR_MUTON]
"randomRace" overrides "race" if both attributes are used.
https://lxnt.wtf/oxem/builds//Extended/Extended-5.3.2-bb54b8678-2019-04-05-win32.7z
-
You can do it with the baseCustomMission setting. Example:
alienRaces:
- id: STR_ANTHROPOD
baseCustomMission: STR_SUBVERTED_HEADQUARTERS
- id: STR_SPITTER
baseCustomMission: STR_SUBVERTED_HEADQUARTERS
- id: STR_PSIMORPH
baseCustomMission: STR_SUBVERTED_HEADQUARTERS
- id: STR_SKELETOR
baseCustomMission: STR_SUBVERTED_HEADQUARTERS
- id: STR_MICRONOID
baseCustomMission: STR_SUBVERTED_HEADQUARTERS
As an addition to what Meridian said, you can also put random members into a race. Example:
alienRaces:
- id: STR_EARLY_INTRUSION
members:
- STR_PSIMORPH
- STR_CHRYSALIS
- STR_CHRYSALIS
- STR_ALIEN_EGG
- STR_ANTHROPOD
- STR_SPITTER
- STR_POPPER
- STR_POPPER
membersRandom:
- [STR_PSIMORPH,STR_PSIMORPH,STR_REAVER]
- [STR_CHRYSALIS,STR_ALIEN_EGG]
- [STR_CHRYSALIS]
- [STR_ALIEN_EGG]
- [STR_ANTHROPOD]
- [STR_SPITTER,STR_SPITTER,STR_ANTHROPOD]
- [STR_POPPER]
- [STR_POPPER,STR_BRAINSUCKER]
You can also use membersRandom to make rare encounters:
membersRandom:
- [STR_TURTLE,STR_TURTLE,STR_TURTLE,STR_TURTLE,STR_TURTLE,STR_TURTLE,STR_TURTLE,STR_TURTLE,STR_TURTLE,STR_GIL_TURTLE]
- [STR_GOBLIN,STR_GOBLIN,STR_GOBLIN,STR_GOBLIN,STR_GOBLIN,STR_GOBLIN,STR_GOBLIN,STR_GOBLIN,STR_GOBLIN,STR_TREASURE_GOBLIN]
- [STR_DUCK,STR_DUCK,STR_DUCK,STR_DUCK,STR_DUCK,STR_DUCK,STR_DUCK,STR_DUCK,STR_DUCK,STR_GOOSE]
- [STR_CACTUS,STR_CACTUS,STR_CACTUS,STR_CACTUS,STR_CACTUS,STR_CACTUS,STR_CACTUS,STR_CACTUS,STR_CACTUS,STR_CACTUAR]
- [STR_BLUE_DRAGON,STR_BLUE_DRAGON,STR_BLUE_DRAGON,STR_BLUE_DRAGON,STR_RED_DRAGON,STR_RED_DRAGON,STR_RED_DRAGON,STR_HEXADRAGON_DRAGON,STR_HEXADRAGON_DRAGON,STR_MALBORO]
- [STR_EXCALIPOOR,STR_EXCALIPOOR,STR_EXCALIPOOR,STR_EXCALIPOOR,STR_EXCALIBUR,STR_EXCALIBUR,STR_EXCALIBUR,STR_MASAMUNE,STR_MASAMUNE,STR_ZANMATO]
- [STR_MUTON_SOLDIER,STR_MUTON_SOLDIER,STR_MUTON_SOLDIER,STR_MUTON_SOLDIER,STR_MUTON_SOLDIER,STR_MUTON_SOLDIER,STR_MUTON_SOLDIER,STR_MUTON_SOLDIER,STR_MUTON_SOLDIER,STR_MUTON_COMMANDER]
- [STR_LOSING_LOTTERY_TICKET,STR_LOSING_LOTTERY_TICKET,STR_LOSING_LOTTERY_TICKET,STR_LOSING_LOTTERY_TICKET,STR_LOSING_LOTTERY_TICKET,STR_LOSING_LOTTERY_TICKET,STR_LOSING_LOTTERY_TICKET,STR_LOSING_LOTTERY_TICKET,STR_LOSING_LOTTERY_TICKET,STR_LOSING_LOTTERY_TICKET]