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

Confirmed Bug Item traders having to much or to few goods and money

Pieter Boelen

Navigation Officer
Administrator
Storm Modder
Hearts of Oak Donator
This happens sometimes, though it isn't quite clear yet why.

It seems the main cause is that the town item quantity is set to a really, really low value:
Code:
change = stf(town.itemtrade.qty);
Returns:
change = 1.e-003
 
PROGRAM\ITEMS\items_utilite.c is the file where the GiveItemToTrader function is defined that gives items to traders.

The only code that changes town itemtrade quantity is in PROGRAM\Towns\Towntable.c:
Code:
    float chmag = 1.0; if(CheckAttribute(ctown,"itemtrade.qty.chmag")) chmag = stf(ctown.itemtrade.qty.chmag);
     float base = 1.0 * (1.0 + (flt * ( IT_UPD_INPORTPC_MULT-1.0))); if(CheckAttribute(ctown,"itemtrade.baseqty")) base *= stf(ctown.itemtrade.baseqty);
     ctown.itemtrade.qty = base * pow2(Bring2RangeNoCheck(IT_TSIZE_MIN, IT_TSIZE_MAX, IT_TSIZE_MIN * IT_TSIZE_NORMAL, IT_TSIZE_MAX * IT_TSIZE_NORMAL, size), chmag);
This is in the TownUpdate function and must be the cause of this. Not sure why this returns such a small value though.

Perhaps the town has been shrinking in size over time? But there is also a minimum size defined in InternalSettings.h:
Code:
#define IT_TSIZE_MIN         0.5       // FLOAT - min for town size scalar
#define IT_TSIZE_MAX         3.0       // FLOAT - max for town size scalar
 
I can remember that in the Standard storyline, when Speighstown is under french flag, item traders do not have anything to sell and no money in which to exchange. Is this intentional or is a bug?
 
It's not intentional on my part at least, that's for sure....
Though indeed a lot is disabled in Speightstown while it is occupied; that much I do remember.
Does it go back to normal after it is liberated again?
 
It's not limited to Speightstown. St. Pierre now has empty traders in my current game.
 
As far as I could tell from my earlier test, it can happen for any town and is economy-dependent.
I didn't get round to get to the bottom of this one. There definitely IS something wrong but I'm not quite sure yet why or how it happens.
 
Pieter & Grey Roger,
I generally notice this when you moor at a beach and enter a town from the jungle.
The town item traders do not have any items or money allocated to them particularly if I have not visited the town normally by mooring in the harbour and entering via the port.
Hope this helps.
 
Pieter & Grey Roger,
I generally notice this when you moor at a beach and enter a town from the jungle.
The town item traders do not have any items or money allocated to them particularly if I have not visited the town normally by mooring in the harbour and entering via the port.
Hope this helps.
I just tested this by starting a new game as Jack Aubrey, sailing to a shore at Cuba and walking into Saint Domingue.
The store owner did have money and items, so my test didn't confirm that. Is there a better way of testing this?

It could be that a left-over of the long-removed "Fleets" mod is responsible for such behaviour though.
That one checked if your ship is actually in port, if I recall.
 
That could be it. I know that when I land somewhere else and walk into town I can buy things but can not sell things as no one has any money.
 
I just tested this by starting a new game as Jack Aubrey, sailing to a shore at Cuba and walking into Saint Domingue.
The store owner did have money and items, so my test didn't confirm that. Is there a better way of testing this?

It could be that a left-over of the long-removed "Fleets" mod is responsible for such behaviour though.
That one checked if your ship is actually in port, if I recall.

Hi Pieter,
I did a test as well for San Juan - there are a number of stall type traders - they had no money or items. The Store did have money and I could sell and buy goods. He did not have any weapons, meds or items for sale.
I entered from Oyster Beach and Spain was hostile. I think the game has always been like this.
Hope this helps.
 
Money is indeed handled differently for the main store.
The first posts in this thread contain some hints of mine on where look.
Do you think you could do some extra tests with that yourself? I can't seem to find the necessary time any time soon.
 
I just started new game and while in shop, there was a small amount of weapons among the shopkeeper's items.
After buying some cargo, 1 day automatically passed then I thought to buy ammo for my guns..

Turns out the cutlass, and a few other weapons are 75-220 in amount.. which is excessively large, especially since it is only my first day playing.


There was no error log for that, and I am unable to take screenshots on my new laptop.. screenshot appears blank somehow.
 
Got a savegame?
 
Yea here u go, i totally forgot to put it.
Also got some other reports i will post in new threads
 

Attachments

  • FreePlay.7z
    495 KB · Views: 159
  • FreePlay.zip
    1.3 MB · Views: 178
Any recommendation? im seeing on google many online ones and some freewares.. but what does this exactly do?
 
Any recommendation? im seeing on google many online ones and some freewares.. but what does this exactly do?
I use Easy2Convert TGA to JPG pro 1.8, its not a freeware, you can get it as freeware similar, but it only handle 1 file a time I think.
What it do is converting your screenshot, which is in TGA format to JPG format, so you can use Paint.net or something like it to work on
the picture. Drag an drop the file to the converter, thats it.:)
 

Attachments

  • Udklip.PNG
    Udklip.PNG
    6.1 KB · Views: 151
  • Udklip 1.PNG
    Udklip 1.PNG
    11 KB · Views: 148
Last edited:
  • Like
Reactions: A.H
Any recommendation? im seeing on google many online ones and some freewares.. but what does this exactly do?
I think F8 creates a screenshot in TGA format in your main game folder (part of stock PotC functionality).
Such a converter would allow that shot to be posted normally on the forum.
 
  • Like
Reactions: A.H
You can take screenshots but they look white? Do you have the in game screen brightness turned all the way up in "options"?
 
Back
Top