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

Not a Bug crew pay uses too much money

Hylie Pistof

Curmudgeon
QA Tester
Storm Modder
Pirate Legend
There seems to be a bug where the player keeps losing money even when he is not in a store. I just finished the Battle of Bridgetown and went from $2 million to $25,000. So here I am with 4 shot up battleships and I can't even make the payroll, much less repair and refit. :bird:
 
Wha? Have you got any clue at what time that happened?
It must be linked to something specific, I would suspect.
 
No ideer at all. I thought I was seeing it randomly during the game but never really tracked my money close enough to verify it. Now I am in deep doo doo. It is like starting over again, except with 4 huge ships.

POTC new 2015-05-22 14-03-13-10.jpg POTC new 2015-05-22 14-09-50-22.jpg POTC new 2015-05-22 14-13-44-91.jpg
 
Then all I can say is to keep a closer eye on it so weer might be able to narrow it down.
Without a clue where to look, there's is nothing to be done.
 
While sailing along it came time to pay the crew but they took 3 times as money as they should have. This probably an intermittent bug an there might be other things going on too.
 

Attachments

  • -=Player=- Martinique. Saint Pierre port. May 23rd, 1682.7z
    401.9 KB · Views: 90
Methinks I found a reason for the money disappearing. I started a new game as Eugene Martin and after the tutorial on the dock I had over $18,000. As I was sailing to the next destination a pay day came up of around $3,300, but afterwards I was left with $9,000. The ship is a Coastal Lugger with 29 crew.
^I'm posting that here for extra details. Will check this soon.
 
It happened again. Different game and storyline. Had over $20,000, paid the crew just under $3,000, and ended up with over $13,000. So lost around $3,000 somewhere.
 
It did it on the next payday too. Went from $24,900 to $14, 500. 28 crew on level 3.
 
Crickey! Three in a row now! Same ship and crew the money went from $17,700 to $7,100.
 
Hopefully I can find some time tomorrow to check this one.

So this start right at the start of a new game? Or does it gradually slip in?
And do you have any idea if this is a new problem or if we're only just starting to notice it now?
 
This problem starts right with the very first pay period and so far continues unabated. I thought I was seeing some strange things before in other games but kept forgetting to keep track. As near as I can tell the crew money is being subtracted twice.
 
Well, it happened. I got reduced to zero money. After that I keep $10,000 on hand and the rest goes into the ships chest. But the last pay period they only took what they were supposed to. The crew now wants just over $8,000 and that is what they took.
 
Oh, well that's good then. :) But still, the problem where the money is going ain't pretty. Can't make that much progress without it.
 
While sailing along it came time to pay the crew but they took 3 times as money as they should have. This probably an intermittent bug an there might be other things going on too.
I loaded your savegame and put in some trace lines to check what actually happens. This was the result:

Paid 3332 to crew (correct amount as shown in interface)
Removed 6000 from player money and added to personal wealth

So in total 9332 gold was subtracted from the "crew fund" while the interface indicated only 3332. I can understand that would be confusing.
However, that extra 6000 gold does not disappear! You get it as personal wealth, which you can donate right back to the crew.
By doing that, I got 15349 gold after all those transactions and there was 18681 gold before. The difference is only the actual pay of 3332 gold.

So based on this test, this isn't actually a bug and you don't actually lose your money either.

---------------------------------------------------------------------------------------

That being said, getting paid 6000 as captain while the entire crew pay is only 3332 does sound a bit excessive.
The player salary share is calculated in this function:
Code:
int GetPaymentSum(ref PChar)
{
   int pSalary = makeint((0.75 + makefloat(GetFoodEver()) * 0.25) * makefloat((10+sti(PChar.rank)*2) * 100 * COMP_PRICE_SCALAR* SALARY_MULTIPLIER) * (0.5 * makefloat(GetDifficulty())));
   return pSalary;
}
So you get MORE money on higher difficulties; this may have been intended to balance the harder game.
And you get more at higher player rank too. But this test was conducted at rank 5 so that amount of money is only going to go UP during the game.

GetFoodEver simply returns 1 or 0 depending on whether you have crew who eat food or not:
Code:
bool GetFoodEver()
{
   if(CheckAttribute(GetMainCharacter(),"foodoff")) return false;
   return true;
}
Not entirely sure why that is factored into this calculation though. o_O

---------------------------------------------------------------------------------------

Long story short, I see no actual bug here. But it certainly does look like an odd feature that we might want to think through a bit further.
What would be a reasonable monthly salary for the player character and what should this depend on?
The current formulation doesn't make all that much sense to me and looks to be returning a too high amount in this test case as well.

Thoughts? Suggestions?
 
Eh? That money is going to me? Why? It has no use in the game until I donate it back to the ship. It should at least say where it is going as I do not recall any message that I got X amount of money.

Over time as the crews get larger and the officers get better paid the crew portion will go up substantially but I shouldn't be getting that much more anyway. Cut my pay in half at least. Two thirds!
 
There is indeed no message programmed in for that. Could be added, of course.
But that would make for extra screen clutter, so if we don't need it we might as well not add it.

Other option would be to include your own part in the number shown so that you'll know how much is taken out of your crew fund.
But that might be a bit misleading in its own way because you are sort of paying that part and sort of still keeping it.

I know your own wealth has no actual purpose other than for keeping score in the game.
But that is why you have the option of donating it back into the crew fund.

As far as I'm concerned, the only real problem is that the amount of money paid to yourself is too high.
Perhaps it should just be a constant value scaled only by player level.
Get rid of the food thing and the difficulty part.

Say we make it 500 gold plus another 100 per player level.
So that makes it 900 per month for a level 5 character instead of the 6000 that was happening now.
That would certainly be a lot less than it is now but might still be a reasonable amount.
 
PROGRAM\INTERFACE\salary.c find:
Code:
int pSalary = makeint((0.75 + makefloat(GetFoodEver()) * 0.25) * makefloat((10+sti(PChar.rank)*2) * 100 * COMP_PRICE_SCALAR* SALARY_MULTIPLIER) * (0.5 * makefloat(GetDifficulty())));
Replace with:
Code:
int pSalary = makeint(500+100*sti(PChar.rank));
That does what I suggested in my previous post. This is clearly a lot less complicated and depends on only one variable (player rank) instead of a whole lot of them.

Does that sound like a good idea? Should the SALARY_MULTIPLIER be in there? How about difficulty?
I'd welcome any and all further feedback.

Eh? That money is going to me? Why?
This is all part of modding work that was done back in 2003/2004 before I ever joined the community.
One of the early Build 11 mods was the difference between wealth/crew money, which went together with salary-vs-"divide the plunder",
the Letter of Marque functionality as well as the food consumption including the ability to cut the food rations and double the rum ones.
That always seemed like quite some cool features to me, but I get the distinct impression none of that is being used much.
Other than the LoMs, that is.
 
Back
Top