[Release] Technical reference library OXP 1.0.1

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

Moderators: winston, another_commander

User avatar
spara
---- E L I T E ----
---- E L I T E ----
Posts: 2691
Joined: Wed Aug 15, 2012 4:19 am
Location: Finland

Re: [WIP] Technical reference library OXP 0.6

Post by spara »

Commander McLane wrote:
spara wrote:
Other oxps can add their classified ships to the this.$classifiedRoles array of this oxp or I can hardcode them in if preferred.
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 a script_info.
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.
User avatar
Commander McLane
---- E L I T E ----
---- 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

Post by Commander McLane »

spara wrote:
Commander McLane wrote:
spara wrote:
Other oxps can add their classified ships to the this.$classifiedRoles array of this oxp or I can hardcode them in if preferred.
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 a script_info.
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.
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.
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: [WIP] Technical reference library OXP 0.6

Post by cim »

spara wrote:
I can also check for a key in script_info, if that's more preferable.
Both can be good approaches in different circumstances. 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
User avatar
spara
---- E L I T E ----
---- E L I T E ----
Posts: 2691
Joined: Wed Aug 15, 2012 4:19 am
Location: Finland

Re: [WIP] Technical reference library OXP 0.6

Post by spara »

Thanks guys, I'll put them both in.
User avatar
spara
---- E L I T E ----
---- E L I T E ----
Posts: 2691
Joined: Wed Aug 15, 2012 4:19 am
Location: Finland

Re: [Release] Technical reference library OXP 1.0

Post by spara »

Now it's finished 8). 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.
User avatar
pagroove
---- E L I T E ----
---- 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

Post by pagroove »

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)
Image
https://bb.oolite.space/viewtopic.php?f=4&t=13709
User avatar
spara
---- E L I T E ----
---- E L I T E ----
Posts: 2691
Joined: Wed Aug 15, 2012 4:19 am
Location: Finland

Re: [Release] Technical reference library OXP 1.0

Post by spara »

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?
Press b. :)
User avatar
pagroove
---- E L I T E ----
---- 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

Post by pagroove »

That worked. Excellent oxp!
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
Image
https://bb.oolite.space/viewtopic.php?f=4&t=13709
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: [Release] Technical reference library OXP 1.0

Post by Svengali »

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...?
User avatar
spara
---- E L I T E ----
---- E L I T E ----
Posts: 2691
Joined: Wed Aug 15, 2012 4:19 am
Location: Finland

Re: [Release] Technical reference library OXP 1.0

Post by spara »

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...?
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.
User avatar
Commander McLane
---- E L I T E ----
---- 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

Post by Commander McLane »

spara wrote:
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...?
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.
If you're writing OXPs, I would recommend that you get the test install. That's what it's for. :wink:
User avatar
spara
---- E L I T E ----
---- E L I T E ----
Posts: 2691
Joined: Wed Aug 15, 2012 4:19 am
Location: Finland

Re: [Release] Technical reference library OXP 1.0.1

Post by spara »

Commander McLane wrote:
If you're writing OXPs, I would recommend that you get the test install. That's what it's for. :wink:
Thanks, done. Don't really know why I have not done this before. :roll:
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...?
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. :D

Version 1.0.1 upped with fixes to those test-version warnings.
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: [Release] Technical reference library OXP 1.0.1

Post by Svengali »

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. :D
Looks good, spara .-)
User avatar
Lestradae
---- E L I T E ----
---- 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

Post by Lestradae »

Would it be possible to expand that idea to show that kind of info about ships offered in the shipyard?

Cheers

L
User avatar
spara
---- E L I T E ----
---- E L I T E ----
Posts: 2691
Joined: Wed Aug 15, 2012 4:19 am
Location: Finland

Re: [Release] Technical reference library OXP 1.0.1

Post by spara »

Lestradae wrote:
Would it be possible to expand that idea to show that kind of info about ships offered in the shipyard?

Cheers

L
I would like that too, but currently not possible. Check the thread: https://bb.oolite.space/viewtopic.php?f=6&t=13983.
Post Reply