Array is set at start up, so that after init any oxp can add roles to it by doing worldScripts.tech_ref_lib.$classifiedRoles.push("foo"). I can also check for a key in script_info, if that's more preferable.Commander McLane wrote:Instead of editing an array in your OXP (which will force you and everybody else to permanently update it), this would be a good case for using aspara wrote:Other oxps can add their classified ships to the this.$classifiedRoles array of this oxp or I can hardcode them in if preferred.script_info
.
[Release] Technical reference library OXP 1.0.1
Moderators: winston, another_commander
Re: [WIP] Technical reference library OXP 0.6
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
Re: [WIP] Technical reference library OXP 0.6
My reasoning is that most ship OXPs don't contain a script at all, just the shipdata.plist. Thus it's most convenient for ship designers to take care of this aspect via the shipdata as well.spara wrote:Array is set at start up, so that after init any oxp can add roles to it by doing worldScripts.tech_ref_lib.$classifiedRoles.push("foo"). I can also check for a key in script_info, if that's more preferable.Commander McLane wrote:Instead of editing an array in your OXP (which will force you and everybody else to permanently update it), this would be a good case for using aspara wrote:Other oxps can add their classified ships to the this.$classifiedRoles array of this oxp or I can hardcode them in if preferred.script_info
.
Re: [WIP] Technical reference library OXP 0.6
Both can be good approaches in different circumstances.spara wrote:I can also check for a key in script_info, if that's more preferable.
script_info
has the big advantage that the Ship OXP author doesn't need to add a worldscript to their OXP solely to push data to another OXP which may or may not be installed - it can all be done in the plist. The JS approach can be useful for an OXP which may want to hide the specs temporarily but release them after a certain stage.On the JS approach I think that it's better to provide an API function e.g.
this._classifyRole(role)
rather than have people set values directly. Then if you decide to change the internal implementation you don't need to keep that exact array around with that exact format (and other data structures with other formats from other OXP versions) to keep compatibility with other OXPs - you just need to change what's inside _classifyRole
Re: [WIP] Technical reference library OXP 0.6
Thanks guys, I'll put them both in.
Re: [Release] Technical reference library OXP 1.0
Now it's finished . Release version 1.0 is up. I'll add it to the wiki later.
* New wireframe graphics. Graphics are taken from game's wireframe mode.
* Individual backgrounds and wireframes for the core ships.
* Added api-functions for classifying and declassifying ships.
* Added check for script_info key classifiedShip.
* Constrictor, ships from Aliens oxp, Black Monk Gunships, ships with a role bigTrader, Green Gecko and ships from Capisastra oxp are marked as classified by default.
* Textual tweaks, nothing spectacular.
* New wireframe graphics. Graphics are taken from game's wireframe mode.
* Individual backgrounds and wireframes for the core ships.
* Added api-functions for classifying and declassifying ships.
* Added check for script_info key classifiedShip.
* Constrictor, ships from Aliens oxp, Black Monk Gunships, ships with a role bigTrader, Green Gecko and ships from Capisastra oxp are marked as classified by default.
* Textual tweaks, nothing spectacular.
- pagroove
- ---- E L I T E ----
- Posts: 3035
- Joined: Wed Feb 21, 2007 11:52 pm
- Location: On a famous planet
Re: [Release] Technical reference library OXP 1.0
Looks excellent but I have a question. When I lock onto a ship and press shift-n and then n the specs are shown neatly in the hud. But how do I view the library. pressing 7 won't work anymore?
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
https://bb.oolite.space/viewtopic.php?f=4&t=13709
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
https://bb.oolite.space/viewtopic.php?f=4&t=13709
Re: [Release] Technical reference library OXP 1.0
Press b.pagroove wrote:Looks excellent but I have a question. When I lock onto a ship and press shift-n and then n the specs are shown neatly in the hud. But how do I view the library. pressing 7 won't work anymore?
- pagroove
- ---- E L I T E ----
- Posts: 3035
- Joined: Wed Feb 21, 2007 11:52 pm
- Location: On a famous planet
Re: [Release] Technical reference library OXP 1.0
That worked. Excellent oxp!
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
https://bb.oolite.space/viewtopic.php?f=4&t=13709
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
https://bb.oolite.space/viewtopic.php?f=4&t=13709
Re: [Release] Technical reference library OXP 1.0
I get lots of warnings in the log about unknown expansion keys. Maybe it's time to get rid of the approach via descriptions.plist...?
Re: [Release] Technical reference library OXP 1.0
Those should only appear if some kind of extended logging (debug?) is used. I have never seen them, as I have the basic 1.77 install. I'll scratch my head a bit, if I can think of another solution.Svengali wrote:I get lots of warnings in the log about unknown expansion keys. Maybe it's time to get rid of the approach via descriptions.plist...?
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
Re: [Release] Technical reference library OXP 1.0
If you're writing OXPs, I would recommend that you get the test install. That's what it's for.spara wrote:Those should only appear if some kind of extended logging (debug?) is used. I have never seen them, as I have the basic 1.77 install. I'll scratch my head a bit, if I can think of another solution.Svengali wrote:I get lots of warnings in the log about unknown expansion keys. Maybe it's time to get rid of the approach via descriptions.plist...?
Re: [Release] Technical reference library OXP 1.0.1
Thanks, done. Don't really know why I have not done this before.Commander McLane wrote:If you're writing OXPs, I would recommend that you get the test install. That's what it's for.
Changed the descriptions.plist approach to a missiontext.plist approach (thanks go to Tricky for the hint) and no more errors with the test-build.Svengali wrote:I get lots of warnings in the log about unknown expansion keys. Maybe it's time to get rid of the approach via descriptions.plist...?
Version 1.0.1 upped with fixes to those test-version warnings.
Re: [Release] Technical reference library OXP 1.0.1
Looks good, spara .-)spara wrote:Changed the descriptions.plist approach to a missiontext.plist approach (thanks go to Tricky for the hint) and no more errors with the test-build.
- Lestradae
- ---- E L I T E ----
- Posts: 3095
- Joined: Tue Apr 17, 2007 10:30 pm
- Location: Vienna, Austria
Re: [Release] Technical reference library OXP 1.0.1
Would it be possible to expand that idea to show that kind of info about ships offered in the shipyard?
Cheers
L
Cheers
L
Re: [Release] Technical reference library OXP 1.0.1
I would like that too, but currently not possible. Check the thread: https://bb.oolite.space/viewtopic.php?f=6&t=13983.Lestradae wrote:Would it be possible to expand that idea to show that kind of info about ships offered in the shipyard?
Cheers
L