Page 1 of 1

Morays, morays everywhere...

Posted: Wed Aug 08, 2007 2:03 pm
by Dunk
Guys,

Is there any way to reduce the frequency certain ships appear ingame? I seem to recall Morays being described as very rare and yet I can't seem to turn around without bumping into several. It's as if the manufacturers are trying to flood the market too because there's always more Morays for sale at stations than there are any other kind of ship.

Cheers

Posted: Wed Aug 08, 2007 2:28 pm
by Captain Hesperus
Hi Dunk, welcome!
There are two ways of reducing the frequency of Morays in the 'Ships for sale' screen, an easy way and a hard way.

The easy way is to add ship OXPs that include player ships, this will increase the number of ships that Oolite will add for sale.

The hard(er) way is to edit the shipyard.plist and that goes as follows (please note this is for PCs):
1) Find a good free text editor (Vim or Notepad++ are good for PCs)
2) Search for the shipyard.plist (it's usually under \Oolite\oolite.app\Resources\Config)
3) Open it with your text editor
4) Search through the file to find the

Code: Select all

<key>moray-player</key>
5) Find

Code: Select all

<key>chance</key>
<real>0.375</real>
6) Edit the numbers closer to 0.0 (maybe 0.2 or 0.1) to drastically reduce the likelihood of seeing the Moray for sale.
This won't reduce the number you see plying the spacelanes as that is a different .plist altogether (And I haven't a clue how to do that).
Personally the easy way is better as there is less chance to muck up and you get to see more and better ships in the For Sale screens.

Ta-da!

Captain Hesperus

Posted: Wed Aug 08, 2007 3:15 pm
by Cmdr Wyvern
To lower the chances of Moray encounters in flight, open shipdata.plist in your trusty editor, and find the <key>moray</key> entry.
Scroll down through the entry till you find

<key>roles</key>
<string>pirate</string>

Change it to

<key>roles</key>
<string>pirate(0.3)</string>

Save the file, and when next you hit the lanes, you'll find fewer Morays around.

Posted: Wed Aug 08, 2007 4:46 pm
by Dunk
Thanks everyone. I should probably have mentioned that I design software for a living so I'm perfectly at home playing around with the XML. I just didn't know which file and entity to modify.

This really is a fantastic game, both from a gamers perspective and from a technical angle. Very, very impressive all in all.

Thanks again.

Posted: Thu Aug 09, 2007 9:32 am
by Commander McLane
Captain Hesperus wrote:
5) Find

Code: Select all

<key>chance</key>
<real>0.375</real>
6) Edit the numbers closer to 0.0 (maybe 0.2 or 0.1) to drastically reduce the likelihood of seeing the Moray for sale.
Perhaps a dumb-ass question, but I'd like to clarify something here.

According to the wiki-documentation on shipyard.plist the chance-key does not determine the chance of a ship being for sale, but the chance of it being equipped with optional equipment:
wiki wrote:
chance

The likelihood that the ship comes fitted with potential extra fittings and equipment.
Example:
<key>chance</key>
<real>0.25</real>
I know that the wiki isn't always reliable, so I just want to know which is right: The wiki or the common sense that chance defines the likelihood of a ship to appear at all?

What have the coders to say?

Posted: Thu Aug 09, 2007 10:23 am
by Dr. Nil
I think that the Wiki explanation is correct - but have actually given ships I wanted to be more rare a lower value for that key, just in case.

It would be nice for OXP'ers to have a way to control the rarity of ships from the shipyard.plist

Posted: Thu Aug 09, 2007 11:07 am
by Commander McLane
Yes, it would indeed.

And as for this just-in-case-scripting: :? :? :?

"Precision! My kingdom for scripting-precision!"

Posted: Thu Aug 09, 2007 12:13 pm
by another_commander
From a very quick look at the code, it looks like the same 'chance' key is utilized for both having the ship appear in the shipyard list and being equipped with gadgets.

So, I guess everybody is right after all :)

Posted: Thu Aug 09, 2007 1:05 pm
by Dr. Nil
Seems like just-in-case-scripting worked after all. :D

Without us bungling dabblers we wouldn't have all those OXPs :lol:

Posted: Thu Aug 09, 2007 2:37 pm
by Cmdr Wyvern
another_commander wrote:
From a very quick look at the code, it looks like the same 'chance' key is utilized for both having the ship appear in the shipyard list and being equipped with gadgets.

So, I guess everybody is right after all :)
In practice, the chance key seems to determine how often the ship appears in the shipyard, as well as the possibility of finding it with some extra kit preinstalled.

The tech level also has a big impact on a ship's rarity. TL13 systems being rarer than TL5, for instance.