Where's my ship?

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

Post Reply
User avatar
jh145
Dangerous
Dangerous
Posts: 94
Joined: Thu Dec 25, 2014 8:39 pm

Where's my ship?

Post by jh145 »

I've created a "Test1.oxp" containing Config/shipdata.plist and Config/shipyard.plist as follows:

Code: Select all

{
    "jh145_cobra3-player" = {
        like_ship = "cobra3-player";
        name = "jh145 Cobra Mk III";
    };
}

Code: Select all

{
    "jh145_cobra3-player" = {
        chance = 1;
        "optional_equipment" = (
            "EQ_DOCK_COMP",
            "EQ_FUEL_INJECTION"
        );
        price = 15;
        "standard_equipment" = {
            extras = "";
            "forward_weapon_type" = "EQ_WEAPON_BEAM_LASER";
            missiles = 3;
        };
        techlevel = 1;
        "weapon_facings" = 15;
    };
}
Starting Oolite with cache-flushing, the OXP loads up with no reported parsing errors. But where's my ship?

1. A new Jameson always has the same two ships for sale.
2. An experienced commander at a TL14 planet can't see the "jh145 Cobra Mk III" in the shipyard either.

What's missing?
User avatar
Venator Dha
---- E L I T E ----
---- E L I T E ----
Posts: 329
Joined: Sun Feb 23, 2014 11:26 am
Location: Sweden

Re: Where's my ship?

Post by Venator Dha »

Have you flown to another system? The ships for sale in the station from the save will be loaded from the save, so any new will not appear until you have changed system.
Taurus Driving through the galaxy since... .
User avatar
jh145
Dangerous
Dangerous
Posts: 94
Joined: Thu Dec 25, 2014 8:39 pm

Re: Where's my ship?

Post by jh145 »

Yep, tried that to no avail, though admittedly only to the closest couple of systems.

Does "chance = 1" not really mean that?
User avatar
Venator Dha
---- E L I T E ----
---- E L I T E ----
Posts: 329
Joined: Sun Feb 23, 2014 11:26 am
Location: Sweden

Re: Where's my ship?

Post by Venator Dha »

jh145 wrote:
Yep, tried that to no avail, though admittedly only to the closest couple of systems.

Does "chance = 1" not really mean that?
I believe so. I'm sorry I can't help any more, you've reached the end of my knowledge on this :( I'm sure an expert will turn up soon though :)
Taurus Driving through the galaxy since... .
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: Where's my ship?

Post by Smivs »

This can be frustrating, I know!
The 'chance = 1' does two things - it maximises the chance of a ship appearing in the shipyard (but does not guarantee it) and also maximises the chance of optional equipment to be fitted to the 'for sale' example. TL 1 will also maximise the chance of the ship appearing, but again will not ensure this. You may need to try a few shipyards before you find one of yours - try middle-rank systems like TL8,9 etc as they often seem to have more ships available.
BTW you are limiting optional equipment - this is what is made available to the ship from the ouitfitters as well as what it might already have fitted when bought. At the moment you will only be able to buy Docking Computers and Fuel Injectors. A full (I think) list of options is here.

Code: Select all

        "optional_equipment" =         
        ( 
            "EQ_ECM", 
            "EQ_PASSENGER_BERTH", 
            "EQ_ESCAPE_POD", 
            "EQ_ENERGY_UNIT", 
            "EQ_NAVAL_ENERGY_UNIT", 
            "EQ_DOCK_COMP", 
            "EQ_WEAPON_PULSE_LASER", 
            "EQ_WEAPON_BEAM_LASER", 
            "EQ_WEAPON_MINING_LASER", 
            "EQ_WEAPON_MILITARY_LASER", 
            "EQ_FUEL_INJECTION", 
            "EQ_SCANNER_SHOW_MISSILE_TARGET", 
            "EQ_MULTI_TARGET", 
            "EQ_GAL_DRIVE", 
            "EQ_ADVANCED_COMPASS", 
            "EQ_SHIELD_BOOSTER", 
            "EQ_NAVAL_SHIELD_BOOSTER"
        ); 
If you want items fitted as standard (my guess is that you want the ship to come with Docking Computers and Fuel Injectors), then these should be added to 'Extras' in the shipyard.plist, thus

Code: Select all

        "standard_equipment" =        
        { 
        extras =            
                ( 
            "EQ_DOCK_COMP",
            "EQ_FUEL_INJECTION"
                ); 
        "forward_weapon_type" = "EQ_WEAPON_BEAM_LASER"; 
        missiles = 3;
        ..etc 
Disclaimer:- any errors or inaccuracies in this post can be blamed on the holiday spirit <slurp> :wink:
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Where's my ship?

Post by cim »

jh145 wrote:
Does "chance = 1" not really mean that?
Shipyard content is ... rather unpredictable. Depending on how many other ship OXPs you have installed, even chance=1 might not be sufficient to guarantee a ship appearing.

If you're wanting to test the ship out without wandering around hundreds of shipyards looking for it, then type

Code: Select all

P.replaceShip("jh145_cobra3-player");
into the debug console while docked. (If you don't have the OXP developer build of Oolite and the debug console, you'll find a lot of things get easier with them, so it's worth the time to download and install)
User avatar
Lone_Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 546
Joined: Wed Aug 08, 2007 10:59 pm
Location: Netherlands

Re: Where's my ship?

Post by Lone_Wolf »

some comments :

equipment should only be in optional_equipment OR in standard_equipment/extras .
If they are in both, the shipyard may offer a model with an increased price because it adds the price for an optional equipment that the ship ALREADY HAS.

some equipment has available_to_all = true; , in general these don't need to be listed as optional_equipment .

Note :
i use "in general" because a condition script can influence this.

Code: Select all

1.80 equipment with available_to_all = true . removal options left out
"EQ_FUEL"
"EQ_MISSILE"
"EQ_GAL_DRIVE",
"EQ_WEAPON_PULSE_LASER",
"EQ_WEAPON_BEAM_LASER",
"EQ_WEAPON_MINING_LASER",
"EQ_WEAPON_MILITARY_LASER",
"EQ_CLOAKING_DEVICE",
"EQ_PASSENGER_BERTH",
"EQ_HARDENED_MISSILE",
"EQ_ADVANCED_COMPASS",
"EQ_ADVANCED_NAVIGATIONAL_ARRAY",
"EQ_TARGET_MEMORY",
"EQ_INTEGRATED_TARGETING_SYSTEM",
"EQ_QC_MINE",
"EQ_HEAT_SHIELD",
"EQ_WORMHOLE_SCANNER",
[code]

( I discovered this when i tried to make it impossible for my ship to install a passenger berth)
OS : Arch Linux 64-bit - rolling release

OXPs : My user page

Retired, reachable at [email protected]
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Where's my ship?

Post by cim »

Lone_Wolf wrote:
some equipment has available_to_all = true; , in general these don't need to be listed as optional_equipment .
To add to this, one reason you might list an available_to_all as optional_equipment is that only those items in the optional equipment list can appear as optional extras on ships for purchase (which is why you never see OXP equipment offered as an "extra" on a ship despite it almost always being available_to_all)
User avatar
jh145
Dangerous
Dangerous
Posts: 94
Joined: Thu Dec 25, 2014 8:39 pm

Re: Where's my ship?

Post by jh145 »

Ah, the debug build OK, downloading as I speak/type. Thanks for the tip.

I took a quick look at the source and was surprised by the way shipyard reseeding works (or appears to). Oolite seems to generate a random days_until_sale between about -194 and +194 days, then test for it being in the range 0 to 30 days. I can't tell how that "random" value is (re)seeded, but in any case it looks like Oolite performs an all-or-nothing replacement of the shipyard. Is it impractical to push and pop ships in smaller quantities, more frequently? -- that would be more "realistic", insofar as anything is in Oolite :D (Or I may just have misunderstood the code ...)
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Where's my ship?

Post by cim »

jh145 wrote:
I can't tell how that "random" value is (re)seeded
In theory that random value was itself reseeded every 90ish days, but there was an error in that code so it was in effect a constant. With changes elsewhere over the last few versions that seed value is now only used by the shipyard, so it's been replaced with the constant for clarity until someone gets round to getting rid of it entirely and rewriting the shipyard generation to be something more transparent.
User avatar
jh145
Dangerous
Dangerous
Posts: 94
Joined: Thu Dec 25, 2014 8:39 pm

Re: Where's my ship?

Post by jh145 »

cim wrote:
... type ... into the debug console while docked
Where's the debug console hosted? There's no wiki page for either the 'C' or Python implementation, and the incidental links that I found to those were broken.
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Where's my ship?

Post by cim »

jh145 wrote:
cim wrote:
... type ... into the debug console while docked
Where's the debug console hosted? There's no wiki page for either the 'C' or Python implementation, and the incidental links that I found to those were broken.
The repo is at https://github.com/OoliteProject/oolite-debug-console - there's a "download ZIP" button on the right. Unpack it, then run DebugConsole.py before starting Oolite.

If you're on Windows, you'll need to get Python separately.
User avatar
jh145
Dangerous
Dangerous
Posts: 94
Joined: Thu Dec 25, 2014 8:39 pm

Re: Where's my ship?

Post by jh145 »

That worked, thanks.

Incidentally, I did finally find the ship for sale, but noticed that the sort order in the shipyard was ASCII ('A' < 'Z' < 'a' < 'z') and so my ship (starting with a lowercase letter) was listed last. Trivial though it is, that's probably a bug. Is there an approved means of raising such things that won't get me dumped in witchspace with nothing more than 1t Liquors/Wines for comfort? Ta.
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6682
Joined: Wed Feb 28, 2007 7:54 am

Re: Where's my ship?

Post by another_commander »

The Debug Console for Windows can be downloaded as a standalone executable (no Python needed) from here:
http://sourceforge.net/projects/oolite- ... p/download.

We really need to get this into oolite.org, though.
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Where's my ship?

Post by cim »

jh145 wrote:
Incidentally, I did finally find the ship for sale, but noticed that the sort order in the shipyard was ASCII ('A' < 'Z' < 'a' < 'z') and so my ship (starting with a lowercase letter) was listed last. Trivial though it is, that's probably a bug. Is there an approved means of raising such things that won't get me dumped in witchspace with nothing more than 1t Liquors/Wines for comfort? Ta.
In general core game bugs should be reported either through the issue tracker at https://github.com/OoliteProject/oolite/ or on the "Testing and Bug Reports" forum here.

There's a fair chance they'll get spotted anywhere they're reported on the forums, though - I've fixed this one now.
Post Reply