• 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 Location doesn't unlock after stealing from merchant due to BuildingSet structures

Jason

Buccaneer
Storm Modder
Ok thanks Pieter. I am testing the latest Levis fixes. I just tested robbing random merchant twice. I got the stuff, (very slow load time) killed all the guards and everyone around except the robbed merchant. I am sure he is the only one left. The music doesn't change an the location won't unlock. This was working correctly before and after I you dealt with everyone, you leave the robbed merchant alone and the location unlocks. I suppose this could be a random hiccup, bu if someone wants to look at it, I have save before the robbery.
 
Ok thanks Pieter. I am testing the latest Levis fixes. I just tested robbing random merchant twice. I got the stuff, (very slow load time) killed all the guards and everyone around except the robbed merchant. I am sure he is the only one left. The music doesn't change an the location won't unlock. This was working correctly before and after I you dealt with everyone, you leave the robbed merchant alone and the location unlocks. I suppose this could be a random hiccup, bu if someone wants to look at it, I have save before the robbery.
Please post it; I can check that tonight.
 
Since I don't know how you triggered your specific problem, I did my normal test on this by killing an item trader in Kralendijk port.
That worked fine.
 
Ok, the merchant should be standing in front of you when you open the save. He is one of the roving merchants that you encounter.
 
Ok, the merchant should be standing in front of you when you open the save. He is one of the roving merchants that you encounter.
Ah, got it now. I did manage to get past that situation, but I had to "kill the windmill" to do it.
Apparently the "windmill owner" objected to the whole thing as well. :facepalm
 
Also I tried this on the beach at Marigot and had the same problem.
You mean Marigot Port? There are also plenty BuildingSet structures there.
I'm trying now to add them to their own AI group to avoid such problems.
 
This extra line in PROGRAM\CCCFunctions.c should probably avoid this in the future:
Code:
void Build(string nr, string building, string interior, float x, float y, float z, float ay, string aigroup)
{
   aref buildingref;
   Items_FindItem(building,&buildingref);
   int planks = sti(buildingref.building.planks);
   int bricks = 0; // KK
   if (CheckAttribute(buildingref, "building.bricks")) bricks = sti(buildingref.building.bricks); // KK
   int hp = 50 + (planks * 20) + (bricks * 30); // KK
   ref chr;
   chr = LAi_CreateFantomCharacterEx(false, 0, false, false, 0.0, buildingref.building.chrmodel, "man", "", "");
   LAi_SetBuildingType(chr);
   LAi_SetHP(chr, hp, hp);
   if (aigroup == "") aigroup = "buildings"; // PB: So they get their own group
I'll include it in the new EXE.

Ok, the merchant should be standing in front of you when you open the save. He is one of the roving merchants that you encounter.
For your posted savegame, I manage to solve the issue through this console command:
Code:
   string aigroup = "";
   ch = CharacterFromID("Location fantom character <7>");
   if (aigroup == "") aigroup = LAI_GROUP_BUILDINGS; // PB: So they get their own group
   LAi_group_MoveCharacter(ch, aigroup);
 
As far as I'm concerned, this should be fixed.
But of course, if something like this does happen again, please report it. :doff

Also... thanks for catching! This was a fun one. :cheeky

windmills.jpg
 
Back
Top