• 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 Treasure Location doesn't contain treasure box.

ANSEL

Corsair
Storm Modder
Hearts of Oak Donator
I was told to report this, so thats what I do.
 

Attachments

  • compile.log
    11.8 KB · Views: 125
  • system.log
    3.8 KB · Views: 124
Code:
ERROR: Treasure Location doesn't contain treasure box. Please report this bug! (include compile.log)
Location: Hispaniola_shore_02
Looks to be something @Levis recently changed.

@ANSEL: Were you indeed doing a Treasure Quest? Was it supposed to be at "Boca de Hubon"?
Was there indeed no chest and/or nothing in it?

For reference, this is the related code from quests_utils.c:
Code:
bool HideTreasureAtLocation(string locid, float x, float y, float z, string required_item, string quest)
{
   ref PChar = GetMainCharacter();
   if(!CheckAttribute(PChar,"required_item."+locid))
   {
     WriteLocatorGlobal(locid, "box", "treasure_box", "", -1, x, y, z, false);
     if(required_item != "")
     {
       if(!CheckAttribute(PChar,"required_item")) PChar.required_item = required_item; //Only set it if none is set already so we don't conflict with the treasure quests
       PChar.required_item.(locid) = required_item;
     }
     if(quest != "")
     {
       PChar.quest.treasure_chest.(locid) = quest;
     }
     return true;
   }
   traceandlog("ERROR: Treasure Location already in use. Please report this bug! (include compile.log)");
   trace("Location: "+locid);
   return false;
}

bool AddItemToTreasureAtLocation(string locid, string itemid, int amount)
{
   if(CheckAttribute(wholeWorld,locid+".locators.box.treasure_box"))
   {
     ref lcn = &Locations[FindLocation(locid)];
     lcn.treasure_box.items.(itemid) = amount;
     return true;
   }
   traceandlog("ERROR: Treasure Location doesn't contain treasure box. Please report this bug! (include compile.log)");
   trace("Location: "+locid);
   return false;
}
 
Probably @Levis needs to look at this, because he was playing around with it before.

Some queries:
- Why check that 'wholeWorld' thing instead of just 'lcn'?
- If 'PChar.required_item' is meant to be written by 'HideTreasureAtLocation', why still write it in MAXIMUS_functions.c at all?
- What if there IS no required item, normally marked with "-1"?

There was indeed a chest, but is was a empty one. False alarm?
No, it sounds like an actual bug. I'm also being massively confused while looking at the new code for this.
And did I mentioned "annoyed"? It was working perfectly fine before. And now it doesn't! :whipa
 
will look into it. sorry :p

@ANSEL Do you have a savegame from before you find the treasure?
 
Wait. An empty treasure chest is actually quite common. In my current game I found treasure the first try! Then went 0-5. That is 5 empty treasure chests. Then hit 2 in a row, then 1 empty. So overall I am 3-9 in treasure quests. I am content with that ratio so please do not change anything.
 
Wait. An empty treasure chest is actually quite common. In my current game I found treasure the first try! Then went 0-5. That is 5 empty treasure chests. Then hit 2 in a row, then 1 empty. So overall I am 3-9 in treasure quests. I am content with that ratio so please do not change anything.
It was not a empty chest there was reason I report this,but the reason was this message:
ERROR: Treasure Location doesn't contain treasure box. Please report this bug! (include compile.log)
Location: Hispaniola_shore_02
 
Wait. An empty treasure chest is actually quite common. In my current game I found treasure the first try! Then went 0-5. That is 5 empty treasure chests. Then hit 2 in a row, then 1 empty. So overall I am 3-9 in treasure quests. I am content with that ratio so please do not change anything.
Do you have the 10 January 2016 version yet? If not, your game may not yet be affected by this issue.
As far as I can tell from @ANSEL's example, I'd expect no treasure chests ever to contain stuff now.
I sincerely doubt that is what you want. ;)

I don't want to have any ratios changed here either. It should just work exactly as well as it did last year.
Which right now, apparently it does not. :ko
 
No I do not have the latest version as I have been working on things and do not want to start a new game when in the middle of something. So this is another new bug?
 
On this point over the last two versions I have been 0 for on treasure quests. And the last five have all sent me to Boca Hubon.
 
Found the problem already.
Please put this in PROGRAM\QUESTS
 

Attachments

  • quests_utils.c
    9.1 KB · Views: 136
Here's to hoping! :cheers
I just made a little mistake. I had a check in place when testing this to see it was all working. I noticed a bug and fixed it then but I forgot to fix it for both functions which give treasure to the chest :p.
 
I don't think this is the proper thread for this but i didn't see another.

I just bought a treasure quest and got a message that there is no treasure chest.
POTC4 2016-01-15 12-56-14-50.jpg
 

Attachments

  • compile.log
    56.6 KB · Views: 87
  • error.log
    15 KB · Views: 110
  • system.log
    14.4 KB · Views: 111
@Hylie Pistof: That is the bug we were discussing here earlier this week.
It is corrected already with the latest Levis Fixes.

There is still another bug though that Jason found.
That one is yet to be fixed.
 
Back
Top