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

Solved 8CompMax and EMS compatibility questions.

Jonesie85

Boarding Master
Storm Modder
Hello all, I have been trying to set up 8CompMax (adding the ability to have 7 other ships in your fleet) manually and Extended Mooring System on my installation of GOF Full v1.2 Patch 1. I was aware of the following bugs. Occasional crashes with a fleet of 8 against whatever else and a funky issue with the port control office.

I can live with the large fleet crash. But, the port control office crash...

Whilst "parking" ships in port control the dialog options stop responding to controls. Effectly traping you in a dialog.
- Is there a way to fix this?
- Does anybody have any other conflict issues they have noticed so i dont get caught by supprise?
- Is there a way to get around the inresponsive port control dialog by closing the dialog screen and starting again?
- Does anybody here know what causes the glitch.
- Is there a way to optimize the incompatibility.
- Is there a limit to how many moorings you can have? it works more times than not with 7 moorings but if you modify the EMS to give 20... pooooof. you have to force a ctd to get out of the dialog freeze and restart.

I knew i was getting into this when i dared combined both 8compmax and EMS (plus)


Below is a piece of code from the Common_portman.c that seems to show the max ammount of moorings available at port control. Is that right and have i written in the number '7' correctly. It was originally 5


"ShipStock_1":
if (sti(NPChar.Portman) >= 7) // {*} BUHO-EMS: Max ships in dock, originally 3.
{
dialog.text = DLG_TEXT_BASE[143];
Link.l1 = DLG_TEXT_BASE[144];
Link.l1.go = "exit";




Below is a piece of code from the Common_portman.c that seems to show specific info on individual moorings. To increase the total ammount of moorings i did what the original extended seems to have done. Copied and pasted 2 blocks' from the original 3 and changed a couple of digits (no offence intended). Have i done it right?

case "ShipStockManBack_1":
NPChar.ShipToStoreIdx = sti(NPChar.Temp.ShipToStoreId1);
dialog.text = DLG_TEXT_BASE[175];
Link.l1 = DLG_TEXT_BASE[176];
Link.l1.go = "ShipStockManBack";
Link.l2 = DLG_TEXT_BASE[177];
Link.l2.go = "exit";
break;

case "ShipStockManBack_2":
NPChar.ShipToStoreIdx = sti(NPChar.Temp.ShipToStoreId2);
dialog.text = DLG_TEXT_BASE[178];
Link.l1 = DLG_TEXT_BASE[179];
Link.l1.go = "ShipStockManBack";
Link.l2 = DLG_TEXT_BASE[180];
Link.l2.go = "exit";
break;

case "ShipStockManBack_3":
NPChar.ShipToStoreIdx = sti(NPChar.Temp.ShipToStoreId3);
dialog.text = DLG_TEXT_BASE[181];
Link.l1 = DLG_TEXT_BASE[182];
Link.l1.go = "ShipStockManBack";
Link.l2 = DLG_TEXT_BASE[183];
Link.l2.go = "exit";
break;

//// {*} BUHO-EMS - ADDED CODE - Space for 2 more ships in the docks.
case "ShipStockManBack_4":
NPChar.ShipToStoreIdx = sti(NPChar.Temp.ShipToStoreId4);
dialog.text = DLG_TEXT_BASE[175];
Link.l1 = DLG_TEXT_BASE[176];
Link.l1.go = "ShipStockManBack";
Link.l2 = DLG_TEXT_BASE[177];
Link.l2.go = "exit";
break;

case "ShipStockManBack_5":
NPChar.ShipToStoreIdx = sti(NPChar.Temp.ShipToStoreId5);
dialog.text = DLG_TEXT_BASE[181];
Link.l1 = DLG_TEXT_BASE[182];
Link.l1.go = "ShipStockManBack";
Link.l2 = DLG_TEXT_BASE[183];
Link.l2.go = "exit";
break;
//// {*} BUHO END ADDITION
//// {*} JONESIES EXTRA MOORINGS - START
case "ShipStockManBack_6": <-----
NPChar.ShipToStoreIdx = sti(NPChar.Temp.ShipToStoreId4); <------ SHOULD THIS BE ID6 ONWARDS?
dialog.text = DLG_TEXT_BASE[175];
Link.l1 = DLG_TEXT_BASE[176];
Link.l1.go = "ShipStockManBack";
Link.l2 = DLG_TEXT_BASE[177];
Link.l2.go = "exit";
break;

case "ShipStockManBack_7":
NPChar.ShipToStoreIdx = sti(NPChar.Temp.ShipToStoreId5);
dialog.text = DLG_TEXT_BASE[181];
Link.l1 = DLG_TEXT_BASE[182];
Link.l1.go = "ShipStockManBack";
Link.l2 = DLG_TEXT_BASE[183];
Link.l2.go = "exit";
break;
//// {*} JONESIES EXTRA MOORINGS - END


Thank you for your time and patience
 
I think i have figured out a workaround. When you have 8 ships (inc your own) in a active fleet. It would look like this:-

Ship 1 (Yours)

Ship 2

Ship 3

Ship 4

Ship 5

Ship 6

Ship 7

Ship 8


When you place the first 4 default companion ships into port control mooring it works without a dialog hang. It would look like this;-

Ship 1 (Yours)

Unused

Unused

Unused

Unused

Ship 6

Ship 7

Ship 8

When you attempt to store the remaining 3 ships the dialog hangs everytime. But if you sell the 3 ships and repurchase them. your fleet list will look like this:-

Ship 1 (Yours)

Ship 2

Ship 3

Ship 4

Unused

Unused

Unused

Unused

Then you can sucessfully store the 3 vessels that always hanged the port control dialog.

My next question:-

Can you rearrange you fleet list ingame without haveing to sell a ship for... say 10,000 and buy it back for 20,000? Or even better, does anybody know how to write a code into the game that will re-assign your ships automatically?

Thank you for your time and patience it is appreciated.
 
Even better, I have found away of fixing the dialog crash

I opened 'Age of Pirates 2\Program\DIALOGS\russian\Common_Portman.c

I found that even though i could have 7 companion ships in your fleet with the 8CompMax mod. The code only allows for port control dialog to recognise 4 companion ships. So i duplicated the code to give 3 extra companions. 7 code 'chunks' in total. I then changed the ed highlighted numbers to represent the correct companion 'chunk'.

I have experimented with this only standing in the Port control office. I have not experimented with this modification elsewhere in game.

case "ShipStockMan_1":
NPChar.ShipToStoreIdx = GetCompanionIndex(PChar, 1);
dialog.text = DLG_TEXT_BASE[149];
Link.l1 = DLG_TEXT_BASE[150];
Link.l1.go = "ShipStock_2";
Link.l2 = DLG_TEXT_BASE[151];
Link.l2.go = "exit";
break;

case "ShipStockMan_2":
NPChar.ShipToStoreIdx = GetCompanionIndex(PChar, 2);
dialog.text = DLG_TEXT_BASE[152];
Link.l1 = DLG_TEXT_BASE[153];
Link.l1.go = "ShipStock_2";
Link.l2 = DLG_TEXT_BASE[154];
Link.l2.go = "exit";
break;

case "ShipStockMan_3":
NPChar.ShipToStoreIdx = GetCompanionIndex(PChar, 3);
dialog.text = DLG_TEXT_BASE[155];
Link.l1 = DLG_TEXT_BASE[156];
Link.l1.go = "ShipStock_2";
Link.l2 = DLG_TEXT_BASE[157];
Link.l2.go = "exit";
break;

case "ShipStockMan_4":
NPChar.ShipToStoreIdx = GetCompanionIndex(PChar, 4);
dialog.text = DLG_TEXT_BASE[158];
Link.l1 = DLG_TEXT_BASE[159];
Link.l1.go = "ShipStock_2";
Link.l2 = DLG_TEXT_BASE[160];
Link.l2.go = "exit";
break;

// 8CompMAX and EMS GOF 1.2 patch1 compatibility fix (Experimental) START.

case "ShipStockMan_5":
NPChar.ShipToStoreIdx = GetCompanionIndex(PChar, 5);
dialog.text = DLG_TEXT_BASE[149];
Link.l1 = DLG_TEXT_BASE[150];
Link.l1.go = "ShipStock_2";
Link.l2 = DLG_TEXT_BASE[151];
Link.l2.go = "exit";
break;

case "ShipStockMan_6":
NPChar.ShipToStoreIdx = GetCompanionIndex(PChar, 6);
dialog.text = DLG_TEXT_BASE[152];
Link.l1 = DLG_TEXT_BASE[153];
Link.l1.go = "ShipStock_2";
Link.l2 = DLG_TEXT_BASE[154];
Link.l2.go = "exit";
break;

case "ShipStockMan_7":
NPChar.ShipToStoreIdx = GetCompanionIndex(PChar, 7);
dialog.text = DLG_TEXT_BASE[155];
Link.l1 = DLG_TEXT_BASE[156];
Link.l1.go = "ShipStock_2";
Link.l2 = DLG_TEXT_BASE[157];
Link.l2.go = "exit";
break;

// 8CompMAX and EMS GOF 1.2 patch1 compatibility fix (Experimental) END.
 
Welcome to the team Jonesie85!

This is some good work :onya

I am going to try implementing your crash solution in Eras. Its one of the only crashes I have. There are some other files affected that will allow you to keep getting NPC pirate and escort missions even if you have 5 ships. Its mostly setting the preset 5 value to 8.

Thank you Mate!

MK
 
Welcome to the team Jonesie85!

This is some good work :onya

I am going to try implementing your crash solution in Eras. Its one of the only crashes I have. There are some other files affected that will allow you to keep getting NPC pirate and escort missions even if you have 5 ships. Its mostly setting the preset 5 value to 8.

Thank you Mate!

MK

Thank you for your comment. ut i must make sure you know that it is 'experimental'. I have tested it in my game of GOF v1.2 full patch 1. Its working so far.
 
Back
Top