Join us at the Oolite Anniversary Party -- London, 7th July 2024, 1pm
More details in this thread.

Interface Reordering OXP

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

Moderators: another_commander, winston

User avatar
Cholmondely
Archivist
Archivist
Posts: 5015
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: Interface Reordering OXP

Post by Cholmondely »

phkb wrote: Mon Jun 27, 2022 5:33 am
For the Galactic Almanac (v0.7) it's a bit more involved, as there are 33 different calls to "runScreen", and 32 of them need a change. But the fix would be at lines 4655, 4684, 4713, 4740, 4778, 4833, 4886, 4917, 4960, 4991, 5023, 5066, 5098, 5120, 5205, 5283, 8764, 8787, 8814, 8841, 8868, 9215, 9238, 9348, 9381, 9653, 9677, 9791, 9832, 9885, 10050, and 10107.
In each of those instances, between the final "}" and ")" symbols ", this" needs to be inserted, so it looks like this:

Code: Select all

}, this);
That should clear up Galactic Almanac.
I was wondering if this was something to do with the Galactic Almanac changing the title of its interface on the F4 screen from Galactic Almanac Off-line: reality under construction back to Galactic Almanac (when starting / restarting a game with Strangers World up and running).
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4657
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Interface Reordering OXP

Post by phkb »

Cholmondely wrote: Mon Jun 27, 2022 8:25 am
I was wondering if this was something to do with the Galactic Almanac changing the title of its interface on the F4 screen from Galactic Almanac Off-line: reality under construction back to Galactic Almanac (when starting / restarting a game with Strangers World up and running).
No, nothing to do with that. It’s just a small omission that wouldn’t normally be a problem, but has been brought to the surface by this OXP.
Alnivel
Dangerous
Dangerous
Posts: 100
Joined: Fri Jun 10, 2022 7:05 pm

Re: Interface Reordering OXP

Post by Alnivel »

phkb wrote: Mon Jun 27, 2022 3:29 am
A suggestion: In "interface-reordering-main.js", lines 500-504, try the following instead of the "\u2xxx" nomenclature:

Code: Select all

    const markerBeforeOthers = String.fromCharCode(31) + String.fromCharCode(160) + String.fromCharCode(160); // abb
    const markerOthers       = String.fromCharCode(160) + String.fromCharCode(31) + String.fromCharCode(160); // bab
    const markerAfterOthers  = String.fromCharCode(160) + String.fromCharCode(160) + String.fromCharCode(31); // bba
    const markerDepth = String.fromCharCode(160);
And at line 63, try this:

Code: Select all

let prefix = script.$interfacePrefixes[key] || script.$interfacePrefixes[interfaceDefinition.category] || String.fromCharCode(160) + String.fromCharCode(31) + String.fromCharCode(160); // see "markerOther" in $makeInterfacePrefixes
That should remove all the question marks popping up everywhere.
Thank you. I've tried my best to avoid the visible indent before the category name, but sadly it doesn't seem to work well.
In fact, at first I couldn’t even understand what question marks you were talking about and understood only after Cholmondely's screenshots on wiki and checking in the Windows version - it works great on my main system
User avatar
Cholmondely
Archivist
Archivist
Posts: 5015
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: Interface Reordering OXP

Post by Cholmondely »

Alnivel wrote: Mon Jun 27, 2022 5:56 pm
phkb wrote: Mon Jun 27, 2022 3:29 am
A suggestion: In "interface-reordering-main.js", lines 500-504, try the following instead of the "\u2xxx" nomenclature:

Code: Select all

    const markerBeforeOthers = String.fromCharCode(31) + String.fromCharCode(160) + String.fromCharCode(160); // abb
    const markerOthers       = String.fromCharCode(160) + String.fromCharCode(31) + String.fromCharCode(160); // bab
    const markerAfterOthers  = String.fromCharCode(160) + String.fromCharCode(160) + String.fromCharCode(31); // bba
    const markerDepth = String.fromCharCode(160);
And at line 63, try this:

Code: Select all

let prefix = script.$interfacePrefixes[key] || script.$interfacePrefixes[interfaceDefinition.category] || String.fromCharCode(160) + String.fromCharCode(31) + String.fromCharCode(160); // see "markerOther" in $makeInterfacePrefixes
That should remove all the question marks popping up everywhere.
Thank you. I've tried my best to avoid the visible indent before the category name, but sadly it doesn't seem to work well.
In fact, at first I couldn’t even understand what question marks you were talking about and understood only after Cholmondely's screenshots on wiki and checking in the Windows version - it works great on my main system
! I was quite convinced that the question marks were supposed to be there and signified that the items in question had yet to be sorted!
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2867
Joined: Tue Apr 04, 2006 7:02 pm
Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.

Re: Interface Reordering OXP

Post by LittleBear »

Made the changes to the Almanac script (thanks for the line numbers). Given it a quick test and it seems to work fine with the Re-Ordering OXP.

I'll put a v0.8 on the manager over the weekend hopefully, but I'm still having a problem uploading a file to the Wiki, as if I try to upload a ,oxz file it says that .oxz is not an accepted format.
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16063
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Interface Reordering OXP

Post by Cody »

LittleBear wrote: Mon Jun 27, 2022 6:10 pm
...if I try to upload a .oxz file it says that .oxz is not an accepted format.
The Wiki Wizards are still waiting on Winston to fix that.
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
Alnivel
Dangerous
Dangerous
Posts: 100
Joined: Fri Jun 10, 2022 7:05 pm

Re: Interface Reordering OXP

Post by Alnivel »

Version 0.2
  • Fixed question marks at the beginning of category names (I hope)
  • Added reset to no ordering
  • Now changes need to be saved explicitly
Download link: https://www.dropbox.com/s/5c4bbeuw6ntlz ... 2.oxz?dl=1

I would be very grateful if someone could check if I managed to fix the question marks.
User avatar
Cholmondely
Archivist
Archivist
Posts: 5015
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: Interface Reordering OXP

Post by Cholmondely »

Alnivel wrote: Fri Jul 01, 2022 4:10 pm
Version 0.2
  • Fixed question marks at the beginning of category names (I hope)
  • Added reset to no ordering
  • Now changes need to be saved explicitly
Download link: https://www.dropbox.com/s/5c4bbeuw6ntlz ... 2.oxz?dl=1

I would be very grateful if someone could check if I managed to fix the question marks.
Downloaded - thanks! Will report back, in the fullness of time, at the appropriate juncture!
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16063
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Interface Reordering OXP

Post by Cody »

A quick and dirty test reveals no question marks. I presume these log messages are purely informational:

Code: Select all

Screen "Reorder interfaces" restarting has been stopped by key 20CONTENT00_00_NO_KEY
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
Cholmondely
Archivist
Archivist
Posts: 5015
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: Interface Reordering OXP

Post by Cholmondely »

No question marks on my AppleMac - and this seems a tad more intuitive that v.0.1 - well done!

And, thank you!
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
Alnivel
Dangerous
Dangerous
Posts: 100
Joined: Fri Jun 10, 2022 7:05 pm

Re: Interface Reordering OXP

Post by Alnivel »

Cholmondely wrote: Fri Jul 01, 2022 7:14 pm
No question marks on my AppleMac - and this seems a tad more intuitive that v.0.1 - well done!
Cody wrote: Fri Jul 01, 2022 6:50 pm
A quick and dirty test reveals no question marks.
Thanks for checking!
Now I can get on with the Wiki page and publishing in the EM.
Post Reply