Loadout by Category

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

Moderators: winston, another_commander

User avatar
Nite Owl
---- E L I T E ----
---- E L I T E ----
Posts: 556
Joined: Sat Jan 20, 2018 4:08 pm
Location: In The Dark

Re: Equipment Reordering

Post by Nite Owl »

What is the code for adding the headers on the F3 screen without the price and install time showing up?

What is the code for getting the headers on the F5 screen?

Inquiring minds want to know.

Amend that to read - "minds that are ridiculously obsessed with tweaking everything want to know".
Humor is the second most subjective thing on the planet

Brevity is the soul of wit and vulgarity is wit's downfall

Good Night and Good Luck - Read You Soon
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Equipment Reordering

Post by phkb »

Nite Owl wrote: Fri Dec 08, 2023 5:29 pm
What is the code for adding the headers on the F3 screen without the price and install time showing up?

What is the code for getting the headers on the F5 screen?

Inquiring minds want to know.

Amend that to read - "minds that are ridiculously obsessed with tweaking everything want to know".
You’ll need the latest nightly to have the values on the F3 page disappear. After that, just add hide_values = yes; to the equipment item being the header.

For the rest, I’ll get an updated oxz out later today for you to pull apart.
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Equipment Reordering

Post by phkb »

OK, here's an updated version of the OXZ: EquipmentReordering.oxz.

I haven't changed the name yet. Still mulling over the possibilities.

I'd like to put the order of equipment on the F5 Status page back to normal (ie not reversed, which it is at the moment). My local build with this change seems to work OK, but I'm hoping some of the previous devs might stop by and offer insights into why reverse ordering was used on that page. I'm trying to avoid stepping on any landmines, as it were, and changing something that has serious (but currently invisible) gameplay implcations. Obviously, I'm not holding out a lot of hope at the moment, because (a) not many are around any more, and (b) they may not remember what the reason was anyway. So, if I don't get any meaningful answers I might create a PR with the code change.

Is it important? Not hugely so, although it is hard to explain why everything is alpha sorted on the F3 Ship Outfitting page, by reverse alpha sorted on the F5 page.

Anyway, Nite Owl, you can now disembowel the OXP and tweak, tweak, tweak!
Switeck
---- E L I T E ----
---- E L I T E ----
Posts: 2411
Joined: Mon May 31, 2010 11:11 pm

Re: Equipment Reordering

Post by Switeck »

Almost seems like Last In, First Out (LIFO) for F5 equipment screen.

As for why...no clue! (I'm not much of a programmer :P )
User avatar
Nite Owl
---- E L I T E ----
---- E L I T E ----
Posts: 556
Joined: Sat Jan 20, 2018 4:08 pm
Location: In The Dark

Re: Equipment Reordering

Post by Nite Owl »

Came up with a way to Underline the Category Headers on either the F3 or F5 pages. It does involve a lot of extra work and extra entries in a variety of places but it might be worth it once it is done. Have a look.

Code: Select all

(	
	0,
	0,
	"----------------------------------------",
	"EQ_SPACER_01",
	"Spacer",
	{
		available_to_all = yes;
		available_to_NPCs = yes;
		available_to_player = yes;
		condition_script = equip_reording_conditions.js
		hide_values = yes;
		display_color = "cyanColor";
	}
),
For each Category Header you would need an entry like this but with a different Equipment name: EQ_SPACER_01, EQ_SPACER_02, etc. In the equipment-overrides.plist they would have to follow the Category Header they are meant to Underline in an immediate manner numerically with regards to the sort_order = [#]: EQ_CATEGORY_HEADER sort_order = 1, EQ_SPACER_01 sort_order = 2 and so on and so forth. The circles that phkb has placed next to the Category Headers look fine but there is just a small something lacking about them. Still playing around with all of this and sometimes odd things are the result but thought that sharing this idea was the way to go so that others can get odd results as well.
Humor is the second most subjective thing on the planet

Brevity is the soul of wit and vulgarity is wit's downfall

Good Night and Good Luck - Read You Soon
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Equipment Reordering

Post by phkb »

Nite Owl wrote: Sat Dec 09, 2023 7:11 pm
Came up with a way to Underline the Category Headers on either the F3 or F5 pages.
Interesting!
Nite Owl wrote: Sat Dec 09, 2023 7:11 pm
For each Category Header you would need an entry like this but with a different Equipment name: EQ_SPACER_01, EQ_SPACER_02
This would mean you've got two lines per header, correct? On the F3 Outfitting page, which only has about 10 or 11 lines for equipment items, taking up 2 for a header means a lot of extra pages. It would be less of an issue on the F5 page that uses 2 columns, but in both cases you'll have potential pagination issues where the underline equipment item is pushed onto a separate page/column from the header, and no easy way (from what I can see) of forcing them together.

If the problem is the choice I made for the extra characters, it might be simpler just to change the "••" characters to something else. Some suggestions:

Code: Select all

   .: Equipment Header :.
   ** Equipment Header **
   -= Equipment Header =-
   << Equipment Header >>
   // Equipment Header \\
   ## Equipment Header ##
   [[ Equipment Header ]]
   -( Equipment Header )-
Or you could go with none at all. The headers are already in a different colour so as to stand out, so maybe the extra characters are unnecessary. I've used the same colour for headers as I used on the section headers in the keyboard and joystick config, and in those I haven't added extra characters.
Last edited by phkb on Mon Dec 11, 2023 1:40 am, edited 2 times in total.
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Equipment Reordering

Post by phkb »

With the separate thread analysing the origin of the reverse order on the F5 status screen, I'm taking a look at the order of things in this OXP and making some tweaks.

The order I'm planning to move to is:
  • Fuel (and related equipment)
  • General/Misc (reason why this is here below)
  • Navigation
  • Laser Weapons (this will only be in this position on the F3 outfitting page)
  • Pylon Weapons (this will only be in this position on the F3 outfitting page)
  • Energy
  • Defensive
  • Shields
  • Targeting
  • Armour
  • Scanners
  • M.F.D.s
  • Cargo/Mining
  • LMSS
  • Towbar and Accessories
  • Self-Repair System
  • Escorts/Fighters
  • Documentation
  • Illicit
  • Second-Hand Equipment
Regarding the "General/Misc", this is the default position for anything that hasn't been ordered explicitly (ie. equipment from older OXPs). Basically, the core code gives these equipment items a sort order of 1000, and that's the same section as the General/Misc.

Comments on this order? Suggestions? It's a fairly easy job to reorder the list, so happy to switch things around.
User avatar
Nite Owl
---- E L I T E ----
---- E L I T E ----
Posts: 556
Joined: Sat Jan 20, 2018 4:08 pm
Location: In The Dark

Re: Equipment Reordering

Post by Nite Owl »

The circles as originally used are fine. Have also tried most of the symbols previously mentioned. The problem with the limited space on the F3 page and the need for a double entry in order to get the underlines has also occurred. The result, as noted, being that the header and its underline end up on separate pages. As stated previously "odd results" do happen. While underling the headers would be the ideal way to go visually it is probably not the practical way to go given the space limitations involved.

Was wondering though if there would be a way to make use of the allow_big_gui = yes; variable in a hud.plist to increase the size of the F3 page. Granted this would not be an ideal solution either as very few H.U.D.s make use of that variable. There is no way that comes to mind of forcing that variable via something like the Xenon U.I. There is also the given that not every Commander is going to want their H.U.D. to make use of that variable when they are docked. It all becomes a matter of give and take at that point. As usual this is all over-think on my part. The best solution would be to go with the simplest and most practical of solutions.
Humor is the second most subjective thing on the planet

Brevity is the soul of wit and vulgarity is wit's downfall

Good Night and Good Luck - Read You Soon
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Equipment Reordering

Post by phkb »

Nite Owl wrote: Mon Dec 11, 2023 4:58 am
Was wondering though if there would be a way to make use of the allow_big_gui = yes; variable in a hud.plist to increase the size of the F3 page.
Not without changes to the core code. The game is hard set to display with the current page size (11 on a page with only one of the Next/Back options, 10 if there's both), regardless of that setting.
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Equipment Reordering

Post by phkb »

OK, here is the new version of "Loadout By Category"! Thanks for the name, Cody!

For those running the latest Oolite version (that is, Oolite 1.91.0.7574-231217-e230e31, the one with PR #470 in it), you can use LoadoutByCategory.oxz.
For Oolite 1.90 or previous, use this version: LoadoutByCategory_190.oxz

The difference is, with PR#470, I can order things on the F3 screen independently of things on the F5 screen. So, with the version for v1.90, you'll find everything is in reverse alphabetical order on the F5 screen, and the less important groups are shown first on the F5 screen (things like MFD's). With the latest Oolite version, I can (a) order each group alphabetically on both F3 and F5, and (b) put the more important groups first on the F5 screen.
User avatar
Cholmondely
Archivist
Archivist
Posts: 5365
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: Loadout by Category

Post by Cholmondely »

Wiki page now up: Loadout by Category

We now have almost 2,500 pieces of equipment according to Hiran's index. Back in 2004 there were 20-ish:
Ship features

Advanced Space Compass
Cargo Bay expansion
Docking Computers
E.C.M. System
Escape Pod
Fuel Scoops
Galactic Hyperdrive
IFF system
Multi-Targeting System
Passenger Berth
Scanner Targeting Enhancement not yet in 2004, I think
Shield Boosters
Witchdrive Fuel Injectors


Weapons

Beam Laser
ECM Hardened Missile
Energy Bomb
Military Laser
Mining Laser
Missile
Pulse Laser
Q bomb
Twin Plasma Cannon
List is from Jan 2006: https://wiki.alioth.net/index.php?title ... oldid=1647
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
Cholmondely
Archivist
Archivist
Posts: 5365
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: Equipment Reordering

Post by Cholmondely »

phkb wrote: Mon Dec 11, 2023 1:18 am
The order I'm planning to move to is:
  • Fuel (and related equipment)
  • General/Misc (reason why this is here below)
  • Navigation
  • Laser Weapons (this will only be in this position on the F3 outfitting page)
  • Pylon Weapons (this will only be in this position on the F3 outfitting page)
  • Energy
  • Defensive
  • Shields
  • Targeting
  • Armour
  • Scanners
  • M.F.D.s
  • Cargo/Mining
  • LMSS
  • Towbar and Accessories
  • Self-Repair System
  • Escorts/Fighters
  • Documentation
  • Illicit
  • Second-Hand Equipment
I've added this into the Equipment.plist wiki page (the list I pasted in was the current one. I also pasted in the equipment-overrides.plist from the older "Equipment Reordering OXP v.1.1" (the one I use) so that equipment designers can put in a sort-order for themselves. I got bedazzled with the four lists in the current OXP - something to do with the dictates of the Church of Giles the Creator, perhaps?)

You might wish to
1) update it - if it needs it
2) mention your methodology so that these future designers can follow it - eg. why 4 lists, how your ordering principle works (why is LMSS after cargo/mining and not after lasers, why are scanners after armour and not navigation, armour after targeting and not shields, targeting after shields and not lasers/missiles...), how your definitions work etc.
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: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Loadout by Category

Post by phkb »

I’ve now added this to the expansion manager in two versions, one with a minimum Oolite version of 1.91, and one with a maximum Oolite version of 1.90, so, fingers crossed, you should only be able to install one version of it.
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: Loadout by Category

Post by Wildeblood »

phkb wrote: Mon May 27, 2024 7:03 am
I’ve now added this to the expansion manager in two versions, one with a minimum Oolite version of 1.91, and one with a maximum Oolite version of 1.90, so, fingers crossed, you should only be able to install one version of it.
Trying to think how to phrase this... bear with me...
The ability to do a version check exists in JS. So why do you need two separate OXZs?
In your heart, you know it's flat.
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Loadout by Category

Post by phkb »

Features added in 1.91 mean I can do things differently to how I do them for 1.90. The difference exists in the plist files, rather than in JS, so I can’t simply do an internal version check to work out which plist file to use. I also can’t override all the equipment items to add a condition script, as I would be removing existing condition scripts from equipment items. So, the best solution is two OXPs: one for 1.90, one for 1.91.
Post Reply