• 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 Merchants Equip Their Stock

Levis

Find(Rum) = false;
Staff member
Administrator
Creative Support
Programmer
Storm Modder
Bastard! :cheeky

Probably the merchant equips te best weapon in his stock then, which should not be happening at all.
@Levis, any thought why merchants would equip anything at all?
Because SetUpCharacterWeapons is called for all character which are logged in, in character_login.c I think.
 
Is that new? Merchants never used to equip any of their stock and it would probably be better if it stays that way....
 
Is that new? Merchants never used to equip any of their stock and it would probably be better if it stays that way....
I moved some code there but I believe I didn't change any of the workings of it. So it shouldn't be new ...
 
In Beta 4:
- Talk to a merchant (so he gets stock generated; they don't have it at game start)
- Exit the location and reload back
- Merchant is now carrying weapons

This also happened in Beta 3.5, but definitely wasn't always the case.
 
Hmm.... I stand corrected. While this IS true, it is NOT new. In fact, it has been like that since at least Build 14 Beta 1 Full.

@Levis did point in the right direction to fix it though, so I did this:
Code:
void SetUpCharacterWeapons(ref chr)
{
   if (GetAttribute(chr,"isMerchant") == 1) return; // PB: Merchants shouldn't equip their own stock
   if (isSoldier(chr) != UNKNOWN_NATION) GiveSoldierWeapon(chr, makeint(GetAttribute(chr, "nation")));   // PB: Re-Update Soldier Weapons
// KK -->
   if (CheckAttribute(chr, "old.blade")) {
Seems to work. Is there any reason to NOT do that? This might prevent merchants getting into any fights unintentionally. :facepalm
 
:aar you can't blame me for everything :p
 
:aar you can't blame me for everything :p
Well.... I could. But it wouldn't be very fair, would it? :razz

But I'll definitely blame you for saving me a lot of time trying to figure out why this happened!
Oh wait... that's not blaming; that's being grateful. Cheers, mate! :cheers
 
I think we can call this fixed, haven't seen an equipped merchant yet. But haven't seen that many tough. Maybe @Talisman could keep an eye on it?
 
I think we can call this fixed, haven't seen an equipped merchant yet. But haven't seen that many tough. Maybe @Talisman could keep an eye on it?
I tested this and it seemed to work. I'm just curious if there could be any unintended side-effects.
But we can call it "Fixed" indeed. :yes
 
Well shopkeepers are pretty weak now.... Maybe call a giveweapon function for them or something?
 
Well shopkeepers are pretty weak now.... Maybe call a giveweapon function for them or something?
They're not supposed to be getting into any fights at all.
In fact, I don't think they fight back even if they DO have something equipped.
That is why we've got massive penalties in place for looting and killing them: because they're generally defenceless.
 
I noticed some are set to BarManType. I changed some already in the past I believe but might have missed this one.
You changed BarmanType to set characters to "IsMerchant" too; I saw that when I looked into it today.

@Hylie Pistof, can you tell me exactly at WHICH merchant you saw that shiny musket?
I'd like to double-check his character init entry to see what is going on there.

My change here should help too: Fix in Progress - Non-Violent Officers | PiratesAhoy!
 
You changed BarmanType to set characters to "IsMerchant" too; I saw that when I looked into it today.

@Hylie Pistof, can you tell me exactly at WHICH merchant you saw that shiny musket?
I'd like to double-check his character init entry to see what is going on there.

My change here should help too: Fix in Progress - Non-Violent Officers | PiratesAhoy!
Ah right. That was a quick fix to make it all work :).
Eventually I do think we want all the LAiTypes to be set up right? right?
 
Eventually I do think we want all the LAiTypes to be set up right? right?
As long as that can't do any harm, then it might as well be cleaned out some time.
On the other hand, if nobody complains anymore after this change, "don't fix what isn't broken" comes to mind.... :rolleyes:
 
So this can be set to fixed again?
 
Back
Top