• Content Count

  • Joined

  • Last visited

Posts posted by Mthec

  1. CustomTrader and BuyerMerchant fixes

    Download CustomTrader

    Download BuyerMerchant


    Added missing wood types.

    On 6/28/2020 at 6:23 PM, Batta said:

    @MthecI just noticed that the Custom Trader is missing lingonberrywood as a wood type.  

    Interesting.  So in the Wurm Unlimited code there is a list of all the wood types, but for some reason it is missing lingonberrywood and orangewood.  At first I thought it was because they were less common wood types, but raspberrywood and blueberrywood are included.


    Thanks for the report.

  2. Crafter bugfix



    16 hours ago, Hakameda said:



    I can dm you the full log if you like

    Yes please, if you wouldn't mind.  What I'm seeing there is that something is going wrong when removing the ash from the forge, but it works fine on my end so can't tell what the problem is.


    I've hopefully fixed the issue with the mine doors, thanks for the logs, but you may still have problems starting up if the ash related issue is still causing problems.

  3. Crafter bugfix



    Crafter logs weren't being written to.  Now fixed.

    13 hours ago, Hakameda said:

    Sorry took a bit, Crafter is working on mine doors but not imping them. [20:36:13] <Twinkywinky> I am currently currently working on 10 items for you.


    And with the debug message on, Nothing is showing up. Metal items just get mailed right back to me

    Sorry about this, still not sure of the cause.  But hopefully with the fix to the message logging it should clear things up.  Check the individual log files in the WurmServerLauncher folder, if you haven't already, sometimes the messages can get log in the console output.


    The only other idea I have at this time is to dismiss and replace the Crafter.  Have you tried that since the previous update?



  4. Crafter update and bugfixes



    Added global restricted materials.  Now GM can limit which materials Crafters may use.  This works in combination with Per-Crafter restrictions, but cannot override globally blocked materials.

    Type /restrictmaterials into chat as a GM to bring up the list.


    Also fixed several bugs.

    On 5/7/2020 at 12:01 AM, Batta said:

    I've noted that the crafter can only take a certain amount of stuff at one time -- I think 5 items?  Ash Produce mod spawns a lot more than that, so it's possible it's overloading your crafter.  I'd test this theory by removing Ash Produce.


    EDIT:  I mean you can trade only a very limited number of items to the crafter at one time, though you can eventually trade all your stuff for imping if you do it in small batches, one after the other.

    Should be fixed now.


    11 hours ago, Hakameda said:

    It's just 1 6.40kg pile of ash, Removing it as gm didn't fix it. It lights the forge and everything, Just no imping. It also doesn't want to imp stone mine doors

    I have a suspicion as to what the problem is, see if the new version fixes it.


    If not, could you try turning on crafter output by putting this:


    In your .properties file.  It should hopefully say what the problem is.

  5. 9 hours ago, Hakameda said:

    It has the items, it's just not imping them. Forge is lit. Only thing in it is one big pile of ash

    If you take out the ash with a GM does it start working again?


    I'm not far off releasing another update so I'll include a possible fix in that.

    15 hours ago, Batta said:

    I've noted that the crafter can only take a certain amount of stuff at one time -- I think 5 items?  Ash Produce mod spawns a lot more than that, so it's possible it's overloading your crafter.  I'd test this theory by removing Ash Produce.


    EDIT:  I mean you can trade only a very limited number of items to the crafter at one time, though you can eventually trade all your stuff for imping if you do it in small batches, one after the other.

    Hmm, that doesn't sound right.  Something else to look at I guess.  Never tested it with a large amount of items.

  6. Crafter update



    Added restricted materials list, found on the management screen. If left blank the Crafter will accept all item materials as usual, if not they will only accept items made from a material that is on the list.

    Added single_crafter_skill option to .properties. If added and set true Crafters can only be assigned 1 skill, instead of allowing multiple. Already placed Crafters will continue to finish current jobs in other skills, but will limit all new jobs to 1 skill. Which will be the "first" skill in the order I use in the mod, it can, of course, be changed if it is not what the owner wants.


    Tagging @Cley

  7. 6 hours ago, Cley said:

    Good day. Is it possible to make the Crafter setting more subtle?
    It is extremely critical for me that he can only work with those metals that will be specified in the settings for each profession. i.e., a blacksmith of weapons and armor - iron, steel. Jeweler-silver, gold. Carpenter-birch, oak, cedar. And exclude the possibility of using krafter as a multi-class character. ie, make a choice of profession from the drop-down list. I want players to be able to use them on their own, but under more careful control.

    Sorry for not replying to your PM, I did read it.


    I was busy with the bugfix and I'm busy today, but will look into it soon.  Should be possible.

  8. DeliveryContracts fix



    Fixed issue with items taking damage in delivery contracts when no decay was true.

    On 4/24/2020 at 10:07 PM, Tyarra said:

    Thanks for the update!  It will take a few hours before finding out if it works or not.


    Yes, at one point, I used the Update Restrictions on these meals, and marked them "Decay disabled", but they decayed anyway.   The current trial with the latest update (0.5.9-beta) has both 'decay' options set to true, and half the meals in Delivery Notes have been "decay disabled" ... I'll report back in about 6 hours or so.  *fingers crossed* 


    As far as I know, we have no other mods that relate to decay rates.  I'll go over them carefully, but the only other one that I even know about is bdew's "no damage", and since it stops EVERYTHING from taking damage, I didn't even bother downloading it


    Alas, it still is decaying.  Here's the display on the merchant:


    Think I've sorted it.  The decay was happening somewhere else in the Wurm code, and I missed it.  Sorry about that.  Let me know if you have any more problems.


    On 4/24/2020 at 10:07 PM, Tyarra said:

    And thank you for the java lesson.  I really should get into it, since I have ideas about mods of my own.  Isn't that a scary thought?! 

    Terrifying.  Take it from me, don't let yourself get drawn in or you'll never escape!

  9. On 4/22/2020 at 3:58 AM, Tyarra said:

    Just to clarify - if I don't want food to take damage, BOTH no_decay_in_contract  and no_decay_food must be set to 'true'?  This is what I'm getting from the "overridden' comment - that if the former is set 'false', it doesn't matter what the latter is set to.  Don't know why you need both, if this is the case.

    It is the other way round, if no_decay_in_contract is 'true' then no_decay_food does not matter.  Unless, I guess, you did want food to decay but nothing else, in which case that wouldn't currently work.


    So, if you only want food to be protected from decay, then no_decay_in_contract should be 'false' or removed, and no_decay_food should be 'true'.

    On 4/22/2020 at 3:58 AM, Tyarra said:

    Is there a minimum weight something needs to be to go in a contract?    I have a player who set up a personal merchant to sell affinity food (we have the mod that lets food give the same affinity to everyone), but the food would decay very quickly (even if cooked with salt, and wrapped) - so I went looking to see if there was a mod that could be set to keep food (or even other things) from decaying on a merchant, and ran across this delivery contract with the setting that should (presumably) take care of the issue.  I'm not positive of what the setting was before, but the food was decaying anyway.  I might have not set both items 'true'.  Trying once again, with the settings definitely set this way.  Will try other settings, if you tell me this isn't right. Or if there needs to be something bigger than a 2kg portion of a meal in a contract.


    Also, the food is 'renamed' with the affinity it is for, and it is visible on the merchant when the + is clicked to open each contract. These have a * at the end of the 'rename' (not put on at the time of renaming) in the window.  Does this mean anything in particular?




    I don't really know Java (my expertise is in mush code, and doing some minor scripting), but I took at look at the source files, and the file does reference the 'no_decay_in_contract' and 'no_decay_food', and it sets  'setNoDecay' and 'setNoDecayFood' as appropriate to 'true', but I don't see anywhere else in that file that takes it into consideration.  Admittedly, those could be system variables, and theoretically it knows what to do with them, but given the behavior,  I would say not.  

    There shouldn't be a minimum weight for items in contracts.

    The '*' marks which items were no decay before going into the contract, so that when they leave they can be reset properly.

    The two values are used in, in markItemAndSubItems.


    Strange that the food is decaying, especially as the '*' is there meaning the food shouldn't have decayed outside the contract either.  Any other mods that may alter decay rates?

    I've changed the setNoDecay behaviour slightly, in case taking the items in and out of contracts was causing issues.  Download.  But I don't think that is the cause.

    17 hours ago, Mr_Abel said:

    I currently have max items set to 10,000 and that seems to be working fine so far.  I'm trying to find where the person selling to the buyer can see how many more the buyer will accept based on the limits you can set.  I have several players on my server already enjoying the system we're using and so far limits have not yet been reached but some are getting close.  There isn't any sort of visible indication or remaining quantity/limit counter to inform the players how much more they can sell (at least not that we can find).  I can see the remaining amounts and even change them in the price management screen (which is nice), but that information isn't shared.

    At present, there is a buy order for any QL/type plank of 1,000.  Approximately 800 have been filled.  The players filling this order have no way of knowing they can only sell 200 more before the buyer mysteriously wont accept them anymore unless I open up the manage menu.  Is there an indicator somewhere we may be over-looking?  Would it be possible to add a remaining quantity display in the sell window or event log?

    I've made an update, hopefully it covers what you need.  Let me know if it's not quite right.


    BuyerMerchant update



    On a Buyer, if the item has a purchase limit it will now show the remaining number on the item label.
    e.g. log, applewood - limit 123


  10. 41 minutes ago, Zera said:

    It was showing up randomly on it's own.
    The funny part is, the only NPC in the world at the time was a single Tower Guard.
    No Deeds have been placed for Templars, there's no Traders (custom or otherwise), no bartenders, nothing.



    I'm thinking then, that it doesn't have anything to do with CustomTrader.  The reason it's appearing in the logs is because the problem is happening at some point when the creatures are polled and CustomTrader hooks into that.  But it shouldn't actually do anything except to CustomTraders.


    Sorry I cannot be of further help.  If you get any different messages, let me know.

  11. CustomTrader update



    Fixed creating custom traders using Summon.  Added weight option for trader items.


    Important - This update will not work with the previous database, so you should dismiss any already created custom traders and then delete customtrader.db in the individual servers sqlite folder (e.g. WurmServerLauncher/Creative/sqlite).

    Sorry about this, whilst I could have worked around it, as the mod is still so new I thought it best to keep things clean rather than leaving code to update old databases.

    14 hours ago, Batta said:

    I summoned the custom trader.  Whoops.  Thanks for the clarification.  🙂

    Would it be possible to add a config to the item sizes?  I like to stock a "GM merchant" with exotic wood logs, but only 4.00kgs each.

    I should have thought about it, but since I don't run a server I can miss things like that.


    Also, added the weight option, it didn't take long.  Thank you for the suggestion.

  12. 6 hours ago, Batta said:

    @Mthec The default items on the custom trader are coming up free.  I logged on an alt to confirm that he could just take whatever he wanted with no charge.  FYI

    There shouldn't be any default items.  Did you create the custom trader with the Place Npc>Custom Trader menu, or by using summon?  Because I just tried summon (I hadn't been using that) and it came with the default trader items, whereas the other way removes them.


    For the moment, you can just use Manage and tick the "Remove all items from inventory?" option after creation.  I shall have a look into removing the items another way.


    New Mod Beta Release

    Custom Trader



    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.


    Placing a Custom Trader

    As a GM, activate your wand and right-click on the tile you wish the trader to appear.  Choose Place Npc>Custom Trader.  A menu will pop-up offering three settings, name, tag and gender.  Leave the tag blank if you wish them to only supply the items you specifically set for that custom trader.


    Setting up stock

    With a wand, right-click on the custom trader and select Manage.  In the first window you can change the tag of the custom trader, as well as empty their inventory and restock them to full capacity.  Item List is where you add/remove items.  Adding an item is very similar to BuyerMerchant, with the addition of specifying enchantments, and restocking rules.


    Restocking Rules:


    How many items are added each interval, up to the maximum.  0 restocks to the maximum every time.



    How often the trader should be restocked, in hours.  0 restocks the custom trader after each sale.



    The maximum number of this item to be available on the trader at any one time.


    Some possible uses:

    • A replacement for the normal trader, with fewer or more items available.
    • A starter trader, offering some basic supplies for new players.
    • A mine "foreman".  Add a small amount of ore on a regular basis to simulate a public mine.

    Think it is about feature complete.  Don't want to overcomplicate things.  Would like some feedback on the text in the menus, is there anything that needs clarifying, etc.

    I've set the range of items that can be used very wide, similar to BuyerMerchant.  Quite a few items will not be ones you want to offer, but I thought it best to be flexible for any custom server setups.

    I've mainly been testing on the beta version of Wurm Unlimited, however it seems to work on the non-beta.






  14. Crafter fix



    Fixed potential issue with workbooks being invalid/not being found and causing NullPointerException.

    20 hours ago, WesncIsMe said:

    Getting a null pointer error one of the crafters which spams the console constantly.

    Not doing very well, am I?


    I've dealt with the error itself, but it is likely caused by a problem with one of the crafters workbooks being missing, or not being valid.  I've added a couple more error messages that should clear things up, or maybe I'm wrong and it'll all be fine now.


    Let me know if you get any more problems.


  15. 22 minutes ago, Segomo said:

    1.How do I get into setting to edit these?

    You set the values in in your mod folder.  It should look like this.


    22 minutes ago, Segomo said:

    2. Can these be set for each individual buyer?

    No, these settings apply to all buyers.  I could look into it, but am currently working on another mod and don't have much spare time.  Sorry.

  16. Crafter Fix



    Fix for error when removing Job.

    On 2/3/2020 at 4:14 PM, WesncIsMe said:

    Getting an error trying to trade crafters a 2nd time. Says there is items waiting for collection but there is none. this makes all crafters on the server untradable.

    Not sure what the original cause of this was.  Trading multiple times seems to run okay on my end, and I'm not sure why it would affect all crafters.


    However there was definitely a problem, which I've now fixed.  See if that clears things up, if not let me know and I'll keep looking.

  17. 22 hours ago, Triadian said:

    @Mthec is there anyway to have a buyer that buys everything at the same price as the trader/salesmen does for example if the normal trader buys a Black Opal for 3s then the buyer would accept any item and sell it for that price so i could sell the Black Opal to him and get 3s without setting up the sell list and prices etc?


    if so how ? - i'd be fine editing the source my end - if i knew where to look 

    If you're sure, that shouldn't be too difficult.


    Firstly, prices are defined in BuyerHandler.getTraderBuyPriceForItem.  If you want to add any item exceptions you can do it here (e.g. you only want to accept gems), and then just call the parent method.  So something like:

    public int getTraderBuyPriceForItem(Item item) {
        PriceList.Entry entry = priceList.getEntryFor(item);
        if (entry == null)
        return getTraderBuyPriceForItem(entry, item);

    Which will also handle all the local buy price stuff I have never really looked into.


    The other part you'll need to change is in suckInterestingItems, which decides what items traders will accept, and for Buyers ignores anything not on their PriceList.  Starting here.

    Then you'll need to extract, or copy, this section to add the items to the trade.  The stuff inbetween only relates to PriceLists.


    I think that should be it, just let me know if you have any problems.