Sign in to follow this  
tmarchuk

[RELEASED] StableMaster Mod (Server) - v0.5 (May 20)

Recommended Posts

7 minutes ago, Chansbi said:

When I thought the modders were out of ideas...  Then here comes this amazing mod. <33

 

Thank you. Thank Razor for the idea. :)

  • Like 1

Share this post


Link to post
Share on other sites

First of all, I don't think a lot of it has to do with modders being out of ideas, I personally have tons, and I bet others do too. However I feel many of them are in the same boat I am, I want to see the official mod support release before I dive into many of the mods I want to do, as I don't want to have to completely do the work twice.

 

Second, just a note tmarchuk, easy to fix for myself, but for people just using mods that do not know how to adjust the mods, selling the tokens on merchants does not work due to the no_drop flag, can't give it to a merchant to sell.

Share this post


Link to post
Share on other sites

On my server i cant put tokens to cart\boat
in properties file, 

enableSmallBoatsLoad=true
 

so..it should be..but not working.

Share this post


Link to post
Share on other sites

Sorry I've been sick and still am. I'll look into these things in the next week or so. 

 

Trading=> Hmm. I thought it was just No_Trade that needed to be removed. It worked in my testing but I might have accidentally used a GM character to test (my bad). If it requires removing No_Drop I'll probably just put No_Trade back and retract the claim that it works. No_drop adds in a ton of edge cases I don't have time to check. 

 

Small boats=> This won't work on carts as per Razor's request but it should work on small boats if enabled. Can you check your server.log file to make sure it says small boats are enabled in there? Also, what boat did you test against? I've only tried rowboat for small a so it's possible there's a problem with sailboats. 

 

Thanks,

-Tyson

Share this post


Link to post
Share on other sites

I was using a GM character, power level 5 when trying to put some on a merchant. No drop can not be passed to a npc or player with the "give" command. You have to actually open a trade window with them to make a trade. That does not work with a NPC..

 

I think the problem with your loading boats is confusion, Masaykh did you try activating the token, then right clicking the boat and selecting load?

  • Like 1

Share this post


Link to post
Share on other sites

After players transfered to other server, their tokens become azbantium pickaxes \ dredges.... strange thing

no errors in logs

Share this post


Link to post
Share on other sites

Sounds like the item template is not set to be the same on both servers. The template it has on the one server is what you are using for azbantium pickaxes \ dredges on the other server. Try setting it to use the defined template ID in the properties file on all servers, pretty sure it is false by default, change it to true.

 

It is strange for this to happen though, the mods should load in the same order and therefore the modloader should assign the same template ID's, however if your servers are not running exactly the same mods and possibly if the mods have different settings it could cause a fluke like this I suppose.

 

Changing it to use the defined ID should fix you up though.

Share this post


Link to post
Share on other sites

this mod is awesome, we test it today and feel happy

it would be good if you can send the tokens via the mailbox

Share this post


Link to post
Share on other sites

with the tokens in the inv. i cant drive with the rowboat to the other server

[12:04:20] The currents work against you and you get nowhere.

 

if i transfer to another server i lost the token

 

i cant load the tokens to a boat/ship

 

but it seems the mod works correctly on each single map

Share this post


Link to post
Share on other sites

Any chance of altering the mod slightly to allow players to convert their own animals to tickets without a NPC to do it for them? Maybe as an alternative version of it rather than an additional feature of this one.

 

This would help in transporting animals from place to place without having to find the stablemaster NPC every time to convert them back and forth.

Edited by Tryst

Share this post


Link to post
Share on other sites

Very nice mod! I am yet to try it yet unfortunately but the server im playing has it installed so hopefully i will get to use it soon!

Just a idea is there scope to do a similar thing for Boats? Such as a 'Harbour Master' That allows sale of boats maybe not making them disappear and reappear but more like selling Ownership?

Share this post


Link to post
Share on other sites

Could we get an option on this for a configurable timer to place down horses. Make it have a chance to be interrupted like spells when your hit in combat

Share this post


Link to post
Share on other sites
On 1/4/2017 at 10:01 AM, Elsa said:

Anyway to set the price for them? 

 

To set a price for the cost of exchanging your animal into a token, you can edit the stablemasters.properties file in the mods folder.

To set a price to sell an animal token at your merchant, you can right-click the token and choose Prices, Set Price.

Share this post


Link to post
Share on other sites

There isn't a set price option on tokens as far as i can see. I think the ITEM_TYPE_FULLPRICE flag is preventing it from showing up?

Share this post


Link to post
Share on other sites

This mod just caused a major mess on my servers... Going back through logs and reports from players what i think happened is:

  • A player traveled between servers with a pregnant horse in their inventory.
  • The horse gave birth, while still in token form - the foal got dumped at 0,0 on the login server (even though the player was going between 2 other servers).
  • The horse died from hunger or something while still in token form after giving birth
  • The token became un-reclaimable (because the creature didn't exist anymore)
  • The player then tried to go back to the previous server with that token, which caused an exception in the server transfer code
  • The player in question was completely deleted from the login server database (but was still in the game server database, so i managed to recover that)
  • The server tried re-running the failed transfer command infinitely, blocking all other RMI stuff from working (so no other players could travel to that server)
  • This also generated ~2GB of error logs by the time i woke up and noticed something is wrong
  • Since i have the server running in a docker container, and the console was redirected to docker logging system, that huge amount of logs also somehow broke docker daemon making it unresponsive

 

Here's the error that was happening in the transfer:

 

Spoiler

[04:48:42 AM] INFO com.wurmonline.server.creatures.CreatureHelper: Receiving an animal from another server.
[04:48:42 AM] SEVERE org.tmarchuk.wurmunlimited.server.stablemaster.StableMasterMod: Failed to decode animal token.
java.io.EOFException
        at java.io.DataInputStream.readBoolean(DataInputStream.java:244)
        at com.wurmonline.server.creatures.CreatureHelper.fromStream(CreatureHelper.java:381)
        at org.tmarchuk.wurmunlimited.server.stablemaster.StableMasterMod$2$1.invoke(StableMasterMod.java:307)
        at org.gotti.wurmunlimited.modloader.classhooks.HookManager.invoke(HookManager.java:302)
        at com.wurmonline.server.intra.IntraServerConnection.createItem(IntraServerConnection.java)
        at com.wurmonline.server.intra.IntraServerConnection.savePlayerToDisk(IntraServerConnection.java:1936)
        at com.wurmonline.server.webinterface.WebInterfaceImpl.transferPlayer(WebInterfaceImpl.java:4657)
        at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:323)
        at sun.rmi.transport.Transport$1.run(Transport.java:200)
        at sun.rmi.transport.Transport$1.run(Transport.java:197)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
        at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$79(TCPTransport.java:683)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)

 

 

 

Looking at the code there seems to be no handling at all of the case where the animal is missing.

 

It looks like @tmarchukhasn't been around for a while... i guess i'll have to fix this myself. yay.

Share this post


Link to post
Share on other sites

Found some issues from my players as well. Loading the token on a boat they can not unload them.

Share this post


Link to post
Share on other sites

Oh yeah, the method in Item that it uses to load the token is failing since the token has No Take flag on it (this was changed in 1.3).

 

I've removed that flag, making the players able to just drag the token to their inventory from a boat, or use the unload action.

 

I've also added more error handling in the server transfer code and a check that deletes invalid tokens when trying to redeem them.

 

My changes are currently here: https://github.com/bdew-wurm/WurmStableMaster/commit/c4761aa612d49da55c46983cc738cd1d1acffad7

 

I haven't made a public release of it yet, but currently testing it on my servers.

  • Like 3

Share this post


Link to post
Share on other sites

Thanks bdew, I just disabled it for now while working on some other thingies.

Share this post


Link to post
Share on other sites

is it now possible to bring horses to a neighbour server?

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this