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

Mutiny - Fix for B14 Beta 1 Patch 6

Talisman

Smuggler
Storm Modder
The original posts quoted here were posted in this thread ---> http://forum.piratesahoy.net/index.php/topic/17642-a-few-bugs-with-beta-patch-6/page__view__findpost__p__395896


  1. Mutiny from world map when using heavy Lugger in the stock storyline is broke. Everybody is loaded on the same locator and there is no ship



  1. 1. - Do different ships use different deck models for the Mutiny? :?

    I have just had a couple of Mutinys - using a Jackass Bark - the both worked fine :ixi - Apart from me getting killed :cheeky

    If anyone knows the locator files used (for the mutiny decks ) for the various ships - need to know a ship each relates to - I will have a look at them. :mm


    1. Yes, they do. All ships use the deck model as set in ships_init.c for the mutinies. That's why I want to know the exact ships that people run into problems with.
    Then we can check which deck model is assigned to that ship in ships_init.c .
    There are:
    ShipDeck1 which uses "locations\Decks\qdeck"
    ShipDeck2 which uses "locations\decks\udeck1"
    ShipDeck3 which uses "locations\decks\udeck2"
    ShipDeck4 which uses "locations\decks\deckLow"
    ShipDeck5 which uses "locations\decks\deckMedium"
    ShipDeck6 which uses "locations\decks\deckBig"

    I'm not sure which locatorfiles the mutinues use, but I suspect they use the "_ld" files.


    I have checked all the deck models ( using several ship models for each ShipDeck ) and they all work OK except ShipDeck1 ( Luggers use ShipDeck1 )

    ShipDeck1 is the only one where the player & NPC Crew are outside the playing area

    The problem was that the locator file ( qdeck_l.gm ) did not have any loc or aloc locators in it.


    Solution:

    Attached is a updated qdeck_l.gm file with loc & aloc locators included. EDIT --> use the file attached to Post #11 it is updated version
    Put this file in RESOURCE \ MODELS \ Locations \ decks \ Qdeck

    And the all the Mutinies should work

    Save original file somewhere safe first


    WARNING :- There is still an occasional problem where the game sometimes generates more mutineers than there are locators for - this causes the fight sequence not to end when you have killed all the mutineers (threat sounds continue ) - and you can't return to sea. ( I don't know how to fix this )
 
That's brilliant; thanks very much! :bow

For the number of locators, do you know the lowest number of loc/aloc locators on any of the decks?
Then we'd probably have to decrease the maximum number of boarders to that number so there won't ever be not enough.
Alternatively, more would need to be added to these locations so that all decks have the same number, which would then be enough.
 
This code from PROGRAM\Loc_ai\LAi_boarding.c seems to govern the number of boarders in the various deck locations:
Code:
//---------- number of locations in each boarding area ---------
int GetBoardingLimit(int locIndex)
{
int limit = 6;	// default, just in case

switch(Locations[locIndex].filespath.models)
{
case "locations\decks\udeck":         // 2 ships side by side, main character starts on "corvette-like" and boards "warship-like" deck
limit = 12;
break;

case "locations\decks\udeck1":        // Narrow single ship
limit = 20;
break;

case "locations\decks\udeck2":        // Wide single ship
limit = 20;
break;

// KK -->
case "locations\decks\Qdeck":         // "corvette-like" deck
limit = 10;
break;

case "locations\decks\deck1":         // Larger cannons deck
limit = 14;
break;

case "locations\decks\deck2":         // Smaller cannons deck
limit = 14;
break;

case "locations\decks\hold":          // Cargo hold
limit = 10;
break;
// <-- KK
}

switch(Locations[locIndex].id)
{
case "Boarding_Cabin_small":          // Tiny cabin
limit = 4;
break;

case "Boarding_Cabin_medium":         // Cabin with 3 rooms, food table and officer's head
limit = 6;
break;

case "Boarding_Cabin1":               // Tutorial cabin
limit = 8;
break;

case "Boarding_Cabin2":               // Has balcony outside rear window
limit = 10;
break;

case "Boarding_Cabin3":               // Has wrap-around gallery across back of cabin
limit = 10;
break;

case "Boarding_Cabin4":			      // Black Pearl
limit = 10;
break;

case "Boarding_Cabin5":			      // Crimson Blood
limit = 2;
break;
// KK -->
case "BOARDING_ShipDeck4":            // Small deck with two little doors on both sides of stairs up on stern
limit = 10;
break;

case "BOARDING_ShipDeck5":            // Medium sized deck with high borts to which lead ladders
limit = 14;
break;

case "BOARDING_ShipDeck6":            // Large deck with exit onto galley and "half-round" stairs to upper deck at stern
limit = 14;
break;

case "BOARDING_ShipDeck7":            // Black Pearl
limit = 14;
break;

case "BOARDING_ShipDeck4vs5":         // Combination of BOARDING_ShipDeck4 and BOARDING_ShipDeck5
limit = 11;
break;

case "BOARDING_ShipDeck4vs6":         // Combination of BOARDING_ShipDeck4 and BOARDING_ShipDeck6
limit = 11;
break;

case "BOARDING_ShipDeck5vs6":         // Combination of BOARDING_ShipDeck5 and BOARDING_ShipDeck6
limit = 14;
break;
// <-- KK
}

if (IsFort) limit = 8;
if (IsTown) limit = 8;

if (limit > 20) limit = 20;		// LDH restored 31Jan09 - 30 is too many in one location, it causes terrible lag
return limit;
}
I imagine the problem crops up if the number in this code here exceeds the number of locators in the location.
If so, it appears we can easily decrease the numbers here.
 
That's brilliant; thanks very much! :bow

For the number of locators, do you know the lowest number of loc/aloc locators on any of the decks?
Then we'd probably have to decrease the maximum number of boarders to that number so there won't ever be not enough.
Alternatively, more would need to be added to these locations so that all decks have the same number, which would then be enough.


Total Number of loc & aloc locators are :-

Mutineers use loc locators - Player & officers & loyal crew use aloc locators

ShipDeck1

qdeck_l.gm loc = 6 aloc = 4 ----- I think I will have to update this file & equalize the locators :yes

qdeck_ld.gm loc = 3 aloc = 0

ShipDeck2 - udeck1

udeck_l.gm loc = 17 aloc = 17

udeck_ld.gm loc = 16 aloc = 16

ShipDeck3 - udeck2

udeck_l.gm loc = 17 aloc = 17

udeck_ld.gm -- can't open file in TOOL :shrug

ShipDeck4

deckLow_l.gm loc = 5 aloc = 5

deckLow_ld.gm - no loc & aloc

ShipDeck5

deckMedium_l.gm loc = 7 aloc = 7

deckMedium_ld.gm - no loc & aloc

ShipDeck6

deckBig_l.gm loc = 11 aloc = 11

deckBig_ld.gm - no loc & aloc

ShipDeck7 - BP (Black Pearl)

deckBig_l.gm loc = 11 aloc = 11

deckBig_ld.gm - no loc & aloc


:drunk
 
WARNING :- There is still an occasional problem where the game sometimes generates more mutineers than there are locators for - this causes the fight sequence not to end when you have killed all the mutineers (threat sounds continue ) - and you can't return to sea.


When this happens you get this in the compile.log ( this one was for ShipDeck1 - qdeck_l.gm )

ItemLogic: On load location MUTINY_Deck
ItemLogic: found 0 buttons
Officer Jannie Dutoit on rld:aloc1
Officer Dorinda Almendros on rld:aloc2
Officer Lucimar Moura on rld:aloc3
Officer Cordelie Paix on rld:aloc4
Officer Serena Ringer on rld:aloc5
Officer Clement Hanequart on rld:aloc6
crewRatio=0.8, actLoyal=1, actMutiny=8, actTotal=9
LAi_CreateFantomCharacter -> can't teleportation character to <rld::loc6>
LAi_CreateFantomCharacter -> can't teleportation character to <rld::loc6>
LAi_CreateFantomCharacter -> can't teleportation character to <rld::loc7>
LAi_CreateFantomCharacter -> can't teleportation character to <rld::loc7>
SETTING MUSIC: music_bitva
SETTING MUSIC: music_bitva


:cheers
 
limit = 10 for that location, but there's only 6 player group locators and 4 enemy group locators.
To ensure nothing can go wrong, I think the locator files should have the same number of locators in a group as there is set as limit in the code.
Or maybe one less, since you can't have a battle without at least one enemy. So if there's 4 aloc and 6 loc, the minimum of that is 4 so we should set the limit to 5.
If we want the limit higher, probably we'll need a couple more locators added...
 
OK

Here is the updated version of the file qdeck_l.gm - now has 10 locators for both loc & aloc :woot

Put this file in RESOURCE \ MODELS \ Locations \ decks \ Qdeck

Save original file somewhere safe first

:dance


EDIT: -- Please use updated file in Post # 11
 
Brilliant, I feel silly now cause I have seen this code before and actually worked it out, just didn't think it was causing the mutiny bug :facepalm
 
So this bug has finally been more-or-less solved? That's great! :woot
 
Final Version of updated file - I hope :nk

I have put back all the locators that I previously renamed in error :modding

File still has the 10 locators for both loc & aloc

Put this file in RESOURCE \ MODELS \ Locations \ decks \ Qdeck

Save original file somewhere safe first

Thanks to Morgan Terror for finding the errors :doff
 

Attachments

  • qdeck_l.gm
    5.1 KB · Views: 233
sweet - this bug had happened to me a few times under patch 5, so i'll add this ontop of the beta patch 6 once i've seen it happen again :)
 
Back
Top