aliens

Author Topic: Using the same listOrder: value in different mods.  (Read 3936 times)

Offline The Martian

  • Commander
  • *****
  • Posts: 754
  • "It implores you to listen to its arguments..."
    • View Profile
Using the same listOrder: value in different mods.
« on: November 29, 2017, 11:27:53 pm »
If two (or more) mods have items / research / etc that assign something to the same position using listOrder: what happens?

From what I can see it appears that doing this increases the position of the item that previously occupied that value by +1.




Are there any negatives to having overlapping listOrder: positions?

Does inserting a new item at an already occupied value move every item that has an equal or greater value by +1, or is it just the overlapping entry that gets moved?




Offline Yataka Shimaoka

  • Colonel
  • ****
  • Posts: 284
  • I'm the trouble maker
    • View Profile
Re: Using the same listOrder: value in different mods.
« Reply #1 on: November 30, 2017, 07:53:58 am »
Game breaking results

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: Using the same listOrder: value in different mods.
« Reply #2 on: November 30, 2017, 08:25:15 am »
Game breaking results
nah, it depends on the mod load order.
new items using a pre-existing listorder value will have it increased to the first unused value, and the first mod loaded takes precedence.

so if mod A adds two items with listOrder: 1024, the first one listed in the mod will be 1024, the second will be 1025.
if mod B then adds an item at 1024, it will be inserted as 1026.
when mod C adds an item at 1024 and 1027, the first one listed in the mod will claim the 1027 slot, and the second one will go to 1028.

if you were to shuffle the mods so that C was loaded first:
mod C's items will occupy the 1024 slot and 1027 slot as intended.
mod A will then get 1025 and 1026 according to the order they appear in the mod.
mod B will add its item at 1028.

etc.

note that these values only affect where things appear in the in-game lists, and have no effect whatsoever on the underlying functionality.
« Last Edit: November 30, 2017, 10:38:21 am by Warboy1982 »

Offline The Martian

  • Commander
  • *****
  • Posts: 754
  • "It implores you to listen to its arguments..."
    • View Profile
Re: Using the same listOrder: value in different mods.
« Reply #3 on: December 04, 2017, 03:58:31 pm »
Thank you for explaining how listOrder: operates.