Ship availability

General discussion for players of Oolite.

Moderators: winston, another_commander

User avatar
hiran
Theorethicist
Posts: 2410
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Ship availability

Post by hiran »

When adding a new expansion providing one or several new ships for the game, I have to search eight galaxies with in total 2048 star systems to find if any of these ships are on sale just for me to buy one.

Is there a more structured way to get the ship of choice?
Or why do I have to go opportunistically on the used ship market at all? Are there not ship factories that would build to order?
Sunshine - Moonlight - Good Times - Oolite
User avatar
Cholmondely
Archivist
Archivist
Posts: 5381
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: Ship availability

Post by Cholmondely »

hiran wrote: Tue May 30, 2023 4:42 pm
When adding a new expansion providing one or several new ships for the game, I have to search eight galaxies with in total 2048 star systems to find if any of these ships are on sale just for me to buy one.

Is there a more structured way to get the ship of choice?
Or why do I have to go opportunistically on the used ship market at all? Are there not ship factories that would build to order?
If you know what you are doing, you can get the debug console to add it in.

Image
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6696
Joined: Wed Feb 28, 2007 7:54 am

Re: Ship availability

Post by another_commander »

While docked, enter in the console:

Code: Select all

player.replaceShip("player_ship_key_as_it_appears_in_shipdata_plist")
Imstant ship replacement occurs.
User avatar
Cholmondely
Archivist
Archivist
Posts: 5381
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: Ship availability

Post by Cholmondely »

I very much like the idea of building ships to order.

We don't seem to have much of the manufacturing side of things in Oolite.

There are only three relevant OXPs to my knowledge:

1) Spara's Station Validator ensures that destroyed stations are not magically replaced if you revisit the system 24 hours later. But you see no station-constructing activity.


2) Svengali's BuoyRepair Facility

Image


3) Mandoman's Mandotech Station & Shipyards. Again, no visible construction activity.

Image
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
Nite Owl
---- E L I T E ----
---- E L I T E ----
Posts: 558
Joined: Sat Jan 20, 2018 4:08 pm
Location: In The Dark

Re: Ship availability

Post by Nite Owl »

For those not using the Development version of Oolite (v1.91) with the Debug Console you can get a ship to appear at all Shipyards with a few TWEAKS to the SHIPYARD.PLIST of that particular ship. The code to TWEAK can be found in the CHANCE and TECH LEVEL sections of the shipyard.plist for the ship in question. The Debug Console method is easier and much cheaper but may not be applicable to everyone in every situation.
Humor is the second most subjective thing on the planet

Brevity is the soul of wit and vulgarity is wit's downfall

Good Night and Good Luck - Read You Soon
User avatar
hiran
Theorethicist
Posts: 2410
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: Ship availability

Post by hiran »

Thank you all for the quick hints. While I cannot fully control the matrix getting the ship via the debug console is immediate and without cost.
Yet this time I thought about how a Jameson, without tweaks, would find a ship.

What is the algorithm how ships are offered in stations? And how come until today noone thought about build to order?

The first question is likeley answered thanks to Nite Owl and the shipyard.plist. There is a techlevel for a ship, a chance and the allowOfferShip function. Which means the algorithm where such a ship can be found is actually inside the expansion, and thus can differ from ship to ship. Quite complex, and if not backed by further information also quite intransparent for players.
Sunshine - Moonlight - Good Times - Oolite
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6696
Joined: Wed Feb 28, 2007 7:54 am

Re: Ship availability

Post by another_commander »

The logic for setting up ships for sale in a system is located in - (NSArray *) shipsForSaleForSystem:(OOSystemID)s withTL:(OOTechLevelID)specialTL atTime:(OOTimeAbsolute)current_time in the src/Core/Umiverse.m source file. OXPs can of course modify the resulting array further as they see fit, but this is what is originally served when a shipyard is created.
User avatar
hiran
Theorethicist
Posts: 2410
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: Ship availability

Post by hiran »

another_commander wrote: Tue May 30, 2023 7:51 pm
The logic for setting up ships for sale in a system is located in - (NSArray *) shipsForSaleForSystem:(OOSystemID)s withTL:(OOTechLevelID)specialTL atTime:(OOTimeAbsolute)current_time in the src/Core/Umiverse.m source file. OXPs can of course modify the resulting array further as they see fit, but this is what is originally served when a shipyard is created.
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.
There is a theory which states that if ever anyone discovers exactly what the Universe is for and why it is here, it will instantly disappear and be replaced by something even more bizarre and inexplicable.
There is another theory which states that this has already happened.
Sunshine - Moonlight - Good Times - Oolite
User avatar
Cholmondely
Archivist
Archivist
Posts: 5381
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: Ship availability

Post by Cholmondely »

hiran wrote: Tue May 30, 2023 9:27 pm
There is a theory which states that if ever anyone discovers exactly what the Ooniverse is for and why it is here, it will instantly disappear and be replaced by something even more bizarre and inexplicable.
There is another theory which states that this has already happened.
Umm... this is the AppleMac version of Oolite, no?
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 2694
Joined: Thu Jun 20, 2013 10:22 pm
Location: On the moon Thought, orbiting the planet Ignorance.

Re: Ship availability

Post by Redspear »

hiran wrote: Tue May 30, 2023 7:31 pm
Yet this time I thought about how a Jameson, without tweaks, would find a ship.
The typical Jameson of course, has a great ship (mkIII) and so having inherited that start from Elite it's not such an issue. I do take your point however, in that the player needn't be forced to start that way. So...

hiran wrote: Tue May 30, 2023 7:31 pm
And how come until today noone thought about build to order?
Just how logical is that in game exactly?

Build to order suits low volume orders, right? So far so good.
From order to build takes time, right? Not so good.

Where tech/facilities are not provided then there could be shipping costs and (especially) risks. That doesn't make a lot of sense, especially for single unit build to order (all eggs in one basket), suggesting that a tech requirement (however low) should still exist for some ships.

Do you really want to see some ships available everywhere? It's fine if you do, I'm not judging, but imagine the shipyard screen as it currently works if that were the case: scroll past 5 adders, 6 cobra mkI's, 7 morays, 4 moray meds etc. etc. I don't think everyone would want that, especially once you start putting oxp ships into the mix.
  • Gameplay reasons:
    • It's exciting to find something you've been looking for after something of a search.
      How difficult that search needs to be is certainly up for debate but just ordering it denies that.
    • Everywhere's the same, sort of, a bit... and so making each shipyard (potentially) unique is one more way to make that seem less true.

      "This planet is a tedious place", opined the GalCop database. A perfectly average communist system with a perfectly average industrial economy with which to trade my perfectly average cargo. So far, so mundane but that was all about to change. There she was, glistening in the vibrant lights of the shipyard, every bit as glamorous as I'd dreamed and yet, after docking at far too many systems to remember, I'd never seen her like before. Suddenly this system didn't seem so average anymore...
But if you (or anyone for that matter) wants to make a build_to_order.oxp then don't let my ramblings stop you :D
User avatar
hiran
Theorethicist
Posts: 2410
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: Ship availability

Post by hiran »

Redspear wrote: Tue May 30, 2023 9:36 pm
hiran wrote: Tue May 30, 2023 7:31 pm
And how come until today noone thought about build to order?
Just how logical is that in game exactly?

Build to order suits low volume orders, right? So far so good.
From order to build takes time, right? Not so good.
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.
Redspear wrote: Tue May 30, 2023 9:36 pm
Where tech/facilities are not provided then there could be shipping costs and (especially) risks. That doesn't make a lot of sense, especially for single unit build to order (all eggs in one basket), suggesting that a tech requirement (however low) should still exist for some ships.

Do you really want to see some ships available everywhere? It's fine if you do, I'm not judging, but imagine the shipyard screen as it currently works if that were the case: scroll past 5 adders, 6 cobra mkI's, 7 morays, 4 moray meds etc. etc. I don't think everyone would want that, especially once you start putting oxp ships into the mix.
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.
Redspear wrote: Tue May 30, 2023 9:36 pm
  • Gameplay reasons:
    • It's exciting to find something you've been looking for after something of a search.
      How difficult that search needs to be is certainly up for debate but just ordering it denies that.
    • Everywhere's the same, sort of, a bit... and so making each shipyard (potentially) unique is one more way to make that seem less true.
I agree. This would make the game even boring. To my taste 256 star systems are too homogenous. And the same over 8 galaxies seems unrealistic for me. So diversity is the key. But not everything needs to be hidden/undocumented.
Redspear wrote: Tue May 30, 2023 9:36 pm
"This planet is a tedious place", opined the GalCop database. A perfectly average communist system with a perfectly average industrial economy with which to trade my perfectly average cargo. So far, so mundane but that was all about to change. There she was, glistening in the vibrant lights of the shipyard, every bit as glamorous as I'd dreamed and yet, after docking at far too many systems to remember, I'd never seen her like before. Suddenly this system didn't seem so average anymore...[/list][/list]

But if you (or anyone for that matter) wants to make a build_to_order.oxp then don't let my ramblings stop you :D
I just have no clue whether OXPs could do that at all, and if yes how that could be achieved.
Sunshine - Moonlight - Good Times - Oolite
User avatar
hiran
Theorethicist
Posts: 2410
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: Ship availability

Post by hiran »

Cholmondely wrote: Tue May 30, 2023 9:35 pm
hiran wrote: Tue May 30, 2023 9:27 pm
There is a theory which states that if ever anyone discovers exactly what the Ooniverse is for and why it is here, it will instantly disappear and be replaced by something even more bizarre and inexplicable.
There is another theory which states that this has already happened.
Umm... this is the AppleMac version of Oolite, no?
Unfortunately the code developed on AppleMac intended to run on AppleMac is the only code that exists. It is getting cross-compiled for Linux and Windows, and it is kind of bizarre that over the years we lost compatibility to MacOS.
Sunshine - Moonlight - Good Times - Oolite
User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 2694
Joined: Thu Jun 20, 2013 10:22 pm
Location: On the moon Thought, orbiting the planet Ignorance.

Re: Ship availability

Post by Redspear »

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?

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?

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?... :?
User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 2694
Joined: Thu Jun 20, 2013 10:22 pm
Location: On the moon Thought, orbiting the planet Ignorance.

Re: Ship availability

Post by Redspear »

Of course, editing shipyard.plist to reduce tech level requirement and increase chance probability would result in more ships being available more often. A condition script could also impose whatever restrictions on that as desired.

Thinking some more, the way chance and tech level interact is rather curious. Because they tend to correlate, we get 'new' shipyards selling 'old' and new (but mostly old) stock.

So yeah, you can buy a fer de lance at that tech level 12 but mainly they trade in superceded cobra mk1s, relict adders and ancient pythons.

An inverse of the correlation and some low tech shipyards will be empty but a few choice tweaks could ameliorate that... Likely not what your after hiran but I feel an oxp coming on...
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Ship availability

Post by cim »

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.
Post Reply