As recent features have increased the need to buy local Arulcan products dramatically :angel: , I have increased the number of merchants that Arulco has. There can now be up to 21 additional merchants (arbitrary number, it seems enough for the moment). I also externalised the merchant data.

Thus it is now possible, via xml, to define any NPC to be a merchant or repairguy. I figure modders might have a use for this

There are new xmls in TableData/NPCInventory. The most interesting one is Merchants.xml, which has the following entries (lets look at Tony's entries as an example):

The xml has slots for all merchants, and template fields for 20 new ones, jsut fill them in however ou like. The Inventory of the new merchants is set in TableData/NPCInventory/Additional_Dealer_xxx_Inventory.xml.

Note that UB gets a slightly different Merchants.xml, due to the different merchants there.

Some of the existing ini settings might alter Tony and Devin in a few regards - I'll eventually erase them I guess.

Note that this xml includes all existing merchants and removes hardcoded values. So any change will influence your dealers.
You can now simply define your own dealers, just fill in the correct values. However, when defining a new merchant, it can take a few days for them to get stock - better do that before starting a new game.

Non-merchant NPCs have no fitting speechfiles, thus they might say odd things when selling stuff. A noble exception is Tina. Altough no code section anywhere indicates that she was intended to be a merchant, her ingame story and speechfiles suggest exactly that. For this reason, I made her sell clothes and LBE gear from now on.

A local woman sells food, seems normal...

... but her son clearly has bad music taste, or watches a bit too much 2012 Anime. Or something.

This guy repairs all their stuff.

Lets hope he's not on the manufacturing side as well.

@JMich: I'll pm you the exact datatypes for the editor later.

By the way... this breaks savegame compatibility. Playing with this requires a new game, no way around that.
This is in the trunk since r5744, and requires GameDir >= r1578.

As or r7887 & GameDir r2251, Kyle finally takes over the San Mona leather shop once his quest is over (it always seemed a bit odd that he moved out of the tattoo parlour but never arrived in the leather shop - now he'll be there). He sells leather clothes (not that we have a wide selection of those) just like he said he would, plus all sorts of clothes. And a bit of kinky stuff, because gays in video games are always over-the-top kinky.
He also sells LBE MOLLE gear, so you now can get MOLLE in the country, if you do a quest beforehand. Quest reward or whatever.

Saren threw his head back and screamed in impotent fury, before falling to his throne, head in his claws, trembling in horrified disbelief.

Then he heard a faint chime as Sovereign subscribed to her ECHO channel.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.

Hm, unlike M16AM I play just plain 1.13.
I took look into lua scripts and found, that Kyle appears when proper if condion checks on gubQuest( Quests.QUEST_LEATHER_SHOP_DREAM ) == qStatus.QUESTNOTSTARTED. So game does not consider the quest even started. Probably nothing to do about that now...

But he still isn't considered a merchant - he does not have "buy/sell" in conversation options. Any ideas what's wrong?

No. That is not what the script says. The script refers to the quest having the status qStatus.QUESTDONE. At that point, Kyle is moved to the shop and is allowed to be a shopkeeper (which of course requires xml shopkeeper settings).

Saren threw his head back and screamed in impotent fury, before falling to his throne, head in his claws, trembling in horrified disbelief.

Then he heard a faint chime as Sovereign subscribed to her ECHO channel.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.

I think you misunderstood - I finished the quest - Kyle has given me money for deed and went. But game still thinks that quest status is "not started", as evidenced by gubQuest( Quests.QUEST_LEATHER_SHOP_DREAM ) == qStatus.QUESTNOTSTARTED evaluating to true. Nevermind - I can cheat Kyle to appear by changing the lua script.

As for XML settings for Kyle being a merchant - I understand those are already in place since r7887 & GameDir r2251 and of course I have those. I checked Kyle is present in merchants.xml - <ubShopKeeperID>95</ubShopKeeperID> which is Kyle (according to comment enumarating NPCs in merchants.xml), tried to copy some other functioning merchant (Darrel's) settings over Kyle's - no effect, Kyle still can't make business. What am I missing?

If only proper entry in merchants.xml was enought for Kyle to be merchant, he would be merchant even in C5 sector before quest, right?

Manny and Kyle can only be merchants once specific quests have been done. That is hardcoded, no way around that. If the quest is not considered finished by the game (for whatever reason), Kyle won't be a shopkeeper.

Saren threw his head back and screamed in impotent fury, before falling to his throne, head in his claws, trembling in horrified disbelief.

Then he heard a faint chime as Sovereign subscribed to her ECHO channel.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.