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

Boarding surrendered ships

Doober

Buccaneer
Storm Modder
I am getting alot of bugs when attempting to board surrendered ships. I am using the most recent beta 2 version. When I attempt to board, the screen flickers and all ships dissappear, I only see ocean. The game freezes and I have to reload from a previous game. Is anyone else getting strange bugs when boarding surrendered ships? <img src="style_emoticons/<#EMO_DIR#>/modding.gif" style="vertical-align:middle" emoid=":modding" border="0" alt="modding.gif" />
 
I am playing Beta 1 version and I have no problems with boarding of surrendered ships.

But I have another problem. While up to 26 level of my experiences the ships surrendered quite regularly and willingly to me, but now, they don´t want to surrender any more. And I would badly need so as some ships surrendered to me in order I could replenish my crew, when my sailors in taverns almost disappeared. So, once again, sailors almost stopped to be to disposition for hiring and concurently ships almost stop to surrender to me now. I don´t know what happens here. <img src="style_emoticons/<#EMO_DIR#>/w00t.gif" style="vertical-align:middle" emoid=":woot" border="0" alt="w00t.gif" />
 
I'm getting the same problem as Doober, I am using the version as of Sept. 9. I'll post logs if they seem useful.

EDIT:

Here is the relevant excerpt. Ican post the system log if someone wants, but it's meaningless to me, I have no idea where battle where I errored begins since the log begins from where I started the game.

Compile.log
--------------
SURR: for char fenc_1292 of ship HMS Flirt surrender chance is 18
PauseAllSounds
ResetSoundScheme
Warning: Could not create twin character - no free character slots left!

During the battle the Flirt surrender right before I boarded another surrendered ship. Is being in a fleet battle the problem (too many characters)? I have no officers.

Error.log
------------
RUNTIME ERROR - file: Reinit.c; line: 2247
Using reference variable without initializing
RUNTIME ERROR - file: Loc_ai\LAi_boarding.c; line: 582
Using reference variable without initializing
RUNTIME ERROR - file: Loc_ai\LAi_boarding.c; line: 582
null ap
RUNTIME ERROR - file: Loc_ai\LAi_boarding.c; line: 582
no rAP data
RUNTIME ERROR - file: Loc_ai\LAi_boarding.c; line: 883
Using reference variable without initializing
RUNTIME ERROR - file: Loc_ai\LAi_boarding.c; line: 883
AClass ERROR n1
RUNTIME ERROR - file: Loc_ai\LAi_boarding.c; line: 883
function 'LAi_LoadLocation' stack error
 
Hmmm, my error log states:

RUNTIME ERROR - file: Reinit.c; line: 2259
Using reference variable without initializing
RUNTIME ERROR - file: Loc_ai\LAi_boarding.c; line: 449
Using reference variable without initializing
RUNTIME ERROR - file: Loc_ai\LAi_boarding.c; line: 449
null ap
RUNTIME ERROR - file: Loc_ai\LAi_boarding.c; line: 449
no rAP data
RUNTIME ERROR - file: Loc_ai\LAi_boarding.c; line: 709
Using reference variable without initializing
RUNTIME ERROR - file: Loc_ai\LAi_boarding.c; line: 709
AClass ERROR n1
RUNTIME ERROR - file: Loc_ai\LAi_boarding.c; line: 709
function 'LAi_LoadLocation' stack error

They are different lines, I don't know if that is significant, must be because of the different versions.

My compile log is pretty much the same though:

Sir, the Sea King has struck her colors!
SURR: done lbc boost, now cycle through ships
SURR: Ship_Surrender complete
SETTING MUSIC: music_spokplavanie
SURR: for char CrOxbay1 of ship Anson surrender chance is 4
SURR: for char CrOxbay1 of ship Anson surrender chance is 4
SURR: for char CrOxbay1 of ship Anson surrender chance is 4
PauseAllSounds
ResetSoundScheme
Warning: Could not create twin character - no free character slots left!

I think it is in this section of code in the Reinit.c:

// a suggested better method (uses function defined before CreateTwinCharacter:

int freeidx = FindFreeCabinCaptain();
if (freeidx == -1) { freeidx = FindFreeCabinCaptain(); }
else { makeref(Fightincabin, Characters[freeidx]); }

Unfortunately, I don't know enough about such things to fix it though. <img src="style_emoticons/<#EMO_DIR#>/bookish.gif" style="vertical-align:middle" emoid=":mm" border="0" alt="bookish.gif" />
 
I came here looking to post the same boarding problem as mentioned. Flickers. then I'm looking at the ocean. Nothing works except the F1 and F2. Also have the 10-9-06 update.
 
Hmm. This doesn't sound good. Beats me why this happens. For all I know, it should be working. <img src="style_emoticons/<#EMO_DIR#>/wacko.gif" style="vertical-align:middle" emoid=":wacko:" border="0" alt="wacko.gif" />
I hope Hook could have a look at this... <img src="style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />

To Rad: If you want to hire more crew, you should return to the tavern the next day after you hired all sailors. Some additional sailors will be there next day. <img src="style_emoticons/<#EMO_DIR#>/yes.gif" style="vertical-align:middle" emoid=":yes" border="0" alt="yes.gif" />
 
I had the problem with the screen flickering then being in the ocean once recently. But I'd been changing the code at the time and I'm pretty sure the problem was a bug in my test version of the code.

If I see it happening again, and can reproduce it, I'll be able to track it down.

Hook
 
Could you please send me your latest files that should work properly? I'm not sure if the files currently in Beta 2 are the right ones... <img src="style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />
 
I was able to reproduce it every time I attempted to board a surrendered ship. I found out that this is what causes it, in the reinit.c file, all previous versions used this code:

// TIH --> using FindBlankCharSlot to generate a new twin from every captain you encounter can cause major troubles, because there
// are no more slots to use for making a new twin of a fantom. This should be using a set group of slots, in rotation so that when
// a slot is not in use (a captain is no longer a captive, or has been killed), the slot can be reused for a new twin generation.

makeref(Fightincabin,Characters[CHARACTERS_QUANTITY]);
CHARACTERS_QUANTITY++;
if(Fightincabin.id != "0")
{
int k = FindBlankCharSlot();
CHARACTERS_QUANTITY = k+1;
makeref(Fightincabin, Characters[k]);
}
// a suggested better method (uses function defined before CreateTwinCharacter:
/*
int freeidx = FindFreeCabinCaptain();
if (freeidx == -1) { freeidx = FindFreeCabinCaptain(); }
else { makeref(Fightincabin, Characters[freeidx]); }
*/

In the beta 2, the first section of code is commented out, and the second section is the working code. I changed my version back to how it looks above, and the problem went away. Of course, I don't know enough about code to know if that causes a problem elsewhere, but I haven't run in to one. Hope that helps! <img src="style_emoticons/<#EMO_DIR#>/rolleyes.gif" style="vertical-align:middle" emoid=":rolleyes:" border="0" alt="rolleyes.gif" />
 
Thanks for figuring that out. Please try to use attached file and see if that works properly. I noticed there was a line missing that should have been in there. <img src="style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />
 
Thanks Pieter, I don't know if that change will affect Mithrandir's and IncredibleHats changes to the problem of generating enemy captains after 35 or not. I unfortunately won't be able to do much testing for awhile as my wife has determined I've spent far too much time on my computer this week. <img src="style_emoticons/<#EMO_DIR#>/whistling.gif" style="vertical-align:middle" emoid=":wp" border="0" alt="whistling.gif" /> (Hey, it was my vacation, I figured I could spend it how I wanted, but you know how those wives are. <img src="style_emoticons/<#EMO_DIR#>/whippa.gif" style="vertical-align:middle" emoid=":whipa" border="0" alt="whippa.gif" /> ) Anyhow, hope someone can try it out and let you know if it works, I know everyone is very excited about the impending Build 13 release! <img src="style_emoticons/<#EMO_DIR#>/w00t.gif" style="vertical-align:middle" emoid=":woot" border="0" alt="w00t.gif" />
 
That code is working to the best of my ability to test it. Of course, if you're running it on a saved game, you'll have to hit the "I" key to put it into effect. If you've already run out of character slots, you're out of luck in any case.

Someone needs to check the code in the latest version to make sure something else isn't messing it up, and every change required for the code to work is in the latest version. If there have been a lot of changes since mithrandir posted the fixed reinit.c file, then it's possible someone else messed up the code.

But it's working just fine in my version.

Hook
 
I think the file I just posted should work fine. There was a missing line in Beta 2, but I added it again in this file. I think it should work fine now, but I haven't actually tested it. <img src="style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />

<!--quoteo(post=164704:date=Sep 30 2006, 04:36 PM:name=Doober)--><div class='quotetop'>QUOTE(Doober @ Sep 30 2006, 04:36 PM) [snapback]164704[/snapback]</div><div class='quotemain'><!--quotec-->
Hey, it was my vacation, I figured I could spend it how I wanted, but you know how those wives are. <img src="style_emoticons/<#EMO_DIR#>/whippa.gif" style="vertical-align:middle" emoid=":whipa" border="0" alt="whippa.gif" /> <!--QuoteEnd--></div><!--QuoteEEnd-->
No, I don't. <img src="style_emoticons/<#EMO_DIR#>/whistling.gif" style="vertical-align:middle" emoid=":wp" border="0" alt="whistling.gif" />
 
Hey Pieter or Hook,
I was able to try out that new Reinit.c and it no longer flickers the sea, but a new bug cropped up. Actually, its similar to the Conciero bug listed on bugtracker. When it goes to the boarding screen, my character is unable to move, and there is no enemy captain. Here is the error log:

RUNTIME ERROR - file: seadogs.c; line: 778
Save - ARef to non existing attributes branch

Here's the compile.log (although it doesn't seem to say anything important)

Sir, the Allemaar has struck her colors!
SURR: done lbc boost, now cycle through ships
SURR: Ship_Surrender complete
SETTING MUSIC: music_spokplavanie
PauseAllSounds
ResetSoundScheme
LoadLocation(ref loc) BOARDING_PINNACE
ItemLogic: On load location BOARDING_PINNACE
ItemLogic: found 0 buttons
ResetSoundScheme
SetSoundScheme: deck
SETTING MUSIC: music_gorod

And here is the system.log, it was a lot longer, but I just copied the last part:

Warning: NPCharacter -> trace node not found
Warning: NPCharacter -> trace node not found
Warning: NPCharacter -> trace node not found
Warning: NPCharacter -> trace node not found
Warning: NPCharacter -> trace node not found
Warning: NPCharacter -> trace node not found
Warning: NPCharacter -> trace node not found
Warning: NPCharacter -> trace node not found
Release d3d8
Undefined error
Release d3d
Undefined error
Unloading
System exit and cleanup:
Mem state: User memory: 3374 MSSystem: 2144 Blocks: 134
Leak: 'Bad memory address' line 0, size 50
Leak: 'Bad memory address' line 0, size 49
Leak: 'Bad memory address' line 0, size 49
Leak: 'Bad memory address' line 0, size 50
Leak: 'Bad memory address' line 0, size 49
Leak: 'Bad memory address' line 0, size 50
Leak: 'Bad memory address' line 0, size 49

Any ideas on this one?

Upon looking closer, I'm not sure if the error.log relates to the problem, it was dated 8 minutes earlier and may be because of something else. I attached the system.log so you could see the entire thing.
 
The "trace node not found" messages do not come from our code. Probably from the engine. None of my logs have this message.

Sounds like one of the characters is messed up pretty badly, but I have no idea how to fix it.

Hook
 
Sorry for all the pestering Hook, I appreciate all the work you've put into this. Are you using the Beta2? Because I did not have these problems with previous versions, and it seems really odd that I would be getting these errors if we are both using the exact same version. <img src="style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />

Has anyone else experienced this?
 
<!--quoteo(post=164790:date=Sep 30 2006, 05:52 PM:name=Doober)--><div class='quotetop'>QUOTE(Doober @ Sep 30 2006, 05:52 PM) [snapback]164790[/snapback]</div><div class='quotemain'><!--quotec-->
Sorry for all the pestering Hook, I appreciate all the work you've put into this. Are you using the Beta2? <!--QuoteEnd--></div><!--QuoteEEnd-->
Thanks.

I'm using Hat's latest September 6 version. I'll upgrade when the newest version runs as bug-free as that version does. This means I'll be missing out on a lot of new stuff, including having the new islands finished, but I'm not encountering all the game stopping bugs other people are.

Also, I need to do my development work from a known working version of the game. That way I know that if I see a bug, it's something I did myself. When I was working on the boarding code, I stayed with the June 28 code the whole time, only upgrading when I was done. I applied my changes to the newest version of the code at the time, and that's the boarding code Pieter got from me.

Basically, if there's a problem with code newer than September 6, you'll need to get answers from the people who have made changes since then. Mostly Pirate_KK and Pieter, I think.

Hook
 
I have the same problem with the frozen character when boarding a surrendered ship. Earlier I boarded a still fighting ship and the fight started as normal but unfortunately I died <img src="style_emoticons/<#EMO_DIR#>/urgh.gif" style="vertical-align:middle" emoid=":urgh" border="0" alt="urgh.gif" /> so I didn't get to see what happened when I won.

I am using B2 as well.
 
At least I know I'm not the only one then, the problem, I think is caused by the failure of an enemy captain to be generated. There is a script or something that causes your character to walk to the enemy captain, but if there is no enemy captain, your character will just stand there, unable to move. Of course, what codes causes this, I have no idea. <img src="style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />
 
So much for a Build 13 release this weekend. This'll need fixing. I'll make a comparision between Beta 2 and IncredibleHat's latest update and see what has been changed. I hope I'd be able to find the error. <img src="style_emoticons/<#EMO_DIR#>/modding.gif" style="vertical-align:middle" emoid=":modding" border="0" alt="modding.gif" />
 
Back
Top