Merchants of Borgo, or MoB, is a system where your players can hire a standard NWN Merchant to sell their items.
.: Features :. - Stores items that do not have a valid blueprint!
- Ues Bioware Stores. This is NOT a text based merchant.
- Persistent using the BiowareDB
- Includes Configuration file for easy customization
- Easy to use. Just place a merchant and change it's tag. The system takes care
of the rest.
- Store Owner can control Store Account, Markup/down, Maximum Buy Price, and other aspects.
- Heavily commented code for easy reading.
- Merchant can charge for identifying items. (Module designer can enable/disable this)
- DM can interact with merchant as though he/she was the owner.
.: Version History :. Version 1.5
- System now handles items that do not have a blueprint.
- System will automatically convert old versions to the new version!
Version 1.4
- Added new config option: VERBOSE If set to true, system will spit out massive amounts of debugging information.
- Added new config option: MAX_ITEMS_BEFORE_PRUNE If a merchant acquires this many items, the system will purchase
a certain percentage of the items. This serves three purposes: 1) Reduces lag 2) Removes the abundance of cheap items
that these merchants might acquire over time. 3) promotes the economy.
- Added new config option: PERCENT_TO_PRUNE This is the percentage of items that are bought from the merchant if it
exceeds the maximum number of items.
- Added new DM options to buy 10,25,50, or 75% of a players items. (This generates money for the player merchant and reduces lag)
- Fixed bug when merchant is fired. The merchant may now be rehired.
- Optimized and added many functions to reduce redundancy. (Eventually will add database wrappers so the module designer can
toggle between mysql and biowareDB.
- Really fixed bug where conversation starts twice. (Those upgrading will have to remove the conversation from all NPC merchants
that already exist in their modules. Not critical if they don't)
Version 1.3
- Changed NPC Merchant race to Human. (Was Half-elf and was generating odd names)
- Changed NPC Merchant perception to long. (This will give merchant more time to load inventory.
- Added new config option: MAX_MERCHANTS so module builder can set how many merchants one pc
may own. (Thanks to Civious for the suggestion)
- Tested Stacked items. Seems to work fine.
- Added chest full of stuff in test module.
- Verified DM functions.
- Eliminated bug where conversation started twice.
Version 1.2
- Fixed a bug where merchant wasn't being fully reset after being fired. (Thanks to The Thayan)
- Made conversation private so as not to spam nearby players with merchant text.
Version 1.1
- Fixed a bug where merchant continued to listen to speech after a setting was made.
- Fixed a bug where a newly placed merchant wasn't recognized as newly placed.
Contains:
Merchants of Borgo.erf - Exported Merchant System
Merchants of Borgo.pdf - This Readme file
Merchants of Borgo.mod - An example module with the system in place.
Posted by Fleshmelter at 2011-07-26 16:23:15 Voted 10.00 on 07/19/11
After locating the required reading, it works all good now. Again thanks for awesome script! _________________________ PW Action Server:
| Chaosgate |
Posted by Fleshmelter at 2011-07-25 14:17:19 Voted 10.00 on 07/19/11
Recently had an issue with the merchant crashing module. has this happened to anyone else. _________________________ PW Action Server:
| Chaosgate |
Posted by Fleshmelter at 2011-07-19 17:55:04 Voted 10.00 on 07/19/11
Thanks for the update, love this community! Even after a decade people still show love and support! _________________________ PW Action Server:
| Chaosgate |
Posted by Jargh193 at 2010-08-12 21:10:43 Voted 10.00 on 08/12/10
All I can say is OMG...this is outstanding. Well, that and I can also say sorry for forgetting to vote on it for so long.
If any builder has a crafting system, like UOA, or anyother for that matter this is a must have. Also very usefull if using any kind of reagent system. A great way to sell loot and crafted items without being there.
Just an update...I'm working on fixing the issue with non-blueprint items. It's going to be a re-write, and I'm going to try and include in an easy conversion to the new system so it can just be installed on a server that is using the old version of MOB. _________________________ Borgo Pass PW Link
Posted by Fleshmelter at 2009-03-30 07:48:33 Voted 10.00 on 07/19/11
Probably the best overall merchant out there, except for the lack of not being able to store custom items.
This would have been more widely used. _________________________ PW Action Server:
| Chaosgate |
Posted by black_liquid at 2008-10-07 19:57:30 Voted 10.00 on 10/07/08
Definitely the best merchants I've ever used. Very easy to use and hassle free. Nice job!
Posted by The Thayan at 2008-08-12 21:47:46 Voted 9.50 on 10/26/07
The question is though - how do you determine if the item has been modified? I suppose you could create the palette item somewhere and cycle through the properties on it (if any) and then do the same to the item being sold to the merchant and compare.
The worst thing is though that creature inventory is limited to about 240 squares...I think? What happens if someone decides to unload 20 modified greatswords with the merchant (don�t they take up about 10 squares each)? That�ll fill up the creature inventory and you could end up losing the rest of what�s in the merchant inventory then. So with all my commiserating on this, I was thinking storing a creature inventory would not be a very good solution to this problem, besides the fact that the database access might be pretty slow.
From my point of view (and this is only me kind of thinking out loud), really the ideal and cleanest way to do this would be to store the aspects of the item as ints and strings, then recreate the merchant inventory OnModuleLoad and save it to the DB whenever the store is closed (which is what I think you�ve set up anyway�? ).
This would mean storing:
1. Item Name as a string since SetName() can be used in game to rename items
2. Item Description as a string since SetDescription() with the 1.69 patch can be used in game to change descriptions
3. Item appearance ints using the GetItemAppearance() function if you want to be able to recreate the item as it appeared when sold to the merchant
4. All the item properties (using the GetFirstItemProperty() and GetNextItemProperty() and GetIsItemPropertyValid() functions). These should be able to be stored as ints in the database
5. Continue storing the item resref as a point to begin the re-creation process when the module is loaded
Just some ideas. If you�re interested in giving this a go, I could try and help when I have time (and if you are even interested in any help). E-mail [email protected] if you�d like to discuss.
Cheers! _________________________ Thay - Realm of the Red Wizards A NWN persistent world found under the Roleplay section of Gamespy.
I've been thinking about a solution for this. I wonder if there is a way to "detect" whether or not an item has been modified (whether by appearance or by ability).
Then, if it has been modified, I can store the modified items as a creature inventory to be retrieved separately from the stuff that can be stored as resref. It's not ideal, but it's better than storing everything as a creature inventory.
Thoughts? _________________________ Borgo Pass PW Link
Posted by The Thayan at 2008-08-10 20:36:47 Voted 9.50 on 10/26/07
The problem KansasDark is having, which is also an issue I am trying to figure out how to address, is that this system simply stores the resref of an item, and not the item properties or appearance.
So the problem is that if there is an in-game method to add an item property to an item (like an enchantment forge), or modify the item appearance (like through a tailor model/weaponsmith), this system does not store those modifications. So if one of those items is sold to a merchant and stored in the database, when it is recalled/recreated on the merchant from the database, it only creates the base item of what is located in the palette with no weapon appearance modifications and no additional item properties.
While not being able to store the appearance is not necessarily a big deal, not saving the enchantments is an issue. This is because it skews the purchase price of an item � if the merchant buys a sword that has an in-game player added enchantment, it is going to cost the merchant owner more gold than just the base item. But then when the merchant owner goes to open their store, they will only get the base item from the palette.
I have been playing around with trying to address this, but it appears it would take a significant re-write of the system. The only two methods I can see at the moment is to either store the merchant inventory in a creature inventory and then use the *slow* StoreCampaignObject() function, or else store the item appearance (optional) variables and cycle through all the item properties and store them as well, so that the item can be properly recreated when reloaded from the database.
It would be great if the original creator of this system could address these problems, but it appears further development on this has probably ceased...? If anyone has other ideas on how to address these problems though, I (for one) would be happy to hear them. _________________________ Thay - Realm of the Red Wizards A NWN persistent world found under the Roleplay section of Gamespy.
Posted by KansasDark at 2008-07-18 11:07:27 Voted 10.00 on 03/24/08
It must be something in regards to how Commanche's system adds abilities to items without specific blueprints on the palette.
I still haven't been able to nail down this error. It seems to work fine on my test builds. Any ideas/insight into what might be causing this? _________________________ Borgo Pass PW Link
Posted by KansasDark at 2008-04-24 12:05:11 Voted 10.00 on 03/24/08
Can anyone supply a fix for the persistency problem I posted below?
Posted by KansasDark at 2008-03-24 06:00:24 Voted 10.00 on 03/24/08
An excellent system and runs well on my server with one exception in regards to persistency.
Standard and blueprinted items works fine but my server also uses Commche's Random Loot Generation System with it's random named and ability items. These items don't work off specific blueprints.
The issue is your vendor system doesn't recognize the non-blueprint items pass a reset and they either vanish or revert back to whatever blueprint the name and abilities are hooked onto.
Could you update this system to recognize and save non-blueprint items beyond a reset?
Would be greatly appreciated.
Posted by Ambrose at 2008-02-06 19:22:46 Voted 10.00 on 02/06/08
This is an awsomely simple and very effective script. Thank you for your submission.
Posted by Fleshmelter at 2008-01-11 21:15:22 Voted 10.00 on 07/19/11
I must say out of all of player merchants I've seen this is definitely one of the finest! Awesome!! _________________________ PW Action Server:
| Chaosgate |
Posted by Daijin at 2008-01-09 14:19:18 Voted 9.75 on 01/09/08
Very nice and used in Dunjon Legends :) _________________________ Dream Well, Faith, Loyalty, Truth, Honor, Friendship always.....
Daijin Dreamweaver, Leader of the Dream Warriors for 32 years, going strong.
@Civious - Thanks for posting the code. I'm still not sure why you're having a problem with stacked items. But...I recently installed a patch for nwnx2 (on linux) and since then, I've had some odd behavior with stacked items... By chance, are you in a linux environment with nwnx2?
@ShadowCabalist - I have to make sure I didn't fix some bugs and not upload the changes...I remember having a problem similar to this that I fixed...I'll look into it. Thanks! _________________________ Borgo Pass PW Link
Maybe I am doing something wrong, but i had an issue where if you fired a merchant, you could not hire one again. That was simple and fixed that, however on resets or restarts from crashes, it seems that the merchants lose items. Not everything is gone, and there seems to be no real pattern. Any suggestions as to where i can start to look? Other than that, the system seems great and is easy to work with, just this annoying issue.
Posted by Civious at 2007-11-11 19:06:16 Voted 9.50 on 10/18/07
Posted by Civious at 2007-11-11 18:56:46 Voted 9.50 on 10/18/07
Sorry for the delay. In the unstack script I ignore ammo. Arrows would be a pain!
Posted by The Thayan at 2007-10-26 08:43:44 Voted 9.50 on 10/26/07
Very nice work and quick response to bug resports/suggestions. This system will be used in the Thay PW (Roleplay section of Gamespy). _________________________ Thay - Realm of the Red Wizards A NWN persistent world found under the Roleplay section of Gamespy.
Posted by Myst_Moonblade at 2007-10-23 15:00:38 Voted 10.00 on 10/23/07
I've hired one of these merchants as a PC on the Borgo Pass server. I've been really happy with the user-friendly interface, as well as the management aspects. It's more aesthetically pleasing.:) Thank you for creating this new merchant! It's nice not having to sort through pages of text. Awesome script.
Posted by Saphhira at 2007-10-19 00:36:08 Voted 9.75 on 10/19/07
Thanks Civious (and thanks for the vote!) That's really odd about the stacked items. The script that unstacks all items, how would that effect a pack of arrows?
As it is now, the system should recognize a DM and give them the same interface that the store owner has, which *should* allow them to "fire" the merchant.
I like the idea of requiring one merchant per PC.
Thanks again! _________________________ Borgo Pass PW Link
Posted by Civious at 2007-10-18 14:09:33 Voted 9.50 on 10/18/07
I had a problem with stacked items. When sold, the whole stack sells but when bought you pay for the whole stack and only get one item.
I fixed it myself by unstacking all items on store close. Let me know if you want the code I added, gotta clean it up a little.
BTW, love the script!
Next I'll be working on making it so a PC can only hire 1 merchant at a time and adding a DM choice to clear the owner & inventory in cases where a player leaves for an extended period so the merchant is not tied up forever.
Just updated and fixed the bug you found. Also made the conversation private so others aren't spammed by merchant babble. _________________________ Borgo Pass PW Link
Hey, thanks for the feedback. I need to rethink how the merchant gets his share. I think I'll add tracking to sales made. I don't have the best mind for business...lol. Thanks again! _________________________ Borgo Pass PW Link
Posted by The Thayan at 2007-10-10 17:37:30 Voted 9.50 on 10/26/07
Looks very good. After doing a little testing, there is a bug with the merchant - after hiring a merchant, adding some gold, and then firing them, if you hire them and then immediately fire them again, you get an amount of gold depending on the amount you added. _________________________ Thay - Realm of the Red Wizards A NWN persistent world found under the Roleplay section of Gamespy.
You must be Logged In to post comments in this section.