Page 1 of 1

Storage space rentals

Posted: Thu Jan 17, 2013 5:40 am
by Massively Locked
Guys- tell me what you think about this idea.

Basically, for some amount of credits, you can rent some storage space (in TCs) in a station for some amount of time. You can then store as many cargo containers as can fit in your storage rental. If you don't pick them up by the time your rental expires, you lose all that you had in there.

This was inspired by a few things: 1) I had a situation where this would have been handy; 2) I was reading about mission variables which seems like the way to save this rental data across game sessions, and 3) the ship-station interface (F4) screen of v1.77 seems like the ideal place for this business.

So... is this do-able or is there some technical deal-breaker that prevents this sort of thing? If this is a bad idea for any non-technical reason, let me know that, too.

Also (and I should have asked this first), has anyone already done this or something like it? If so, just point me in the right direction so I can check it out.

Re: Storage space rentals

Posted: Thu Jan 17, 2013 6:16 am
by Wildeblood
It's a good idea. Being a frequent user of storage units IRL, I like the idea very much.

Apparently similar to Hypercargo OXP, but with the restrictions that you could only retrieve the stored cargo when docked and at a particular station. Once you got started you'd probably find the scripting needed was more different than similar.

To just swap out the whole manifest would be fairly straightforward, if you want to pick and choose one tonne at a time it would be more useful but a pain to code. With the dayChanged event added to 1.77 it's easy to make a counter of how many days your storage contract has to run.

Re: Storage space rentals

Posted: Thu Jan 17, 2013 7:05 am
by Diziet Sma
Nice idea.. me likes! 8)

Re: Storage space rentals

Posted: Fri Jan 18, 2013 8:30 pm
by Switeck
I really like this idea as well...it makes sense in-universe.
Main stations have huge capacities, so renting out that space seems sensible as a way for it to generate additional income.

A problem with storing this information is it would be PER main station (potentially 1000's!) -- unless you want this to be available only at 1 "home port".
GUI issues may be ugly, both for setting up a storage rental and transferring cargo to/from it.
There could possibly be only 2 storage sizes - 10 TC "small" and 100 TC "large"...just to keep things simple. Making the capacity equal to the size of your ship runs into the problem of what happens when you buy a new ship with smaller or larger capacity.

Transfers are done either TO the storage or FROM the storage, with a simple first-in,first-out (FIFO) policy.
Gold/Plat/Gems might have to be treated separately.
So if you have a 35 TC cargo capacity Cobra 3 with 900 kg of Gold and 30 TC computers and 5 TC luxuries already in your 10 TC max capacity storage unit...it would let you transfer 5 TC computer to the storage unit. After that, if you tried to transfer them back to your ship, it would move 4 TC computers and 5 TC Luxuries to your ship and leave 1 TC computers in the storage unit.

It's also possible to make each transfer take some time, like 1 minute regardless of amount of cargo transferred.

The rental fees are likely per day -- you want them to be low enough that people would use them but high enough to not use them everywhere. Does it make sense to always pay for that full capacity amount even if it's mostly empty? Also, WHEN should payment come due? Having the credits auto-deducted from your account every time you visit that station could work, but it seems "silly" to have credits auto-deducted even if you're in another Galaxy Chart! So, the rental should probably be paid for in advance and additional time can be bought and added.

Re: Storage space rentals

Posted: Fri Jan 18, 2013 8:52 pm
by Thargoid
Aside from the interface issue of how to select what goes in and comes out, this would be fairly simple to do. You'd need an array, initially empty but when you make a purchase of space you just push the system ID plus the chosen amount of each cargo onto the array.

On docking with a main station you poll that array, and if the first element of it (the system ID) matches the current system ID then you already have storage there and can act on it accordingly. If not then you can buy some, and there again act on it accordingly by script.

That way the array is just a maximum of 256 elements (one per system, as each system only has 1 main station), where each element is in itself an array of the stored cargo by cargo screen order.

As Wildeblood already said it's script-wise a variant on my HyperCargo/Vortex multibay scripting. The only issue is coming up with a nice way to select what to load/unload. And just have it reset itself on galactic jump, with the rule that if you leave cargo behind in such circumstances then it's gone and you've lost it.

Re: Storage space rentals

Posted: Sat Jan 19, 2013 6:51 am
by Massively Locked
Glad to hear that the idea isn't completely half-baked! :)

By what you guys said, the biggest challenge is the interface. Bummer. I was hoping for something similar to the commodities market screen like this:Image
So with the cursor up/down, you can select the commodity and cursor left/right will move your cargo in & out of storage. But again, I get the impression that JavaScript doesn't handle this or doesn't handle this well.
Switeck wrote:
It's also possible to make each transfer take some time, like 1 minute regardless of amount of cargo transferred.
Definitely- I always thought it's a little odd that buying/selling commodities is instantaneous. The transaction can be, but it should take some time to load/unload a bunch of cargo containers.
Switeck wrote:
The rental fees are likely per day -- you want them to be low enough that people would use them but high enough to not use them everywhere. Does it make sense to always pay for that full capacity amount even if it's mostly empty? Also, WHEN should payment come due? Having the credits auto-deducted from your account every time you visit that station could work, but it seems "silly" to have credits auto-deducted even if you're in another Galaxy Chart! So, the rental should probably be paid for in advance and additional time can be bought and added.
I was thinking that the fees would be mainly based on the size of the storage unit and the amount of time rented. There may also be variances depending on some factors like the station size. For a small station, space is at a premium and therefore more expensive. Large stations, like the Torus, may have cheaper rates. And I agree- full payment up front with the option to purchase additional time if needed.

Alright, much to mull over. Back to the the wikis and Hypercargo I go...

Re: Storage space rentals

Posted: Sat Jan 19, 2013 9:21 am
by cim
Massively Locked wrote:
But again, I get the impression that JavaScript doesn't handle this or doesn't handle this well.
You could draw that screen, though only in 1.77. The only thing you couldn't do is make left and right arrows work properly. You'd instead have to have pressing return on the cargo line take you to a transfer screen for that commodity.

Still, left/right arrows for mission screen controls is something which would simplify quite a few existing OXP interfaces, and shouldn't be that difficult. I'll add it to the list.

Re: Storage space rentals

Posted: Sat Jan 19, 2013 9:30 am
by PhantorGorth
cim wrote:
Massively Locked wrote:
Still, left/right arrows for mission screen controls is something which would simplify quite a few existing OXP interfaces, and shouldn't be that difficult. I'll add it to the list.
Why not just add a "keypressed" argument that is passed to the mission screen callback? Then all sorts of other keys could be utilised.

Re: Storage space rentals

Posted: Sat Jan 19, 2013 9:43 am
by GGShinobi
Massively Locked wrote:
Guys- tell me what you think about this idea.
Good idea!! Like it! :D
Massively Locked wrote:
Switeck wrote:
It's also possible to make each transfer take some time, like 1 minute regardless of amount of cargo transferred.
Definitely- I always thought it's a little odd that buying/selling commodities is instantaneous. The transaction can be, but it should take some time to load/unload a bunch of cargo containers.
How do you like this suggestion: As long as the player is on the screen to transfer cargo from/to the station, the time is running normal. But after the player has finished his transfers and confirms them, the time that it takes to tranfer that cargo is added. You might think of it as the player planning the tranfer on his computer and only submitting the complete transfer order in the end. I think this is more realistic than adding time every time the player transfers a single cargo item, and of course more realistic than cargo transfer taking no time at all.
cim wrote:
Still, left/right arrows for mission screen controls is something which would simplify quite a few existing OXP interfaces, and shouldn't be that difficult. I'll add it to the list.
Yes please!!! I need that, too!!! :mrgreen:

Re: Storage space rentals

Posted: Sat Jan 19, 2013 11:17 am
by Diziet Sma
If this could be made New Cargoes compatible, it would be seriously cool.. it would then be possible to drop various rare items, (usually found in very small quantities) into storage until such time as you had enough of them to warrant finding a buyer, rather than lugging them around, taking up precious cargo space.

Re: Storage space rentals

Posted: Sat Jan 19, 2013 1:53 pm
by Walbrigg
If you store your precious cargo in a storage locker in some fleahole anarchy or multi-government system, I wouldn't absolutely count on it all being there when you come back... :twisted:

Re: Storage space rentals

Posted: Sat Jan 19, 2013 9:52 pm
by Switeck
Massively Locked wrote:
By what you guys said, the biggest challenge is the interface. Bummer. I was hoping for something similar to the commodities market screen like this:
...
So with the cursor up/down, you can select the commodity and cursor left/right will move your cargo in & out of storage. But again, I get the impression that JavaScript doesn't handle this or doesn't handle this well.
...
Alright, much to mull over. Back to the the wikis and Hypercargo I go...
Probably better to get a simple version of "Storage Space Rental OXP" working, then maybe later try to add complex menus.

Hypercargo has an all-or-nothing transfer to and from it. My suggestion might be a minor modification of that to check to see if enough space was available and still do partial transfers if not.
Massively Locked wrote:
I was thinking that the fees would be mainly based on the size of the storage unit and the amount of time rented. There may also be variances depending on some factors like the station size. For a small station, space is at a premium and therefore more expensive. Large stations, like the Torus, may have cheaper rates. And I agree- full payment up front with the option to purchase additional time if needed.
I don't really think of any of the standard main stations as small. Even the Rock Hermit outpost is pretty big compared to the size of a cargo canister. Storage space would basically consist of however many cargo pods locked together rather than each ship having a dedicated storage space. The automated cargo handlers already have to handle cargo loads of potentially multiple Anacondas daily, so even the storage space of a Rock Hermit may be 1000's of TCs and remain mostly empty.
Even if space was at a premium on a main station, cargo could be off-loaded to the planet below using shuttles...so cargo storage capacity could be grossly oversold and at worst all it would cause is a 1 hour delay recovering the cargo from the planet. (This is kind of the philosophy behind our computers' level 1 and 2 caches and main memory and even main memory and swapfile.) Storage on-planet could be long-term storage, relatively cheap but with a 1 hour delay to recover.
Walbrigg wrote:
If you store your precious cargo in a storage locker in some fleahole anarchy or multi-government system, I wouldn't absolutely count on it all being there when you come back... :twisted:
Simple solution to that is to make these storage units only available at a minimum government type and/or tech level. They might not be available in a Communist system but might be in a Dictatorship.

"A minor cargo screwup and shipping error has caused us to lose your stored cargo. We cannot reimburse you for this loss as we are not aware of what you lost."
...Maybe also get insurance with the storage rental? :lol:

Because this cargo doesn't leave the station, it offers a novel way to make a profit...buy low, store, sell high. Best done on commodities which have highly variable prices even at the same station. Presumably, in-universe, huge shipping companies may already do this to make additional profits.