Mthec

Members
  • Content Count

    179
  • Joined

  • Last visited

Posts posted by Mthec


  1. 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:

    @Override
    public int getTraderBuyPriceForItem(Item item) {
        PriceList.Entry entry = priceList.getEntryFor(item);
        if (entry == null)
            super.getTraderBuyPriceForItem(item);
        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.


  2. BuyerMerchant fix

    Download

     

    Fixed apply_max_to_merchants was not being applied when destroy_bought_items was also true.

     

    53 minutes ago, Batta said:

    In the server.log, I see this, so I know it's loading.  But no sign of "Buyer and merchant max items"

    I think I may have found the issue, do you also have destroy_bought_items set to true?  If so, then the above fix should sort things out.

     

    Otherwise, sorry, I was looking at the output rather than the server.log.

     

    In my server.log I get:

    [03:42:45 PM] INFO com.wurmonline.server.steam.SteamHandler: Starting the server
    ***
    [03:42:47 PM] INFO com.wurmonline.server.steam.SteamHandler: Server connected to steam

    With the *** being any number of lines depending on how many mods you have that put messages here.  Although I think the "Server connected to steam" line can vary in timing, so it may appear in the middle.

    In there, you should find a line like:

    [03:42:46 PM] INFO mod.wurmunlimited.buyermerchant.BuyerMerchant: Buyer and merchant max items set to 200

     

     

     


  3. 15 hours ago, Batta said:

    I felt sure that this used to apply to our regular personal merchants, but now they will take only 100 items again.  Am I remembering incorrectly?  Or perhaps when we were disabling mods, we accidentally disabled something required thing to make this work?  

    That is how it should work.

     

    In the logs, just after the server is up and running (between "Starting the server" and "Wurm Server launcher finished at..."), you should get a line saying "Buyer and merchant max items set to <your max setting>".

     

    The only limitations are:

    1. Players can only carry 100 items (GMs are not limited), so they can't receive in trade more than 100 minus the number of currently carried items.
    2. You can only drag 100 items between windows at a time.  Since items don't leave your inventory until the trade is complete, you will need to select the lower items separately when dragging.  i.e. You can't just drag across a stack as it will only drag the first 100 items.

    Anything else, just let me know what message you are getting and I'll take another look.


  4. Crafter update/fix

    Download

     

    Metal lumps of special types were becoming bugged when they were low weight.
    Missed Hire question in previous fix.
    Added remove_donations_at option to .properties.  Set to a whole number (positive, zero or negative) to have crafters destroy donation items when the item reaches the ql plus the value relative to their current skill (Default disabled).

     

    For example, at a value of 10, items will be destroyed when their ql reaches 10 or more ql above the crafters skill for that item.

    e.g. With 30 skill in Blacksmithing, a shovel will be destroy when the ql is greater than:

    • 10 - 40ql
    • -10 - 20ql
    • 0 - 30ql
    On 1/4/2020 at 1:14 AM, zeafaw said:

    Hello, so im using the crafter mod, and another mod that drops tools of different materials, and when the crafter is about to improve a supreme bronze pickaxe, it gets stuck, using a gm to look in its inv i can see that the bronze lump is bugged, and stuck on refreshing when right clicked, is this something i can fix myself or is this an actual mod bug? (it creates a 0.10kg bronze lump, everytime, and same thing happens everytime, i've tried to remove the crafter and replace it, and restarted the server and nothing works)

    Fixed.  This was caused by special metal lumps having a low default weight, so that larger items consume the entire lump.  I was so certain I'd sorted that out, but it must have been for something else.  Shouldn't require any extra work on your part.

     

    On 1/5/2020 at 2:26 PM, Metallumere said:

    Downloaded the crafter update today. Seems there's still the issue with setting can_learn=false and trying to hire: "Skill cap value was invalid."

    Whoops, I missed the Hire question in the previous update.

     

    On 1/5/2020 at 2:26 PM, Metallumere said:

    I briefly fiddled with the new item donation system. It definitely feels much better, though i'm still not all too sure about an NPC potentially being left to skill up indefinitely. I don't think i'll set them to be able to learn unless they eventually trash donated items, or something like that. I'm sure that's just me though, maybe it's not as worrying as i expect.

    I've added a new option that should help with this.


  5. Crafter update/fix

    Download

     

    Added a new window only accessible to GM (specifically power 2+) characters that allows setting the skills of Crafters directly.
    Donations should now be improved in the proper order.
    Some miscellaneous changes.

     

    On 12/30/2019 at 4:43 AM, Metallumere said:

    There seems to be a problem with crafters and setting can_learn to false.
    If i set or comment out starting_skill or max_skill in any combination it seems to result in the same thing; the crafter cannot have its skill cap set in the hire window, and it always results in saying "skill cap value was invalid" when trying to press send.

    This is more of a difference between how I started the mod (for players) and how it's developed with feedback (also GM controlled). 

     

    So what I have done is, firstly, made it so that GM characters can always set the Skill Cap of their controlled Crafters (subject to starting_skill and max_skill in .properties, commenting them out sets them to defaults (20 and 99.99999)).  I've also added a second screen, that will not be available to normal players, called "Set Skill Levels", which lets GMs set the skill levels directly.  e.g. You could set Blacksmithing to 50 and Jewellery to 30, when using can_learn=false, and customers will only be able to select improvement for items up to that level.

     

    The message was a bug.

    On 12/30/2019 at 4:43 AM, Metallumere said:

    And, i guess just as a feedback thing: I like that crafters can improve their skills over time, i'm not very happy with the idea that they'll always be there endlessly improving the same item indefinitely. I figured the system was supposed to make use of many items donated, but it seems they are content to keep the same singular donated item and improve it indefinitely rather than toss it out when they're done with it and move on to the next donation. At least, i assume this is intentional behavior? If not, then this is another issue report: Crafters endlessly improve one donated item.

    This one sort of comes down to laziness on my part.  When setting up donation items I didn't want to accidentally throw an item away just because it had reached its cap for the time being.

     

    I've changed it now so that it will always work in order of lowest to highest ql.

     

    Sorry about that.

    On 12/29/2019 at 7:15 PM, Xentakinor said:

    Id like a seller merchant that can have endless stock, like a brick merchant that doesn't need to be restocked by a GM

     

    On 12/30/2019 at 4:43 AM, Metallumere said:

    I also quite like the above suggestion of an endless stock of select items on merchants! My plan was to just use deliverycontracts of brick packages to sell on merchants, essentially forcing bulk purchases of an otherwise seemingly infinite stock, so it'd be nice to have an actually infinite stock.
     

    I haven't had much time for modding lately, but this is a suggestion I was given a long time ago (and felt I didn't know enough at the time) and has also been recently requested.  So I've started working on it now.

     

    It shouldn't be too difficult, but due to time constraints it might be a while before it's ready.  It also depends how many more bugs people find in my current mods...

     

    Apologies for taking a year to reply. 

     


  6. Crafter fix

    Download

     

    Hopefully fixed the issue with items being mailed repeatedly or being available for pick-up after having being retrieved the item from the mail.
    Fixed several other bits and pieces I discovered along the way.
    Also, I have changed the way money is handed out to Crafters. Before the value on the Management screen would be inaccurate, now money is only given out on completed orders.

     

    Note: Some money may be lost on pre-update orders. Sorry about that.

     

    Apologies for the late reply, thought it would be dealt with sooner so I left off posting.

     

    On 12/19/2019 at 2:20 AM, Kingtren said:

    Having an issue with players receiving an item multiple times. They will receive it via mail, Then it will take it from the inventory and mail it again. Not sure what might be causing this just started recently.

     

    On 12/19/2019 at 3:44 AM, WesncIsMe said:

    Having this issue aswell. 

    I couldn't reproduce the multiple mail issue, however I have experienced it in the past (and thought it was fixed).  But I did find another issue that was causing similar problems and have re-jiggled the system in a way that should fix all problems of that type.

     

    Let me know if things still aren't right on your end.

    On 12/19/2019 at 5:31 AM, Metallumere said:

    I had updated to the latest versions of buyer, crafter, and deliverycontracts today. I seem to be unable to drop or place items at all with deliverycontracts enabled, reverting back to the older version(0.5.6) does not have this issue.
    I disabled all other mods except buyermerchant, crafter, and deliverycontracts, and was still unable to drop anything. I don't see any errors in the server log from it either, and aside from playing the animation of dropping/placing an item, nothing actually happens in-game, no messages from dropping or anything giving reason why it didn't work. I was still able to plant items like ovens from my inventory, if that's useful info at all.

    Aside from this very minor issue, I've quite enjoyed these mods. Thank you very much for them~

    DeliveryContracts fix

    Download

     

    Fixed issue with dropping items.

    No idea why it was released that way, just my own stupidity.

     

    Just to let you know, I haven't missed this and will working on it next.

    Well that was easier than I thought it would be.

     

    Thank you for the kind words.


  7. Crafter update

    Download

     

    Added crafter_skill_gain_rate to .properties (default disabled).
    This overrides the server wide skill gain for Crafters if applied.  Set 1 or comment out to use server skill gain value.
    Also removed the beta tag since everything seems to be going okay.

    14 hours ago, WesncIsMe said:

    Seperate settable skillrate for crafters would be really cool but if you adding that I suppose it would have to act like overall override. 

     

    I'm also curious as to where it's set in the file? We use a custom skill ramping system and I would love to apply this to the crafter

    I've added the option, let me know if it doesn't quite work right for you.

     

    The skill gain rate for Crafters isn't really set anywhere, it just uses the built-in skill system.  Depending on how your system is applied I would have thought it would still work for Crafters.  The one possibility I can think of is if your system applies to Players, as Crafters are technically Creatures, so some of the Player specific skill stuff (e.g. stamina affecting amount gained) does not apply.


  8. Crafter and MerchantCap fix

    Crafter Download

    MerchantCap Download

     

    Fixed issue with one of my libraries being updated before the recent Crafter update.

    These should be the only mods that are affected, however you don't need to update MerchantCap unless you also want to use Crafter.

    11 hours ago, tyrfang said:

    so after creating a new crafter i got this https://ibb.co/tCYVX53

    even if i mark those skills with the numbers it says he needs to have 1 skill selected to not sure if it broke somehow

    Sorry about that.  I updated one of my libraries a while back, but since I have all of my mods installed it hid the problem on my end.  All should be good now.

     

     


  9. 2 hours ago, Batta said:

    @Mthec I seem to have found another little glitch, with this setting.  Is it supposed to mean that if players found a tiny deed, they will still be charged at least 1 silver upkeep?  That was my intention, but we're getting players being charged just a few coppers per month.

    That's what it is supposed to do.  It seems to be working fine on my end so I am not sure what the problem is.

     

    When the deed owners check their upkeep does it show the correct cost per month, or is that wrong too?


  10. Fix

    Download

     

    Fixed use_per_server_settings option.

    15 hours ago, Batta said:

    @Mthec There appears to be a problem.  I had to delete the upkeepcosts folder from the server folder, or else setting "use_per_server_settings=false" didn't work, and it still used the settings from the server mods folder.  As soon as I started the server it created a new upkeepcosts folder in the server mods folder, with the same settings as I have in the main mods folder.

     

    I then tested by changing the settings in the server mods folder only, still keeping "use_per_server_settings=false" in the main mods folder, but it used the server mod instead of the main mod.

    So sorry@Batta, I must have broke it when I was cleaning things up.

     

    Thank you for your continued feedback.


  11. Update

    Download

     

    Added use_per_server_settings to the .properties file.  If true it will use a .properties file in the individual server folders, if false it will only use the main mod file.  Default is true, to keep it in-line with previous behaviour.  Changing the value will not delete the old per server files, so you can switch back and forth at will.

     

    Also took the time to refresh the mod a little.  It was one of my first and I've learnt a lot since then.  May have found (and fixed) a bug with disband warnings along the way.


  12. On 9/23/2019 at 1:33 AM, evilkilem said:

    Trying to add the Crafter to our server... get this error on start up, spams it every few secs.

    Haven't placed one yet.

    *snip*

    Hmm, strange that you would be getting that error without having placed a crafter.  What it is saying is that it has found a creature that it thinks is a Crafter, but can't find it's workbook.

     

    Further up in the logs, during server load, there should be a line that says "No workbook found on creature (<creature-id>)".  If you don't mind, could you use a GM character to find out what creature it is?  In-game you can use the GM wand, right click on an item and select Creatures>GM interface, scroll down to GM Tool and type the id in, then click send.  You could also look in the creatures database if you know how to do it.

     

    If you're not comfortable doing that, I can look in to writing up a workaround.

     

    Some quick possibilities off the top of my head, it is a Crafter (in which case deleting the creature is the easiest solution), some kind of problem with the mod id database (maybe a removed mod), some other mod conflict involving creatures, or I've missed something.


  13. 3 hours ago, Batta said:

    I notice that the format of the in-server version is quite different than the main version.  It might help with copying if they could be the same format, so we could just copy and paste.  Is that doable?

    The reason the order is all jumbled is because the file was generated by the mod, and the only way I found to make it preserve order seemed a bit involved at the time.  But it doesn't actually matter which order the entries are in, so you can copy and paste as you like.

     

    The only important bit is the "classname" and "classpath", they must be in the main .properties file for ago's modlauncher to find the mod.  It wouldn't matter if they were copied into the per server file though, they would be ignored.


  14. 10 hours ago, Batta said:

    *snip*

     

    EDIT:  OH.  I didn't realize there is an auto-generated folder inside the server mods folder!  And yes, the figures there were off in exactly the ways that were causing me problems.  Are they supposed to automatically follow what we put in the other properties file (in the main mods folder)?  Or are we meant to manually do it.  Anyway, this fixes the issue for me.  🙂

    Yeah, the original intention behind it was if people wanted different prices per server.  I also did it back when mods were still somewhat new and didn't know if server specific options would be a thing.  They do need copying manually, although I will probably add an option to the main .properties file that will allow automatic overriding for single server setups, as it's not typical behaviour and can be easily forgotten when changing values at a later date.

     

    Anyway, glad it's resolved for you.


  15. Hmm, that doesn't look right at all @Batta.  Some of the other values are off according to the message.  That looks like the main .properties, does the per server file have the same values (WurmServerLauncher/<server-name>/mods/upkeepcosts/upkeepcosts.properties)?

     

    Also, to help narrow it down, at what stage does this happen, founding, resizing/expanding, just hiring extra guards or all of the above?


  16. DeliveryContracts update

    Download

     

    Delivery contracts can now be sent in the mail.

    On 6/30/2019 at 12:15 PM, Eject said:

    Can you make the delivery contracts so that i can pack up items in it and sell it via mail?

    Just tested it but i cant drag and drop the delivery contract into the mailbox

    Haven't tested mailing across servers as I don't have that setup, but everything else seems okay.  Let me know if there are any issues.

     

    MerchantCap update

    Download

     

    Added clear_history option.  Default is off, options are daily, weekly, monthly, yearly.  All times are in Wurm time.

     

    After the specified time has elapsed, all player spending history will be erased.  Caps will not be affected.

    4 hours ago, CountZero said:

     

    a timer (daily/weekly) would be great :D its to stop people over-using the buyer

     

    cheers

    Differentiating between real time and Wurm time was a bit tricky, so I opted for the latter.  I figure that's more "realistic" and hopefully still does what you want.  Let me know if it is a problem.


  17. New Mod Release - MerchantCap

    Download

     

    Set a per player trade cap for merchants.  If a player makes any trade with a capped merchant it will add to their player spending history and if any trade would go over that amount it will prevent the trade from completing.

     

    Using a GM character and wand, right-click on the merchant and there will be a "Cap Trade" option, with "Set Cap" as a sub-option.  This will bring up a window where you can set, and later remove, the cap.  After a cap has been set there will be a second sub-option, "Clear History", if you wish to remove all player transactions with this particular merchant.  Otherwise the history will remain, so you can toggle the cap on and off without losing history.

     

    Can be used without BuyerMerchant on normal merchants, or with BuyerMerchant to also work on buyers.

     

    Unlike most of my mods, this does use a database.  It is called "merchantcap.db" and can be found with all the other databases in <ServerName>/sqlite.

    On 6/20/2019 at 11:50 AM, CountZero said:

    Would it be possible to add a sell limit per player to the buyer npc? So an individual player can only receive a set amount of money in a given week? I know someone could just make additional accounts but it would still help a little.

     

    I want to use some of these in my newb starter area to buy basic mats like planks or bricks so new players can earn a bit of money to buy and imp basic stuff from other npcs (it will also add to the RP feel having an npc blacksmith in his forge looking to buy metal etc) but I'm afraid someone will just abuse it to make loads of money.

    Hopefully this should do what you want.


  18. On 6/30/2019 at 12:15 PM, Eject said:

    Can you make the delivery contracts so that i can pack up items in it and sell it via mail?

    Just tested it but i cant drag and drop the delivery contract into the mailbox

    Sure thing.  The contracts are marked "noDrop" to prevent them from being used for storage, so I just need to find a way to work round it.  Already started, but not done yet.


  19. Update and fix

    Download

     

    Fix for "Manage guards" when not using upkeep.  Select the new checkbox at the bottom to take money from your bank instead (if there is enough money).
    Added free_guards option (default 0), deeds will be able to hire the specified number of guards without initial cost or added upkeep. Any further guards will cost as normal.
    Updated some mechanics I missed from the last WU update.
    Added epic_upkeep_scaling option (default true), epic guards now hire on a scaling upkeep system (initial hiring costs are unaffected) which I missed before. Now you can choose between the scaling option or "standard" on epic servers.

     

    Don't forget to check your settings on the per server .properties file.

    On 6/25/2019 at 5:46 PM, Darkness1990 said:

    @MthecMod has been working great the exploit is fixed! I still have one small problem with the guards, I would like players making a new deed to get 2 free guards, but pay for more guards. Also they cant add guards using "manage guards" when making a deed with upkeep off because we get message "There was not enough upkeep to increase the number of guards. Please make sure that there is at least one month of upkeep left after you hire the guards." only way to buy new guards is to use resize deed because it takes the money from the bank instead of upkeep but with new players they can't buy any guards during the making of a new deed because they have no money in the bank..

     

    basically: I just want players to get 2 free guards during creation of new deed and to "buy" new guards with managed guards while upkeep is turned off.

    Hopefully this will sort things out for you.


  20. On 6/25/2019 at 4:56 PM, Tokeiito said:

    Some how, my pottery crafter got bugged out. What i did is, i have donated ~10 planters to improve skill. Then i gave large amphora to imp it. Logged out. After coming back, i receive email wtih bunch of clay jar with money, 7 out of 10 (i beleave) planters and amphora.I take everything out. 

    One of clay jars had coins i was not able to do anything with.

    I gave same amphora for improvement. Logged out. After login back, that amphora appeared in inventory window, but not within inventory and i can not interact with it. I always get message that It is in mail right now, but upon checking mail it states that it is empty. So i have ended up with amphora in inventory, i can not do anything with.

    Sorry I didn't reply till now, I was working on another task.

     

    I've had a quick look and test myself, but can't reproduce what happened to you.  I will keep trying though.  In the mean time, assuming you've not turned off logging could you post the contents of the one for the crafter?  It might help narrow things down.  The file should be in the WurmServerLauncher folder, and it should be named crafter_<name>_<id>.log.

     

    As for the stuck amphora, not sure what caused it but have you restarted the server since?  That usually clears up bugged inventory.  If that doesn't work let me know and I'll think of another solution.  If you're happy modifying the database, then just find the item and set the MAILED column to 0, although I completely understand if you're not happy to do that.


  21. Crafter fix

    Download

     

    Fix for issues with large anvils.

    Added optional (default disabled)  "/crafters collect" chat command for collecting mailed items when there are no mailboxes.  Uncomment (or add) mail_command=true in the .properties file.

    On 6/22/2019 at 11:46 AM, CountZero said:

    yea, im getting a message everytime i log on so ill just get my GM char to create a mailbox for now

     

    EDIT

     

    he doesnt seem to want to imp large anvils at all :P he just mails them back in the same state.

    That's one sorted, hopefully.  Turns out the issue was water.  When restocking crafting items the crafter used to use the default weight for water, most items never used it all, unfortunately large anvils did.  I've bumped it up so it won't be a problem anymore.

     

    You also got me thinking about servers without mailboxes.  So I added a command to allow people to collect mail items from crafters without a mailbox.  Unfortunately it won't apply to old items, as I didn't want to add a command that might bypass other server features.