Page 1 of 4

Sorting out the F3 Ship Outfitting screen.

Posted: Wed Dec 15, 2021 10:19 am
by Cholmondely
Cholmondely wrote: Wed Jan 12, 2022 1:55 am
I've created a repository on GitHub for this, so I can start chipping away at it. Other would-be fellow chippers are more that welcome!

https://github.com/Cholmondely-of-Digebiti
_________________________________________________________________________________________________________________________

There are currently more than 500 possible entries for this page.

The order seems to be that of the middle name of the meddling maternal great-grandmother of the muddling manufacturer (in strict alphabetical order, of course...).

Can it be made more useful?
arquebus wrote: Tue Dec 14, 2021 7:42 pm
If there's one thing Oolite needs, it's a way to sort or filter the outfitter. I imagine it's non-trivial to have some kind of categorization (given that category information is, presumably, not a thing in existing OXPs), but that would be even better. Nested menus...
arquebus wrote: Wed Dec 15, 2021 2:34 am
Cholmondely wrote: Tue Dec 14, 2021 8:14 pm
I feel that we would first have to categorise all the equipment - all 316 pieces. This is a non-trivial issue.
Yes, that is the issue. But I would be willing to do it! I'd go through all 316 and categorize them and tag them and make a spreadsheet and everything.
Notice that the 316 omit the 70 varieties of laser and the 69 varieties of missile & bomb. Not to mention your very own favourite small fixes on incomprehensible service levels...

This would presumably be for the new Oolite version 1.92 whenever it emerges from the nebula cluster...



1) So, Arquebus, I made a first stab of it here.

The categories I came up with are

Propulsive (makes it move!)
Astrogatory
Offensive
Defensive
Mercantile
Generic (ie miscellaneous, does not fit in the above)
Various (more than one of the above)

Your playthroughs indicate to me that at least one more category: Maintenance would be needed for the F3 page.

This list developed for covering the vanilla game equipment only. It is not sacred and can be tweaked. Or scrapped.



2) Another categorisation might be HUD/MFD/Compass equipment/Scanner Equipment/Lasers/Missiles/Bombs/Shield equipment/Ship Hull equipment/engine equipment/Torus Drive equipment/....

Should missiles include missile combat (ECM's, missile analysers, chaff...) & should bombs include bomb combat (Mine Safety Catch, Quirium Cascade Mine Detector...)?



3) We would need to find out if the new F3 page could carry section headings. If I understand correctly Phkb tried it with the Joysticks Configuration pages and was defeated by the Vanilla game coding.



But the first thing to do is to come up with a categorisation which makes sense and would be helpful. There are ~500 possible entries for the F3 page that need sorting! And it has to work for Phkb's Ship Configuration too!

We will also need a steer from our Admiralty as to what makes sense here... how can they rejig the F3 screen and what should we be doing....

Any ideas?

References:
*F3 page (ship outfitting)
*Equipment List
*Equipment OXPs List
*Lasers List
*Missiles & Bombs List

Note that these lists exclude the myriad masses of modified equipment from Phkb's Ship Configuration OXP

Re: Sorting out the F3 Ship Outfitting screen.

Posted: Wed Dec 15, 2021 5:05 pm
by arquebus
I like your categories, they're very in-universe sounding.

I would like these categories to work not just as an additional column in the list the way they do for OXP's in the manager. They should work as top level domains, then you select the domain and it switches to the list of items in that domain. I'm guessing that's got the same set of problems as with the joystick configuration screen.

If wishes were horses, I'd want there to be subcategories as well. But that's just me, I imagine a lot of people would get very annoyed with having to burrow two levels deep just to get to the lasers. But we could combine your first category list and your second one, with the second list being sub-ordered off the first. So Astrogation would have, for example, HUD, MFD, Scanner, etc.

There are also certain categorizations that could be done quick and dirty, without input from the OXP creators, just by sorting based on the equipment name. For example, anything that has "laser" in the name would end up in the laser pile.

"Going forward", as it were, though, we would probably want there to be a change (addition) to the manifest.plist requirements. Right now there's a line to specify the OXP category (which is a little loose because it relies on the creator to spell the word consistently, and if they don't, you end up with things like Ambience/Ambiance as it is now). There should also be a line to specify the equipment category, if relevant.

Re: Sorting out the F3 Ship Outfitting screen.

Posted: Wed Dec 15, 2021 8:02 pm
by phkb
Cholmondely wrote: Wed Dec 15, 2021 10:19 am
If I understand correctly Phkb tried it with the Joysticks Configuration pages and was defeated by the Vanilla game coding.
I actually did work this out, and have a plan for including it in a future code change.

Re: Sorting out the F3 Ship Outfitting screen.

Posted: Wed Dec 15, 2021 8:10 pm
by Cholmondely
phkb wrote: Wed Dec 15, 2021 8:02 pm
Cholmondely wrote: Wed Dec 15, 2021 10:19 am
If I understand correctly Phkb tried it with the Joysticks Configuration pages and was defeated by the Vanilla game coding.
I actually did work this out, and have a plan for including it in a future code change.
Hero!

Re: Sorting out the F3 Ship Outfitting screen.

Posted: Wed Dec 15, 2021 8:11 pm
by Cholmondely
arquebus wrote: Wed Dec 15, 2021 5:05 pm
I like your categories, they're very in-universe sounding.

I would like these categories to work not just as an additional column in the list the way they do for OXP's in the manager. They should work as top level domains, then you select the domain and it switches to the list of items in that domain. I'm guessing that's got the same set of problems as with the joystick configuration screen.

If wishes were horses, I'd want there to be subcategories as well. But that's just me, I imagine a lot of people would get very annoyed with having to burrow two levels deep just to get to the lasers. But we could combine your first category list and your second one, with the second list being sub-ordered off the first. So Astrogation would have, for example, HUD, MFD, Scanner, etc.

There are also certain categorizations that could be done quick and dirty, without input from the OXP creators, just by sorting based on the equipment name. For example, anything that has "laser" in the name would end up in the laser pile.

"Going forward", as it were, though, we would probably want there to be a change (addition) to the manifest.plist requirements. Right now there's a line to specify the OXP category (which is a little loose because it relies on the creator to spell the word consistently, and if they don't, you end up with things like Ambience/Ambiance as it is now). There should also be a line to specify the equipment category, if relevant.
So we'll work something out. If we have enough input, we should be able to come up with something GOOD!

Re: Sorting out the F3 Ship Outfitting screen.

Posted: Sun Jan 02, 2022 8:35 pm
by Cholmondely
Is there any chance of doing something about this for Oolite v.1.92?

Both Arquebus and I have offered to categorise all the equipment if that would help, and there may be one or two others who might put their heads above the parapet if there were any point...

Is there any way of at the very least sorting it out into subcategories?

And furtively hopeful... some sort of sorting within those sub-categories (TL? Cost? Alphabetical?).

Re: Sorting out the F3 Ship Outfitting screen.

Posted: Tue Jan 04, 2022 7:25 pm
by hiran
arquebus wrote: Wed Dec 15, 2021 5:05 pm
I would like these categories to work not just as an additional column in the list the way they do for OXP's in the manager. They should work as top level domains, then you select the domain and it switches to the list of items in that domain. I'm guessing that's got the same set of problems as with the joystick configuration screen.

If wishes were horses, I'd want there to be subcategories as well. But that's just me, I imagine a lot of people would get very annoyed with having to burrow two levels deep just to get to the lasers. But we could combine your first category list and your second one, with the second list being sub-ordered off the first. So Astrogation would have, for example, HUD, MFD, Scanner, etc.
Seems we'd like to see a treetable widget for SDL.

Re: Sorting out the F3 Ship Outfitting screen.

Posted: Wed Jan 05, 2022 9:22 pm
by arquebus
hiran wrote: Tue Jan 04, 2022 7:25 pm
Seems we'd like to see a treetable widget for SDL.
That would be glorious.

Re: Sorting out the F3 Ship Outfitting screen.

Posted: Thu Jan 06, 2022 4:13 am
by Nite Owl
There is another way to go about this but it is a long, drawn out, and tiresome process made even more so when multiplied against the number of OXZs/OXPs one might have installed. The first step is to realize that the following bit of code exists for equipment.plist(s).

Code: Select all

"display_color" = "whiteColor";
The "whiteColor" modifier can be any of the variations from the following LIST. RGB color codes can also be used in place of the modifiers on that list but that will only complicate things at this point so we will leave that for another discussion. This bit of code changes the color that a piece of equipment appears as on the F3 screen. Now comes the long, drawn out, and tiresome part. You would have to go into every single equipment.plist associated with your unique Oolite OXZ/OXP install and add the above code to each piece of equipment's entry. You would obviously have to decide first which equipment category would equal which color before the code additions would be made. The final entry in an equipment.plist would look similar to this.

Code: Select all

(
	9,
	5000,
	"Single AMS Dart",
	"EQ_AMS_1",
	"A single dart for the Anti-Missile System launcher.",
	{
		"requires_equipment" =  "EQ_AMS";
		"available_to_all" = true;
		"conditions" = ("mission_amCount equal 5");
		"display_color" = "whiteColor"; // THIS IS THE LINE THAT HAS BEEN ADDED
	}
),
In my Ooniverse this has only been done on a small scale. Items such as the one in the code snippet shown above have been coded to appear WHITE on the F3 screen. This is so that they more easily catch the eye once the time comes to purchase them. These pieces of equipment are usually the renewable ones like the Anti-Missile Darts, Missiles themselves, Bounty Hunter License Renewals, etc.

The only draw back to this method (if done universally) is the loss of the red (sellable) and yellow (purchasable) designations provided by phkb's excellent OXZ EQUIPMENT 'SELL ITEM' COLOR. Having looked at this OXZ it might be possible to do all of this recoloring via a single OXZ but such coding is beyond my meager skills. The real question in all of this is "Can the position of equipment items on the F3 screen be changed"? If memory serves there is a way to do that but it is probably even more drawn out and complicated then what has been described here.

Re: Sorting out the F3 Ship Outfitting screen.

Posted: Thu Jan 06, 2022 10:26 am
by phkb
It’s possible right now, if someone wanted to take the time to do it, to create an equipment-overrides.plist file that just contains the equipment key and a sort order value for every possible equipment item. I’m away from my dev environment at the moment so I can’t do a sample to explain it in detail, but it would be possible, although a gargantuan exercise, to reorder everything into something more logical.

And even if some sort of grouping arrangement was added to the core code, it still wouldn’t auto-allocate equipment, which means we would still need an overrides file if we wanted to put everything into the appropriate spot. Or get every oxp with equipment updated individually.

Re: Sorting out the F3 Ship Outfitting screen.

Posted: Thu Jan 06, 2022 1:14 pm
by Cholmondely
phkb wrote: Thu Jan 06, 2022 10:26 am
It’s possible right now, if someone wanted to take the time to do it, to create an equipment-overrides.plist file that just contains the equipment key and a sort order value for every possible equipment item. I’m away from my dev environment at the moment so I can’t do a sample to explain it in detail, but it would be possible, although a gargantuan exercise, to reorder everything into something more logical.

And even if some sort of grouping arrangement was added to the core code, it still wouldn’t auto-allocate equipment, which means we would still need an overrides file if we wanted to put everything into the appropriate spot. Or get every oxp with equipment updated individually.
I'm up for this. Great! And thank you!

_________________________________________________________________________________________

Arquebus - would you like to take part of the list?

Say all the lasers for a start?



We will also need to fillet the oxp's not on the Expansions Manager and extract Equipment Keys/Names/Identifiers...

Reference:
OXPList
Guide to Unlisted OXPs
_________________________________________________________________________________________

And we need to fine-tune the categories we would use.
Propulsive (makes it move!)
Astrogatory
Offensive
Defensive
Mercantile
Generic (ie miscellaneous, does not fit in the above)
Multiple (more than one of the above where the features are of near-equal importance)

+ Maintenance?
+ Sub-categories:
Offensive: Lasers, Missiles, Bombs, and Other (eg Railguns, QTHI AntiZap...)

We need to decide our categories first (which may well end up getting rejigged as we work our way through)!

Redspear, Switeck, Hiran - any chance of an opinion from you, please?

And all other interested parties... kindly opine!
_________________________________________________________________________________________

Hiran's OutputDir includes the Equipment list (I've his version 6 from June which has 2311 "pieces" of equipment!)

His most recent link/version: https://bb.oolite.space/viewtopic.ph ... 54#p281754 (yesterday)

I presume that Phkb's equipment key is the same as Hiran's identifier

Re: Sorting out the F3 Ship Outfitting screen.

Posted: Fri Jan 07, 2022 6:18 am
by phkb
Here's what the structure of the equipment-overrides.plist file would look like:

Code: Select all

{
  "EQ_EQUIPMENT_KEY1" = {sort_order = 100;};
  "EQ_EQUIPMENT_KEY2" = {sort_order = 110;};
  ...
     and so on
  ...
}
Each unique equipment key would get it's own sort_order value. After that, it's just a matter to wrap it in an OXP/OXZ format, and it should be good to go.

Hopefully that helps get the process started. It would probably be fairly easy for hiran to use his global equipment list to output a sample file with all the keys in it already, and put a place-holder sort_order number next to each, based on the format above, and then the process is even easier.

Re: Sorting out the F3 Ship Outfitting screen.

Posted: Fri Jan 07, 2022 8:03 pm
by hiran
phkb wrote: Thu Jan 06, 2022 10:26 am
It’s possible right now, if someone wanted to take the time to do it, to create an equipment-overrides.plist file that just contains the equipment key and a sort order value for every possible equipment item. I’m away from my dev environment at the moment so I can’t do a sample to explain it in detail, but it would be possible, although a gargantuan exercise, to reorder everything into something more logical.

And even if some sort of grouping arrangement was added to the core code, it still wouldn’t auto-allocate equipment, which means we would still need an overrides file if we wanted to put everything into the appropriate spot. Or get every oxp with equipment updated individually.
It is great that the idea is implementable - but the way you mention sounds like a workaround for me.

Where would we place this new equipment-overrides.plist file? Very likely it would go into an additional OXP. One that would have to be updated and reinstalled whenever any of the other 700 OXPs get updated. How would we ensure this really happens? We already are
- not in control of the build environments all platforms
- not in control of regular builds for all platforms
- not in control over today's already existing OXPs
So why should we create another item that we later cannot control?

I believe the pattern should be something that can be better followed up/sustained in the future - even if it costs more work for now.

Re: Sorting out the F3 Ship Outfitting screen.

Posted: Fri Jan 07, 2022 8:43 pm
by phkb
hiran wrote: Fri Jan 07, 2022 8:03 pm
- not in control over today's already existing OXPs
We will never be in control over the existing OXPs, or even future ones. Unless you mean implementing a breaking change into the core code that would require equipment items to conform to some standard grouping pattern in order for them to appear.

Re: Sorting out the F3 Ship Outfitting screen.

Posted: Sat Jan 08, 2022 2:46 am
by Nite Owl
phkb: A few things.

Went looking for the sort_order parameter after you posted about it on Thursday but could not find any documentation about it on the Wiki. If you or Cholmondely would be so kind as to post it up somewhere appropriate it would be most appreciated. In fact the equipment-overrides.plist is not even listed HERE amongst all of the other .plist documentation. One must dig through several layers of New Release Data to find it mentioned and once there the sort_order parameter is, once again, not to be found.

If one was to create an equipment-overrides.plist that is not within an OXZ/OXP structure and place it in the Config sub-folder of the AddOns folder would it function in the same way as all of the other non OXZ/OXP files that can be placed in the Config sub-folder? If this does work then it would be possible for individuals to create a customized F3 screen sorting order based on whatever OXZs/OXPs they have installed. Still lots of work but possibly a shorter route than creating a comprehensive OXZ that includes every piece of equipment ever created for the game.