[TEST RELEASE-Trunk Only] - Ship_Storage_Helper v0.20 24/06

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

Moderators: another_commander, winston

User avatar
Capt. Murphy
Commodore
Commodore
Posts: 1127
Joined: Fri Feb 25, 2011 8:46 am
Location: UK South Coast.

Re: [WIP-Trunk Only] - Ship_Storage_Helper.oxp v0.15 20/05/1

Post by Capt. Murphy »

Version bumped to v0.15.

Fly_B4_U_Buy is retired from active service and is replaced by Extended_Shipyards.oxp - https://bb.oolite.space/viewtopic.php?f=4&t=11971
[EliteWiki] Capt. Murphy's OXPs
External JavaScript resources - W3Schools & Mozilla Developer Network
Win 7 64bit, Intel Core i5 with HD3000 (driver rev. 8.15.10.2696 - March 2012), Oolite 1.76.1
User avatar
Capt. Murphy
Commodore
Commodore
Posts: 1127
Joined: Fri Feb 25, 2011 8:46 am
Location: UK South Coast.

Re: [WIP-Trunk Only] - Ship_Storage_Helper.oxp v0.16 31/05/1

Post by Capt. Murphy »

Bumped to version 0.16.
v0.16 31/5/12 – Added additional information to header including system.name as a string, information about the station the ship is stored at, and the full price of the stored ship. Added entityPersonality as a ship attribute that is saved and can be restored (maintains paint colours on Griff's ships under full shaders). Thanks to cim for making this option available from trunk revision 4968. Fixed a bug were version 0.15 was unintentionally dependent on the Breakables OXPs.
[EliteWiki] Capt. Murphy's OXPs
External JavaScript resources - W3Schools & Mozilla Developer Network
Win 7 64bit, Intel Core i5 with HD3000 (driver rev. 8.15.10.2696 - March 2012), Oolite 1.76.1
User avatar
Capt. Murphy
Commodore
Commodore
Posts: 1127
Joined: Fri Feb 25, 2011 8:46 am
Location: UK South Coast.

Re: [TEST RELEASE-Trunk Only] - Ship_Storage_Helper v0.17 05

Post by Capt. Murphy »

And to v0.17...
v0.17 05/06/12 - v.017 05/6/12 – Fixed a bug in handling of subEntities when the ship doesn’t have any.
[EliteWiki] Capt. Murphy's OXPs
External JavaScript resources - W3Schools & Mozilla Developer Network
Win 7 64bit, Intel Core i5 with HD3000 (driver rev. 8.15.10.2696 - March 2012), Oolite 1.76.1
User avatar
Capt. Murphy
Commodore
Commodore
Posts: 1127
Joined: Fri Feb 25, 2011 8:46 am
Location: UK South Coast.

Re: [TEST RELEASE-Trunk Only] - Ship_Storage_Helper v0.18 09

Post by Capt. Murphy »

And on to v0.18...
v0.18 09/06/12 – Added compatibility for v0.2 of Resprays for Griffs.oxp
[EliteWiki] Capt. Murphy's OXPs
External JavaScript resources - W3Schools & Mozilla Developer Network
Win 7 64bit, Intel Core i5 with HD3000 (driver rev. 8.15.10.2696 - March 2012), Oolite 1.76.1
User avatar
Capt. Murphy
Commodore
Commodore
Posts: 1127
Joined: Fri Feb 25, 2011 8:46 am
Location: UK South Coast.

[TEST RELEASE-Trunk Only] - Ship_Storage_Helper v0.19 16/06

Post by Capt. Murphy »

And on to v0.19...
v0.19 16/06/12 – Updated compatibility for v0.3 of Respray for Griffs.oxp
[/quote]
[EliteWiki] Capt. Murphy's OXPs
External JavaScript resources - W3Schools & Mozilla Developer Network
Win 7 64bit, Intel Core i5 with HD3000 (driver rev. 8.15.10.2696 - March 2012), Oolite 1.76.1
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: [TEST RELEASE-Trunk Only] - Ship_Storage_Helper v0.19 16

Post by cim »

Capt. Murphy wrote:
And on to v0.19...
v0.19 16/06/12 – Updated compatibility for v0.3 of Respray for Griffs.oxp
[/quote]
Very minor issue on ship replacement: if you have a ship without Shield Boosters / Military Shields, and then buy them, your ship will slowly charge up to the full shield level (so if you launch straightaway, you only have partial shields).

If you're restoring a ship with either/both of those items fitted, it's probably correct to explicitly restore its shield strength to maximum after adding the equipment.
User avatar
Capt. Murphy
Commodore
Commodore
Posts: 1127
Joined: Fri Feb 25, 2011 8:46 am
Location: UK South Coast.

Re: [TEST RELEASE-Trunk Only] - Ship_Storage_Helper v0.20 24

Post by Capt. Murphy »

Thanks cim,

Added in v.20.
v0.20 24/06/12 – Updated compatibility for v0.4 of Respray for Griff’s.oxp so that adjusted decals are correctly restored. Ensure that player shield strength is set to maximum on restore (thanks cim for the report).
[EliteWiki] Capt. Murphy's OXPs
External JavaScript resources - W3Schools & Mozilla Developer Network
Win 7 64bit, Intel Core i5 with HD3000 (driver rev. 8.15.10.2696 - March 2012), Oolite 1.76.1
User avatar
JazHaz
---- E L I T E ----
---- E L I T E ----
Posts: 2991
Joined: Tue Sep 22, 2009 11:07 am
Location: Enfield, Middlesex
Contact:

Re: [TEST RELEASE-Trunk Only] - Ship_Storage_Helper v0.20 24

Post by JazHaz »

Is this OXP still being developed?

I would like to ask, can the OXP store multiple ships? For my OXP project I would like to store up to 4 ships.... :)
JazHaz

Gimi wrote:
drew wrote:
£4,500 though! :shock: <Faints>
Cheers,
Drew.
Maybe you could start a Kickstarter Campaign to found your £4500 pledge. 8)
Thanks to Gimi, I got an eBook in my inbox tonight (31st May 2014 - Release of Elite Reclamation)!
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: [TEST RELEASE-Trunk Only] - Ship_Storage_Helper v0.20 24

Post by cim »

JazHaz wrote:
Is this OXP still being developed?
Capt. Murphy's not been on the forum for a while, but the OXP works and is usable (and I'd strongly recommend it over calling player.replaceShip directly).
JazHaz wrote:
I would like to ask, can the OXP store multiple ships? For my OXP project I would like to store up to 4 ships.... :)
Yes. It converts the ship to a string, so your only limit is on the number of storable strings.
User avatar
JazHaz
---- E L I T E ----
---- E L I T E ----
Posts: 2991
Joined: Tue Sep 22, 2009 11:07 am
Location: Enfield, Middlesex
Contact:

Re: [TEST RELEASE-Trunk Only] - Ship_Storage_Helper v0.20 24

Post by JazHaz »

I've mirrored the last version of this OXP to my box, just in case Capt Murphy's box gets deleted. All of his OXPs are there.

https://app.box.com/s/5axsr83uf4g39ugsgo6h
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Re: [TEST RELEASE-Trunk Only] - Ship_Storage_Helper v0.20 24

Post by JensAyton »

I’m not sure what’s changed, but Ship_Storage_Helper eats up all available JavaScript memory in master. (Raising the limit doesn’t help.)
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: [TEST RELEASE-Trunk Only] - Ship_Storage_Helper v0.20 24

Post by cim »

JensAyton wrote:
I’m not sure what’s changed, but Ship_Storage_Helper eats up all available JavaScript memory in master. (Raising the limit doesn’t help.)
I think this is the way it works out which player ships are available - specifically, if any of the player ships has escorts defined, it will end up in a potentially endless loop, since both for loops use counter variable. Probably the change to shipdata for more templating has put unused escort entries on the player freighters, but there are already OXPs which could break this too. What if you replace

Code: Select all

this.buildDataKeyArray = function(iterations) {...}
with

Code: Select all

this.buildDataKeyArray = function(iterations)
{
  this.dataKeyArray = Ship.keysForRole("player");
  this.dataKeyArrayBuilt = true;
}
That particular function was my motivation for writing Ship.keysForRole anyway.
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Re: [TEST RELEASE-Trunk Only] - Ship_Storage_Helper v0.20 24

Post by JensAyton »

Yep, that works.
User avatar
Norby
---- E L I T E ----
---- E L I T E ----
Posts: 2577
Joined: Mon May 20, 2013 9:53 pm
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Contact:

Ship_Storage_Helper v0.21

Post by Norby »

In v0.21 I added a version check to call keysForRole in Oolite 1.79 and a slightly improved buildDataKeyArray function in 1.77 (from Gallery OXP).

My contributed folder hold Ship_Storage_Helper_0.21_2013.12.16.oxp.zip.
User avatar
Norby
---- E L I T E ----
---- E L I T E ----
Posts: 2577
Joined: Mon May 20, 2013 9:53 pm
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Contact:

Ship_Storage_Helper v0.22

Post by Norby »

Ship Storage Helper v0.22:
- provide support for [wiki]Carriers[/wiki] OXP and [wiki]EscortDeck[/wiki] OXP
- possible to save and restore NPC ships by storeCurrentShip‭(‬ship) and restoreStoredShip(storedShipString, ship‭)

I changed the category to Miscellaneous, was Mechanic but this is a function library.
Post Reply