Mthec

[Released] Mthec's NPCs - Crafter, Buyer, DeliveryContracts, MerchantCap, and CustomTrader

Recommended Posts

Ah, I think I see the problem.

 

You have to drag the "Improve to..." and donate/mail items down into the bottom left area.  As you would with a normal trade.  Dragging the items onto another item doesn't do anything.  Then the Crafter will automatically drag your spindle down.

 

I see what you mean by checkbox now, but that's not how it works.  That's just the symbol that says the item is a container, but it doesn't apply here.  It's just how I repurposed the trade window.

Share this post


Link to post
Share on other sites

Well, it's as I suspected, I just missed something simple.  Thank you!! 

  • Like 1

Share this post


Link to post
Share on other sites

FYI - Delivery Contracts - can be exploited in many ways in PvP server!! (e.g. steal guard-towers from other kingdom.. and much much more..).

Share this post


Link to post
Share on other sites
5 hours ago, Barfoot said:

FYI - Delivery Contracts - can be exploited in many ways in PvP server!! (e.g. steal guard-towers from other kingdom.. and much much more..).

Sorry, DeliveryContracts was never designed for PvP.  One of its main purposes is to transport items that can't otherwise be transported.  As such it bypasses some of the security, in the guard tower case items marked NoTake.

 

I could fix the guard tower issue for PvP, but wouldn't be able to guarantee the rest of the mod was safe for PvP.

Share this post


Link to post
Share on other sites
On 7/15/2020 at 11:19 PM, EmmaGrace said:

Well, it's as I suspected, I just missed something simple.  Thank you!! 

That happens to me ALL the time, lol.

 

Share this post


Link to post
Share on other sites
On 12/12/2018 at 6:26 PM, Mthec said:

CustomTrader

What does it do?

A new type of NPC based on the standard trader, that can only be placed by GMs.  Has various options for a custom inventory, including restocking rules.  Use a 'tag' to share the same inventory between multiple custom traders, or just use a unique inventory.

 

Hello again!

 

Is there a way that the items will not be damaged inside the trader's inventory?

I would like to have a NPC selling food and seeds, but it will take damage over time, so I have to manually restock it. Maybe I am missing something again hehe

Share this post


Link to post
Share on other sites

CustomTrader update

Download

 

Added new option, prevent_decay, if true it will prevent decay from occurring on all CustomerTraders.  Default is true.

21 hours ago, Norhi said:

Hello again!

 

Is there a way that the items will not be damaged inside the trader's inventory?

I would like to have a NPC selling food and seeds, but it will take damage over time, so I have to manually restock it. Maybe I am missing something again hehe

You're not missing anything, added it now.

  • Like 2

Share this post


Link to post
Share on other sites
On 8/8/2020 at 9:12 AM, Mthec said:

CustomTrader update

Download

 

Added new option, prevent_decay, if true it will prevent decay from occurring on all CustomerTraders.  Default is true.

You're not missing anything, added it now.

Doesn't seem to be working. We added it last night, and I confirmed that we have 

Quote

prevent_decay=true

One of my players loaded her merchant with meals, and they all have 50% decay already today.

Share this post


Link to post
Share on other sites
15 hours ago, Batta said:

Doesn't seem to be working. We added it last night, and I confirmed that we have 

One of my players loaded her merchant with meals, and they all have 50% decay already today.

This new setting only works for CustomTraders.

 

Can I just confirm you mean merchants, as in personal merchants?  If so, I could create a new mod that does the same for them.

  • Like 1

Share this post


Link to post
Share on other sites
4 hours ago, Mthec said:

This new setting only works for CustomTraders.

 

Can I just confirm you mean merchants, as in personal merchants?  If so, I could create a new mod that does the same for them.

Oh!  Yes, I would love it for personal merchants too.  Thanks.  🙂

Share this post


Link to post
Share on other sites
Posted (edited)

New mod - MerchantDecayPrevention

Download

 

A new mod that prevents item decay whilst held by a merchant or trader.

allow_cooling

If true then items will still cool down whilst held by a merchant or trader.
Default true.

19 hours ago, Batta said:

Oh!  Yes, I would love it for personal merchants too.  Thanks.  🙂

Done.  Sorry about the long mod name, couldn't think of anything better.

Edited by Mthec
  • Like 2

Share this post


Link to post
Share on other sites
3 hours ago, Mthec said:

New mod - MerchantDecayPrevention

Download

 

A new mod that prevents item decay whilst held by a merchant or trader.

allow_cooling

If true then items will still cool down whilst held by a merchant or trader.
Default true.

Done.  Sorry about the long mod name, couldn't think of anything better.

Wonderful!  The allow_cooling is a great touch.

  • Like 1

Share this post


Link to post
Share on other sites
Posted (edited)

Helo!

 

Do you think it would be possible to customize the currency accepted by traders? 

One of our players suggested a special HoTA trader, that accept the HoTA medallions as currency, so they could trade it for other rewards, like statues, and I think it would be great :D

Edited by Norhi
  • Like 1

Share this post


Link to post
Share on other sites

CustomTrader update

Download

 

Added new Currency Trader.  This trader trades items, added in the same way as Custom Traders through a menu system, in exchange for a specific type of item used as a currency.  e.g. HotA medallions.

On 8/28/2020 at 5:21 AM, Norhi said:

Helo!

 

Do you think it would be possible to customize the currency accepted by traders? 

One of our players suggested a special HoTA trader, that accept the HoTA medallions as currency, so they could trade it for other rewards, like statues, and I think it would be great :D

Sorry I didn't reply sooner, took a little longer than I thought.  Hopefully this suits your needs.

  • Like 1

Share this post


Link to post
Share on other sites

This looks awesome! Although I am curious, how is the type of currency it takes set?

 

I was also curious if it's possible to give an option to set auxdata on the item being created?

Edited by WesncIsMe
  • Like 1

Share this post


Link to post
Share on other sites

CustomTrader update

https://github.com/Mthec/CustomTrader/releases/latest

 

Added AuxData option.

7 hours ago, WesncIsMe said:

This looks awesome! Although I am curious, how is the type of currency it takes set?

 

I was also curious if it's possible to give an option to set auxdata on the item being created?

Thank you.

 

It's set on the Place/Management screen, there's a dropdown with all the different item types with an optional filter, similar to creating an item entry.

currency_trader_setup.png?raw=1

 

  • Like 1

Share this post


Link to post
Share on other sites

Got it! Thank you! I was also wondering if there was a way to sync tags across intra-connected servers?

Share this post


Link to post
Share on other sites

Is there a setting anywhere for the buyer that will tell people how many items the buyer is willing to purchase?

 

Share this post


Link to post
Share on other sites
16 hours ago, WesncIsMe said:

Got it! Thank you! I was also wondering if there was a way to sync tags across intra-connected servers?

Unfortunately I don't know much about networking, so I don't know how to automatically sync tags across servers.  If you know of a mod that does it, let me know and I can take a look.  However I could add a manual option, where the tags are copied to files and you could manually transfer them to the other server?

 

1 hour ago, EmmaGrace said:

Is there a setting anywhere for the buyer that will tell people how many items the buyer is willing to purchase?

 

It will say "- limit n" on the item in the inventory window, although it may be too long to fit for some items.  It will also put a message in Event when the limit has been exceeded and the Buyer can't accept any more.

Share this post


Link to post
Share on other sites
10 hours ago, Mthec said:

Unfortunately I don't know much about networking, so I don't know how to automatically sync tags across servers.  If you know of a mod that does it, let me know and I can take a look.  However I could add a manual option, where the tags are copied to files and you could manually transfer them to the other server?

That would be a good option!

 

Got a new error with the crafters. I have them placed inside a mine with their forge right next to them (same tile) but it doesn't seem to access it properly. it lights it, then throws out too far away messages in the console.

I reassign the forge and even dismiss and remake them, same thing, however other crafters that imp items in their inventory work just fine.

[07:25:52 PM] INFO com.wurmonline.server.players.Player: Stopping watching forge because not within distance to 386.7324, 786.831
[07:25:55 PM] INFO com.wurmonline.server.players.Player: Stopping watching forge because not within distance to 386.8894, 785.5638
[07:25:59 PM] INFO com.wurmonline.server.Server: current mem in use: 1473M free mem: 571M Max mem: 2010M
player count: 2
bytes in: 35544 bytes out: 561311 total in: 191251 total out: 8044006
Server uptime: 5100 seconds. Unanswered questions:0
com.wurmonline.server.NoSuchItemException: You are too far away from a small anvil.
        at com.wurmonline.server.behaviours.Action.<init>(Action.java:951)
        at com.wurmonline.server.behaviours.BehaviourDispatcher.action$1(BehaviourDispatcher.java:962)
        at sun.reflect.GeneratedMethodAccessor30.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at mod.wurmunlimited.npcs.CrafterMod.behaviourDispatcher(CrafterMod.java:480)
        at org.gotti.wurmunlimited.modloader.classhooks.HookManager.invoke(HookManager.java:384)
        at com.wurmonline.server.behaviours.BehaviourDispatcher.action$2(BehaviourDispatcher.java)
        at sun.reflect.GeneratedMethodAccessor29.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at mod.wurmunlimited.delivery.DeliveryContractsMod.behaviourDispatcher(DeliveryContractsMod.java:464)
        at org.gotti.wurmunlimited.modloader.classhooks.HookManager.invoke(HookManager.java:384)
        at com.wurmonline.server.behaviours.BehaviourDispatcher.action(BehaviourDispatcher.java)
        at mod.wurmunlimited.npcs.CrafterAIData.sendNextAction(CrafterAIData.java:408)
        at mod.wurmunlimited.npcs.CrafterAI.pollCreature(CrafterAI.java:61)
        at com.wurmonline.server.creatures.Creature.poll$1(Creature.java:6017)
        at sun.reflect.GeneratedMethodAccessor24.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at mod.wurmunlimited.npcs.customtrader.CustomTraderMod.poll(CustomTraderMod.java:133)
        at org.gotti.wurmunlimited.modloader.classhooks.HookManager.invoke(HookManager.java:384)
        at com.wurmonline.server.creatures.Creature.poll(Creature.java)
        at com.wurmonline.server.creatures.Creatures.pollAllCreatures(Creatures.java:1834)
        at com.wurmonline.server.zones.Zones.pollNextZones(Zones.java:1975)
        at com.wurmonline.server.Server.run(Server.java:1911)
        at java.util.TimerThread.mainLoop(Timer.java:555)
        at java.util.TimerThread.run(Timer.java:505)
[07:28:18 PM] INFO com.wurmonline.server.Server: Lag detected at Zones.pollnextzones (0.5): 31.817 seconds
[07:28:18 PM] INFO com.wurmonline.server.Server: Elapsed time (31819ms) for this loop was more than 1 second so adding it to the lag count, which is now: 33
com.wurmonline.server.NoSuchItemException: You are too far away from a short sword.
        at com.wurmonline.server.behaviours.Action.<init>(Action.java:951)
        at com.wurmonline.server.behaviours.BehaviourDispatcher.action$1(BehaviourDispatcher.java:962)
        at sun.reflect.GeneratedMethodAccessor30.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at mod.wurmunlimited.npcs.CrafterMod.behaviourDispatcher(CrafterMod.java:480)
        at org.gotti.wurmunlimited.modloader.classhooks.HookManager.invoke(HookManager.java:384)
        at com.wurmonline.server.behaviours.BehaviourDispatcher.action$2(BehaviourDispatcher.java)
        at sun.reflect.GeneratedMethodAccessor29.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at mod.wurmunlimited.delivery.DeliveryContractsMod.behaviourDispatcher(DeliveryContractsMod.java:464)
        at org.gotti.wurmunlimited.modloader.classhooks.HookManager.invoke(HookManager.java:384)
        at com.wurmonline.server.behaviours.BehaviourDispatcher.action(BehaviourDispatcher.java)
        at mod.wurmunlimited.npcs.CrafterAIData.sendNextAction(CrafterAIData.java:408)
        at mod.wurmunlimited.npcs.CrafterAI.pollCreature(CrafterAI.java:61)
        at com.wurmonline.server.creatures.Creature.poll$1(Creature.java:6017)
        at sun.reflect.GeneratedMethodAccessor24.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at mod.wurmunlimited.npcs.customtrader.CustomTraderMod.poll(CustomTraderMod.java:133)
        at org.gotti.wurmunlimited.modloader.classhooks.HookManager.invoke(HookManager.java:384)
        at com.wurmonline.server.creatures.Creature.poll(Creature.java)
        at com.wurmonline.server.creatures.Creatures.pollAllCreatures(Creatures.java:1834)
        at com.wurmonline.server.zones.Zones.pollNextZones(Zones.java:1975)
        at com.wurmonline.server.Server.run(Server.java:1911)
        at java.util.TimerThread.mainLoop(Timer.java:555)
        at java.util.TimerThread.run(Timer.java:505)
com.wurmonline.server.NoSuchItemException: You are too far away from a bowl.
        at com.wurmonline.server.behaviours.Action.<init>(Action.java:951)
        at com.wurmonline.server.behaviours.BehaviourDispatcher.action$1(BehaviourDispatcher.java:962)
        at sun.reflect.GeneratedMethodAccessor30.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at mod.wurmunlimited.npcs.CrafterMod.behaviourDispatcher(CrafterMod.java:480)
        at org.gotti.wurmunlimited.modloader.classhooks.HookManager.invoke(HookManager.java:384)
        at com.wurmonline.server.behaviours.BehaviourDispatcher.action$2(BehaviourDispatcher.java)
        at sun.reflect.GeneratedMethodAccessor29.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at mod.wurmunlimited.delivery.DeliveryContractsMod.behaviourDispatcher(DeliveryContractsMod.java:464)
        at org.gotti.wurmunlimited.modloader.classhooks.HookManager.invoke(HookManager.java:384)
        at com.wurmonline.server.behaviours.BehaviourDispatcher.action(BehaviourDispatcher.java)
        at mod.wurmunlimited.npcs.CrafterAIData.sendNextAction(CrafterAIData.java:408)
        at mod.wurmunlimited.npcs.CrafterAI.pollCreature(CrafterAI.java:61)
        at com.wurmonline.server.creatures.Creature.poll$1(Creature.java:6017)
        at sun.reflect.GeneratedMethodAccessor24.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at mod.wurmunlimited.npcs.customtrader.CustomTraderMod.poll(CustomTraderMod.java:133)
        at org.gotti.wurmunlimited.modloader.classhooks.HookManager.invoke(HookManager.java:384)
        at com.wurmonline.server.creatures.Creature.poll(Creature.java)
        at com.wurmonline.server.creatures.Creatures.pollAllCreatures(Creatures.java:1834)
        at com.wurmonline.server.zones.Zones.pollNextZones(Zones.java:1975)
        at com.wurmonline.server.Server.run(Server.java:1911)
        at java.util.TimerThread.mainLoop(Timer.java:555)
        at java.util.TimerThread.run(Timer.java:505)

 

Edited by WesncIsMe
  • Like 1

Share this post


Link to post
Share on other sites

Crafter bugfix

Download

 

Fixed bug with underground forges.

 

15 hours ago, WesncIsMe said:

That would be a good option!

 

Got a new error with the crafters. I have them placed inside a mine with their forge right next to them (same tile) but it doesn't seem to access it properly. it lights it, then throws out too far away messages in the console.

I reassign the forge and even dismiss and remake them, same thing, however other crafters that imp items in their inventory work just fine.

That was a strange one, think it might be a bug in WU, or I am doing something quite incorrectly.  For some reason when a Crafter put items in a forge, it moved them to the surface.  Hence too far away.  I just never noticed it because most Crafters were used on the surface.

 

Thanks for the report.

Edited by Mthec
  • Like 1

Share this post


Link to post
Share on other sites

CustomTrader update

Download

 

You can now use the /dumptags command (with a GM character) to create a copy of all the tagged trader stock info, for loading on other servers.  Copy the file found in the mods/customtrader mod folder, called tags.db and put it in the same location on another server.  Tags will be loaded when the server starts.

18 hours ago, WesncIsMe said:

That would be a good option!

Hopefully this will work for you.

  • Like 1

Share this post


Link to post
Share on other sites
10 hours ago, Mthec said:

Crafter bugfix

Download

 

Fixed bug with underground forges.

 

That was a strange one, think it might be a bug in WU, or I am doing something quite incorrectly.  For some reason when a Crafter put items in a forge, it moved them to the surface.  Hence too far away.  I just never noticed it because most Crafters were used on the surface.

 

Thanks for the report.

 

Thanks for the fast update!!

 

6 hours ago, Mthec said:

CustomTrader update

Download

 

You can now use the /dumptags command (with a GM character) to create a copy of all the tagged trader stock info, for loading on other servers.  Copy the file found in the mods/customtrader mod folder, called tags.db and put it in the same location on another server.  Tags will be loaded when the server starts.

Hopefully this will work for you.

 

Absolutely perfect, thanks for this aswell!

  • Like 1

Share this post


Link to post
Share on other sites
On 9/10/2020 at 4:12 PM, Mthec said:

CustomTrader update

Download

 

You can now use the /dumptags command (with a GM character) to create a copy of all the tagged trader stock info, for loading on other servers.  Copy the file found in the mods/customtrader mod folder, called tags.db and put it in the same location on another server.  Tags will be loaded when the server starts.

Hopefully this will work for you.

I was curious if you could do the same for the currency trader aswell?

Edited by WesncIsMe

Share this post


Link to post
Share on other sites
12 hours ago, WesncIsMe said:

I was curious if you could do the same for the currency trader aswell?

It works for both.  Technically you can have a currency trader and a custom trader use the same tag.  Although the prices would be off, unless you want several hundred of an item in exchange.

 

I also forgot to add before, that old stock entries won't be deleted when loading, to save losing any information.  It just adds ones that are missing.

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