Clobbering order for AddOns .plist keys

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

User avatar
submersible
Commodore
Commodore
Posts: 264
Joined: Thu Nov 10, 2011 7:49 am

Clobbering order for AddOns .plist keys

Post by submersible »

Is there a defined or predictable order in which plists eg planetinfo.plist are applied and hence can be clobbered by another plist? Are whole structures clobbered ?

eg: my.oxp defines a planetinfo for Lave ; and my-v2.oxp defines it also

Code: Select all

{
   "0 7" = {
       texture = "my-oxp-texture.png";
   };
}

Code: Select all

{
   "0 7" = {
       texture = "my-v2-oxp-texture.png";
   };
}
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: Clobbering order for AddOns .plist keys

Post by Smivs »

As far as I know, it depends on the order that OXPs are loaded - last one loaded wins. The load order is unpredictable, with some compters seeming to do this alphabetically and others seemingly at random.
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2453
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia
Contact:

Re: Clobbering order for AddOns .plist keys

Post by Wildeblood »

Ya, what Smivs wrote. On Windows it's alphabetical, on other systems, unpredictable.
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Re: Clobbering order for AddOns .plist keys

Post by Commander McLane »

Wildeblood wrote:
Ya, what Smivs wrote. On Windows it's alphabetical, on other systems, unpredictable.
Small correction: on Windows and Mac it's alphabetical, on Linux it's unpredictable.
User avatar
Tricky
---- E L I T E ----
---- E L I T E ----
Posts: 821
Joined: Sun May 13, 2012 11:12 pm
Location: Bradford, UK. (Anarchic)

Re: Clobbering order for AddOns .plist keys

Post by Tricky »

Is there any reason why the AddOns directory list can not be scanned and sorted in order to harmonise all OS's?
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: Clobbering order for AddOns .plist keys

Post by Smivs »

The trouble here is that, say they could be allways be made to load alphabetically, all new OXPs would be called z_newOXP.oxp :wink: :lol:
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: Clobbering order for AddOns .plist keys

Post by Eric Walch »

Smivs wrote:
... all new OXPs would be called z_newOXP.oxp :wink: :lol:
Definitely not! I would always uses Ω_newOXP.oxp for my files to make sure I beat the z-files. :P
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Clobbering order for AddOns .plist keys

Post by cim »

Tricky wrote:
Is there any reason why the AddOns directory list can not be scanned and sorted in order to harmonise all OS's?
People might start relying on a particular order, giving unexpected bugs if people use another method of sorting their OXPs (e.g. renaming OXP folders, or creating folders like 'eyecandy.oxp' and 'ships.oxp' inside their AddOns folder to categorise their addons).

In answer to the original question, you can guarantee that OXP A will be loaded after OXP B by placing OXP A inside OXP B.
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Re: Clobbering order for AddOns .plist keys

Post by Commander McLane »

cim wrote:
In answer to the original question, you can guarantee that OXP A will be loaded after OXP B by placing OXP A inside OXP B.
… and now I can see a whole new level of madness coming over us all, with OXPers giving detailed instructions as to where exactly to install their OXPs. :? Goodbye, good ol' days of "just drop it into AddOns". :roll:

But seriously, and before that madness begins: everybody, please be aware that telling the player to install an OXP within another OXP is not an option for Mac users, because for them OXPs are (or at least appear to be) single files with no "inside" to begin with. Guiding single users—especially those who want to get into OXPing—through how to deal with packages is okay, and a necessary step in learning how to create OXPs. But that's different from what the general public should be expected to learn and do on their computers, in order to just play a simple game.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: Clobbering order for AddOns .plist keys

Post by Eric Walch »

cim wrote:
People might start relying on a particular order, giving unexpected bugs if people use another method of sorting their OXPs
And sorting will also be language specific. At least on the mac, the sorting of things like u, ü, ù etc used to be customised with the language settings. And I used to have a numeric sorting 'plug-in' that made sure that the string '000044' was sorted after '22'. Just a pity that most programs never called the system sorting routine to do their sorting.
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Clobbering order for AddOns .plist keys

Post by cim »

Commander McLane wrote:
But seriously, and before that madness begins:
Indeed. It's useful to know if you're testing an OXP and want to drop a temporary override to a file or two in; it's not suited to distribution.
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6312
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: Clobbering order for AddOns .plist keys

Post by Diziet Sma »

cim wrote:
In answer to the original question, you can guarantee that OXP A will be loaded after OXP B by placing OXP A inside OXP B.
At first I thought "Aha! Here's a neat way to deal with the Halsis/BGS problems on Linux!" but after reading the rest of this thread, I think I'll just leave it as is.. patching BGS itself.
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
User avatar
Pleb
---- E L I T E ----
---- E L I T E ----
Posts: 908
Joined: Sun Apr 29, 2012 2:23 pm
Location: United Kingdom

Re: Clobbering order for AddOns .plist keys

Post by Pleb »

Smivs wrote:
The trouble here is that, say they could be allways be made to load alphabetically, all new OXPs would be called z_newOXP.oxp :wink: :lol:
Ah, the good old days of quake (and quake engine releated) mods... zzzzzzzzzzzzzzzzzzzzzzzzzzzMy_New_Mod_Frag_Frag_Frag.pk3 :lol:
Desktop PC: CPU: Intel i7-4790K Quad Core 4.4GHz (Turbo-Charged) GPU: Nvidia GeForce GTX 1080Ti RAM: 32GB DDR3

Laptop PC: CPU: Intel i5-10300H Quad Core 4.5GHz (Turbo-Charged) GPU: Nvidia GeForce GTX 1650 RAM: 32GB DDR4
Halfhand
Competent
Competent
Posts: 32
Joined: Thu Jan 17, 2013 6:07 pm

Re: Clobbering order for AddOns .plist keys

Post by Halfhand »

Maybe oxp dependencies could be looked at the same time, that would fix a lot of compatibility issues as well as missing oxps.

it would also determine a load order that couldn't be overridden by oxp names.

just my tuppence
_____________________________
When the revolution comes, stand clear of all walls!
User avatar
submersible
Commodore
Commodore
Posts: 264
Joined: Thu Nov 10, 2011 7:49 am

Re: Clobbering order for AddOns .plist keys

Post by submersible »

Halfhand wrote:
Maybe oxp dependencies could be looked at the same time, that would fix a lot of compatibility issues as well as missing oxps.

it would also determine a load order that couldn't be overridden by oxp names.

just my tuppence
That's really the only realistic option by the sounds of it. Looking at trunk (and I probably should have done this to begin with) it would need some serious rethink of how OXP loading and verification is determined. I wonder if it is important to anyone other than me.

To demand that some other OXPs are loaded BEFORE yours would mean a format something like,

Code: Select all

{
  "version" = "1.77";
  "depends" = {
    "my_base_package" = "0.09";
    "Cabal_Common_Comms" = "1.4.5"
  };
}
and of course that raises the question of how to stamp OXPs with that information without fully loading them first.
Post Reply