Page 2 of 2

Re: Ship availability

Posted: Wed May 31, 2023 9:22 am
by Cholmondely
I think that there may be another complication.

Are the ships for sale in the orbital station shipyard brand-new or second-hand?

Prima facie, the first seems true - but then what happens to all the trade-ins? And if the pirates had any sense, they would be grabbing ships and selling them on the second-hand market too (except of course, many of those markets are on GalCop-controlled stations).

Personally I'd presumed that most of the ships were second-hand but at ludicrous prices. But since I usually stick with my Cobra its not been an issue for me.



This seems another area where the conceptual legacy from the original Oolite has not really been thought through. Where do all these ships come from? Are they made inside the orbital stations? Or are they made on the surface and taken up to the stations for sale? Where are the massive convoys of Faulcon de Lacy ships and missiles as they jump from one system to another as they make their way to their eventual salesrooms? And the accompanying packs of pirates preying on them?

And, as regards the shipyards: Surely, in a corporate state orbital, you will only find the one corporate-dominated shipyard with ships from (say) Isis Interstellar or Zorgon Petterson (just the Asp, the Fer-de-Lance and whatever relevant OXP ships are loaded). But there would be a full selection of these. Plus a disparate second-hand collection of trade-ins. However, in a democracy or a Confederacy there might be several shipyards with a much wider selection. And in an anarchy there might just be the second-hand ships.

The only OXPs which seem to address any of this are
(1) Murgh's 2006 Rusties (His update has yet to be published). But it just provides the ships, not the different shipyards.
And (2) SIRF which supposedly has second-hand ships for sale (not checked it out, sorry!).

Image

Re: Ship availability

Posted: Wed May 31, 2023 3:35 pm
by Redspear
Cholmondely wrote: Wed May 31, 2023 9:22 am
And if the pirates had any sense, they would be grabbing ships and selling them on the second-hand market too (except of course, many of those markets are on GalCop-controlled stations).
Alloys... almost untraceable 8)

However, a 'rusties' market was, and remains, a good idea I think.

"Picks up ten times more females than a Fer-de-Lance" technically, possibly true :lol:

Re: Ship availability

Posted: Wed May 31, 2023 4:57 pm
by Cholmondely
Redspear wrote: Wed May 31, 2023 3:35 pm
"Picks up ten times more females than a Fer-de-Lance" technically, possibly true :lol:
Starting with "your mother"?

Re: Ship availability

Posted: Wed May 31, 2023 6:54 pm
by hiran
Redspear wrote: Tue May 30, 2023 10:00 pm
hiran wrote: Tue May 30, 2023 9:50 pm
How long does it take to travel one galaxy? You could order a unit, roam around and come back for pickup later.
That could be exiting in itself. Given that it happens with cars, ships or planes already would not make it illogical.
And as long as the prices for new ships are high enough the standard Cobra equipped Jameson will not be able to order one. Problem solved, yet there might be special missions that could boost the credits and open up a lot of options.
All makes perfect sense except for... piracy.
It's pretty rife, wouldn't you say?
I'm not sure what/how piracy should be a big impact here. Could you elaborate?
Redspear wrote: Tue May 30, 2023 10:00 pm
hiran wrote: Tue May 30, 2023 9:50 pm
No, the ships would not have to be available everywhere. Having some well-known ship factories that offer one or the other type of ships would be fully sufficient. Also today you cannot buy Ocean Liners in every harbour. And still you can order them.
Right, so how does the player make the order (in a UI sense)? There will be various ways it could be done but what are you imagining? Because if you still have to scroll through all of those ships then it doesn't really matter which system they're coming from does it?
I guess there could be three well-known star systems with big ship factories, each of them bound by a trademark. So specific ships would get built there only. Now it might be a question whether ships can only be ordered in that star system or in a wider range of systems. However to pickup the ship one would have to travel there.
Ordering itself would be done in some station menu. Maybe call it mission screen. Payment is upfront - just in case you wander off and get shot right after the next hyperjump.

There could also be two more star systems with huge ship factories that are not bound to specific brands. There you could get all the misc ships from. - maybe even the branded ones but at a higher price due to licencing cost.
Redspear wrote: Tue May 30, 2023 10:00 pm
hiran wrote: Tue May 30, 2023 9:50 pm
I just have no clue whether OXPs could do that at all, and if yes how that could be achieved.
Sorry, me neither. I'd need to think about it some more.
Mission screen upon entering shipyard?...
Reference similar to ship library?...
Selection triggers mission timer until ship's arrival?... :?
...and some way to add equipment/tuning. That would be really nice, yes.

Re: Ship availability

Posted: Wed May 31, 2023 6:59 pm
by hiran
Cholmondely wrote: Wed May 31, 2023 9:22 am
I think that there may be another complication.

Are the ships for sale in the orbital station shipyard brand-new or second-hand?

Prima facie, the first seems true - but then what happens to all the trade-ins? And if the pirates had any sense, they would be grabbing ships and selling them on the second-hand market too (except of course, many of those markets are on GalCop-controlled stations).
Actually that was something puzzling me already: When I trade my ship I would somehow expect it to show up in the ship market. So far I was not able to undo my sale by getting my ship back - and money was not the issue.
Redspear wrote: Tue May 30, 2023 10:00 pm
Personally I'd presumed that most of the ships were second-hand but at ludicrous prices. But since I usually stick with my Cobra its not been an issue for me.
That kind of ship market always gave me a feeling of second hand.
Redspear wrote: Tue May 30, 2023 10:00 pm
This seems another area where the conceptual legacy from the original Oolite has not really been thought through. Where do all these ships come from? Are they made inside the orbital stations? Or are they made on the surface and taken up to the stations for sale? Where are the massive convoys of Faulcon de Lacy ships and missiles as they jump from one system to another as they make their way to their eventual salesrooms? And the accompanying packs of pirates preying on them?
Hmmm, if no source for ships is modeled into the game, but we clearly have a sink (ships get destroyed), then the number of ships should converge towards zero.
Redspear wrote: Tue May 30, 2023 10:00 pm
And, as regards the shipyards: Surely, in a corporate state orbital, you will only find the one corporate-dominated shipyard with ships from (say) Isis Interstellar or Zorgon Petterson (just the Asp, the Fer-de-Lance and whatever relevant OXP ships are loaded). But there would be a full selection of these. Plus a disparate second-hand collection of trade-ins. However, in a democracy or a Confederacy there might be several shipyards with a much wider selection. And in an anarchy there might just be the second-hand ships.
Yes, that concept sounds reasonable.

Re: Ship availability

Posted: Wed May 31, 2023 7:01 pm
by hiran
cim wrote: Wed May 31, 2023 8:54 am
hiran wrote: Tue May 30, 2023 9:27 pm
Sounds like this function:
https://github.com/OoliteProject/oolite ... se.m#L9014

Given the amount of comments in that code, and the length of it I am not sure who would be able to understand what it is doing.
It's long, and takes a bizarre way around - basically, to avoid having to store the shipyard anywhere persistent, it randomly generates it to a fixed seed algorithm every time it's looked at, but it's conceptually relatively simple.

The shipyard has 256 potential slots. For each slot:
- pick a random entry from the entire list of player available ships (excluding those which fail condition scripts)
- determine an "on sale date" for that slot based on a long loop
- if the slot isn't on sale in its 30-day window based on the current time, leave it blank - so the shipyard will gradually rotate stock as you leave and return. This is on a roughly 200-day cycle, so only about 40 slots are actually active at any time.
- if the ship which would fill the slot is higher tech than the station (or system if the station doesn't have a tech level defined), leave it blank
- if the ship's "chance" in shipyard.plist is <1, roll against that for another chance to leave the slot blank
- if all of the above allows the slot to be filled, potentially give the ship some random weapon upgrades and bonus equipment
Having established which of the slots contain ships, remove all the duplicates in ship+equipment from the list so it doesn't contain 5 identical stock Adders.

It works pretty well for base Oolite - with only 10 player-buyable ships, that's plenty of chances for each to come up, and higher-tech systems have fuller shipyards.

If you add tens or hundreds of OXP player-flyable ships, the chances of any particular ship being there are minimal. It's easy to stop a ship showing up - condition script, low chance value, high tech level - but impossible to guarantee its appearance.
That is a good description. Would it make sense to add this into the source code? Just so that it is not forgotten in this forum but stored where someone in need of it would also find it?

Re: Ship availability

Posted: Wed May 31, 2023 10:13 pm
by Redspear
hiran wrote: Wed May 31, 2023 6:54 pm
I'm not sure what/how piracy should be a big impact here. Could you elaborate?
Sure. First the obvious: piracy adds risk to transport. So a cargo can be damaged or it's ship can be destroyed.
In game individual cannisters can be destroyed or the ship transporting them can suffer the same fate.

Throughout the game this is both demonstrably common and in some/many systems even likely.

What happens if the transit goes wrong?

So a python shipping 100tc of luxuries has a cargo of approximately 91,200 Cr value. The python itself is (potentially) worth up to 200,000 Cr if standard issue, no frills. So an escape pod would be rescuing most of the combined value. Furthermore, the escaping trader, with new ship is well placed (GalCop station with new ship) to immediately begin trading again.

In oolite gameplay terms, build to order is much more like a contract than an opportunistic trade: specific order with a particular time limit.
How many systems must a delivery vessel travel through? And if no delivery then no pay.

To ship an adder would require a much bigger or specialised vessel and yet be worth only 62,000 Cr in cargo, or for a Boa MkII a much more handsome 495,000 Cr.
True build to order would only be one ship via one carrier, and if you're ordering anything larger than a cobra then just how likely is it that the carrier will be able to dock?
If that were not possible then would it require specialist refueling services, escorts etc.?
What would the costs be to that and how much of that is reflected in the price of the ordered ship?
Is that ship externally exposed a la [EliteWiki] EscortDeck (much more vulnerable) or is it sealed within a much larger vessel?

I think that the most likely way to make it viable would be to only ship to the safer systems, which also tend to have the highest tech levels and therefore tend to have the highest ship availabilty and shipyard choice, thereby being least likely to require such an order under the current system in the first place.

More economical still would be to ship in bulk, beginning to move away from the build to order model.

Want that Boa MkII sent to an Anarchy system, why wouldn't it cost exponentially more than it would to be sent to a corporate system?
...perhaps if shipping it to a corporate system required traversing one feudal and two multi-government systems?

Without piracy, risk (and for the most part shipping) is a non-issue.

Best way to minimise shipping cost and risk? Manufacture planetside or even better at the station itself.
If they can maintain a coriolis then they can probably build you an adder.

hiran wrote: Wed May 31, 2023 6:54 pm
There could also be two more star systems with huge ship factories that are not bound to specific brands. There you could get all the misc ships from. - maybe even the branded ones but at a higher price due to licencing cost.
Like travelling to a high tech system? All you have to do to is up the 'chance' values enough in shipdata.plist and pretty much every ship would be available at any tech level 12+ system. Up the tech level requirements as well and you could have your imagined factories be the few tech level 14+ systems in each galaxy map.

No mystery where to find the ships and no wait beyond travelling to one of those systems as soon as the player is ready.


Oh, and as may be obvious in retrospect, there are a bunch of quotes attributed to me above that were actually Cholmondely I believe.

Re: Ship availability

Posted: Wed May 31, 2023 10:28 pm
by hiran
Redspear wrote: Wed May 31, 2023 10:13 pm
hiran wrote: Wed May 31, 2023 6:54 pm
I'm not sure what/how piracy should be a big impact here. Could you elaborate?
Sure. First the obvious: piracy adds risk to transport. So a cargo can be damaged or it's ship can be destroyed.
In game individual cannisters can be destroyed or the ship transporting them can suffer the same fate.

Throughout the game this is both demonstrably common and in some/many systems even likely.

What happens if the transit goes wrong?
I agree that the transport is difficult. But why bother?
I would simply not ship the ship at all. Keep it for pickup at the factory, which means the player has to come and dock at the factory (a rock hermite or a station yet to be created, maybe similar to Star Treck's ship hangars?).
Redspear wrote: Wed May 31, 2023 10:13 pm
hiran wrote: Wed May 31, 2023 6:54 pm
There could also be two more star systems with huge ship factories that are not bound to specific brands. There you could get all the misc ships from. - maybe even the branded ones but at a higher price due to licencing cost.
Like travelling to a high tech system? All you have to do to is up the 'chance' values enough in shipdata.plist and pretty much every ship would be available at any tech level 12+ system. Up the tech level requirements as well and you could have your imagined factories be the few tech level 14+ systems in each galaxy map.

No mystery where to find the ships and no wait beyond travelling to one of those systems as soon as the player is ready.
Let's give that a try! :-)
Redspear wrote: Wed May 31, 2023 10:13 pm
Oh, and as may be obvious in retrospect, there are a bunch of quotes attributed to me above that were actually Cholmondely I believe.
If that happened it was not on purpose. I hope both you and Cholmondely can forgive...

Re: Ship availability

Posted: Wed May 31, 2023 11:50 pm
by Redspear
hiran wrote: Wed May 31, 2023 10:28 pm
Let's give that a try! :-)
So it's effectively a standard shipyard just more reliable and more exclusive.

The following is untested and almost certainly needs tweaking but can be tried as a shipdata-overrides.plist

Code: Select all

{
	"adder-player" =
	{
		chance = 1;//0.25
		price = 65000;
		techlevel = 4;//4
	};
	"anaconda-player" =
	{
		chance = 1;//0.25
		price = 650000;
		techlevel = 12;//8
	};
	"asp-player" =
	{
		chance = 1;//0.5
		price = 375000;
		techlevel = 15;//10
	};
	"boa-player" =
	{
		chance = 1;//0.375
		price = 450000;
		techlevel = 9;//6
	};
	"boa-mk2-player" =
	{
		chance = 1;//0.325
		price = 495000;
		techlevel = 10;//7
	};
	"cobra3-player" =
	{
		chance = 1;//0.5
		price = 150000;
		techlevel = 9;//6
	};
	"cobramk1-player" =
	{
		chance = 1;//0.375
		price = 100000;
		techlevel = 4;//4
	};
	"ferdelance-player" =
	{
		chance = 1;//0.25
		price = 485000;
		techlevel = 12;//8
	};
	"moray-player" =
	{
		chance = 1;//0.375
		price = 125000;
		techlevel = 7;//5
	};
	"morayMED-player" =
	{
		chance = 1;//0.275
		price = 145000;
		techlevel = 9;//6
	};
	"python-player" =
	{
		chance = 1;//0.5
		price = 200000;
		techlevel = 4;//4
	};
}
The old values are stil there so it can be seen what I've done. Price is included as it's the other shipyard factor that influences availabilty to the player (should you wish to tweak that as well).

This, if used on it's own, should affect every shipyard yet still create something approximating the super factories you imagine, so do bear that in mind.

hiran wrote: Wed May 31, 2023 10:28 pm
If that happened it was not on purpose. I hope both you and Cholmondely can forgive...
Of course, no problem :D

Re: Ship availability

Posted: Wed May 31, 2023 11:56 pm
by Cholmondely
hiran wrote: Wed May 31, 2023 7:01 pm
That is a good description. Would it make sense to add this into the source code? Just so that it is not forgotten in this forum but stored where someone in need of it would also find it?
I've pasted Cim's description onto the shipyard.plist page on our wiki.


Oh! And: Forgiven! Forgiven!! Forgiven!!!

Re: Ship availability

Posted: Thu Jun 01, 2023 7:49 pm
by hiran
Cholmondely wrote: Wed May 31, 2023 11:56 pm
hiran wrote: Wed May 31, 2023 7:01 pm
That is a good description. Would it make sense to add this into the source code? Just so that it is not forgotten in this forum but stored where someone in need of it would also find it?
I've pasted Cim's description onto the shipyard.plist page on our wiki.
Thank you. My intention was more to have it added into the source code itself. However I only know about JavaDoc and have no clue how Objective-C would expect something similar.

What might be the correct keyword? AppDoc? Appledoc? Is there such support in the project already?

Edit: I found a hit towards doxygen: https://bb.oolite.space/viewtopic.php?p=275245#p275245
Next step would be to add this into our build pipeline.
Cholmondely wrote: Wed May 31, 2023 11:56 pm
Oh! And: Forgiven! Forgiven!! Forgiven!!!
:-)

Re: Ship availability

Posted: Thu Jun 01, 2023 9:46 pm
by hiran
hiran wrote: Thu Jun 01, 2023 7:49 pm
Cholmondely wrote: Wed May 31, 2023 11:56 pm
hiran wrote: Wed May 31, 2023 7:01 pm
That is a good description. Would it make sense to add this into the source code? Just so that it is not forgotten in this forum but stored where someone in need of it would also find it?
I've pasted Cim's description onto the shipyard.plist page on our wiki.
Thank you. My intention was more to have it added into the source code itself. However I only know about JavaDoc and have no clue how Objective-C would expect something similar.

What might be the correct keyword? AppDoc? Appledoc? Is there such support in the project already?

Edit: I found a hit towards doxygen: https://bb.oolite.space/viewtopic.php?p=275245#p275245
Next step would be to add this into our build pipeline.
Done. We have the documentation as new asset, available here:
https://github.com/OoliteProject/oolite ... tag/latest

So now it should be worth adding more doxygen-style comments into the code to increase maintainability.