541
Help / Re: Randomized alien equipment?
« on: November 24, 2019, 11:24:09 am »
If I understand correctly how alienItemLevels: + itemSets: work is that:
(1)
The possible equipment loadout for each alien Rank on the UFO is defined in the alienDeployments: itemSets: section, example:
(2)
When a UFO mission's battlescape is generated depending how many months have passed ingame since the start of the game the corresponding line in alienItemLevels: is used to select one of 10 random values in a 10 dimensioned array. This value determines which of the itemSets: STR_ITEM_NAME groups is used.
(Or the last line in alienItemLevels: if the number of months past exceeds the number of lines written in the alienItemLevels: section.)
So for example if it was the second month using the above code example there would be a 50% chance of it being either item level 1 or 2.
If item level 1 was selected this would translate into all Rank 5 aliens carrying 1 Plasma Rifle & 2 Clips where as if the UFO generated using item level 2 all Rank 5 aliens would be equipped with 1 Heavy Plasma & 2 Clips.
Am I correct about this or does it randomly assign each alien equipment from an item set belonging to the current item level or lower when they are placed on the battlescape?
(My understanding is they all share the same assigned item level once it has been rolled during mission generation.)
As you are suggesting I agree that expanding the alienItemLevels: + itemSets: to a total of ten would add more variation, example:
However all aliens of each Rank will share the same equipment when the item level is selected, and if membersRandom: is used to change the alien unit type of that Rank so that the UFO could have a Sectoid or Muton soldier they will still all share the same equipment with only the unit carrying it differing.
If instead of using alienDeployments: itemSets: the units: builtInWeaponSets: variables are used and the Sectoid soldier is assigned to have a Plasma Pistol for item levels 0,1,2 and the Muton soldier is assigned to carry a Plasma Rifle for item level 0 & 1 and a heavy plasma at item level 2, then the Rank 5 itemSets: would not be shared by both the Muton and Sectoid on the same UFO.
Additionally if several versions of each unit are created with different builtInWeaponSets: like below:
Sectoid Soldier (A) With Plasma Pistol
Sectoid Soldier (B) With Plasma Pistol & Grenades
Sectoid Soldier (C) With Plasma Rifle & Grenades
Muton Soldier (A) With Plasma Rifle
Muton Soldier (B) With Heavy Plasma
Muton Soldier (C) With Blaster Bomb Launcher
Then the alienRaces: membersRandom: variables could be used to randomly place different Rank 5 units that each have a different loadout, instead of all Rank 5 units sharing the same loadout on the same UFO.
If I've read the UFOpaedia correctly each time a unit is spawned on the battlescape using membersRandom: it is randomized so there could potentially be several different Rank 5 units on the same map.
(Question)
Have I misunderstood how "alienDeployments: itemSets:" "units: builtInWeaponSets:" "alienRaces: membersRandom:" function?
(1)
The possible equipment loadout for each alien Rank on the UFO is defined in the alienDeployments: itemSets: section, example:
Code: [Select]
alienDeployments:
- type: STR_MIB_SMALL_SCOUT
data:
- alienRank: 5
lowQty: 3
highQty: 6
dQty: 3
percentageOutsideUfo: 100
itemSets:
-
- STR_PLASMA_PISTOL
- STR_PLASMA_PISTOL_CLIP
- STR_PLASMA_PISTOL_CLIP
-
- STR_PLASMA_RIFLE
- STR_PLASMA_RIFLE_CLIP
- STR_PLASMA_RIFLE_CLIP
-
- STR_HEAVY_PLASMA
- STR_HEAVY_PLASMA_CLIP
- STR_HEAVY_PLASMA_CLIP
width: 40
length: 40
height: 4
(2)
When a UFO mission's battlescape is generated depending how many months have passed ingame since the start of the game the corresponding line in alienItemLevels: is used to select one of 10 random values in a 10 dimensioned array. This value determines which of the itemSets: STR_ITEM_NAME groups is used.
(Or the last line in alienItemLevels: if the number of months past exceeds the number of lines written in the alienItemLevels: section.)
Code: [Select]
alienItemLevels:
- [0, 0, 0, 0, 0, 1, 1, 1, 1, 1]
- [2, 2, 2, 2, 2, 1, 1, 1, 1, 1]
- [2, 2, 2, 2, 2, 2, 2, 2, 2, 2]
So for example if it was the second month using the above code example there would be a 50% chance of it being either item level 1 or 2.
If item level 1 was selected this would translate into all Rank 5 aliens carrying 1 Plasma Rifle & 2 Clips where as if the UFO generated using item level 2 all Rank 5 aliens would be equipped with 1 Heavy Plasma & 2 Clips.
Am I correct about this or does it randomly assign each alien equipment from an item set belonging to the current item level or lower when they are placed on the battlescape?
(My understanding is they all share the same assigned item level once it has been rolled during mission generation.)
I probably misunderstand the objective, but if your goal is to simply increase the range of possible weapons, why not simply increase the number of item levels? For example, I have 10 in the X-Com Files.
As you are suggesting I agree that expanding the alienItemLevels: + itemSets: to a total of ten would add more variation, example:
Code: [Select]
alienItemLevels:
- [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
alienDeployments:
- type: STR_MIB_SMALL_SCOUT
data:
- alienRank: 5
lowQty: 3
highQty: 6
dQty: 3
percentageOutsideUfo: 100
itemSets:
-
- STR_PLASMA_PISTOL
- STR_PLASMA_PISTOL_CLIP
- STR_PLASMA_PISTOL_CLIP
-
- STR_PLASMA_RIFLE
- STR_PLASMA_RIFLE_CLIP
- STR_PLASMA_RIFLE_CLIP
-
- STR_HEAVY_PLASMA
- STR_HEAVY_PLASMA_CLIP
- STR_HEAVY_PLASMA_CLIP
-
- STR_SMALL_LAUNCHER
- STR_STUN_BOMB
- STR_STUN_BOMB
-
- STR_BLASTER_LAUNCHER
- STR_BLASTER_BOMB
- STR_BLASTER_BOMB
-
- STR_LASER_PISTOL
-
- STR_LASER_RIFLE
-
- STR_HEAVY_LASER
-
- STR_ALIEN_GRENADE
- STR_ALIEN_GRENADE
- STR_ALIEN_GRENADE
- STR_ALIEN_GRENADE
-
- STR_LASER_PISTOL
- STR_ALIEN_GRENADE
- STR_ALIEN_GRENADE
width: 40
length: 40
height: 4
However all aliens of each Rank will share the same equipment when the item level is selected, and if membersRandom: is used to change the alien unit type of that Rank so that the UFO could have a Sectoid or Muton soldier they will still all share the same equipment with only the unit carrying it differing.
If instead of using alienDeployments: itemSets: the units: builtInWeaponSets: variables are used and the Sectoid soldier is assigned to have a Plasma Pistol for item levels 0,1,2 and the Muton soldier is assigned to carry a Plasma Rifle for item level 0 & 1 and a heavy plasma at item level 2, then the Rank 5 itemSets: would not be shared by both the Muton and Sectoid on the same UFO.
Additionally if several versions of each unit are created with different builtInWeaponSets: like below:
Sectoid Soldier (A) With Plasma Pistol
Sectoid Soldier (B) With Plasma Pistol & Grenades
Sectoid Soldier (C) With Plasma Rifle & Grenades
Muton Soldier (A) With Plasma Rifle
Muton Soldier (B) With Heavy Plasma
Muton Soldier (C) With Blaster Bomb Launcher
Then the alienRaces: membersRandom: variables could be used to randomly place different Rank 5 units that each have a different loadout, instead of all Rank 5 units sharing the same loadout on the same UFO.
If I've read the UFOpaedia correctly each time a unit is spawned on the battlescape using membersRandom: it is randomized so there could potentially be several different Rank 5 units on the same map.
(membersRandom) Alternative to members. Instead of defining just a single unit type per alien rank, you can define any number of unit types here and one will be chosen randomly (each time a new unit is generated). To increase a chance of a certain unit type being selected, you can add it multiple times.
(Question)
Have I misunderstood how "alienDeployments: itemSets:" "units: builtInWeaponSets:" "alienRaces: membersRandom:" function?