Author Topic: alienItemLevels help  (Read 5798 times)

Offline ibanix

  • Captain
  • ***
  • Posts: 73
    • View Profile
    • Email
alienItemLevels help
« on: July 06, 2014, 09:53:38 am »
Can someone explain how the alienItemLevels work? I can't quite figure it out.

For example, how does:

 - [0, 0, 0, 0, 0, 0, 0, 1, 1, 2]

Map to this:

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

Offline Falko

  • Commander
  • *****
  • Posts: 799
    • View Profile
Re: alienItemLevels help
« Reply #1 on: July 06, 2014, 11:12:15 am »
0 = first list
            - STR_PLASMA_PISTOL
            - STR_PLASMA_PISTOL_CLIP
            - STR_PLASMA_PISTOL_CLIP
            - STR_MIND_PROBE
1 = second list
            - STR_PLASMA_RIFLE
            - STR_PLASMA_RIFLE_CLIP
            - STR_PLASMA_RIFLE_CLIP
            - STR_MIND_PROBE
2 = third list
            - STR_HEAVY_PLASMA
            - STR_HEAVY_PLASMA_CLIP
            - STR_MIND_PROBE
position in itemlevellist = month
frequency of the number = frequency of use in this month
so in  - [0, 0, 0, 0, 0, 0, 0, 1, 1, 2] there is only a 10% chance that the 3rd list is used

Offline ibanix

  • Captain
  • ***
  • Posts: 73
    • View Profile
    • Email
Re: alienItemLevels help
« Reply #2 on: July 06, 2014, 11:56:41 am »
Thank you!

Offline ibanix

  • Captain
  • ***
  • Posts: 73
    • View Profile
    • Email
Re: alienItemLevels help
« Reply #3 on: July 07, 2014, 12:35:07 am »
Why, exactly, is the frequency of use in month defined in such a strange way?

Wouldn't the following be easier to read and use?

- [x, y, z]   where x=first set, y=second set, z=third set (by percentages)

eg.

- [10, 40, 50]

(with a ruleset rejection of the numbers do not sum to 100%)


Offline Falko

  • Commander
  • *****
  • Posts: 799
    • View Profile
Re: alienItemLevels help
« Reply #4 on: July 07, 2014, 12:45:27 am »
i do not know

if you have 5 instead of 3 weapon lists for all missions
you can mod
[0, 1, 1, 2, 2, 2, 3, 3, 3, 4]
and the data format is still the same (no variable length)

and it works fine so no need to change :)

Offline ibanix

  • Captain
  • ***
  • Posts: 73
    • View Profile
    • Email
Re: alienItemLevels help
« Reply #5 on: July 07, 2014, 01:54:51 am »
You can define more than three weapon sets? The game doesn't crash/fail out?

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 10534
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
    • Email
Re: alienItemLevels help
« Reply #6 on: July 07, 2014, 06:32:45 pm »
You can define more than three weapon sets? The game doesn't crash/fail out?

Nope, my Alien Armoury Expanded mod (and by extension, Final Mod Pack) uses four loadouts per enemy. It works fine, as long as it doesn't conflict with another mod that adds loadouts.

Offline Harald_Gray

  • Colonel
  • ****
  • Posts: 142
    • View Profile
Re: alienItemLevels help
« Reply #7 on: August 04, 2014, 12:06:53 am »
And is there actually a way of making a mod that will remain compatible? I've probably run into this kind of problem just now.

If I use three item levels, mods that use four can crash the game. If I use four levels and don't modify vanilla itemsets, those vanilla missions crash the game. If I don't set alienItemLevels, I'm stuck with vanilla setting or whatever other mod creators set.

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 10534
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
    • Email
Re: alienItemLevels help
« Reply #8 on: August 04, 2014, 12:18:23 am »
If I use three item levels, mods that use four can crash the game.

Yes, you'll have to make sure all mods that modify alienDeployments have the same number of levels.basically you'll have to add (the simple way is to duplicate) one entry per each alien in each mission in the other ruleset. Not that much of a job, but still, it needs to be done.

If I use four levels and don't modify vanilla itemsets, those vanilla missions crash the game.

Yes, that's why the Alien Armoury Expanded contains them all, so they're all upgraded.

Offline Harald_Gray

  • Colonel
  • ****
  • Posts: 142
    • View Profile
Re: alienItemLevels help
« Reply #9 on: August 04, 2014, 01:14:36 am »
Problem is, if *I* do set it all then I'm AFAIK changing the settings for all the other mods too and if other mods get loaded after mine, then somebody else is changing my settings.

Plus I'm beginning to test my new mod and I've had the game crash when I've attempted a MiB mission and the crash message was pretty much the same one I got when I've had those itemsets wrong, so this is about more than just changing somebody's settings.

I've used three itemlevels and defined four in my new missions, which seems to mostly work - but I'm still looking for a better solution.

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 10534
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
    • Email
Re: alienItemLevels help
« Reply #10 on: August 04, 2014, 01:39:21 am »
Problem is, if *I* do set it all then I'm AFAIK changing the settings for all the other mods too and if other mods get loaded after mine, then somebody else is changing my settings.

Yeah, you practically need to check and possibly modify all mods you're using to fit the same number of equipment slots. I don't think there's any other way.

I can't think of any viable solution to this problem...
« Last Edit: August 04, 2014, 11:36:26 pm by Solarius Scorch »

Offline Arthanor

  • Commander
  • *****
  • Posts: 2488
  • XCom Armoury Quartermaster
    • View Profile
Re: alienItemLevels help
« Reply #11 on: August 04, 2014, 06:24:22 pm »
AH! You guys are awesome! I just found out why the Elerium Bomb mod crashed my terror sites! If I load it after the Alien Armoury Expanded, there's an itemSets conflict (Armoury uses 4 sets, Bomb only defines 3). If I load it before, I think I've seen aliens use it (edit: No, it appears that stun bombs look exactly like real explosions..! Somehow I thought they were different) but I have not been able to pick even one up...

Solarius: Would you be interested in an update of your Armoury that includes the Elerium Bomb? I'll make one for my own use any ways and it fits well within the Armoury's intent of giving aliens more weapons.

EDIT: I just finished it and I can now run terror missions with Elerium bombs :D I have attached the Armoury ruleset with added Elerium bombs. It is basically just pasting Fatrat's code (all credits to him!) into the Alien Armoury, and referencing the resources under the Armoury Resources folder (just paste the Elerium Bomb into the Armoury's main Resources folder)
« Last Edit: August 04, 2014, 07:23:50 pm by Arthanor »