The in-built ability to set configuration flags for OXPs

An area for discussing new ideas and additions to Oolite.

Moderators: winston, another_commander

Post Reply
User avatar
SandJ
---- E L I T E ----
---- E L I T E ----
Posts: 1048
Joined: Fri Nov 26, 2010 9:08 pm
Location: Help! I'm stranded down here on Earth!

The in-built ability to set configuration flags for OXPs

Post by SandJ »

A suggestion for a change to the core Oolite program:
• to support OXPs which have configuration settings, include a page in the Config screen for altering them.

The idea being to save newbies having to find the OXP's /thingummy/doobrie/shipdata.plist file and a non-Notepad editor and learn JScript.

It would be necessary for OXPs to provide the flags they set, and their validation rules (even if as just text advice: "Between 0 to 255"), so once the core program changes, OXPs writers will be able to take advantage of the functionality if they wish.

So whereas at the moment Oolite sets values and OXPs over-write and/or add to them, this is the opposite of Oolite being able to over-write values set by OXPs. So the OXP provides the default values and informs Oolite of what variables can be configured, then the OXP needs to check Oolite's OXP_Variables.plist to see what the user has configured them to be.
Extra config screen wrote:
OXP Settings
Armoury
Instant Death weapons enabled (1 = anyone can have them, 0 = nobody can)
0

auto_eject
Energy level (default 22, will eject when less)
44

Basic-Debug
Default port (1 to 65535, default 8563)
8563

Fuel Station
extraA (1 = satellites + stations, 0 = satellites)
1
extraB (1 = NPCs can use fuel stations, 0 = only you can)
1

Illegal Goods Tweak
Scan all ships (1 = 100% scanned, 0 = chance not scanned)
1

Target Autolock Plus
Lock range (0 to 25 km, recommend at least 3)
5
Lock time (seconds, default is 5)
60
Sensitivity (0.1 to 0.7, default 0.3, higher is more likely to lock)
0.6

Wasps
Appear in hyperspace (default = 1 for Yes, use 0 for no)
1
The Explorers'_Club OXP would benefit greatly from this.
Flying a Cobra Mk I Cobbie 3 with nothing but Explorers Club.OXP and a beam laser 4 proper lasers for company :D
Dropbox referral link 2GB of free space online + 500 Mb for the referral: good for securing work-in-progress.
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: The in-built ability to set configuration flags for OXPs

Post by cim »

Other than being core rather than OXP functionality, how does this differ from what [wiki]OXPConfig[/wiki] does?
User avatar
SandJ
---- E L I T E ----
---- E L I T E ----
Posts: 1048
Joined: Fri Nov 26, 2010 9:08 pm
Location: Help! I'm stranded down here on Earth!

Re: The in-built ability to set configuration flags for OXPs

Post by SandJ »

cim wrote:
Other than being core rather than OXP functionality, how does this differ from what [wiki]OXPConfig[/wiki] does?
In that I was suggesting something user-friendly, whereas following that link and reading the text, I still don't know what OXPConfig is for. Is it meant for users or developers of OXPs?
Flying a Cobra Mk I Cobbie 3 with nothing but Explorers Club.OXP and a beam laser 4 proper lasers for company :D
Dropbox referral link 2GB of free space online + 500 Mb for the referral: good for securing work-in-progress.
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: The in-built ability to set configuration flags for OXPs

Post by cim »

SandJ wrote:
cim wrote:
Other than being core rather than OXP functionality, how does this differ from what [wiki]OXPConfig[/wiki] does?
In that I was suggesting something user-friendly, whereas following that link and reading the text, I still don't know what OXPConfig is for. Is it meant for users or developers of OXPs?
Both. Users get a config screen for supported OXPs through OXPConfig, which then passes the config decisions (or the defaults) back to the OXPs.
User avatar
snork
---- E L I T E ----
---- E L I T E ----
Posts: 551
Joined: Sat Jan 30, 2010 4:21 am
Location: northern Germany

Re: The in-built ability to set configuration flags for OXPs

Post by snork »

both - the text there is meant for oxp-ers, I think.

The first time I saw the config dialogue in-game (for Snoopers) - it really was a wow! moment.
Easy, smart, comfy, slick!

edit : yeah, right.
User avatar
SandJ
---- E L I T E ----
---- E L I T E ----
Posts: 1048
Joined: Fri Nov 26, 2010 9:08 pm
Location: Help! I'm stranded down here on Earth!

Re: The in-built ability to set configuration flags for OXPs

Post by SandJ »

So when newbies ask "Which OXPs do I need?", this should be first on the list, yes? (I don't recall it being suggested.)

In which case, why not make it part of the core product and make it the responsibility of OXPs to tell Oolite which variables it can amend?
Flying a Cobra Mk I Cobbie 3 with nothing but Explorers Club.OXP and a beam laser 4 proper lasers for company :D
Dropbox referral link 2GB of free space online + 500 Mb for the referral: good for securing work-in-progress.
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: The in-built ability to set configuration flags for OXPs

Post by cim »

SandJ wrote:
So when newbies ask "Which OXPs do I need?", this should be first on the list, yes? (I don't recall it being suggested.)
Well, maybe. It's of course only useful in those cases where:
1) An OXP has multiple settings; and
2) The OXP uses OXPConfig; and
3) You don't like the default settings.

I have over 100 OXPs between my "installed" and "have tried" directories, and I've never actually used OXPConfig to change any settings.
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: The in-built ability to set configuration flags for OXPs

Post by Svengali »

cim wrote:
1) An OXP has multiple settings; and
2) The OXP uses OXPConfig; and
3) You don't like the default settings.
This sums it up very well .-)

OXPConfig is more or less only a GUI (with the expansion to store and load settings) to give OXPs the possibility to let users change settings in the game. But it can do this only for OXPs which are including the necessary data (and if the OXP is in the database for performance reasons). This way it's still up to the OXPers to decide if they want user settings or not. It's really easy to implement the data and probably only needs user requests.
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6683
Joined: Wed Feb 28, 2007 7:54 am

Re: The in-built ability to set configuration flags for OXPs

Post by another_commander »

SandJ wrote:
In which case, why not make it part of the core product and make it the responsibility of OXPs to tell Oolite which variables it can amend?
It is kind of policy that we do not include OXPs in the core distribution. The core has to be the absolute minimum required to run the game, nothing else. The only OXP that has been excepted from this rule is the Basic-debug.oxp. The reason it has been included as optional in the Windows/Linux distributions is that it is sometimes necessary for OXP debugging and it was becoming common for OXPers to download older / invalid versions of this OXP from the wiki or elsewhere (especially common case with the use of nightly builds), resulting in inexplicable sudden crashes and a lot of associated bug reports. Instead of having users go look for the latest debug oxp that works with the current version of the game, we thought it better to have the right basic-debug version packed with the game and thus solve these kind of problems. But other than this, no other OXPs are scheduled to be part of the core distribution.
User avatar
Fatleaf
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 1988
Joined: Tue Jun 08, 2010 5:11 am
Location: In analysis mode on Phaelon
Contact:

Re: The in-built ability to set configuration flags for OXPs

Post by Fatleaf »

another_commander wrote:
But other than this, no other OXPs are scheduled to be part of the core distribution.
In my opinion this is the right way to go. With a lot of oxp's you either really like it or you don't and to force a new play to have a set that wouldn't be to his style would only go to put people off. As we would be telling them that anything else is wrong.
One of the strengths of the game is its ability to be changed according to the player. A new player might not know how to locate the AddOns folder to change things.
So allowing the new player to find his feet with the bare bones of the game is a good thing to do.
Find out about the early influences of Fatleaf here. Also his OXP's!
Holds the Ooniversal record for "Thread Necromancy"
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: The in-built ability to set configuration flags for OXPs

Post by Svengali »

Fatleaf wrote:
another_commander wrote:
But other than this, no other OXPs are scheduled to be part of the core distribution.
In my opinion this is the right way to go. With a lot of oxp's you either really like it or you don't and to force a new play to have a set that wouldn't be to his style would only go to put people off.
Yep. Additionally I think that shifting even more work in direction of Oolites developers is a no-go. It's a job for a 3rd-party application if at all, but all plans to create such a thing (a few times in the last years by different users) have died pretty soon, sometimes even within the same day of posting about it. So OXPConfig is the best tool we have (not difficult - it's the only tool in that area).
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Re: The in-built ability to set configuration flags for OXPs

Post by Kaks »

another_commander wrote:
It is kind of policy that we do not include OXPs in the core distribution. The core has to be the absolute minimum required to run the game, nothing else. The only OXP that has been excepted from this rule is the Basic-debug.oxp.
And in the not-too-distant future we're very likely to fully integrate what's now inside basic-debug into the core (debug) distribution, so we'll be back to no OXPs, like nature intended! :mrgreen:
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
Post Reply