Shipyard monotony
Moderators: winston, another_commander
Shipyard monotony
I find that the shipyard markets on stations are often dominated by just a few different ship-types for sale, but with great variation in terms of pre-installed equipment –as much as a page and a half of the same model can be available, and the feeling is that this suppresses a potential for variation in ships.
Does anyone know of some bit of code in the open that can be tweaked to say, limit any given model to one or two appearances?
Does anyone know of some bit of code in the open that can be tweaked to say, limit any given model to one or two appearances?
I was young, I was naïve. Jonny Cuba made me do it!
- Cody
- Sharp Shooter Spam Assassin
- Posts: 16081
- Joined: Sat Jul 04, 2009 9:31 pm
- Location: The Lizard's Claw
- Contact:
Re: Shipyard monotony
Dumb pilot's suggestion: could a condition script be adapted?
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
And any survivors, their debts I will certainly pay. There's always a way!
Re: Shipyard monotony
You may well be right, I hope it could be done with the world's smallest OXP. I just have no idea how to dictate such a restriction through the javascript engine. I have this feeling that it's either a very small matter or it can't be done, but no clue as to which.
I was young, I was naïve. Jonny Cuba made me do it!
- montana05
- ---- E L I T E ----
- Posts: 1166
- Joined: Mon May 30, 2016 3:54 am
- Location: lurking in The Devils Triangle (G1)
Re: Shipyard monotony
It probably could be done but, the first idea of mine, would require a modification of the shipyard or a lot of overrides.Old Murgh wrote: ↑Mon Mar 28, 2022 10:35 pmYou may well be right, I hope it could be done with the world's smallest OXP. I just have no idea how to dictate such a restriction through the javascript engine. I have this feeling that it's either a very small matter or it can't be done, but no clue as to which.
Scars remind us where we've been. They don't have to dictate where we're going.
- phkb
- Impressively Grand Sub-Admiral
- Posts: 4830
- Joined: Tue Jan 21, 2014 10:37 pm
- Location: Writing more OXPs, because the world needs more OXPs.
Re: Shipyard monotony
Agreed. It can be done, as the shipyard is fully accessible to JS now, but it would require a considerable effort. The alternative is to create a large shipyard-overrides.plist file. The benefit here is that you could do it in stages, one ship type at a time, rather than doing some sort of global-every-oxp-ship sort of thing.
Re: Shipyard monotony
Do you mean large as in it would require a copy/paste/adjust line per every potential ship, or the other kind of large?phkb wrote: ↑Tue Mar 29, 2022 2:11 amAgreed. It can be done, as the shipyard is fully accessible to JS now, but it would require a considerable effort. The alternative is to create a large shipyard-overrides.plist file. The benefit here is that you could do it in stages, one ship type at a time, rather than doing some sort of global-every-oxp-ship sort of thing.
So, a global offerShip equal or less than 2-script is more complicated..?
I was young, I was naïve. Jonny Cuba made me do it!
- Cholmondely
- Archivist
- Posts: 5366
- Joined: Tue Jul 07, 2020 11:00 am
- Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
- Contact:
Re: Shipyard monotony
Does anybody know why this monotony prevails? One would presume that the ships appearing would be a random selection. Either the selection is not random, or else the selection of the popular models with widgets is so immense as to drown out everything else.
I've found that Maaarcooose's Odyssey is immensely popular in the shipyards when loaded, zillions appearing with lots of different ooptions.
On the other hand, Killer Wolf's Venom seems never to appear at all!
Shipyard.plists:
I've found that Maaarcooose's Odyssey is immensely popular in the shipyards when loaded, zillions appearing with lots of different ooptions.
On the other hand, Killer Wolf's Venom seems never to appear at all!
Shipyard.plists:
Code: Select all
{
"u31_odyssey-player" =
{
chance = 1;
"optional_equipment" =
(
"EQ_ECM",
"EQ_FUEL_SCOOPS",
"EQ_ESCAPE_POD",
"EQ_ENERGY_BOMB",
"EQ_ENERGY_UNIT",
"EQ_NAVAL_ENERGY_UNIT",
"EQ_DOCK_COMP",
"EQ_WEAPON_PULSE_LASER",
"EQ_WEAPON_BEAM_LASER",
"EQ_WEAPON_MILITARY_LASER",
"EQ_FUEL_INJECTION",
"EQ_MULTI_TARGET",
"EQ_SCANNER_SHOW_MISSILE_TARGET",
"EQ_GAL_DRIVE",
"EQ_ADVANCED_COMPASS",
"EQ_SHIELD_BOOSTER",
"EQ_NAVAL_SHIELD_BOOSTER",
"EQ_HEAT_SHIELD"
);
price = 10000;
"standard_equipment" =
{
extras =
(
"EQ_PASSENGER_BERTH",
);
"forward_weapon_type" = "EQ_WEAPON_PULSE_LASER";
missiles = 3;
};
techlevel = 1;
"weapon_facings" = 3;
};
}
Code: Select all
{
/* Venom*/
"venomplayer" = {
"chance" = 1;
"optional_equipment" = (
"EQ_ECM",
"EQ_ESCAPE_POD",
"EQ_ENERGY_UNIT",
"EQ_DOCK_COMP",
"EQ_FUEL_INJECTION",
"EQ_SCANNER_SHOW_MISSILE_TARGET",
);
price = 200500;
standard_equipment =
{
extras =
(
"EQ_FUEL_SCOOPS",
"EQ_HEAT_SHIELD"
);
forward_weapon_type = "EQ_WEAPON_BEAM_LASER";
missiles = 1;
};
techlevel = 4;
weapon_facings = 15;
};
}
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: Shipyard monotony
In this case the ship has given itself a 1 (100% chance) of being included in a yard's selection. Most ships are in the .375 to .05 range and will get dominated out of the pickings.
[edit]
–But so has the other. Then I don''t understand that either.
But a nice script to reduce bullies to only one or two spots would be nice.
I was young, I was naïve. Jonny Cuba made me do it!
- Cholmondely
- Archivist
- Posts: 5366
- Joined: Tue Jul 07, 2020 11:00 am
- Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
- Contact:
Re: Shipyard monotony
Umm... I changed the Venom percentage to make it appear. Maaarcooose's bizarre little ship was never quite finished, so I presume he left the percentage high to make it more available to himself. The ship seems to be unique in what I read about the original cartoon strip.Old Murgh wrote: ↑Tue Mar 29, 2022 4:43 pmIn this case the ship has given itself a 1 (100% chance) of being included in a yard's selection. Most ships are in the .375 to .05 range and will get dominated out of the pickings.
[edit]
–But so has the other. Then I don''t understand that either.
But a nice script to reduce bullies to only one or two spots would be nice.
And the Venom finally appeared once I got rid of the Werewolf.oxp! Quite strange!!
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?
- phkb
- Impressively Grand Sub-Admiral
- Posts: 4830
- Joined: Tue Jan 21, 2014 10:37 pm
- Location: Writing more OXPs, because the world needs more OXPs.
Re: Shipyard monotony
Yes, and yes. The shipyard-overrides file would have an entry per player ship, with whatever tweaks to the percentages and limits as you deem necessary. But it would also ultimately become quite large, given the number of OXP ships out there.
Additional thoughts: If the goal is to make the shipyard more interesting, in a guaranteed kind of way (ie, not relying too much on RNG), then you probably would just override all player ships with a "chance" of 1 (to make sure they are always available), but then have a condition script that kicks it to become the final arbiter of whether a ship appears or not.
- phkb
- Impressively Grand Sub-Admiral
- Posts: 4830
- Joined: Tue Jan 21, 2014 10:37 pm
- Location: Writing more OXPs, because the world needs more OXPs.
Re: Shipyard monotony
You would still need to use shipyard-overrides.plist to change the condition script of each and every player ship to get it to trigger. I don't believe the shipyard condition scripts can be engaged in a global way like you suggest.
Re: Shipyard monotony
I like the chance element, and think that some yards should be sparse, and others bountiful. It's only the way it currently gets dominated by a few mass-repeaters that' I'd like to have the power to changephkb wrote: ↑Tue Mar 29, 2022 8:47 pmIf the goal is to make the shipyard more interesting, in a guaranteed kind of way (ie, not relying too much on RNG), then you probably would just override all player ships with a "chance" of 1 (to make sure they are always available), but then have a condition script that kicks it to become the final arbiter of whether a ship appears or not.
I think I grasp the outline of what you're saying. The prospect of wrangling 30-40 ships isn't as daunting as 300-400.
I was young, I was naïve. Jonny Cuba made me do it!
Re: Shipyard monotony
In Oolite 1.91 there is the possibility to edit the shipdata.plist of all loaded ships (and thus also edit the shipyard data):
This would set the chance (from originally 0.25) to 0.1.
To make this into a real OXP you could make up some rules, like ships that cost more than 1 000 000 have at most a chance of 0.1, all ships have at most a chance of 0.5 and at least a chance of 0.02, adding hard-coded chances for some ships, ... and then apply these rules to all ships, e.g.:
But again, this works only in the development version, because the function
Code: Select all
var shipdata = Ship.shipDataForKey("adder-player");
if(shipdata._oo_shipyard){
shipdata._oo_shipyard.chance = 0.1;
}
Ship.setShipDataForKey("adder-player", shipdata);
To make this into a real OXP you could make up some rules, like ships that cost more than 1 000 000 have at most a chance of 0.1, all ships have at most a chance of 0.5 and at least a chance of 0.02, adding hard-coded chances for some ships, ... and then apply these rules to all ships, e.g.:
Code: Select all
this.startUp = function()
{
var dataKeysArray = Ship.keys();
for(let i in dataKeysArray)
{
let shipdata = Ship.shipDataForKey(dataKeysArray[i]);
let newShipData = myRuleFunction(shipdata);
Ship.setShipDataForKey(dataKeysArray[i], newShipData);
}
}
setShipDataForKey
is quite new.- Cholmondely
- Archivist
- Posts: 5366
- Joined: Tue Jul 07, 2020 11:00 am
- Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
- Contact:
Re: Shipyard monotony
Edited in light of a_c's post on the next page! Hurrah!
Last edited by Cholmondely on Wed Mar 30, 2022 8:33 am, edited 1 time in total.
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: Shipyard monotony
Yes this does look smart, but the future feels uncertain for us with a Mac.Cholmondely wrote: ↑Wed Mar 30, 2022 1:08 amSo not for Murgh's AppleMac or mine, then. Development version does exist (thanks, Hiran!) but is currently windows only...
I was young, I was naïve. Jonny Cuba made me do it!