• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

Cant berth ships

Take a look at the berthing code from CoAS. They have a fully functional berthing system. Allows up to 3 ships in each port.

Cap'n Drow
 
We had that too. Only it doesn't work anymore. <img src="style_emoticons/<#EMO_DIR#>/dunno.gif" style="vertical-align:middle" emoid=":shrug" border="0" alt="dunno.gif" />
 
<!--quoteo(post=324682:date=Jun 3 2009, 12:37 AM:name=Talisman)--><div class='quotetop'>QUOTE (Talisman @ Jun 3 2009, 12:37 AM) <a href="index.php?act=findpost&pid=324682"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Hi, I am using B14 A9.5 patch 1

I have tried to berth ships several times and each time the game freezes.

I go to the shipyard and press F2, click on the ship button, and then when I click on the ship berthing Button nothing happens and the screen freezes. <img src="style_emoticons/<#EMO_DIR#>/dunno.gif" style="vertical-align:middle" emoid=":shrug" border="0" alt="dunno.gif" />

I have tried on several Islands and the same thing happens<!--QuoteEnd--></div><!--QuoteEEnd-->
Exact same version and problem.
 
Known. Need to fix. One day... <img src="style_emoticons/<#EMO_DIR#>/mybad.gif" style="vertical-align:middle" emoid=":facepalm" border="0" alt="mybad.gif" />
 
... one day is today. Please find attached a fix. Not all is working 100% properly, but basic ship berthing is possible.

Enjoy,
Sulan

PS: Includes also my fixes to Eleuthera and RansackOfficer (I'm too lazy to sort them out).
 

Attachments

  • FixShipBerthing.zip
    72.6 KB · Views: 86
That's brilliant; thanks very much! <img src="style_emoticons/<#EMO_DIR#>/w00t.gif" style="vertical-align:middle" emoid=":woot" border="0" alt="w00t.gif" />
 
It did use to work. At some point. Build 13, I think. <img src="style_emoticons/<#EMO_DIR#>/mybad.gif" style="vertical-align:middle" emoid=":facepalm" border="0" alt="mybad.gif" />
 
<!--quoteo(post=328916:date=Jun 15 2009, 05:35 PM:name=Pieter Boelen)--><div class='quotetop'>QUOTE (Pieter Boelen @ Jun 15 2009, 05:35 PM) <a href="index.php?act=findpost&pid=328916"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->It did use to work. At some point. Build 13, I think. <img src="style_emoticons/<#EMO_DIR#>/mybad.gif" style="vertical-align:middle" emoid=":facepalm" border="0" alt="mybad.gif" /><!--QuoteEnd--></div><!--QuoteEEnd-->
That would explain it I started playing after Build 14 Alpha 8 came out <img src="style_emoticons/<#EMO_DIR#>/laugh.gif" style="vertical-align:middle" emoid="xD:" border="0" alt="laugh.gif" />
 
Installed it now and will be included in the next update. <img src="style_emoticons/<#EMO_DIR#>/doff.gif" style="vertical-align:middle" emoid=":doff" border="0" alt="doff.gif" />

I do wonder if it's necessary to use that ReverseTownName and ReverseIslandName function.
I'd prefer that wouldn't be required, especially considering the original functions will get a lot more complicated soon
with the inclusion of period-dependent town- and island-names. In that case, the reverse function also becomes more complex. <img src="style_emoticons/<#EMO_DIR#>/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" />

Maybe just GetTownName and FindIslandByLocation would work? Or one of the other functions already there?
There must be a way of preventing a double name-change, right?
 
I totally agree - I might take those out and replace the functions by a sound basis for handling ports/islands/towns. But that'd have impact on quite a bunch of other files and functions and I was not able to test all the implications.

There's much more redundancy in the code - and still the results are quite different: GetTownName and FindTownName are supposed to do the same (at least as I understood), but they do not give the same results, because they query the data differently.

Sulan
 
Figures, after I've spent the last 4 hours or so attempting to recode it to work having very little idea what I am doing someone fixes it :p

Well, at least I can take pride in that I got the islands listing properly on my own before using this. <img src="style_emoticons/<#EMO_DIR#>/biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" />
 
Congratulations on that then. <img src="style_emoticons/<#EMO_DIR#>/wink.gif" style="vertical-align:middle" emoid=";)" border="0" alt="wink.gif" />
 
Back
Top