• 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 Merchant companion food and rum consumption

Michiko_chan152

Landlubber
I'm not sure if this is a bug or not but I couldn't find anything else in the forum about it. Whenever I accept a merchant escort quest from the tavern, I find that regardless of how much food or rum I or the companion's ship has and regardless of how many days the rations menu says I have left for all of my food and rum, as soon as I set sail in two or three days on the world map all the food and rum from both ships are all consumed and people start starving to death.

The entries on the screen might even say "14 days of food left" but then the next day it says there is none. I thought this was just one strange occurrence but I tried a completely different escort quest with a companion ship that had an even smaller crew and it happened again.
 
Huh? That's really weird.
I wonder of anyone else ever experienced that.

Which modpack version are you playing with at the moment?
 
Nope, I don't remember having such a problem. :no

Not sure what would be causing it, if I think of something I will let you know.
 
This bug is confirmed and I know why it happens.

DailyUpdate follows this procedure for food (and rum):
  • Find the total food in the fleet.
  • Find the total crew of the fleet.
  • Work out how much food the whole crew eat, then deduct that from the total food.
  • Work out what proportion of the food is eaten by each ship and deduct that from their individual holds. This will probably be slightly wrong due to rounding.
  • Add the individual ships' food together and compare to the total food remaining. Go through each ship in turn adding or subtracting 1 food until the totals match.
So the fleet should eat the right amount of food and each ship should eat its share.

Except that the initial total food is obtained from 'GetSquadronCargo', which skips any ship for which 'IsTrader' is true. That means quest traders. So the total food does not include the food carried by the trader. So there is a big mismatch between the total food and the sum of ships' foods. The correction for rounding errors "corrects" this by dumping a lot of food. In effect, the quest trader dumps all its food overboard, then takes a share of yours - and next day it does it again.

This version of "PROGRAM\Characters\CharacterUtilite.c" adds a check to 'GetSquadronCargo' so that it only skips traders if the cargo is not food or rum.
 

Attachments

  • CharacterUtilite.c
    149.4 KB · Views: 168
Except that the initial total food is obtained from 'GetSquadronCargo', which skips any ship for which 'IsTrader' is true. That means quest traders. So the total food does not include the food carried by the trader. So there is a big mismatch between the total food and the sum of ships' foods. The correction for rounding errors "corrects" this by dumping a lot of food. In effect, the quest trader dumps all its food overboard, then takes a share of yours - and next day it does it again.
OUCH! That is EVIL!!! :shock

This version of "PROGRAM\Characters\CharacterUtilite.c" adds a check to 'GetSquadronCargo' so that it only skips traders if the cargo is not food or rum.
Good catch!
And good fix. :bow
 
Back
Top