Ship availability
Moderators: winston, another_commander
- hiran
- Theorethicist
- Posts: 2403
- Joined: Fri Mar 26, 2021 1:39 pm
- Location: a parallel world I created for myself. Some call it a singularity...
Ship availability
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?
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
- Cholmondely
- Archivist
- Posts: 5364
- 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
If you know what you are doing, you can get the debug console to add it in.hiran wrote: ↑Tue May 30, 2023 4:42 pmWhen 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?
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?
•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?
-
- Quite Grand Sub-Admiral
- Posts: 6682
- Joined: Wed Feb 28, 2007 7:54 am
Re: Ship availability
While docked, enter in the console:
Imstant ship replacement occurs.
Code: Select all
player.replaceShip("player_ship_key_as_it_appears_in_shipdata_plist")
- Cholmondely
- Archivist
- Posts: 5364
- 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
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
3) Mandoman's Mandotech Station & Shipyards. Again, no visible construction activity.
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
3) Mandoman's Mandotech Station & Shipyards. Again, no visible construction activity.
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?
•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?
Re: Ship availability
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
Brevity is the soul of wit and vulgarity is wit's downfall
Good Night and Good Luck - Read You Soon
- hiran
- Theorethicist
- Posts: 2403
- Joined: Fri Mar 26, 2021 1:39 pm
- Location: a parallel world I created for myself. Some call it a singularity...
Re: Ship availability
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.
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
-
- Quite Grand Sub-Admiral
- Posts: 6682
- Joined: Wed Feb 28, 2007 7:54 am
Re: Ship availability
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.- hiran
- Theorethicist
- Posts: 2403
- Joined: Fri Mar 26, 2021 1:39 pm
- Location: a parallel world I created for myself. Some call it a singularity...
Re: Ship availability
Sounds like this function:another_commander wrote: ↑Tue May 30, 2023 7:51 pmThe 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.
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
- Cholmondely
- Archivist
- Posts: 5364
- 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
Umm... this is the AppleMac version of Oolite, no?hiran wrote: ↑Tue May 30, 2023 9:27 pmThere 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.
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?
•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?
- Redspear
- ---- E L I T E ----
- Posts: 2685
- Joined: Thu Jun 20, 2013 10:22 pm
- Location: On the moon Thought, orbiting the planet Ignorance.
Re: Ship availability
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...
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...
- It's exciting to find something you've been looking for after something of a search.
- hiran
- Theorethicist
- Posts: 2403
- Joined: Fri Mar 26, 2021 1:39 pm
- Location: a parallel world I created for myself. Some call it a singularity...
Re: Ship availability
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.
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 pmWhere 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.
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
- 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 just have no clue whether OXPs could do that at all, and if yes how that could be achieved.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
Sunshine - Moonlight - Good Times - Oolite
- hiran
- Theorethicist
- Posts: 2403
- Joined: Fri Mar 26, 2021 1:39 pm
- Location: a parallel world I created for myself. Some call it a singularity...
Re: Ship availability
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.Cholmondely wrote: ↑Tue May 30, 2023 9:35 pmUmm... this is the AppleMac version of Oolite, no?hiran wrote: ↑Tue May 30, 2023 9:27 pmThere 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.
Sunshine - Moonlight - Good Times - Oolite
- Redspear
- ---- E L I T E ----
- Posts: 2685
- Joined: Thu Jun 20, 2013 10:22 pm
- Location: On the moon Thought, orbiting the planet Ignorance.
Re: Ship availability
All makes perfect sense except for... piracy.hiran wrote: ↑Tue May 30, 2023 9:50 pmHow 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.
It's pretty rife, wouldn't you say?
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?
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?...
- Redspear
- ---- E L I T E ----
- Posts: 2685
- Joined: Thu Jun 20, 2013 10:22 pm
- Location: On the moon Thought, orbiting the planet Ignorance.
Re: Ship availability
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...
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...
Re: Ship availability
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.hiran wrote: ↑Tue May 30, 2023 9:27 pmSounds 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.
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.