• 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!

Need some help

Pieter Boelen

Navigation Officer
Administrator
Storm Modder
Hearts of Oak Donator
I need to find out how to give a ship from one officer to another through code. Officer one has the ship and it should be given to officer two who doesn't have a ship at all. I tried some things myself, but no luck so far. Reason for this is my changes to Bartolomeu's Santiago quest.
 
Try something like this:<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->ref Char1 = CharacterFromID("Person without ship");
ref Char2 = CharacterFromID("Person with ship");
ExchangeCharacterShip(Char1, Char2);
Char1.ship.name = characters[GetCharacterIndex("Person with ship")].ship.name;<!--c2--></div><!--ec2-->I hope that should help...
 
Are you sure that works? I tried to use the ExchangeCharacterShip code, but it made the game go crazy. In any case: I'll try your suggestion.

BTW: I just noticed that Bartolomeu has a 0 sailing skill, which would make him a bit of a poor captain. I wonder what I should do about it. The easiest solution would be to just increase his sailing skill be default. I just don't know what the real Bartolomeu would think of me doing that... <img src="style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />
 
I am sorry to say that I have been unable to get it to work. I keep having the same problem: The game starts to run with a lot of lag and as soon as I open/close an interface, it crashes. No matter what I try. I tried it myself, I tried your code, I tried setting Bartolomeu's sailing skill to > 0, I tried adding a RemoveOfficersIndex line first, but no luck whatsoever. Perhaps you can try yourself. The code needs to be added in the last Santiago quest case or in case "exit_hired": in Txiki Pijuan's dialog file in my latest pb_modifications.zip. When you do that, the final questtext will also need to be changed, because it doesn't make sense anymore after that change.
 
Bartolomeu is a "comrade-in-arms" (so he can't sail a ship). Do you think that is the problem? <img src="style_emoticons/<#EMO_DIR#>/dunno.gif" style="vertical-align:middle" emoid=":shrug" border="0" alt="dunno.gif" />
 
That isn't the problem. I don't know what the problem IS, but that isn't it. Any officer can sail a ship, as long as he doesn't have a zero sailing skill. However, giving Bartolomeu a higher sailing skill doesn't solve my issue either, so that isn't the cause either. I wonder if the problem is that I perform a ship swap on a character who doesn't HAVE a ship. <img src="style_emoticons/<#EMO_DIR#>/rolleyes.gif" style="vertical-align:middle" emoid=":rolleyes:" border="0" alt="rolleyes.gif" />
 
i thought a would-be captain needed more skills than just sailing? i don't remember what though. maybe it was cannons and accuracy. but i agree with you that the other officer not having a ship would likely be the problem.
 
Back
Top