• 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 Fixing the Different Flags Mod

Indeed having no flags after the next HoistFlag is definitly better than having a CTD.
And HoistFlag is only done if you open the interface, right? So that isn't too bad then, is it?

I originally was able to confirm Captain Maggee's hoist pirate flag problem, but then noticed I was using the wrong ships_init.c entry.
With the correct file, it didn't crash anymore. However, I did end up seeing various weird things at various times in my testing of various things:
- EITC flag on Cayman fort just after testing my sailing ship in Mutiny scene modification
- No pirate pennants on player ship in Jack Sparrow storyline at some points
- Personal AND pirate ensign on player ship; pennants had disappeared - this happened when checking the hoist pirate flag option

I haven't got a clue what was going on with the above. Possibly I was using the wrong ships_init file for some of them.
Once Alpha 9.5 Patch 2 is released, I'll also upload all my flag-related files. Then you can see for yourself what happens with my files.
 
The Different Flags mod seems pretty stable, apart from the fallen-mast and inventory crashes.
For the inventory ones, I was wondering if perhaps it could be caused by two SendMessages being done at the same time or so,
the "update flags" one as well as the "update player sword" one. If so, maybe it could be solved by adding a delay of some sort.

I know for the Different Flags mod Pirate_KK has the game update one flag each frame,
probably because doing them all at once causes trouble. The same could apply to the blade updating.
 
<!--quoteo(post=335397:date=Jul 6 2009, 10:19 AM:name=Pieter Boelen)--><div class='quotetop'>QUOTE (Pieter Boelen @ Jul 6 2009, 10:19 AM) <a href="index.php?act=findpost&pid=335397"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Indeed having no flags after the next HoistFlag is definitly better than having a CTD.
And HoistFlag is only done if you open the interface, right? So that isn't too bad then, is it?<!--QuoteEnd--></div><!--QuoteEEnd-->
No, no the refreshflag can also be done if a ship is surrending, not only if you open an interface !
I have continued my testing and i have noticed that the same weird effects are still present even if i abort the set flags for the ship who has lost a mast <img src="style_emoticons/<#EMO_DIR#>/modding.gif" style="vertical-align:middle" emoid=":modding" border="0" alt="modding.gif" />
The set flags processus looks completely disordered as soon as a ship lost a mast ! the flags seems to be set on the next coastal ship ! all is moved <img src="style_emoticons/<#EMO_DIR#>/wacko.gif" style="vertical-align:middle" emoid=":wacko:" border="0" alt="wacko.gif" />
Plus, i noticed that if an event activate the refreshflags (ship surrender for example) too close of a fall mast event , the game still crashes. It looks like the same type of sendmessage conflict when you exit the inventory in a port.

All those testings were not in vain because there is a way to avoid the crashes and the weird effects :

<b>first :</b> Abort all the refreshflags processus if a ship has lost a mast around except for player.
Advantages : No CTD and all the flags will stay the same, only player could change his flags by interface (except if the fallen mast was on the player ship, in this case, set flags will be abort for him too)
Inconveniences : If a ship would surrender after a fallen mast event, those flags won't be updated and stay the national ones.

<b>second :</b> Restore the fallen mast(s) on ship(s) who have lost them as soon as we go at port or if the sea is reloaded (directencounter call or worldmap+3d sailing at the same island)
Advantages : As the mast would be restored, the set flags processus would rework normaly next time you'd go in 3d sailing. After all, why sailors of a coastal ship who has lost mast couldn't fix it ?

I'm begenning to proceed this way and it works fine for now. The crash has disappeared and weird effects too. In fact, unless you exit the 3d sailing mod, only your flags is updated after a fall mast event !

<!--quoteo(post=335854:date=Jul 7 2009, 09:56 PM:name=Pieter Boelen)--><div class='quotetop'>QUOTE (Pieter Boelen @ Jul 7 2009, 09:56 PM) <a href="index.php?act=findpost&pid=335854"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->The Different Flags mod seems pretty stable, apart from the fallen-mast and inventory crashes.
For the inventory ones, I was wondering if perhaps it could be caused by two SendMessages being done at the same time or so,
the "update flags" one as well as the "update player sword" one. If so, maybe it could be solved by adding a delay of some sort.<!--QuoteEnd--></div><!--QuoteEEnd-->
I completely agree with this analysis pieter ! Have you an idea how could we do to add a delay ?
 
<!--quoteo(post=335871:date=Jul 7 2009, 11:28 PM:name=Screwface)--><div class='quotetop'>QUOTE (Screwface @ Jul 7 2009, 11:28 PM) <a href="index.php?act=findpost&pid=335871"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->No, no the refreshflag can also be done if a ship is surrending, not only if you open an interface !
I have continued my testing and i have noticed that the same weird effects are still present even if i abort the set flags for the ship who has lost a mast <img src="style_emoticons/<#EMO_DIR#>/modding.gif" style="vertical-align:middle" emoid=":modding" border="0" alt="modding.gif" />
The set flags processus looks completely disordered as soon as a ship lost a mast ! the flags seems to be set on the next coastal ship ! all is moved <img src="style_emoticons/<#EMO_DIR#>/wacko.gif" style="vertical-align:middle" emoid=":wacko:" border="0" alt="wacko.gif" />
Plus, i noticed that if an event activate the refreshflags (ship surrender for example) too close of a fall mast event , the game still crashes. It looks like the same type of sendmessage conflict when you exit the inventory in a port.<!--QuoteEnd--></div><!--QuoteEEnd-->Ouch, ouch, ouch and ouch. <img src="style_emoticons/<#EMO_DIR#>/mybad.gif" style="vertical-align:middle" emoid=":facepalm" border="0" alt="mybad.gif" />

<!--quoteo(post=335871:date=Jul 7 2009, 11:28 PM:name=Screwface)--><div class='quotetop'>QUOTE (Screwface @ Jul 7 2009, 11:28 PM) <a href="index.php?act=findpost&pid=335871"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->All those testings were not in vain because there is a way to avoid the crashes and the weird effects :
[...]
I'm begenning to proceed this way and it works fine for now. The crash has disappeared and weird effects too. In fact, unless you exit the 3d sailing mod, only your flags is updated after a fall mast event !<!--QuoteEnd--></div><!--QuoteEEnd-->That DOES sound like a good idea. And you can actually update the flags on the player ship only?
Sounds like a very good compromise to me! <img src="style_emoticons/<#EMO_DIR#>/w00t.gif" style="vertical-align:middle" emoid=":woot" border="0" alt="w00t.gif" />

<!--quoteo(post=335871:date=Jul 7 2009, 11:28 PM:name=Screwface)--><div class='quotetop'>QUOTE (Screwface @ Jul 7 2009, 11:28 PM) <a href="index.php?act=findpost&pid=335871"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I completely agree with this analysis pieter ! Have you an idea how could we do to add a delay ?<!--QuoteEnd--></div><!--QuoteEEnd-->The game agrees too; I did have an idea how to add a delay and seem to have been able to fix it that way! <img src="style_emoticons/<#EMO_DIR#>/piratesing.gif" style="vertical-align:middle" emoid=":shock" border="0" alt="piratesing.gif" />

In <i>PROGRAM\BATTLE_INTERFACE\Flags.c</i>, add <i>#event_handler("UpdateFlags", "RefreshFlags");</i> above the <i>void RefreshFlags()</i> line:<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->#event_handler("UpdateFlags", "RefreshFlags"); // PB: Enable delayed flag updates
void RefreshFlags()
{
    if (FindLoadedLocation() >= 0 && locNumShips > 0) {
        SetEventHandler("frame", "BLI_SetFlags", 1);
        return;
    }
    if (bSeaActive && !bAbordageStarted) {
        SetEventHandler("frame", "BI_SetFlags", 1);
        return;
    }
}<!--c2--></div><!--ec2-->
Then in <i>PROGRAM\seadogs.c</i>, replace the <i>RefreshFlags();</i> call with <i>PostEvent("UpdateFlags", 100);</i> :<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->        //    RefreshFlags(); // KK
            PostEvent("UpdateFlags", 100); // PB: Fixes port inventory crash<!--c2--></div><!--ec2-->
I have just tested this and the game no longer crashes upon:
1. Opening the F2>Inventory screen in port and closing the interface in port
2. Doing the same, but actually equipping another blade
3. Looting dead bodies in port

I'm pretty sure it had been crashing in those cases before, so it seems to me like this is working properly now! <img src="style_emoticons/<#EMO_DIR#>/danse1.gif" style="vertical-align:middle" emoid=":dance" border="0" alt="danse1.gif" />

<b>Edit:</b> Let's make it 100 instead; 10 still crashes when there's many ships in port, apparently. <img src="style_emoticons/<#EMO_DIR#>/mybad.gif" style="vertical-align:middle" emoid=":facepalm" border="0" alt="mybad.gif" />
 
Question: According to Thomas the Terror and Pirate_KK, in the DR, surrendered ships DID get proper white flags.
Is there any chance that can be restored here too? Because I didn't get any flags on surrendered ships... <img src="style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />
 
<!--quoteo(post=335963:date=Jul 8 2009, 11:11 AM:name=Pieter Boelen)--><div class='quotetop'>QUOTE (Pieter Boelen @ Jul 8 2009, 11:11 AM) <a href="index.php?act=findpost&pid=335963"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->The game agrees too; I did have an idea how to add a delay and seem to have been able to fix it that way! <img src="style_emoticons/<#EMO_DIR#>/piratesing.gif" style="vertical-align:middle" emoid=":shock" border="0" alt="piratesing.gif" />

In <i>PROGRAM\BATTLE_INTERFACE\Flags.c</i>, add <i>#event_handler("UpdateFlags", "RefreshFlags");</i> above the <i>void RefreshFlags()</i> line:<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->#event_handler("UpdateFlags", "RefreshFlags"); // PB: Enable delayed flag updates
void RefreshFlags()
{
    if (FindLoadedLocation() >= 0 && locNumShips > 0) {
        SetEventHandler("frame", "BLI_SetFlags", 1);
        return;
    }
    if (bSeaActive && !bAbordageStarted) {
        SetEventHandler("frame", "BI_SetFlags", 1);
        return;
    }
}<!--c2--></div><!--ec2-->
Then in <i>PROGRAM\seadogs.c</i>, replace the <i>RefreshFlags();</i> call with <i>PostEvent("UpdateFlags", 10);</i> :<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->        //    RefreshFlags(); // KK
            PostEvent("UpdateFlags", 100); // PB: Fixes port inventory crash<!--c2--></div><!--ec2-->
I have just tested this and the game no longer crashes upon:
1. Opening the F2>Inventory screen in port and closing the interface in port
2. Doing the same, but actually equipping another blade
3. Looting dead bodies in port

I'm pretty sure it had been crashing in those cases before, so it seems to me like this is working properly now! <img src="style_emoticons/<#EMO_DIR#>/danse1.gif" style="vertical-align:middle" emoid=":dance" border="0" alt="danse1.gif" />

<b>Edit:</b> Let's make it 100 instead; 10 still crashes when there's many ships in port, apparently. <img src="style_emoticons/<#EMO_DIR#>/mybad.gif" style="vertical-align:middle" emoid=":facepalm" border="0" alt="mybad.gif" /><!--QuoteEnd--></div><!--QuoteEEnd-->
That's amazing pieter <img src="style_emoticons/<#EMO_DIR#>/par-ty.gif" style="vertical-align:middle" emoid=":cheers" border="0" alt="par-ty.gif" /> Another crash fixed ! Congratulations ! I didn't know this technic <img src="style_emoticons/<#EMO_DIR#>/piratesing.gif" style="vertical-align:middle" emoid=":shock" border="0" alt="piratesing.gif" /> Thank you to learn me that !
Perhaps i could have a try of this to the fallen mast crash to see if that's not a question of conflict too <img src="style_emoticons/<#EMO_DIR#>/rolleyes.gif" style="vertical-align:middle" emoid=":rolleyes:" border="0" alt="rolleyes.gif" />

<!--quoteo(post=335971:date=Jul 8 2009, 12:19 PM:name=Pieter Boelen)--><div class='quotetop'>QUOTE (Pieter Boelen @ Jul 8 2009, 12:19 PM) <a href="index.php?act=findpost&pid=335971"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Question: According to Thomas the Terror and Pirate_KK, in the DR, surrendered ships DID get proper white flags.
Is there any chance that can be restored here too? Because I didn't get any flags on surrendered ships... <img src="style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" /><!--QuoteEnd--></div><!--QuoteEEnd-->
I actually don't know why the white flags are missing but i have discovered, by accident, that if you add a line of code in the GetShipFlagType function like that :
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->string GetShipFlagType(ref chr, int pos)
{
    int iShipType = GetCharacterShipType(chr);
    if (iShipType < 0 || iShipType == SHIP_NOTUSED) return FLAG_ENSIGN;
    aref arShip; makearef(arShip, chr.Ship);
    ref rShip; makeref(rShip, ShipsTypes[iShipType]);
    if (!CheckShipAttribute(arShip, rShip, "Flags")) return FLAG_ENSIGN;
    int n = 0;
    aref arMasts; makearef(arMasts, rShip.Flags);
    int nMasts = GetAttributesNum(arMasts);
    int m = 0;
    int i = 1;
    if(CheckAttribute(chr,"surrendered")){return FLAG_NONE;} // Screwface : seems to fix the white flags missing bug ???
    ......................<!--c2--></div><!--ec2-->
With this line of code, when a ship surrender, she hoist White flags <img src="style_emoticons/<#EMO_DIR#>/piratesing.gif" style="vertical-align:middle" emoid=":shock" border="0" alt="piratesing.gif" />
I don't know if it's THE solution but that's a solution which seems to work !
 
You set FLAG_NONE and they turn white? That is WEIRD! But if it works.... <img src="style_emoticons/<#EMO_DIR#>/mybad.gif" style="vertical-align:middle" emoid=":facepalm" border="0" alt="mybad.gif" />
I really have to check in the DR at some point to see if I DO get white flags there. <img src="style_emoticons/<#EMO_DIR#>/wacko.gif" style="vertical-align:middle" emoid=":wacko:" border="0" alt="wacko.gif" />

Is there any chance you can upload your current fallen-mast adjustments?
I'd like to do some testing to see if the game indeed is more stable with that. I'm a bit fed-up with crashes. <img src="style_emoticons/<#EMO_DIR#>/icon_mrgreen1.gif" style="vertical-align:middle" emoid=":cheeky" border="0" alt="icon_mrgreen1.gif" />

Personally I can't imagine delays helping with the fallen masts, since that's more of a number problem like the port crashes before.
But you can always try. Have you got any idea what happens if there's a ship with fallen masts and you then reload to port?
Would you get a crash? And if you managed to prevent that crash, would there be any flags at all? Or would it be all messed up?
 
<!--quoteo(post=335984:date=Jul 8 2009, 01:11 PM:name=Pieter Boelen)--><div class='quotetop'>QUOTE (Pieter Boelen @ Jul 8 2009, 01:11 PM) <a href="index.php?act=findpost&pid=335984"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Have you got any idea what happens if there's a ship with fallen masts and you then reload to port?
Would you get a crash? And if you managed to prevent that crash, would there be any flags at all? Or would it be all messed up?<!--QuoteEnd--></div><!--QuoteEEnd-->
Originally, if a ship with a fallen mast was reloaded to port, the game crashed ! That's why to prevent that crash and missing flags on her, i manage to restore the fallen mast before loading her in port. With this solution, all looks in order <img src="style_emoticons/<#EMO_DIR#>/me.gif" style="vertical-align:middle" emoid=":onya" border="0" alt="me.gif" />!

I will finalyse my adjustments and upload its after some testings. I managed to only allow the set flags on player ship after a fallen mast event but i haven't foreseen yet the case of companions ships <img src="style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />
 
At this point, I'm glad if you can get rid of the actual crashes.
If the visual flags are a bit confused, that's certainly not as bad as a crash and can be looked at later, right?
And indeed restoring the masts is a very good one! <img src="style_emoticons/<#EMO_DIR#>/w00t.gif" style="vertical-align:middle" emoid=":woot" border="0" alt="w00t.gif" />
 
Pieter, is the postevent delay relative to the CPU speed ? because i still have a crash when i excite the inventory with 100 as value <img src="style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />
 
It could be. I noticed that with 10 as value, it didn't crash anymore with one ship present, but did still when there was several.
That's why I increased it to 100. Try a higher value still and see if that doesn't solve it for you.
I wonder how Pirate_KK managed to get the "one update per frame" working. I only know how to do things in milliseconds with PostEvent.
 
Here is my Adjustments to solve the fallen masts crashes !!
As i said before, as soon as a mast has fallen, i restrict the refreshflags only to the player to avoid crash when the flags events are too close of the fallen mast events but but i finally found a way to refresh flags of a ship who surrender <img src="style_emoticons/<#EMO_DIR#>/rolleyes.gif" style="vertical-align:middle" emoid=":rolleyes:" border="0" alt="rolleyes.gif" /> (except if the fallen mast(s) are on this ship)

Of course, if you go to port or if you reload the sea, all the fallen mast(s) will be restored, even if it was a mast of the player ship. It can seem curious for you but that's the condition to avoid problems <img src="style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />

I also made some modifications in ransack_main.c and transfer_main.c file to avoid crash if you swap your ship or if you assign an officer to a ship who has a fallen mast !

As i haven't got time yet to install the patch 2, this update is made for patch 1 <img src="style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />
 

Attachments

  • Period_Flags_mod_update_07_09_09.rar
    135.8 KB · Views: 88
That is wonderful! I'm updating the experimental mods now so everybody can try it.
Hopefully the bad crashes will be a thing of the past now! <img src="style_emoticons/<#EMO_DIR#>/w00t.gif" style="vertical-align:middle" emoid=":woot" border="0" alt="w00t.gif" />
 
Sailing into Grenada in the Assassin storyline the game will actually load the screen but the CTD

At this stage there is a quest ship in the port as well so this may be the problem

EDIT: Removed ship and still got CTD <img src="style_emoticons/<#EMO_DIR#>/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" />
 
I just tested this point by starting the Assassin storyline and executing this with the console:<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->            DisableFastTravel(false);
            DisableMenuLaunch(false);        
            WaitDate("", 0,0,1,0,0);    
            SetCurrentTime(10, 0);        
            DoQuestReloadToLocation("Cabin_small", "goto", "goto2", "novelabis");<!--c2--></div><!--ec2-->
That actually worked fine with a crash. I had tested with <i>DoQuestReloadToLocation("Quest_ShipDeck2", "rld", "startloc", "comecar2");</i>
before and got a weird crash with that one, but this time it worked as it should.
 
I tested the exact same thing again and it DID crash this time. What is going on here???<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->Quest complete, quest name = fougornot
LandInterface DoSetFlags: 0
procGetRiggingData: n=-2, chr.id=Blaze, ship.type=Barque4_47, nation=-1, ShipFlagsQuantity=6, bShipWithoutPennants=0
CurrentFlag=1, ShipFlagsQuantity=6, FlagType=E
procGetRiggingData: n=-2, chr.id=Blaze, ship.type=Barque4_47, nation=-1, ShipFlagsQuantity=6, bShipWithoutPennants=0
CurrentFlag=2, ShipFlagsQuantity=6, FlagType=P
FlagType==FLAG_PENNANT && n == SHIP_FLAG
procGetRiggingData: n=-2, chr.id=Blaze, ship.type=Barque4_47, nation=-1, ShipFlagsQuantity=6, bShipWithoutPennants=0
CurrentFlag=3, ShipFlagsQuantity=6, FlagType=P
FlagType==FLAG_PENNANT && n == SHIP_FLAG
procGetRiggingData: n=-3, chr.id=Blaze, ship.type=Barque4_47, nation=-1, ShipFlagsQuantity=6, bShipWithoutPennants=0
CurrentFlag=4, ShipFlagsQuantity=6, FlagType=E
FlagType==FLAG_ENSIGN && n == SHIP_PENNANT
procGetRiggingData: n=-3, chr.id=Blaze, ship.type=Barque4_47, nation=-1, ShipFlagsQuantity=6, bShipWithoutPennants=0
CurrentFlag=5, ShipFlagsQuantity=6, FlagType=P
procGetRiggingData: n=-3, chr.id=Blaze, ship.type=Barque4_47, nation=-1, ShipFlagsQuantity=6, bShipWithoutPennants=0
CurrentFlag=6, ShipFlagsQuantity=6, FlagType=P
LandInterface DoSetFlags: 1
procGetRiggingData: n=-2, chr.id=CrConceicao1, ship.type=Sloop1, nation=3, ShipFlagsQuantity=1, bShipWithoutPennants=1
CurrentFlag=1, ShipFlagsQuantity=1, FlagType=E
LandInterface DoSetFlags: 2
procGetRiggingData: n=-2, chr.id=CrConceicao2, ship.type=Barque3_50, nation=3, ShipFlagsQuantity=6, bShipWithoutPennants=0
CurrentFlag=1, ShipFlagsQuantity=6, FlagType=P
FlagType==FLAG_PENNANT && n == SHIP_FLAG
procGetRiggingData: n=-2, chr.id=CrConceicao2, ship.type=Barque3_50, nation=3, ShipFlagsQuantity=6, bShipWithoutPennants=0
CurrentFlag=2, ShipFlagsQuantity=6, FlagType=E
procGetRiggingData: n=-2, chr.id=CrConceicao2, ship.type=Barque3_50, nation=3, ShipFlagsQuantity=6, bShipWithoutPennants=0
CurrentFlag=3, ShipFlagsQuantity=6, FlagType=P
FlagType==FLAG_PENNANT && n == SHIP_FLAG
procGetRiggingData: n=-3, chr.id=CrConceicao2, ship.type=Barque3_50, nation=3, ShipFlagsQuantity=6, bShipWithoutPennants=0
CurrentFlag=4, ShipFlagsQuantity=6, FlagType=P
procGetRiggingData: n=-3, chr.id=CrConceicao2, ship.type=Barque3_50, nation=3, ShipFlagsQuantity=6, bShipWithoutPennants=0
CurrentFlag=5, ShipFlagsQuantity=6, FlagType=E
FlagType==FLAG_ENSIGN && n == SHIP_PENNANT
procGetRiggingData: n=-3, chr.id=CrConceicao2, ship.type=Barque3_50, nation=3, ShipFlagsQuantity=6, bShipWithoutPennants=0
CurrentFlag=6, ShipFlagsQuantity=6, FlagType=P
LandInterface DoSetFlags: 3
procGetRiggingData: n=-2, chr.id=CrConceicao3, ship.type=Galeon1, nation=0, ShipFlagsQuantity=4, bShipWithoutPennants=1
CurrentFlag=1, ShipFlagsQuantity=4, FlagType=E
procGetRiggingData: n=-2, chr.id=CrConceicao3, ship.type=Galeon1, nation=0, ShipFlagsQuantity=4, bShipWithoutPennants=1
CurrentFlag=2, ShipFlagsQuantity=4, FlagType=E
procGetRiggingData: n=-2, chr.id=CrConceicao3, ship.type=Galeon1, nation=0, ShipFlagsQuantity=4, bShipWithoutPennants=1
CurrentFlag=3, ShipFlagsQuantity=4, FlagType=E
procGetRiggingData: n=-2, chr.id=CrConceicao3, ship.type=Galeon1, nation=0, ShipFlagsQuantity=4, bShipWithoutPennants=1
CurrentFlag=4, ShipFlagsQuantity=4, FlagType=E
LandInterface DoSetFlags: 4
procGetRiggingData: n=-2, chr.id=CrConceicao4, ship.type=Fleut2, nation=0, ShipFlagsQuantity=4, bShipWithoutPennants=1
CurrentFlag=1, ShipFlagsQuantity=4, FlagType=E
procGetRiggingData: n=-2, chr.id=CrConceicao4, ship.type=Fleut2, nation=0, ShipFlagsQuantity=4, bShipWithoutPennants=1
CurrentFlag=2, ShipFlagsQuantity=4, FlagType=E
procGetRiggingData: n=-2, chr.id=CrConceicao4, ship.type=Fleut2, nation=0, ShipFlagsQuantity=4, bShipWithoutPennants=1
CurrentFlag=3, ShipFlagsQuantity=4, FlagType=E
procGetRiggingData: n=-2, chr.id=CrConceicao4, ship.type=Fleut2, nation=0, ShipFlagsQuantity=4, bShipWithoutPennants=1
CurrentFlag=4, ShipFlagsQuantity=4, FlagType=E
LandInterface DoSetFlags: 5
procGetRiggingData: n=-2, chr.id=CrConceicao5, ship.type=LuggerVML, nation=5, ShipFlagsQuantity=3, bShipWithoutPennants=1
CurrentFlag=1, ShipFlagsQuantity=3, FlagType=E
procGetRiggingData: n=-2, chr.id=CrConceicao5, ship.type=LuggerVML, nation=5, ShipFlagsQuantity=3, bShipWithoutPennants=1
CurrentFlag=2, ShipFlagsQuantity=3, FlagType=E
procGetRiggingData: n=-2, chr.id=CrConceicao5, ship.type=LuggerVML, nation=5, ShipFlagsQuantity=3, bShipWithoutPennants=1
CurrentFlag=3, ShipFlagsQuantity=3, FlagType=E
procGetRiggingData: n=-2, chr.id=CrConceicao5, ship.type=LuggerVML, nation=5, ShipFlagsQuantity=3, bShipWithoutPennants=1<!--c2--></div><!--ec2-->
Edit: And it crashed again:<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->Quest complete, quest name = fougornot
LandInterface DoSetFlags: 0
procGetRiggingData: n=-2, chr.id=Blaze, ship.type=Barque4_47, nation=-1, ShipFlagsQuantity=6, bShipWithoutPennants=0
CurrentFlag=1, ShipFlagsQuantity=6, FlagType=E
procGetRiggingData: n=-2, chr.id=Blaze, ship.type=Barque4_47, nation=-1, ShipFlagsQuantity=6, bShipWithoutPennants=0
CurrentFlag=2, ShipFlagsQuantity=6, FlagType=P
FlagType==FLAG_PENNANT && n == SHIP_FLAG
procGetRiggingData: n=-2, chr.id=Blaze, ship.type=Barque4_47, nation=-1, ShipFlagsQuantity=6, bShipWithoutPennants=0
CurrentFlag=3, ShipFlagsQuantity=6, FlagType=P
FlagType==FLAG_PENNANT && n == SHIP_FLAG
procGetRiggingData: n=-3, chr.id=Blaze, ship.type=Barque4_47, nation=-1, ShipFlagsQuantity=6, bShipWithoutPennants=0
CurrentFlag=4, ShipFlagsQuantity=6, FlagType=E
FlagType==FLAG_ENSIGN && n == SHIP_PENNANT
procGetRiggingData: n=-3, chr.id=Blaze, ship.type=Barque4_47, nation=-1, ShipFlagsQuantity=6, bShipWithoutPennants=0
CurrentFlag=5, ShipFlagsQuantity=6, FlagType=P
procGetRiggingData: n=-3, chr.id=Blaze, ship.type=Barque4_47, nation=-1, ShipFlagsQuantity=6, bShipWithoutPennants=0
CurrentFlag=6, ShipFlagsQuantity=6, FlagType=P
LandInterface DoSetFlags: 1
procGetRiggingData: n=-2, chr.id=CrConceicao1, ship.type=Lugger1, nation=1, ShipFlagsQuantity=4, bShipWithoutPennants=0
CurrentFlag=1, ShipFlagsQuantity=4, FlagType=P
FlagType==FLAG_PENNANT && n == SHIP_FLAG
procGetRiggingData: n=-2, chr.id=CrConceicao1, ship.type=Lugger1, nation=1, ShipFlagsQuantity=4, bShipWithoutPennants=0
CurrentFlag=2, ShipFlagsQuantity=4, FlagType=E
procGetRiggingData: n=-3, chr.id=CrConceicao1, ship.type=Lugger1, nation=1, ShipFlagsQuantity=4, bShipWithoutPennants=0
CurrentFlag=3, ShipFlagsQuantity=4, FlagType=P
procGetRiggingData: n=-3, chr.id=CrConceicao1, ship.type=Lugger1, nation=1, ShipFlagsQuantity=4, bShipWithoutPennants=0
CurrentFlag=4, ShipFlagsQuantity=4, FlagType=E
FlagType==FLAG_ENSIGN && n == SHIP_PENNANT
LandInterface DoSetFlags: 2
procGetRiggingData: n=-2, chr.id=CrConceicao2, ship.type=Lugger2, nation=1, ShipFlagsQuantity=4, bShipWithoutPennants=0
CurrentFlag=1, ShipFlagsQuantity=4, FlagType=P
FlagType==FLAG_PENNANT && n == SHIP_FLAG
procGetRiggingData: n=-2, chr.id=CrConceicao2, ship.type=Lugger2, nation=1, ShipFlagsQuantity=4, bShipWithoutPennants=0
CurrentFlag=2, ShipFlagsQuantity=4, FlagType=E
procGetRiggingData: n=-3, chr.id=CrConceicao2, ship.type=Lugger2, nation=1, ShipFlagsQuantity=4, bShipWithoutPennants=0
CurrentFlag=3, ShipFlagsQuantity=4, FlagType=P
procGetRiggingData: n=-3, chr.id=CrConceicao2, ship.type=Lugger2, nation=1, ShipFlagsQuantity=4, bShipWithoutPennants=0
CurrentFlag=4, ShipFlagsQuantity=4, FlagType=E
FlagType==FLAG_ENSIGN && n == SHIP_PENNANT
LandInterface DoSetFlags: 3
procGetRiggingData: n=-2, chr.id=CrConceicao3, ship.type=Xebec3, nation=3, ShipFlagsQuantity=2, bShipWithoutPennants=1
CurrentFlag=1, ShipFlagsQuantity=2, FlagType=E
procGetRiggingData: n=-2, chr.id=CrConceicao3, ship.type=Xebec3, nation=3, ShipFlagsQuantity=2, bShipWithoutPennants=1
CurrentFlag=2, ShipFlagsQuantity=2, FlagType=E
LandInterface DoSetFlags: 4
procGetRiggingData: n=-2, chr.id=CrConceicao4, ship.type=Hooker1, nation=3, ShipFlagsQuantity=2, bShipWithoutPennants=1
CurrentFlag=1, ShipFlagsQuantity=2, FlagType=E
procGetRiggingData: n=-2, chr.id=CrConceicao4, ship.type=Hooker1, nation=3, ShipFlagsQuantity=2, bShipWithoutPennants=1
CurrentFlag=2, ShipFlagsQuantity=2, FlagType=E
LandInterface DoSetFlags: 5
procGetRiggingData: n=-2, chr.id=CrConceicao5, ship.type=Barque2, nation=5, ShipFlagsQuantity=4, bShipWithoutPennants=0
CurrentFlag=1, ShipFlagsQuantity=4, FlagType=E
procGetRiggingData: n=-2, chr.id=CrConceicao5, ship.type=Barque2, nation=5, ShipFlagsQuantity=4, bShipWithoutPennants=0
CurrentFlag=2, ShipFlagsQuantity=4, FlagType=E
LandInterface DoSetFlags: 6
procGetRiggingData: n=-2, chr.id=CrConceicao6, ship.type=Fleut1, nation=5, ShipFlagsQuantity=4, bShipWithoutPennants=1
CurrentFlag=1, ShipFlagsQuantity=4, FlagType=E
procGetRiggingData: n=-2, chr.id=CrConceicao6, ship.type=Fleut1, nation=5, ShipFlagsQuantity=4, bShipWithoutPennants=1
CurrentFlag=2, ShipFlagsQuantity=4, FlagType=E
procGetRiggingData: n=-2, chr.id=CrConceicao6, ship.type=Fleut1, nation=5, ShipFlagsQuantity=4, bShipWithoutPennants=1
CurrentFlag=3, ShipFlagsQuantity=4, FlagType=E
procGetRiggingData: n=-2, chr.id=CrConceicao6, ship.type=Fleut1, nation=5, ShipFlagsQuantity=4, bShipWithoutPennants=1
CurrentFlag=4, ShipFlagsQuantity=4, FlagType=E
procGetRiggingData: n=-2, chr.id=CrConceicao6, ship.type=Fleut1, nation=5, ShipFlagsQuantity=4, bShipWithoutPennants=1<!--c2--></div><!--ec2-->
 
Pieter, i'm sorry to insist with that but shouldn't the heavytraders be replaced by the wargalleons of the DR ? Because actually, there are no new heavytraders (DR wargalleons renamed) files in the new experimental mod resources ship folder but they are still in the ships_init file <img src="style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" /> So I tried to sail with a heavytrader and had a CTD !
 
If you install as per the installation instructions, then you do have the HeavyTrader model files.
They are renamed to WarGalleon in the Development Resources, but not in any of the release mods.
Of course eventually we should rename them in the release mods too, because it's getting confusing. <img src="style_emoticons/<#EMO_DIR#>/mybad.gif" style="vertical-align:middle" emoid=":facepalm" border="0" alt="mybad.gif" />

Could you please test that Assassin quest problem from above? I really want to know if you can replicate it.
It seems really weird, because one time it worked fine, then two times it crashed. Really strange. <img src="style_emoticons/<#EMO_DIR#>/wacko.gif" style="vertical-align:middle" emoid=":wacko:" border="0" alt="wacko.gif" />
 
The crash comes when you go at port in grenada, right ?
I discovered something very interesting that you could try to confirm if that's the same for you. If you outcomment this line of code in quest_reaction of assassin storyline at the fougornot :

<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->            LAi_ActorDialog(characterFromID("Chico Cois"), pchar, "", 2.0, 1.0);<!--c2--></div><!--ec2-->
Then for me the crash disappear ! This line is not a problem in itself but as it is executed as soon as you land at port, it is probably executed at the same time of the set flags processus and i'm beginning to believe that the set flags functions do not like very much that an other action is executed at the same time. It's probably a story of conflicts as we had with other processus/events <img src="style_emoticons/<#EMO_DIR#>/dunno.gif" style="vertical-align:middle" emoid=":shrug" border="0" alt="dunno.gif" />
I have traced the LAi_ActorDialog function and this function calls other functions and what can we found in one of them ?..... a Sendmessage <img src="style_emoticons/<#EMO_DIR#>/icon_mrgreen1.gif" style="vertical-align:middle" emoid=":cheeky" border="0" alt="icon_mrgreen1.gif" />

I think the best way to solve that would be perhaps to delay the begenning of the dialog action...
 
That sounds very possible that it is the problem...

I see the dialog screen pop up just before the CTD so it does make sense, I'll try adding a delay <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />

<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->        case "fougornot":
            LAi_SetActorType(characterFromID("Chico Cois"));
            Characters[GetCharacterIndex("Chico Cois")].dialog.currentnode = "begin_38";
            LAi_ActorDialog(characterFromID("Chico Cois"), pchar, "", 2.0, 1.0);
        break;<!--c2--></div><!--ec2-->
to
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->        case "fougornot":
            LAi_QuestDelay("fougornot2", 2.0);
        break;

        case "fougornot2":
            LAi_SetActorType(characterFromID("Chico Cois"));
            Characters[GetCharacterIndex("Chico Cois")].dialog.currentnode = "begin_38";
            LAi_ActorDialog(characterFromID("Chico Cois"), pchar, "", 2.0, 1.0);
        break;<!--c2--></div><!--ec2-->

This will allow the game to continue as it should
 
Back
Top