OXPConfig

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

Moderators: winston, another_commander

User avatar
Lone_Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 546
Joined: Wed Aug 08, 2007 10:59 pm
Location: Netherlands

Re: OXPConfig

Post by Lone_Wolf »

Svengali wrote:
Lone_Wolf wrote:
Some configurable settings will become available later, can OxpcSettings be used multiple times ?
For the same worldScript with the same ID? No - i don't think so (at least it was never intended this way).
My oxp will have an upgrade path with 5 devices, and after upgrades more configurable options become available.

I can think of 2 options to achieve this :
A. add a separate bitmask with 9 bits ( the 4 booleans + 4 short integers + the 24-bit bitmask) where each bit determines if that value is shown/configurable by user.
create a function to set the bitmask.

B.
create a destroy method for oxpCsettings

Both ways have advantages / disadvantages, but option B (destroy method) seems the most logical choice to me.
OS : Arch Linux 64-bit - rolling release

OXPs : My user page

Retired, reachable at [email protected]
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: OXPConfig

Post by Svengali »

Lone_Wolf wrote:
B.
create a destroy method for oxpCsettings

Both ways have advantages / disadvantages, but option B (destroy method) seems the most logical choice to me.
Yes, should be possible .-)

I think I'll go for a simple way, rebuilding the searchtree. Set the LeaveData flag and pass the object to the function then.
Will do some tests and give you a call.
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: OXPConfig

Post by Svengali »

OXPConfig2.0.3 is online.

Changes:
- Added Lone_Wolfs Shield Cycler.
- Raised overall length to max 31 em on screens.
- Added .Hide property and searchtree rebuild.

Special thanks to Lone_Wolf.
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: OXPConfig

Post by Svengali »

OXPConfig2.0.4 is online.

Changes:
- Added Famous Planets (v2.5.1)
- Added System Redux (1.2.1)
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: OXPConfig

Post by Svengali »

OXPConfig2.0.5 is online.

Changes:
- Added Capt.Murphy's Explorers Club
- Added Disclaimer
- Requires: Cabal_Common_Library1.5
- Screen titles use now OXP .Display property
- StartUp behaviour in v1.76 adapted
- Timer behaviour changed
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: OXPConfig

Post by Svengali »

v2.0.6 is online.

Changes:
- Fix undefined station in case player gets launched while in docking process (thanks Commander McLane)
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: OXPConfig

Post by Svengali »

v2.0.7 is online.

Changes:
- Added m4r35n357s Furball
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: OXPConfig

Post by Svengali »

Following the discussion in Thargoids Target Autolock OXP thread:

Ok, got the color stuff working. OXPConfig defines now an array with 20 elements [ [[c0-color1],[c0-color2]], ... ] and a related missionVariable. A simple example could look like:

Code: Select all

this.startUp = function(){
  this.myColor = ["grayColor","greenColor"];
  if(worldScripts.OXPConfig) this.grabArrayDelayed = true;
  else if(missionVariables.genericUserColors){
    var a = JSON.parse(missionVariables.genericUserColors);
    this.myColor = a[1];
  }
}
this.shipWillLaunchFromStation = function(){
  if(this.grabArrayDelayed){
    this.myColor = worldScripts.OXPConfig.genericUserColors[1];
    delete this.grabArrayDelayed;
  }
}
The example defines a default array which is used if neither array, nor the related mV is available. Then it checks if OXPConfig is installed - if so it delays the access (here shipWillLaunchFromStation) to avoid loading order stuff without the need of a timer and grabs the reference. If a user changes the settings through OXPConfigs GUI the references will be automagically updated as well without any callback/registering or constant checking (associative array). If no OXPConfig is installed (= array unavailable), it tries to get the data from the mV.

OXPConfig itself does a similiar thing. The default array get defined in the script body. On startUp it tries to read in the mV. If not available the mV gets created. If OXPConfig shuts down this property is not deleted (unlike most other properties) to stay available for other OXPs. The mV gets updated on leaving the color settings.
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: OXPConfig

Post by Svengali »

OXPConfig2.0.8 is online -> OXPConfig2.0.8 (98 KB)

Changes:
- Added Capt. Murphys coming OXP (I'm sure he'll reveal what it is in the coming days)
- Added Color handling
- Info.plist
- various minor tweaks
- docs updated

For trunk users OXPConfig2.1.1 is online.
Direct link: OXPConfig2.1.1.zip (97 KB)

v2.1.1 uses equipment and HUD to display additional infos.

Special thanks to Capt. Murphy.
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: OXPConfig

Post by Svengali »

OXPConfig2.0.9 is online.

Changes:
Added Capt Murphys "Illegal Goods Tweak"

For trunk users OXPConfig2.1.2 is online as well.
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: OXPConfig

Post by Svengali »

OXPConfig2.0.10 is online.

Changes:
- Added PhantorGorth "Safe Docking"
- Docs updated

For trunk users OXPConfig2.1.3 is online as well.
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: OXPConfig

Post by Svengali »

OXPConfig v2.0.11 is online.

Changes:
- Adapted changes in Cabal_Common
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: OXPConfig

Post by Svengali »

[wiki]OXPConfig[/wiki] v2.0.12 is online.

Changes:
- Added Trickys [wiki]Jaguar_Company[/wiki]
- Changed timer behaviour (is only created when player accesses Game options)
- Further cleanup

v2.2.1 is online as well and has been moved into the folder Developers Edge.
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: OXPConfig

Post by Svengali »

[wiki]OXPConfig[/wiki] v2.0.13 is online.

After a little bit thinking about the difficulty to identify problems in OXPs I've decided to add two new features to OXPConfig. Both are explicitely there to help OXPers in case a user reports trouble.

Changes:
- Added 'Dump missionVariables' in Specials
- Added 'Dump worldScript properties' in Specials

v2.2.2 for trunk is online as well (folder Developers Edge, see signature).
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: OXPConfig

Post by Svengali »

[wiki]OXPConfig[/wiki] v2.0.14 is online.

Changes:
- Added Trickys Friend or Foe.

As the Wiki seems to be a bit flaky I've only updated the OXP page yet. Will try again tomorrow.

v2.2.3 for trunk is online as well (folder Developers Edge, see signature).
Post Reply