The new OXPConfig version is nearly done and it is time to build the database for supported oxps. Only if included in this database loading and storing will be enabled for this oxp. The pics on the first page are pretty outdated, but will give you a first impression how it looks.
OXPConfig2 will support:
- 4 booleans.
- 4 short unsigned integers (0xff).
- 1 unsigned 24Bit integer (0xffffff) that is used as bitmask e.g. to en/disable appearance of entities.
- Minimum version checks.
- Early calls of oxps startUp function if flag is set.
- Early settings if OXPConfig has collected the data and flag is set.
- Notification for oxps about changed settings if flag is set. Calls oxpcNotifyOnChange().
- Uses a library that PhantorGorth, Cmd.Cheyd and myself are currently testing (lib is requirement then).
If any of your worldScripts should be included in the database I'll need some infos:
- name of worldScript
- display name for OXPConfig2, can be different from the scriptname.
The script will get an ID (stored in OXPConfig) that is internally used then. OXPConfig will look for a specific object (oxpcSettings) and collects the data. If LeaveData flag is not set, OXPConfig deletes the object (oxpcSettings).
Code: Select all
this.oxpcSettings = {
Info: {
Name: "myOXP",
// required (string), name of the worldScript, can also be simply this.name
Display: "myOXP",
// optional (string), if not specified defaults to Name
MinVersion: "1.0",
// optional (string), if not specified defaults to "0.0"
EarlyCall: true,
// optional (boolean), if not specified defaults to false
EarlySet: true,
// optional (boolean), if not specified defaults to false
Notify: true,
// optional (boolean), if not specified defaults to false
LeaveData: true,
// optional (boolean), if not true OXPConfig deletes oxpcSettings after gathering the infos
InfoB: "Additional infos for the booleans",
// optional (string)
InfoS: "Additional infos for the short unsigned integers",
// optional (string)
InfoE: "Additional infos for the unsigned integer."
// optional (string)
},
// Propertyname, e.g. this.logging use "logging" (string), the default value (boolean) and short description (string)
Bool0: {Name: "propertyname1", Def: false, Desc: "Short description for boolean0"},
Bool1: {Name: "propertyname2", Def:true, Desc:"Short description for boolean1"},
Bool2: {Name: "propertyname3", Def:true, Desc:"Short description for boolean2"},
Bool3: {Name: "proeprtyname4", Def:true, Desc:"Short description for boolean3"},
// Propertyname, e.g. this.additionalPlanets use "additionalPlanets" (string)
// the default value (unsigned short integer 0x0-0xff or 0-255)
// the maximum value (unsigned short integer 0x1-0xff or 1-255)
// short description (string)
SInt0: {Name: "propertyname5", Def: 0x2, Max: 0xf, Desc: "Short description for shortint0"},
SInt1: {Name: "propertyname6", Def: 0xaf, Max: 0xbf, Desc: "Short description for shortint1"},
SInt2: {Name: "propertyname7", Def: 0xfe, Max: 0xff, Desc: "Short description for shortint2"},
SInt3: {Name: "propertyname8", Def: 0x10, Max: 0x13, Desc: "Short description for shortint3"},
// Propertyname, e.g. this.myEntities use "myEntities", default value (unsigned integer 0x0-0xffffff)
// maximum value (unsigned integer 0x1-0xffffff) and description for every bit (array with strings)
EInt0: {Name:"propertyname9",Def:0xfff,Max:0xffffff,
Desc:["desc01","desc02","desc03","desc04","desc05","desc06","desc07","desc08","desc09","desc10","desc11","desc12",
"desc13","desc14","desc15","desc16","desc17","desc18","desc19","desc20","desc21","desc22","desc23","desc24"]
};
Code: Select all
this.oxpcSettings = {
Info: {Name: this.name},
Bool0: {Name:"myBooleanProperty", Def:true, Desc:"Do funny things."}
};