OpenXcom Forum

Modding => OpenXcom Extended => OXCE Suggestions DONE => Topic started by: Nord on April 01, 2019, 08:49:27 pm

Title: [DONE][Suggestion] Random items in Alien Deployement.
Post by: Nord on April 01, 2019, 08:49:27 pm
Looking at this
Code: [Select]
alienRaces:
  - id: STR_STALKERS2
    retaliation: false
    members:
      - STR_STALKER_1_TERRORIST
      - STR_STALKER_2_TERRORIST
    membersRandom:
      - [STR_CHUPA_TERRORIST,STR_BLINDWOLF_TERRORIST]
I imagined how useful will be random equipment in deployement, just as random members in race.
Code: [Select]
  - type: STR_SMALL_SHIP
    ...
    data: &SmallShipCrew
      - alienRank: 5
        lowQty: 1
        highQty: 2
        dQty: 1
        percentageOutsideUfo: 50
        itemSets:
          -
            - STR_RUSTY_BLADE
          -
            - STR_SWORD_1
          -
            - STR_SPEAR_1
          itemSetRandom:
          -  [STR_HEALTH_POTION,STR_MANA_POTION,STR_AMULET]
Title: Re: [Suggestion] Random items in Alien Deployement.
Post by: krautbernd on April 02, 2019, 12:18:11 pm
Isn't this already covered by alien tech levels and item levels?
Title: Re: [Suggestion] Random items in Alien Deployement.
Post by: Meridian on April 02, 2019, 12:34:02 pm
also, one should design alien inventory manually/carefully, so that they don't go overburdened by random junk

plus, AI doesn't know how to use any potions, amulets or other junk... it can handle only firearms, grenades, melee and blasters...
Title: Re: [Suggestion] Random items in Alien Deployement.
Post by: Nord on April 02, 2019, 02:59:13 pm
also, one should design alien inventory manually/carefully, so that they don't go overburdened by random junk

plus, AI doesn't know how to use any potions, amulets or other junk... it can handle only firearms, grenades, melee and blasters...
Amulets and other stuff is just an example. There can be grenades, or different sidearms.
I have a trouble:
I want to infuse large variety of items in game, but alien item levels is not enough for me. And yes, it can be a various junk. But it depends on modder. Remember alien multitools and bio-samples from Openxcom X-files.
Now i have more than 20 melee weapons, and i dont know how to give them to aliens. Because i dont want to spawn clone missions with diffirent inventory layouts.
But if you dont want to do it, well... I will not insist. :'-(
Title: Re: [Suggestion] Random items in Alien Deployement.
Post by: Meridian on April 02, 2019, 03:07:41 pm
But if you dont want to do it, well... I will not insist. :'-(

I didn't say that... the option is open for discussion.
More feedback from modders is welcome.
Title: Re: [Suggestion] Random items in Alien Deployement.
Post by: Solarius Scorch on April 02, 2019, 03:25:23 pm
Maybe it's enough to add more item levels? X-Com Files has 10, but I imagine you can go as high as you need to.
Title: Re: [Suggestion] Random items in Alien Deployement.
Post by: Nord on April 02, 2019, 06:00:52 pm
Maybe it's enough to add more item levels? X-Com Files has 10, but I imagine you can go as high as you need to.
It is possible. But for most enemys they will be identical.
Title: Re: [Suggestion] Random items in Alien Deployement.
Post by: Finnik on April 04, 2019, 12:50:04 pm
I think it could be a useful option as if you want to have a random array of, say, 20 items, you will need to do lots of copy-paste work to make every deployment inline with it
Title: Re: [Suggestion] Random items in Alien Deployement.
Post by: Solarius Scorch on April 04, 2019, 01:09:09 pm
To me, this is mostly superfluous. But could be useful for civilian equipment lists, as they are more constrained.
Title: Re: [Suggestion] Random items in Alien Deployement.
Post by: Meridian on April 04, 2019, 01:46:01 pm
Code: [Select]
  - type: STR_SMALL_SHIP
    ...
    data: &SmallShipCrew
      - alienRank: 5
        lowQty: 1
        highQty: 2
        dQty: 1
        percentageOutsideUfo: 50
        itemSets:
          -
            - STR_RUSTY_BLADE
          -
            - STR_SWORD_1
          -
            - STR_SPEAR_1
          itemSetRandom:
          -  [STR_HEALTH_POTION,STR_MANA_POTION,STR_AMULET]

So in this example:
1. is the itemSetRandom "instead of" or "in addition to" itemSets?
2. should alien item levels be considered in itemSetRandom too?
3. how many items should be chosen from the random set? 1? 2? random?
4. any need for percentages?
Title: Re: [Suggestion] Random items in Alien Deployement.
Post by: ohartenstein23 on April 04, 2019, 03:09:42 pm
To chime in here I think I would find this useful in 40k, where having a randomized selection of special weapons that also changes over time with alien item levels makes sense in terms of the variety of weapons available in the lore and for increasing difficulty and availability of those weapons over time. In that sense, I'd want to see something along the lines of this:

Code: [Select]
alienDeployments:
  - type: STR_SOME_40K_DEPLOYMENT
    data:
      - alienRank: 5
        itemSetsRandom:
          -
            - [STR_GENERIC_RIFLE, STR_GENERIC_RIFLE_AMMO, STR_GENERIC_RIFLE_AMMO]
            - [STR_GENERIC_RIFLE, STR_GENERIC_RIFLE_AMMO, STR_GENERIC_RIFLE_AMMO]
            - [STR_HEAVY_WEAPON_1, STR_HEAVY_WEAPON_1_AMMO, STR_HEAVY_WEAPON_1_AMMO]
          -
            - [STR_GENERIC_RIFLE, STR_GENERIC_RIFLE_AMMO, STR_GENERIC_RIFLE_AMMO]
            - [STR_HEAVY_WEAPON_1, STR_HEAVY_WEAPON_1_AMMO, STR_HEAVY_WEAPON_1_AMMO]
            - [STR_HEAVY_WEAPON_2, STR_HEAVY_WEAPON_2_AMMO, STR_HEAVY_WEAPON_2_AMMO]
          -
            - [STR_GENERIC_RIFLE, STR_GENERIC_RIFLE_AMMO, STR_GENERIC_RIFLE_AMMO]
            - [STR_HEAVY_WEAPON_2, STR_HEAVY_WEAPON_2_AMMO, STR_HEAVY_WEAPON_2_AMMO]
            - [STR_HEAVY_WEAPON_3, STR_HEAVY_WEAPON_3_AMMO, STR_HEAVY_WEAPON_3_AMMO]

In this example, a level is chosen by alien item levels, then within that level, one of the lines is picked at random so the soldier ends up with the rifle and its ammo or a heavy weapon and its respective ammo.
Title: Re: [Suggestion] Random items in Alien Deployement.
Post by: Nord on April 04, 2019, 05:27:13 pm
So in this example:
1. is the itemSetRandom "instead of" or "in addition to" itemSets?
2. should alien item levels be considered in itemSetRandom too?
3. how many items should be chosen from the random set? 1? 2? random?
4. any need for percentages?

1. In addition. Definitely.
2. I think not. Instead of multiplying entities, modder can put any item in list two or more times to increase spawn chances.
3. I think one.
4. see 2).
Title: Re: [Suggestion] Random items in Alien Deployement.
Post by: Meridian on April 04, 2019, 05:37:58 pm
In this example, a level is chosen by alien item levels, then within that level, one of the lines is picked at random so the soldier ends up with the rifle and its ammo or a heavy weapon and its respective ammo.

This example is really just 3 item levels with 3 random sub-item-levels each.

Same can be achieved using 9 item levels in general.... or in this particular example using just 4 item levels, and adjust the weights under "alienItemLevels:"
Title: Re: [Suggestion] Random items in Alien Deployement.
Post by: ohartenstein23 on April 04, 2019, 06:05:03 pm
Maybe not the best example then, but we have a number of ruleset features to reduce the copy-paste kind of work, which is really what this suggestion is about, is it not?
Title: Re: [Suggestion] Random items in Alien Deployement.
Post by: Meridian on April 06, 2019, 07:18:08 pm
Code: [Select]
alienDeployments:
  - type: STR_SMALL_SCOUT
    data:
      - alienRank: 5
        lowQty: 1
        highQty: 1
        dQty: 0
        percentageOutsideUfo: 50
        itemSets:
          -
            - STR_PLASMA_PISTOL
            - STR_PLASMA_PISTOL_CLIP
            - STR_PLASMA_PISTOL_CLIP
            - STR_MIND_PROBE
          -
            - STR_PLASMA_RIFLE
            - STR_PLASMA_RIFLE_CLIP
            - STR_PLASMA_RIFLE_CLIP
            - STR_MIND_PROBE
          -
            - STR_HEAVY_PLASMA
            - STR_HEAVY_PLASMA_CLIP
            - STR_MIND_PROBE
        extraRandomItems:
          - [STR_MOTION_SCANNER, STR_MEDI_KIT, STR_ELECTRO_FLARE, STR_SMOKE_GRENADE, STR_PROXIMITY_GRENADE]
          - [STR_MOTION_SCANNER, STR_MEDI_KIT, STR_ELECTRO_FLARE, STR_SMOKE_GRENADE, STR_PROXIMITY_GRENADE]
    width: 40
    length: 40
    height: 4

In this sample, the alien soldier will get 1 of the 3 item sets + 2 random items from the "extraRandomItems" list.

Is that what you wanted Nord?
Title: Re: [Suggestion] Random items in Alien Deployement.
Post by: Nord on April 06, 2019, 08:20:59 pm
Yes, exactly. This will be great.
What about empty case?
Code: [Select]
[blabla,,blabla]?
Title: Re: [Suggestion] Random items in Alien Deployement.
Post by: Meridian on April 07, 2019, 01:45:01 am
use something that doesn't exist... e.g. STR_DUD
Title: Re: [Suggestion] Random items in Alien Deployement.
Post by: efrenespartano on August 05, 2019, 09:01:38 pm
Sorry for the necroposting, comrades. But, I have to ask (and in my opinion, it makes sense for me to ask the question here, in the original topic, instead of starting a new one).

Would it be possible to make this feature available to civilians as well? No just on alienDeployments.rul, but also on units.rul