Mthec

[Released] Mthec's NPCs - Crafter, Buyer, DeliveryContracts, MerchantCap, CustomTrader, ToolPurchaser, Banker, BeastSummoner

Recommended Posts

I think I figured it out. I'm only seeing those Free Money and Destroy Item options on my GM, so that's perfect!

Share this post


Link to post
Share on other sites

So here's an issue from a new Buyer that I had just set up with my GM:

I added the items for him to purchase, had another character do a couple trades, all seemed good. I could go back and add items.

 

Later, after a server restart and relogging, and my GM going back and forth to a couple other servers, I went back to check on him and when I right-click on him and select 'Manage Traders' I see: "[23:24:26] Could not find the buyer's contract." But the contract is there in his inventory.

I tried to manage traders from the contract, but it showed me the original start up dialog, i.e. it was asking for a name and the free money and destroy options, as if it was going to create a new buyer. 

 

If I examine the buyer, it says he is buying items on behalf of my GM.  If my GM opens a trade window, it shows bought items and I can retrieve them. 

Another character can still sell items to him. But my GM can no longer manage prices, add items, etc.

 

One possible consideration: The contract was created on a different server than where the buyer was ultimately placed.

 

Any ideas?

 

 

Share this post


Link to post
Share on other sites
Posted (edited)

Crafter update

Download

 

Added 'Threaten' action, for non-home, PvP servers. Uses the same system as merchants, except it will also work on non-epic servers.
Set allow_threatening to true in .properties. Default false.

 

Added option to stop Crafter action messages appearing in Event.
Set send_event_messages to false. Default true.

 

Added option to allow Crafters to keep their skills, when dismissed and replaced.
Set allow_saved_skills to true. Default true.
Only works for Crafters placed with contracts, GMs can still modify skills via the 'Manage' menu. If disabled Crafters won't load skills when placed, and won't update their entries in the database. However, already saved skills won't be removed from the database, and will load again if the setting is enabled, and the Crafter is replaced.

 

Fixed an issue that prevented compatibility with some other modded items.

 

On 2/24/2024 at 5:34 PM, Hakameda said:

If they could be taunted or w/e like old merchants to drop things currently in there crafting queue, or killable.

Added the 'Threaten' option, which works like merchant threatening.  Drops all jobs, and donated items.

Needs to be turned on, as I thought it might be a nasty surprise for those who aren't expecting it.

 

On 2/24/2024 at 5:34 PM, Hakameda said:

If they could be moved with there skills intact

Added.

 

On 2/24/2024 at 5:34 PM, Hakameda said:

They also still don't work for a few select weapons notably from wyvern mods as it tweaks some to use weapon heads smithing. Knuckles, Clubs, Warhammers, Battle Yoyo's

Ah, thanks for the explanation.  I've sorted it so that items that use blade- and head- smithing for improvement can now be accepted with the weaponsmithing trade option.

 

On 2/24/2024 at 5:35 PM, Hakameda said:

Maybe if they could just not output there messages ingame, And keep it just in the log. Gets spammy with alot of em in the same area lol

Also added.

Needs to be turned on, as one of the intentions with the mod were to add some "background noise" of activity.  But I can understand how a lot of them put together would get annoying.

 

On 3/3/2024 at 4:52 AM, Brian said:

I've got a DB Browser, so I'll see if I can find the bugged trader, though mine was just a default WU trader. Thanks!

 

As far as dismissing a trader, I was wondering about the regular trader that is created with the normal trader contract. I haven't been able to figure out how to get of those cleanly. 

I took a quick look at the code, and it appears that 'Destroy'ing them, also cleans up some database stuff.

 

11 hours ago, Brian said:

Any ideas?

Hmm, sounds like the server transfer is messing up the contract, which should keep a reference to the Buyer.  I haven't played around much with hopping servers.

 

I've run out of time now, but I'll respond later with more details.

 

 

Edited by Mthec
Missed new messages.
  • Like 1

Share this post


Link to post
Share on other sites

A couple of things I noticed while poking around the database, in case it helps. Most of the entries look similar compared to the one other player-owned buyer, except:
There are entries for the GM-owned buyer in the buyer.db only, which I assume is because I had the free money turned on for that one.

For the personal buyer contracts, the player-owned buyer has a 'null' for the PLACE field, while the GM-owned buyer has '0'. The last owner IDs look correct.

Share this post


Link to post
Share on other sites
1 hour ago, Brian said:

A couple of things I noticed while poking around the database, in case it helps. Most of the entries look similar compared to the one other player-owned buyer, except:
There are entries for the GM-owned buyer in the buyer.db only, which I assume is because I had the free money turned on for that one.

For the personal buyer contracts, the player-owned buyer has a 'null' for the PLACE field, while the GM-owned buyer has '0'. The last owner IDs look correct.

Interesting.  The player-owned Buyer wouldn't show up in the buyer.db, as I added the database much later on in development.

A quick look shows that the PLACE field is for where an item is on a creatures body.  0 being nowhere.  Not sure why it would not be null, unless it was put in someones hand, but oh well.

 

So I'll have to do some investigating into crossing server borders, but in the mean time I've created a little site to help with reconnecting the contract to the Buyer.

  • Using a GM wand, use 'Get info' on the Buyer, and look for the 'Wurmid'.  It should be a long number in the last line in Event.
  • Visit the site, and put the id into the box and press Calculate.
  • You'll get two numbers labeled 'Data1' and 'Data2'.
  • Use the wand on the contract and go 'Item>Set data', then put the two numbers in the appropriate fields.
  • Click 'Send' then you should be able to access the Buyer with the contract again.
  • Like 1

Share this post


Link to post
Share on other sites

That worked perfectly, thank you so much!

Share this post


Link to post
Share on other sites
Posted (edited)

Holy ######, Your a legend 😃 That didn't take long at all. These changes will be perfect for PvP and just some general annoyances

 

I'll throw it onto the server pretty quick for some testing to see how its all working

 

Edited by Hakameda

Share this post


Link to post
Share on other sites

Did donating enchanted tools end up being a tricky one? The only idea i could think of was like a special drop down for donating tools, and if you give a lump at say 95. It'll just cap at 95

Share this post


Link to post
Share on other sites
On 3/6/2024 at 12:32 AM, Hakameda said:

Did donating enchanted tools end up being a tricky one?

It should still be doable.  I just worked on them in order of what I thought would be easier, and thought I'd release what I had after completing several of them.

Share this post


Link to post
Share on other sites
Posted (edited)

Well thats awesome, I had no idea how easy or hard they may have been lol

 

So far the only issues we hit, The WS will not level up blade smithing or weapon head smithing. He has 90 WS, but was only 10 WHS. He'll still try to to imp a warhammer to 90, But he'll basically get stuck.

Battle yoyo's also seem to be under carp or fine carp i think

May not be able to taunt same kingdom crafters, Wyvern mods makes it so you can have 1 kingdom PvP, situations, anyone not in your village/alliance is an enemy but everyone is freedom

Edited by Hakameda

Share this post


Link to post
Share on other sites
Posted (edited)

Hello again

Spoiler

 Running into a bit of a puzzling issue. I tried downloading the latest BuyerMerchants and set it up as would be expected. No items I am adding to the list are showing up in the trade window. I checked the buyer.db and it showed the Buyer with Freemoney=true and DeleteItems=true. I tried even setting up a scheduler, those entries all entered. At any rate, even after waiting an hour for the restock nothing was in the trader window. So I figured let's revert back to the version that I know worked on my server at one point without the database. I shut down server. Deleted buyers.db which shouldn't matter as it's recreated if server is started, but as I said, this was the non-db version. Of course I am dismissing the buyer before doing this via the dismiss action, not destroy. 

At any rate, I loaded up version 0.5.22 which was the version that last worked for me, but I haven't used it in ages. Just wanted to do a simple sleep powder buyer. Even with 0.5.22 it still allows for freemoney and destroyitems which were both true in .properties from when it did work.
Set up the buyer as normal. Still no dice. Anyway I will post screenshots. I have to think maybe something isn't hooking in right, but there's literally nothing in server.log for buyer search. I also reviewed all Warning level, Severe level entries, found nothing relating to buyermerchant. Truly at a loss. The screenshot in-game is me basically disassembling it piece by piece to figure out where it's not grabbing the item to put in the trade window. I should also note that for whatever reason, when I traded (though the buyer had nothing) it said they had no cash. So I figured well let's try giving it a couple silver. Then it said yeah I've got 2 silver. But still the item entry did not appear. 😕

J9YyubV.png

 

3GvR4e5.png

 

The only other NPC I'm using is your CustomTrader which seems to be working without any issue. As I said, I think if it was another mod issue hooking into the same methods, there ought to be a crash for CannotCompileException, or some sort of logging, but I've spent a few hours on it trying to debug everything I could think of, all combinations of freemoney/destroyitems on both the database version and non-database version. Truly puzzling.

 

Please halp! :)

 

 

Nevermind. Just me being an idiot yet again. Didn't test it using a player that wasn't the owner. Works as intended. Upgraded back to new version and everything looks great. Sorry for the ping. Don't know if editing undoes it.Thanks for the great mod.

Edited by Ayluin
I am an idiot sandwich!

Share this post


Link to post
Share on other sites

Crafter update

Download

 

Added "Give tools" option to the Trade window, so that owners and GMs can donate tools to be used by the Crafter. Making it possible to give Crafters enchanted tools.

GMs can now set the level of any skill for a Crafter, using the Manage>Modify Skills>Set Skill Levels menu.

Crafter's will now bump all known skills up to the starting_skill level set in .properties.

allow_threatening now uses three options:

  • disabled
  • kingdom
  • village_alliance
On 2/24/2024 at 5:34 PM, Hakameda said:

Being able to donate tools for them to use  - Then we could give them enchanted tools or say glimmer tools etc. Would make them imp faster and get alot less stuck on the way to 99 ql. Especially with say wyvern mods or spellcraft with the custom spells or higher spell limits. Might be weird giving them lumps of a not high enough ql though? If a player requests a 99ql item but you gave them a 93ql enchanted lump.

I've added a new Trade option, "Give tools".  It's limited to the owner and GMs, to prevent random players affecting the Crafter.  The Crafter will use the tool normally (not "cheating" as it does with its own tools), so the owner needs to keep an eye on it, and remove/re-improve tools as they stop being useful.
As there is no real way for a Crafter to know which enchantments are good or bad, I've left it up to the owner.  As long as a tool is between the target QL and the targetQL + 20 (to prevent wasting 99ql lumps to improve items at 1ql), the Crafter will use it.

 

On 3/7/2024 at 4:32 PM, Hakameda said:

So far the only issues we hit, The WS will not level up blade smithing or weapon head smithing. He has 90 WS, but was only 10 WHS. He'll still try to to imp a warhammer to 90, But he'll basically get stuck.

Hopefully sorted.  If your Crafter is controlled by a GM, they can now change any of the Crafter's skills with the Manage menu.
A Crafter's skills will be boosted to the starting_skill level, if they are too low.
Hopefully that's the least messy solution.

 

On 3/7/2024 at 4:32 PM, Hakameda said:

Battle yoyo's also seem to be under carp or fine carp i think

Interestingly, it's neither.  They use Toymaking.
I've setup a system that should clear things up.  Toymaking is considered to be part of Carpentry, when it comes to the Crafter's assigned skills, but will still use Toymaking to improve.

 

On 3/7/2024 at 4:32 PM, Hakameda said:

May not be able to taunt same kingdom crafters, Wyvern mods makes it so you can have 1 kingdom PvP, situations, anyone not in your village/alliance is an enemy but everyone is freedom

I've changed the allow_threatening option to allow you to set disabled, kingdom, or village_alliance.

 

On 3/17/2024 at 9:39 AM, Ayluin said:

Sorry for the ping. Don't know if editing undoes it.Thanks for the great mod.

No worries, out of interest it doesn't undo pings.  Just glad it's resolved for you.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now