Mthec

Members
  • Content Count

    292
  • Joined

  • Last visited

Posts posted by Mthec


  1. Crafter fix

    Download

     

    Fix for issue when BuyerMerchant is not also installed.

    5 hours ago, Vanyel said:

    Maybe I've borked the properties? 

     

    I'm also using the 'Donation Fix' release in case that matters....

     

    Please help

    Not your fault.  The problem was I also had another of my mods running on my test server, running without that mod caused your issue and of course it wouldn't appear for me when I was testing. 

     

    Sorry about that.  Should all be fixed now.


  2. 36 minutes ago, Batta said:

    What settings would I use if I want the minimum purchase to be 1, but the limit to be infinite?   I would have thought I'd use 0 for the limit, but it doesn't allow that because the minimum is 1.  This is a GM Buyer, to help clean up leftovers on the server.

     

    1 for "Min. Purchase" and 0 for "Limit" would be correct.  Not sure what the problem is as it seems to work fine for me.  Minimum purchase must be 1 or higher, but you should be able to set limit to 0 (for infinite).

     

    It won't work for the owner, but if this is for other GMs then it should still work.


  3. Buyer Merchant fix

    Download

     

    Fixed message.  Extended limit to 4 chars.

    1 hour ago, Batta said:

    @MthecIs the "purchase limit" a limit for all time from that player, or just for each individual transaction?  I ask because it won't let me set the limit higher than 999, and if I leave it at 0 I get an error saying that the minimum purchase is higher than the purchase limit.

    Gah.  Knew there was something I forgot that I found when testing earlier.  Sorry about that.

     

    So to clarify, the limit is in total across all players.  The message you were getting doesn't actually stop anything from working it just warns you that the limit is below the minimum(to save people having to re-add the entry).  Except they way I wrote it the message would be sent when they were both at their default settings.

     

    The limit, erm, limit was only restricted to the form, it can technically be really, really high.  I just didn't know how far to extend the form so left it at a maximum of three.  But I ended up adding the horizontal scroll anyway as the form is getting pretty wide.


  4. Buyer Merchant fix

    Download

     

    Fixed Bought values on management screen.  Also added horizontal scroll to appropriate windows.

    14 hours ago, Batta said:

    Okay, all of a sudden everything I said above has changed.  I'm able to get 1000 items into the buyer now, though I swear I didn't change anything at all.  

    No worries.  Sometimes errors crop up and solve themselves without ever knowing why.  Thank you for the information though, it can really help diagnose these things.

     

    Also you were correct about the Bought Month/Life values.  Should be fixed now, and I've removed the ratio as it doesn't do anything else for buyers.


  5. 48 minutes ago, Batta said:

    @Mthec On the Buyer merchant, I set max items to 1000 but it won't take more than 100 total from all players.  I had 2 players fill up the buyer in a day, and then nobody else could sell to it until I collected the items.

    That is strange.  I've just given it a test on my end and it seems to be working fine.  The only thing 100 makes me think of is the client limit of transferring from the inventory window to the trade window, but you said you had to collect the items to free it up so it wouldn't be that.

     

    When you start up the server, one of the last few lines should be "Buyer max items set to..." or "Buyer and merchant max items set to...".  Does that say the correct amount?


  6. Buyer Merchant update

    Download

     

    Added new option to Price List entries.  Limit will restrict the amount of that type that players can sell to Buyers.  It will reduce with every trade, then the entry will be removed when the maximum number have been bought.  Default is 0, which means no limit.

    On 3/22/2019 at 3:19 PM, Yarilo said:

    Can you please tell whether it is possible to install a certain quantity of the purchased goods from the buyer? For example, I need to buy 60 nails, how can I set a limit on the number? Thank you.

    This is now done.  Let me know if you expected something different.


  7. Bug fix

    Download

     

    Pricing was incorrect for some pricing settings.

    3 hours ago, Yarilo said:

    Hi, set the coefficient 50 at the artisan (tools). Improving the tool in increments of 10 quality to 50 is in progression, and from 60 to 90 the price is the same at the same time very high. I guess you're already tired of you)

     

    http://prntscr.com/n43gpp

    Crafter mod, now with loot boxes.  What bug will you get next!  Thank you for your continued reports.


  8. Bug fix

    Download

     

    Some un-improvable items were being accepted.  Any already accepted items will be returned to the owner in the mail with a refund.

    6 hours ago, Yarilo said:

    There is a problem. If you give the artisan for cutting stone a brick for improvement, he still takes it, but it stops working. The queue of improvements stops.

    Thank you for the report.  It turns out some items that cannot be improved are not marked "NoImprove" by WU.


  9. 4 hours ago, Yarilo said:

    Can you please tell whether it is possible to install a certain quantity of the purchased goods from the buyer? For example, I need to buy 60 nails, how can I set a limit on the number? Thank you.

    There isn't a way to do that at the moment.  If you don't need your buyer for anything else you could put only enough money for 60.

     

    I will look into adding it to the mod.


  10. 56 minutes ago, Batta said:

    Is the Crafter something that players can set up, or only GMs?  If players can set them up, would it be possible to add a config so that GMs can choose to allow only admin?

    It works like the Buyer.  By default traders get contracts players can buy.  But if you change contracts_on_traders to false (and if you've already run the game with the mod update_traders to true) traders won't have them.  At which point GMs can just spawn them with their wand.


  11. Update

    Download

     

    Weight can now be adjusted on the Price List so that prices for items with flexible weight (e.g. butchered products) can be more easily set. Leave blank to reset to default.

    Accepts Damage option can now be set for each buy request, in which case damaged items can be accepted, using scaled QL for finding the correct entry.

    On 3/16/2019 at 1:11 PM, WittleBunnBun said:

    Just found another thing that is a bit odd. 

     

    I have a trader that is suppose to take huge shod clubs at 1ql, and they spawn at 45ql. I had a player try to sell his clubs, but the trader wouldn't take them cuz they are damaged, but a shod club can't be repaired via player. Even if it could be repaired, it would be well above 1ql. Is there a way to tell the trader to take the damaged item in these special cases ? 

     

    EDIT: this too can be easily worked around by telling people to bank their clubs, etc so they dont take damage, but they seem to take damage very quickly

    Done, and done.

    Sorry I took a little longer than I should have as I wanted to get the below ready for initial release.

     

    New Mod Beta Release

    Crafter

    Download

     

    A new type of NPC who accepts orders from players for items to be improved in return for money.

    Uses the same contract options as BuyerMerchant so they can be bought by players or restricted to GM placement.

     

    Placing an order

    To place an order just "Trade" with a Crafter.  As well as items that are ready to collect the top left window will contain options for you to use.  "Improve to XXql" selects how high you want the item(s) improved, there is a separate entry for each skill the Crafter can use so you can also select different qls for different item types.  "Mail when done" will add an extra fee and when the item is done it will be sent to you in the mail, otherwise it will need to be collected from the Crafter in person.  "Donate Items" allows you to donate items to the Crafter that they will then use to increase their skill.  Want to have a high ql sword at some point but your local Crafter is still new?  Donate a bunch of low ql weaponsmithing items now and reap the rewards later.

     

    Skills

    Crafter skill set is configurable, choose between specific skills or skill groups (all metal, all wood and all armour).

    Crafters gain skills as they work and can accept items as a donation to increase their skill.

    Crafter learning can be disabled or capped.  For example, if you wish for Crafters to only improve to a QL limit, leaving higher quality to player crafting.

    Initial Crafter skill level can also be set.

    A per Crafter skill cap (under the server cap) can also be set by the owner when hiring.

     

    Equipment

    Assign a forge to your Crafter if they need to improve metal items.  This locks the forge from other players to prevent any kind of mix-up.  The Crafter will walk a small distance to reach it.

    Just activate the contract and right-click on a forge and choose assign.  Once assigned you can also unassign the same way.

    The Crafter will create their own tools and resources.  I may add it so that players and/or the owner have to keep the Crafter in stock, but if so it will be an option.

    Offers "Mail when done" option (with configurable price).

     

    Money

    There are three server-wide options for what Crafters do with their earnings.

    for_owner (Default) - 10% to tax, the rest for the owner to collect (same as merchants).

    all_tax - All money goes to the King's coffers.  Particularly useful for GM controlled Crafters.

    tax_and_upkeep - A percentage of the money goes into the owners deed upkeep, percentage is configurable (same as traders).  A good option for if you don't want players to get money directly, but to have some benefit of hosting a Crafter.

    Crafters will hold onto money until the job is completed, if the Crafter is dismissed then the money will be refunded to the customers.

     

    Pricing

    Prices work on a scale, based on some research in the Trade forums.  Roughly speaking 70ql=10c, 80ql=30c, 90ql=90c, 91ql=1s.

    There is a base_price modifier (default 1.0), plus skill specific modifiers (default 1.0, except "dragon armour" which is 10.0), if you wish to increase or reduce the prices.

    Each Crafter has a "Price Modifier" option that can be set by the owner at any time, like merchants.

     

    Other info

    Crafters use the base human model that official NPCs do, so GMs can provide them with items to wear. (e.g. kingdom colours, coloured tunics, etc.)

    Currently Crafters ignore stamina, due to the way creature stamina works vs. players.

    Typing /crafters into chat will open up a "Crafters" tab where any Crafters that are working on items for you will let you know how many are being worked on and how many are ready for collection.  Owners can see total Crafter jobs using the contract.

    Output can be adjusted to help with testing and general logging.  The default is "save", in which case all messages sent from the server to the Crafter, plus some custom messages indicating what the Crafter is currently doing, will be saved to a file in the server directory.  "print", as well as saving, logs that output to normal server output.  Finally, set "none" to ignore all Crafter work logging.  Trading logs, like merchants and traders, are unaffected.

     

    Screenshots

    Spoiler

    hire.jpg?raw=1management.jpg?raw=1trade.jpg?raw=1assign.jpg?raw=1

     

    Still some more features I would like to add but thought I'd get this version out for feedback.


  12. 5 hours ago, WittleBunnBun said:

    Just found something - could we be able to manually put the weight amount in? For example, a goblin skull's default weight is 1kg for the buyer, but all my players butcher them at 3kg. Meat is also put in for .3kg, but raw butchered meat can weight much more than that. 

     

    So, I set a default price and I am over paying players for 1 item, so it would be amazing to be able to dictate the weight as well as everything else. I tried to look in the wiki and their kg is not accurate either, nor are the GM spawned weights of items. I've found meat, fur, pelt, skulls (pretty much a lot of the butchered objects) to have the wrong raw kg amount. 

     

     

    Sure thing, shouldn't be too difficult.  The price scales with the weight of an item, so for the moment you could just set the price differently and it should charge the appropriate cost.  The default weights come from the ItemTemplates, but obviously some items differ when it comes to what the end product weighs.

     

    As a side note, I've checked out the 1.9 beta and my current mods all seem to be compatible as is.  Which is nice.


  13. On 2/23/2019 at 7:01 PM, joedobo said:

    1. I'd like to run object clean up code to handle edge cases. Every 6 hours or so I want to check that the GhostTower objects have a matching Wurm item object and if that is lacking remove the tower. I can inject the needed code into say Item.poll() but I don't understand the polling frequency. And I need this to make a proper RNG roll that success about every 6 hours.

    I've not used it myself yet, but modlauncher has a ServerPollListener interface.  Not sure how often it gets called though.

    On 2/23/2019 at 7:01 PM, joedobo said:

    3. Where do others put creature template creation? I put mine in onServerStarted() but that seem too late.

    I just follow ago's creature demo and put it in init and it seems to work fine.  I imagine there might be errors with creatures being loaded from the database during server load and not finding the template?  This might not have happened with yours as they are created on demand rather than "living" on the server.

    On 2/23/2019 at 7:01 PM, joedobo said:
    • Any other ideas?

    The one thought I had is you could also check if they are on a village tile, unless the asker has some appropriate village permissions.


  14. Mini Update

    Download

     

    Changed GM Destroy action so that it destroys items that have fallen out of a contract.
    Added a server command (#dcCleanup) to check for the above and remove across the whole server.  Limited to once per minute because it could cause lag with a lot of items on the server.

    Added two options to .properties, default for both is false.

    no_decay_in_contract

    If true items inside a contract will not be subject to decay.

    no_decay_food

    If true food inside a contract will not be subject to decay. Overridden by no_decay_in_contract.

    Fixed bug with items in containers in contracts.


  15. Fix

    Delivery Contracts download

     

    Fixed issue with packed items not being cleaned up properly.

     

    Mini Update

    Buyer Merchant download

     

    Changed Copy Price List to two actions, for copying in each direction, to help clarify things.

    18 hours ago, Eject said:

    It seems all is working now but i have a little problem ^^

     

    i destroyed my delivery contract and have now the rest of 83 clay bricks in my inventory that i cant destroy or move out in a container

     

    [07:10:10] You cannot reach that now. It is in the mail.

     

    edit: idea, i tried to buy a new contract (it looks like an empty container with the square) and move the bricks down in the contract, sad it doesnt work

    i hope with that i can just make a "deliver here" and can fix that by myself ^^

     

    So in the modsupport database i also dont find the entrys for the filled contracts or items they losing the contract (because deleting it) lol

    Have you an idea how i get rid of this brick holograms? ^^

     

    second edit: restarting the server also dont fix the "ghost items"

    maybe a new command or menu entry in the gm-wand to delete ghost items serverwide would be awesome

    just for the reason if contracts disapearing at any player, so gm´s could help

     

    18 hours ago, Eject said:

    I was able to delete the ghost-items with the #loadItem command ^^ but item per item lol

    still 17 ghost bricks on the ground, i dont know how i can delete them

    Sorry about that, it originally cleaned things up better but then I changed over to keeping the contract around until all items were gone.  I forgot all about destroying with a wand and possibly some other ways.  I have added it back in and now it works properly.

     

    I've run out of time tonight for the clean up command, but will get it done tomorrow.  If it is a problem in the mean time and you're okay with using SqliteBrowser open up the wurmitems.db, got to the ITEMS table and filter the TEMPLATEID column by 769, MAILED by 1 and MAILTIMES by 0.  That should show up the ghost items.

    17 hours ago, Eject said:

    Copy pricelist does not work

     

    i activated the contract from the buyer with a big list of prices, rightclick the new empty buyer and say copy pricelist

    if i than manage this new buyer and go to manage pricelist, the list is empty

     

    Eject

    It's the other way around.  Although I think your way is probably going to be more common, so I've changed it to two options. "To Contract Buyer" will copy the list from the buyer you right click on to the one who is controlled by the contract.  "To This Buyer" will copy the list from the contract buyer to the one you right click on.

     

    Hopefully that will clear things up.  Let me know if there's anything else I can do to make it more obvious.

     

    Thank you very much for being my guinea pig.  ^_^


  16. Mini Update - Delivery Contracts

    Download

     

    Added Multi-Pack™.  You can now "Pack up" multiple times with the same contract, overcoming the maximum items per pile limit.

    Added new option to .properties
    max_items

    Higher numbers may cause performance issues when trading with Buyers with price and minimum purchase calculations.  Default 1000.  Higher should be okay, just something to be aware of.

    15 hours ago, Eject said:

    add: i droped 100 bricks in front of me, activated the contract and rightclicked the pile

    [07:21:22] It would not be possible to unpack that many items at the destination.

    Sorry, don't know why I left that in.  That'll teach me to try rushing out an update in the evening.

     

    What happened was when I was first working things out I hit an issue with the maximum items per tile limit.  I tried to get it working without making it possible for contracts to hold onto any un-dropped items, but ended up having to do it in the end.  I already planned to add multi-pack at this point this but needed some more time so released as it was.  I could have at least taken out the 99 item drop limit, but oh well, it's all done now.


  17. Update

    Buyer Merchant download

    Delivery Contracts download

     

    Made contracts compatible with buyers.  If all of the items in the delivery note meet the requirements then they can now be accepted by buyers.  Both mods need to be updated for it to work.

     

    Also, as I was going through I noticed a possible exploit.  Minimum purchase items could be accepted even if they were underweight, which I assume is not the expected behaviour (you want 100 rock shards not 100 0.01kg rock shards).  So I have now changed it so that any items that are not full weight are not accepted to fulfil a minimum purchase.  Normal buying will still correctly scale the price based on the weight.

    On 1/31/2019 at 2:06 PM, McKenna said:

    Thank you for making the contracts... most appreciated!

    You're quite welcome.


  18. 1 hour ago, joedobo said:

    #1) The onPlayerMessage() modloader hook so I can trigger events when players ask for help is loading WU bases classes too early and causing an error:

     

    java.lang.RuntimeException: com.wurmonline.server.players.Player class is frozen

     

    There is a bunch of these too:

    [07:25:23 AM] WARNING org.gotti.wurmunlimited.modloader.EarlyLoadingChecker: Mod GhostTowerGuardMod loaded server class com.wurmonline.server.creatures.Creature during phase load

     

    When I remove the PlayerMessageListener interface and its required methods the error goes away.

    I haven't quite gotten my head around load order myself yet, so someone may have a better answer.  But I just gave it a quick try and if you move the onPlayerMessage code out of your mod class and into another and just call that from the onPlayerMessage method it doesn't cause the same error.

     

    There is probably a better way, but it should get things done as a workaround.  Not tested it fully of course.

    1 hour ago, joedobo said:

    #2) Also, I"m not sure if creature AI can be setup to destroy itself if its target no longer exists. I want to create a ghost, have it target and attack the mob. Once the target is dead have the ghost disappear and delete itself. I'm not asking you to do this. I just want to know how difficult it is before I start digging into it. I've never done anything with creature AI.

    Only just learning about it myself, but I've thought of two ideas.  One, create your own extension to the CreatureAI class, then in the pollCreature method returning true signals that the Creature should die.  The big drawback to this one is that you'd need to implement the combat stuff yourself.  The easier way would be to hook on setOpponent and check if it receives null, then just call the die method.


  19. 15 hours ago, Batta said:

    What does this cost?

    Default is 1c.  The price is configurable in the .properties file.  I don't think I ever used the mail system when playing Wurm Online and have been out of touch with delivery price changes so the default may be way out.  Figured server admins may want to set different prices anyway.

    8 hours ago, Eject said:

    @MthecSorry i missunderstood the concept ( i havent read the posts above)

    I thought with this players can bring and sell big amounts of stuff to my buyer ;) Some told me its not always easy to bring 1000 of bricks to my buyer (they like to use portals)

     

    Eject

    No worries, that's actually a good idea I hadn't thought of.  I will have a chat with the guy who made the buyer mod and work something out.


  20. 7 hours ago, Eject said:

    Can i pack items on server 1 and sell them at the buyer at server 2?

    Yes, if by buyer you mean merchant.  I haven't actually tested sending items across server, but I just checked the one thing that might have complicated things and it wasn't an issue.

     

    The items are just stored inside the contract, so it should transfer just like any container.

    7 hours ago, Eject said:

    For the packed items you get a paper or how would this work?

    Sorry, should have been more clear.

    So you buy a "delivery contract" off a trader, then when you pack the items it renames the contract to "delivery note", and also sets the description based on the contents.  You then set the price and put the "delivery note" on your merchant to sell.  Then the player who buys it takes it to the place they want it delivered and it disappears once all the items have been dropped.  If there are any complications in delivering some of the items (e.g. too many items already on the tile) the note stays and you can re-deliver the rest later.

     

    One other thing I forgot to mention, unfortunately you can't select a range of items in your inventory, this ability is controlled by the client.  So if you select one item in a group (i.e. where there is one entry for all the iron lumps and you click the + to see them all) it will also pack all of the others in that group.


  21. New Mod Beta Release

    Delivery Contracts

    Download

     

    Purchase one of these from your local trader. Activate and right click on an item or pile and select Pack up. The spirits will then take the items and hold them for later delivery. You can now sell this item on a merchant no matter the weight.

    For the buyer, all they have to do is activate and right click on either their villages token or a nearby waystone and select Deliver Here and the spirits will deliver the items in front of them.

    For use with heavy piles and items (e.g. piles of bricks, logs, high ql dirt, forges/ovens, etc.)

     

    Note - You cannot highlight a range of items and only pack those.  If you pack one item in a group it packs all the others of that type in the container/inventory.

     

    There were a lot of permissions and restrictions involved, so if I missed any just let me know and I'll add them to the list.

     

    On 1/6/2019 at 6:51 AM, McKenna said:

    Any thoughts about a merchant contract that allows you to sell bulk items? like you buy a contract add 1-100 items, (title reflects name of item and amount on the contract) that players can put on there personal merchants and set the price they wish to sell it for?

    Sorry it took longer than I originally thought.  So many little loose ends to clear up.  Think this fits your requirements.

    @McKenna