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

Fixed References to Non-Existent Location

Pieter Boelen

Navigation Officer
Administrator
Storm Modder
Hearts of Oak Donator
@Bartolomeu o Portugues: I just got this error message using one of your storyline jump-starts:
Code:
RUNTIME ERROR - file: storyline\Bartolomeu\dialogs\Pierre Delacroix_dialog.c; line: 325
Missed array index
Problem is on this line:
Code:
Locations[FindLocation("Havana_Town_03")].dangerous = true;
I think the reason is because that location no longer exists as you replaced it with a VCO one.
Do you remember what is the correct location ID now?

There are some more references to that location in the game's code files, so those should all be corrected. :facepalm
 
Looking at an old version of "PROGRAM\Locations\init\Cuba.c", seeing what links to "Havana_Town_03", then looking at the new version and seeing where those links lead now, they all seem to point to "Havana_Town_02". "Havana_Town_02" used to be a Spanish version of Douwesen, while "Havana_Town_03" was a Spanish version of part of Redmond. "Havana_Town_02" is the big VCO one which is why "Havana_Town_03" no longer exists.

If any of the other references require locators then more detailed conversion will be needed, but for the numerous lines in "Pierre Delacroix_dialog.c" which simply mark part of Havana as dangerous, replacing the lot with "Havana_Town_02" ought to do the job.
 
Checking further, it is used in the Bartolomeu sidequest like this:
Code:
      Locations[FindLocation("Havana_town_05")].reload.l3.disable = false;
       Locations[FindLocation("Havana_town_05")].reload.l21.disable = false;
       Locations[FindLocation("Havana_town_05")].reload.l4.disable = false;
       Locations[FindLocation("Havana_town_05")].reload.l22.disable = false;
       Locations[FindLocation("Havana_town_02")].vcskip = true;

But for the Jack Sparrow storyline:
Code:
      Locations[FindLocation("Redmond_town_04")].reload.l3.disable = false;
       Locations[FindLocation("Redmond_town_04")].reload.l21.disable = false;
       Locations[FindLocation("Redmond_town_04")].reload.l4.disable = false;
       Locations[FindLocation("Redmond_town_04")].reload.l22.disable = false;
       Locations[FindLocation("Havana_town_02")].vcskip = true;
That's probably wrong, isn't it? Any clue what it should be if the quest takes placed on Jamaica instead?

There are also the following two character init entries:
Code:
      // Soldier.
   ch.nation = SPAIN;
   ch.old.name = "";
   ch.old.lastname = "";
   ch.name    = "";
   ch.lastname    = "";
   ch.id     = "Havana_soldier_05";
   ch.model = 1; // PB
   ch.sex = "man";
   ch.sound_type = "soldier";
   LAi_CharacterReincarnation(ch, true, false);
   GiveItem2Character(ch, "blade4");
   ch.equip.blade = "blade4";
   ch.location   = "Havana_town_02";
   ch.location.group = "goto";
   ch.location.locator = "soldier02";
   ch.Dialog.Filename = "Isla Muelle soldier_dialog.c";
   ch.rank    = 1;
   ch.reputation = "None";
   ch.experience = "0";
   ch.skill.Leadership = "1";
   ch.skill.Fencing = "1";
   ch.skill.Sailing = "1";
   ch.skill.Accuracy = "1";
   ch.skill.Cannons = "1";
   ch.skill.Grappling = "1";
   ch.skill.Repair = "1";
   ch.skill.Defence = "1";
   ch.skill.Commerce = "1";
   ch.skill.Sneak = "1";
   ch.money = "10";
   ch.quest.meeting = "0";
   LAi_SetGuardianType(ch);
   LAi_SetLoginTime(ch, 0.0, 24.0);
   LAi_SetHP(ch, 80.0, 80.0);
   LAi_group_MoveCharacter(ch, "SPAIN_SOLDIERS");
   ch.greeting = "Gr_isla muelle soldier";
   AddGameCharacter(n, ch);

       // Soldier.
   ch.nation = SPAIN;
   ch.old.name = "";
   ch.old.lastname = "";
   ch.name    = "";
   ch.lastname    = "";
   ch.id     = "Havana_soldier_06";
   ch.model = 6; // PB
   ch.sex = "man";
   ch.sound_type = "soldier";
   LAi_CharacterReincarnation(ch, true, false);
   GiveItem2Character(ch, "blade4");
   ch.equip.blade = "blade4";
   ch.location   = "Havana_town_02";
   ch.location.group = "goto";
   ch.location.locator = "soldier01";
   ch.Dialog.Filename = "Isla Muelle soldier_dialog.c";
   ch.rank    = 1;
   ch.reputation = "None";
   ch.experience = "0";
   ch.skill.Leadership = "1";
   ch.skill.Fencing = "1";
   ch.skill.Sailing = "1";
   ch.skill.Accuracy = "1";
   ch.skill.Cannons = "1";
   ch.skill.Grappling = "1";
   ch.skill.Repair = "1";
   ch.skill.Defence = "1";
   ch.skill.Commerce = "1";
   ch.skill.Sneak = "1";
   ch.money = "10";
   ch.quest.meeting = "0";
   LAi_SetGuardianType(ch);
   LAi_SetLoginTime(ch, 0.0, 24.0);
   LAi_SetHP(ch, 80.0, 80.0);
   LAi_group_MoveCharacter(ch, "SPAIN_SOLDIERS");
   ch.greeting = "Gr_isla muelle soldier";
   AddGameCharacter(n, ch);
They're probably not correct now. Should they be removed or should they have their locators changed?
 
All the above changes have been applied in the latest updates.

However, I'm still curious about @Bartolomeu o Portugues' comments on the Jack Sparrow version of the Bartolomeu sidequest that takes place on Jamaica instead.
 
Locations[FindLocation("Havana_town_02")].vcskip = true;
It should be now:
Locations[FindLocation("Redmond_town_04")].vcskip = true;

and the reloads also need to be checked because they are maybe different from Havana_town_05.

About the soldiers, if I don't make any mistake, I think you must kill them when you enter this location after talking a bit with them.
But this must be confirmed :unsure
 
The Havanna location used is a copy of the same Port Royal one, so the locators should remain the same as the old version. Right?
We can check those soldier IDs, I suppose.
 
The Havanna location used is a copy of the same Port Royal one, so the locators should remain the same as the old version. Right?
We can check those soldier IDs, I suppose.
I didn't remember the Havana location was a copy of the Port Royal one :facepalm About the soldiers, yes their IDs will allow to know if they are used in the quest.
 
It should be now:
Locations[FindLocation("Redmond_town_04")].vcskip = true;
Checking this now; are you sure about that one?
For the normal Bartolomeu quest, the related section of code looks like this:
Code:
Locations[FindLocation("Havana_town_05")].reload.l3.disable = false;
Locations[FindLocation("Havana_town_05")].reload.l21.disable = false;
Locations[FindLocation("Havana_town_05")].reload.l4.disable = false;
Locations[FindLocation("Havana_town_05")].reload.l22.disable = false;
Locations[FindLocation("Havana_town_02")].vcskip = true;
Note that the last line is applied to a different location.
Using "Redmond_town_04" there as well would make the code not match with that original section, suggesting that either the Sparrow or the Bartolomeu one would then be wrong.

"Redmond_town_04" = "Havana_town_05"
But I can't remember the equivalent for "Havana_town_02" anymore.

About the soldiers, yes their IDs will allow to know if they are used in the quest.
Looks like we're good to removed them; your storylines use "QUEST_Havana_soldier" characters:
upload_2015-8-16_12-27-41.png
 
That is the "find in all open files" option in Notepad++. Extremely handy, I've got to say.
I used it once to search in 1000 files in a few minutes and export the findings to an Excel file.
Saved me a lot of time, that did! :woot
 
Last edited:
Back
Top