Deactivate in game expansion manager

General discussion for players of Oolite.

Moderators: winston, another_commander

Post Reply
User avatar
hiran
Theorethicist
Posts: 2403
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Deactivate in game expansion manager

Post by hiran »

Does someone know if it were a lot of work...
...to define a command line parameter that - if set - would hide the in game expansion manager?

It could be automatically set by OoliteStarter to prevent that two expansion managers are active at the same time.

Which file(s) would I have to touch?
Last edited by hiran on Fri Feb 16, 2024 8:31 am, edited 1 time in total.
Sunshine - Moonlight - Good Times - Oolite
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6680
Joined: Wed Feb 28, 2007 7:54 am

Re: Deactivate in game expansion manager

Post by another_commander »

Given that the only way to access the Expansion Manager is via the startup screen menu, you should be able to gray-out the "Manage Expansion Packs" option so that it cannot be selected.

You could start by finding where in the code the text "Manage Expansion Packs" appears. That should be the point where you start looking for how the menu entry is set up and compare it with a different grayed-out skippable menu entry to find out what you need to change in order to disable the one of interest to you.
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: Deactivate in game expansion manager

Post by Wildeblood »

hiran wrote: Thu Feb 15, 2024 7:12 pm
Does someone know if it were a lot of work...
...to define a command line parameter that - if set - would hide the in game expansion manager?

It could be automatically set by OoliteStarter to prevent that two expansion managers are active at the same time.

Which file(s) would I have to touch?
I don't about all that technical stuff, but you can easily hide it by dropping a descriptions.plist into AddOns. I've done it before, and just confirmed it still works.

{
"oolite-start-option-5" = ""; // " Manage All Those Sexy Expansion Packs ";
}
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6680
Joined: Wed Feb 28, 2007 7:54 am

Re: Deactivate in game expansion manager

Post by another_commander »

Wildeblood wrote: Fri Feb 16, 2024 9:07 am
I don't about all that technical stuff, but you can easily hide it by dropping a descriptions.plist into AddOns. I've done it before, and just confirmed it still works.

{
"oolite-start-option-5" = ""; // " Manage All Those Sexy Expansion Packs ";
}
Problem with that is that you can still enter the Expansion Manager by navigating in the gap and pressing Enter. Although the option is not visible, the selection is still possible.
User avatar
hiran
Theorethicist
Posts: 2403
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: Deactivate in game expansion manager

Post by hiran »

another_commander wrote: Fri Feb 16, 2024 10:38 am
Wildeblood wrote: Fri Feb 16, 2024 9:07 am
I don't about all that technical stuff, but you can easily hide it by dropping a descriptions.plist into AddOns. I've done it before, and just confirmed it still works.

{
"oolite-start-option-5" = ""; // " Manage All Those Sexy Expansion Packs ";
}
Problem with that is that you can still enter the Expansion Manager by navigating in the gap and pressing Enter. Although the option is not visible, the selection is still possible.
Then let's prevent that by labelling it 'Format C:>'
Sunshine - Moonlight - Good Times - Oolite
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: Deactivate in game expansion manager

Post by Wildeblood »

another_commander wrote: Fri Feb 16, 2024 10:38 am
Wildeblood wrote: Fri Feb 16, 2024 9:07 am
I don't know about all that technical stuff, but you can easily hide it by dropping a descriptions.plist into AddOns. I've done it before, and just confirmed it still works.

{
"oolite-start-option-5" = ""; // " Manage All Those Sexy Expansion Packs ";
}
Problem with that is that you can still enter the Expansion Manager by navigating in the gap and pressing Enter. Although the option is not visible, the selection is still possible.
Oh, I see what you mean, navigating with the arrow down key. I didn't try that; it's my habit to click on the line with the mouse pointer. The empty string definitely makes it too small a target for the mouse pointer to find. I only mention it because Hiran wrote the other day that part of his Starter works by adding and removing an OXP anyway.
User avatar
hiran
Theorethicist
Posts: 2403
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: Deactivate in game expansion manager

Post by hiran »

another_commander wrote: Fri Feb 16, 2024 8:12 am
Given that the only way to access the Expansion Manager is via the startup screen menu, you should be able to gray-out the "Manage Expansion Packs" option so that it cannot be selected.

You could start by finding where in the code the text "Manage Expansion Packs" appears. That should be the point where you start looking for how the menu entry is set up and compare it with a different grayed-out skippable menu entry to find out what you need to change in order to disable the one of interest to you.
I'll take a look.
Sunshine - Moonlight - Good Times - Oolite
User avatar
hiran
Theorethicist
Posts: 2403
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: Deactivate in game expansion manager

Post by hiran »

Wildeblood wrote: Fri Feb 16, 2024 9:07 am
hiran wrote: Thu Feb 15, 2024 7:12 pm
Does someone know if it were a lot of work...
...to define a command line parameter that - if set - would hide the in game expansion manager?

It could be automatically set by OoliteStarter to prevent that two expansion managers are active at the same time.

Which file(s) would I have to touch?
I don't about all that technical stuff, but you can easily hide it by dropping a descriptions.plist into AddOns. I've done it before, and just confirmed it still works.

{
"oolite-start-option-5" = ""; // " Manage All Those Sexy Expansion Packs ";
}
Seems like you are making use of the i18n features. A grep as a_c suggested revealed this:

Code: Select all

$ grep -r "Manage E" *
Resources/Config/descriptions.plist:	"oolite-start-option-5"			= " Manage Expansion Packs ";
$ 
But searching for the key does not reveal too many opportunities either:

Code: Select all

$ grep -r "oolite-start-option-5" *
Resources/Config/descriptions.plist:	"oolite-start-option-5"			= " Manage Expansion Packs ";
src/Core/Entities/PlayerEntity.m:	text = DESC(@"oolite-start-option-5");
$
It leads to this line: https://github.com/OoliteProject/oolite ... ty.m#L9931
If I commented out 9929 - 9934 I'm still not sure it cannot be selected or activated. Where does the menu control happen?

Just for curiosity I looked at Universe.m but also here I cannot make out some clear menu control code. I'm afraid I am stuck.
Sunshine - Moonlight - Good Times - Oolite
Post Reply