• 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 Discount at traveling merchant so low that arbitrage becomes profitable

Tingyun

Corsair
Storm Modder
Fix re uploaded to opening post, made sure to merge other changes from Levis fixes to file now.
------------------------------------------------

ORIGINAL OPENING POST:

With a quatermaster with commerce 6, the traveling (random npc) merchants give such a high discount that the player could profitably buy things from them, walk into the store, and immediately sell for a profit.

For example: I recorded them selling one item for 1172, and the store would purchase it from me for 1282. Another item the traveling merchant sold for 1850, the store would purchase it from me for 2021.

Aside from causing the player to wonder why these merchants don't just walk 10 feet to the store themselves and sell their entire inventory, it is symptomatic of a larger issue, that these traveling merchants sell skill books and advanced weapons at way too low of a price.

I'd suggest the discounts offered by traveling random npc merchants be lowered to be the same as the discount used for the stall merchants (who are currently offering lower prices than stores, but not so unreasonably low as the random npcs). Or, reduce by half the stall discount, and make the random npc merchant discount the old stall merchant amount.
 

Attachments

  • items_utilite.c
    87.8 KB · Views: 90
Last edited:
I don't even know why they'd be different.
Probably you can find a relevant tie in the Enc Walker dialog file.
 
I'll pull it up later this weekend or Monday before leaving and report back with suggested modifications, based on what seem to be reasonable discount tiers for the store -----> stall ------> walker merchant discount levels. :) Something that reflects a small premium price for shopping at the formal established store (and the reduced overhead expenses of a stall or traveling merchant), but not so large that arbitrage could be profitable?
 
Last edited:
@Pieter Boelen



It is set in item_utilite.c.

Price modifier for Store/Stall/"sneaky" (the random walking merchants)

RPG style 1.2/1.0/0.8

non RPG style 1.1/1.0/1.0

So the dramatic price differences I've noticed is the result of playing on RPG style item traders.

I think the non RPG style price tiers make more sense, and should be applied to RPG style as well (it is the default setting I think). Most players using rpg style are probably doing so to avoid getting access to overly powerful weaponry too soon, that is why I did it. So probably doesn't make sense to tie dramatic price differences to that system. (though I think I will switch to non-rpg style now, as I'm high enough level it shouldn't matter anymore).

I also think the price tiers could stand to be weakened slightly, so 1.05/1.0/1.0, which should eliminate arbitrage. A file attached with that pricing structure edited in.

Though the old non rpg style prices of 1.1/1.0/1.0 are pretty good too. Basically, I think we should unify the RPG and non-RPG pricing structures.

Here is the relevant code:

switch(tradetype)
{
case IT_TYPE_STORE:
if(assigntypes)
{
if ( IT_RPG_STYLE ) {// TIH
if(!skipqty) chr.itemtrade.qty = 1.25;
if(!skipsize) chr.itemtrade.size = 1.0;
if(!skipprice) chr.itemtrade.price = 1.2;// prices are at a premium for store merchants ( those friggen price whores! =)
} else {
if(!skipqty) chr.itemtrade.qty = 1.25;
if(!skipsize) chr.itemtrade.size = 1.0;
if(!skipprice) chr.itemtrade.price = 1.1;
}
if(!skiptown) IT_AssignTownType(&chr, town);
if(!skipisland) IT_AssignIslandType(&chr, island);
if(!skipnat) IT_AssignNationType(&chr, nat);
if(!skipgen)
{
if(!CheckAttribute(itmt,"general"))
{
itmt.general = true;
}
}
}
quality++;
break;

case IT_TYPE_STALL:
if(assigntypes)
{
if ( IT_RPG_STYLE ) {// TIH
if(!skipqty) chr.itemtrade.qty = 0.7; // smaller amount of stuff at a stall
if(!skipsize) chr.itemtrade.size = 0.5; // smaller amount of stuff at a stall
if(!skipprice) chr.itemtrade.price = 1.0;
} else {
if(!skipqty) chr.itemtrade.qty = 1.0;
if(!skipsize) chr.itemtrade.size = 0.5;
if(!skipprice) chr.itemtrade.price = 1.0;
}
if(!skiptown) IT_AssignTownType(&chr, town);
if(!skipisland) IT_AssignIslandType(&chr, island);
if(!skipnat) IT_AssignNationType(&chr, nat);
if(!skipgen)
{
if(!CheckAttribute(itmt,"general"))
{
itmt.general = true;
}
}
}
break;

And a bit below that we have

case IT_TYPE_SNEAKY:
if(assigntypes)
{
if ( IT_RPG_STYLE ) {// TIH
if(!skipqty) chr.itemtrade.qty = 0.5; // not very many
if(!skipsize) chr.itemtrade.size = 0.4; // not very many
if(!skipprice) chr.itemtrade.price = 0.8;// lower priced!
} else {
// set to behave like "IT_TYPE_GENERAL" as that is how they used to behave
if(!skipqty) chr.itemtrade.qty = 0.5;
if(!skipsize) chr.itemtrade.size = 0.5;
if(!skipprice) chr.itemtrade.price = 1.0;
if(!skiptown) IT_AssignTownType(&chr, town);
if(!skipisland) IT_AssignIslandType(&chr, island);
if(!skipnat) IT_AssignNationType(&chr, nat);
}
if(!skipgen)
{
if(!CheckAttribute(itmt,"general"))
{
itmt.general = true;
}
}
itmt.(tmpstr) = IT_TYPE_SNEAKY;
cur++;
itmt.tqty = cur;
//DeleteAttribute(&itmt, "general");// very bad to do if you want someone to trade ANY items
}
// TIH --> allow external higher quality setting to pass
if ( IT_RPG_STYLE && CheckAttribute(chr,"itemtrade.quality") && sti(chr.itemtrade.quality) > IT_QUAL_MAX )
{
quality = sti(chr.itemtrade.quality);
skipclamp = true; // so it doesnt iclamp the quality down for special merchants (like Samsa Gregor)
} else {
quality++; // they sell slightly better stuff
}
// TIH <--
break;
 
Last edited:
This might be a temp fix. I still hope to have a loko at this and find a more permanent solution for it. altough I'm not sure about changing this. because what is left of the RPG style then? Is there actually anything which is still done by the RPG style?
 
What do we want the RPG style to do anyway? Do we need two different settings?
For all I know, nobody ever changes that setting.
 
What do we want the RPG style to do anyway? Do we need two different settings?
For all I know, nobody ever changes that setting.
I'm fine with removing it all together. simplyfying is always good (and less for me to worry about once I'm going to take a good look at it :p).
 
Outside of the different price modifiers I suggest to remove, rpg style means:

1) capping items available by level, instead of basing them on the store keeper's skill

2) code that increases the level of traders for every 5 levels the player gains, so they keep getting better alongside him

3) some additional changes like eliminating low quality items the player wouldn't want, expanding selection to ensure the player has choices, etc

I think two seperate settings are good, and they do appeal to different playstyles. I prefer it off I think, but many would want on, for all of the different reasons.

But price modifiers shouldn't be different between the settings. I think 1.05/1/1 is a good general set.

Later, what we could do is disagregate the buying and selling price modifier, so stores sell things at a higher price, but don't offer better prices to buy player stuff. That would be the best long term solution.
 
I kind-of like the storekeeper skill controlling the quality of the items.
Otherwise you're building the world on the player again.

It can be a bit tricky with "minlevel" when important items stop appearing. This has affected Maps, Pickaxes and Shovels before.
It may also be affecting the random appearance of Cursed Coins and the Apothecary-required Health Items.
 
I kind-of like the storekeeper skill controlling the quality of the items.
Otherwise you're building the world on the player again.
I like that too. It means your commerce skill and perks actually mean something - as you (or your quartermaster) gain them, the storekeeper doesn't, which means you get gradually better prices.

It can be a bit tricky with "minlevel" when important items stop appearing. This has affected Maps, Pickaxes and Shovels before.
It may also be affecting the random appearance of Cursed Coins and the Apothecary-required Health Items.
I'm not sure what's affecting the appearance of pickaxes. I didn't find one until very late in my "Tales of a Sea Hawk" campaign, and I haven't found one at all during a test playthrough of "Ardent". But Cursed Coins certainly don't seem to be affected because I'm finding quite a lot of them.
 
I'm not sure what's affecting the appearance of pickaxes. I didn't find one until very late in my "Tales of a Sea Hawk" campaign, and I haven't found one at all during a test playthrough of "Ardent".
They're low-level items so once your level exceeds a certain number, they stop appearing.

Because that can potentially break the Treasure Quests, I had to put special code in place so that if a treasure quest does require them, you can ALWAYS find the item you need.

But Cursed Coins certainly don't seem to be affected because I'm finding quite a lot of them.
All throughout the campaign, from beginning to end? That's good.
I was afraid the same mechanic might make them stop appearing after a while too, which could make the curse far worse than it is.
 
Well, the non rpg shops have powerful swords from the very beginning, because it is based on the shopkeeper skill.

I kept rpg shops until I hit level 18, then switched to non-rpg shops. I think both serve their purpose as a useful option. next game I might just play non-rpg shops from the beginning. You can always gets powerful swords from dungeons and such anyway.

One fun thing: I think (from what I remember looking through things) non-rpg shops have the shopkeeper skill going up the more the player trades with them, so they begin to offer hgiher prices slowly, but also begin to carry a more extensive selection of higher quality items. If so, it creates an interesting tradeoff, the more you deal with a shop, the higher the prices but the more good stuff available.
 
One fun thing: I think (from what I remember looking through things) non-rpg shops have the shopkeeper skill going up the more the player trades with them, so they begin to offer hgiher prices slowly, but also begin to carry a more extensive selection of higher quality items. If so, it creates an interesting tradeoff, the more you deal with a shop, the higher the prices but the more good stuff available.
It should indeed work like that.
Which makes me think... should they not also go up over time without the player doing business with them?
Levelling-style?
 
They're low-level items so once your level exceeds a certain number, they stop appearing.

Because that can potentially break the Treasure Quests, I had to put special code in place so that if a treasure quest does require them, you can ALWAYS find the item you need.
It's not working. ;) I got the spade fairly early in both games on but Ardent is still looking for a pickaxe...
 
It should indeed work like that.
Which makes me think... should they not also go up over time without the player doing business with them?
Levelling-style?
From the player's point of view, he goes up over time and so do the storekeepers. The visible effect is not much different from a player-oriented world in which everyone goes up along with the player. ;)
 
It's not working. ;) I got the spade fairly early in both games on but Ardent is still looking for a pickaxe...
It used to work. But only during the relevant Treasure Quest.
So if you don't actually need it right now, it won't be showing up either.
 
@Pieter Boelen all character should get some XP over time but this is still the code form the original mod and I haven't touched it yet. it is broken a bit but it does seem to work somewhat. It is on my todo list to change but not very high. I first want to fix the trading system all together where possible.
 
I'd actually prefer shopkeepers NOT going up without the player doing business with them, so only getting commerce xp when player trades with them. It could be increased for the rate at which they gain though.

The reason is simple: all the shopkeepers already have different defined starting commerce ratings, reflecting how commercially influential their town is I think. Absent the player intervention, those should remain the same (and that is why shopkeepers in a napoleonin start do not nessicarilly start with higher commerce than in a golden age start--presumably, the commerce level of shops should be somewhat constant over time).

Instead, the player focussing on trading with a particular shop could cause that to change, and that is the kind of fun player intervention changes the world thing that a story should have. You can see how you favoring studf in your commerce affected decelopment!

I would love it if more things, like placing large sums with a loan shark (investing in a town and growing industry), would affect the prosperity and relative growth of the world. :) so I prefer commerce xp for shopkeepers, which is a stand-in for the commercial level of the town, either only going up through player sales, or being also linked to overall trade and prosperity of a town, but not going up on its own for all towns.

As for shovels and pickaxes, I stocked up on like 50 of each of them. I though I should buy enough for my crew to roleplay being the ones digging, a couple of tools for every man, but interesting to hear it will have a practical benefit. ;)
 
The reason is simple: all the shopkeepers already have different defined starting commerce ratings, reflecting how commercially influential their town is I think. Absent the player intervention, those should remain the same (and that is why shopkeepers in a napoleonin start do not nessicarilly start with higher commerce than in a golden age start--presumably, the commerce level of shops should be somewhat constant over time).
I think their assignments are pretty much random.

As for shovels and pickaxes, I stocked up on like 50 of each of them. I though I should buy enough for my crew to roleplay being the ones digging, a couple of tools for every man, but interesting to hear it will have a practical benefit. ;)
Yep, you need one to dig up buried treasure. :cheeky
 
Haha, yes, you need one if the Captain intends to dig it up all on his own, but in my roleplaying world, I need 50 for the crew to do the work. ;)

Then we can do a pass on the file and make the starting commerce ratings make sense. The ones I saw did seem logical, but it was probably just lucky. I volunteer to do so later, once I have a bit more experience traveling the world. :)
 
Back
Top