Sign in to follow this  
tmarchuk

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

Recommended Posts

10 hours ago, tmarchuk said:

It looks like there might be an EPICKINGDOM and a CHAOSKINGDOM stored for a player in the DB in addition to a KINGDOM. It appears when switching between PVP and non-PVP servers (and epic/non-epic servers) there is some logic to switch the KINGDOM value but I haven't had a chance to trace it all through properly and I don't have the right test server setup to check easily. Would it be possible for you to run a test and see what the Player DB values are for these 3 columns when the player converts the animal to a token and then again just before they convert it back to an animal? If you could check the KINGDOM value for the animal as well that would be great.

 

I have a suspicion the player is getting converted somehow to a different kingdom on transfer and I would like to just make it so that the KINGDOM of the animal is set equal to the KINGDOM of the player on redeeming the token but I don't have an easy way to test if that is the right thing to do. It's fairly trivial to make the mod do this though (set KINGDOM of animal equal to KINGDOM of player on redemption.)

 

Thanks,

-Tyson

 

 

You are correct.  I was able to correct this by switching the properties in the ticket during a transfer on that table.  Since the login cluster is freedom the animal are flagged freedom.   When the player crosses the cluster they are converted to their PVP kingdom.   Not sure the logic could be written in the MOD easily as im not a coder but it was easy to write a sql script during the transfer.    I know sql but i dont know Java  LOL 

Again since im stripping out kingdoms to replace with a realm vs realm pvp system this is only a temp fix until that system is done.  

 

 

Cheers! 

Edited by razoreqx

Share this post


Link to post
Share on other sites

Well it's 1 line of code to change the animal to the kingdom of the player when you redeem it (I tried and tested it) but I don't know if there are any unintended consequences of this. I see some animals flagged as 'Unknown kingdom' which is 0 and some as Freedom '4'. My character seems to be Jenn-Kellon which is 1. So if a whole bunch of animals start being flagged as part of a certain kingdom when before they were none or freedom I'm not sure if that causes any problems. Maybe bred animals are automatically part of a kingdom? Maybe when they're branded they get the kingdom of the village the brand is for? I have no idea. If you know what the right logic is it shouldn't be too hard to implement regardless of whether it should happen on server transfer or on token redemption. Just let me know. Thanks.

Share this post


Link to post
Share on other sites

it goes like this:

 

Kingdom

For Home servers, this value indicates the kingdom to which the server belongs. Built-in kingdom values are:

0 - No kingdom

1 - Jenn-Kellon

2 - Mol-Rehan

3 - Horde of the Summoned

4 - Freedom

 

in SQL i just read the character value and assign that same value to the animal.   Its had no impact to the DB doing it as a sql script. Wurm put it in the game to so NPC's and players could kill mounts and tamed pets owned by another player in combat.

 

  • Like 1

Share this post


Link to post
Share on other sites
26 minutes ago, razoreqx said:

it goes like this:

 

Kingdom

For Home servers, this value indicates the kingdom to which the server belongs. Built-in kingdom values are:

0 - No kingdom

1 - Jenn-Kellon

2 - Mol-Rehan

3 - Horde of the Summoned

4 - Freedom

 

in SQL i just read the character value and assign that same value to the animal.   Its had no impact to the DB doing it as a sql script. Wurm put it in the game to so NPC's and players could kill mounts and tamed pets owned by another player in combat.

 

Ok my change should be fine then. I'll push it to github later today when I'm in front of my computer and cut a new release which I'll consider released for now. Thanks for the info!

  • Like 1

Share this post


Link to post
Share on other sites

Released now and at version 0.4.

  • Sets kingdom to player's kingdom when it is redeemed.
  • Enabled trading of tokens and checks to make sure the token can't be redeemed while being traded

As usual, please let me know if you find any problems. I'm considering this mod done for now unless someone finds a bug or asks for a feature I find interesting. :)

 

Have fun!

-Tyson

  • Like 2

Share this post


Link to post
Share on other sites

An idea so incredibly mouthwateringly tasty that if it becomes stable...  I'd be more than delighted.  :D

  • Like 1

Share this post


Link to post
Share on other sites

Would it be possible to get the ability for it to go across servers to be configurable. 1 so it can be used on cluster servers without worry until this feature is stable, 2 so people who do not want this feature can turn it off?

 

Great work btw!

Share this post


Link to post
Share on other sites

Would like to point out the player achievement thing does not have anything to do with your mod. Had this bug since first month of WU, I have been correcting it by SQL command to change the player achievement dates to a proper format. This gives them the wrong date of achievement but at least it doesnt throw nasty errors on startup.

Share this post


Link to post
Share on other sites

Has anyone tried transfering servers with equiped horses to see if the items do anything weird?

Share this post


Link to post
Share on other sites
8 hours ago, Xyp said:

Has anyone tried transfering servers with equiped horses to see if the items do anything weird?

 

Doesnt work.   The animal is essentially dead.   The equipment is lost in the DB actually.    

Share this post


Link to post
Share on other sites

I can add an option to disable server transfers. This is the first I'm hearing that it doesn't work though. Perhaps someone can provide more details on what's being tried and what goes wrong? In my testing a saddle on a horse transferred fine but if you know of something specific that doesn't transfer I can look into fixing that.

Share this post


Link to post
Share on other sites

People are probably doing this but just to make sure, you're installing the mod on all the servers with the same IDs for the tokens right?

Share this post


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

i'll do some testing and get you the debugs.  

 

Thanks Razor. I'm going to release a version soon here that you can enable more debugging statements in which will help.

 

On 2016-05-19 at 8:50 PM, Xyp said:

Would it be possible to get the ability for it to go across servers to be configurable. 1 so it can be used on cluster servers without worry until this feature is stable, 2 so people who do not want this feature can turn it off?

 

Great work btw!

 

Turns out this isn't that easy. I added a setting to disable the server transfer code and make the item 'Server Bound' but it turns out the unmodified server code doesn't handle server bound items on vehicles only in player inventories. They probably don't need to because I'm guessing all server-bound items can't be dropped or put on boats. So while the item won't transfer it also won't get 'replaced' on the vehicle (aka boat) when you get back. So the item becomes lost in the DB unattached to anything. I would have to modify the server to handle this which is back to having server transfer modifications... Note I tested this with a Merchant Contract as well. You can't place them in a boat but I force it to go there using the DB and it behaves the same. Warns you it won't transfer but doesn't come back like it does in player inventories. I'll leave the setting in there in case you just want to warn people not to leave them in the boat and if they do it'll 'poof' but up to you. I don't have time now to make it so that server transfers of tokens can properly recover the tokens on re-entering the server. If you know of some item that works like this in WU please let me know and I can check the code to see if it's easy to just duplicate that behavior.

 

I'm going to check that things are still working in my test case (I move a horse with a saddle and a sheep, one on a cog and one in my inventory between two servers of the same type) and then I'll release a version with debugging and server transfer defaulted to 'true' but then can be turned off.

 

Have fun!

-Tyson

Share this post


Link to post
Share on other sites

Version 0.5 released.

  • Added two new configuration flags:
    • enableServerTransferLogging defaults to true and will put more information into the log to help with debugging issues.
    • enableServerTransfer defaults to true. Setting to false will prevent animal tokens from transferring to new servers but unfortunately while it warns you they won't transfer if you decide to transfer anyways the tokens on a vehicle (like a boat) will be lost. Tokens in a player's inventory will be restored when they come back to the originating server.
  • Updated to the newest server mod loader/launcher, 0.19. Please make sure you update this and install the same versions of this mod and the mod loader on all servers that are connected.

Share this post


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

I only see the links to the source code

 

Sorry about that. Forgot to copy up the binary. Fixed now.

-Tyson

  • Like 1

Share this post


Link to post
Share on other sites

Thanks for those updates. TBH I am hacking your mod to try and make a crate/load system for animals. The more I look over your code though, the more I realize you are quite talented!

 

I have learned a good bit just seeing how you handled certain things.

Edited by Xyp
  • Like 1

Share this post


Link to post
Share on other sites
6 hours ago, Xyp said:

Thanks for those updates. TBH I am hacking your mod to try and make a crate/load system for animals. The more I look over your code though, the more I realize you are quite talented!

 

I have learned a good bit just seeing how you handled certain things.

 

You're too kind. You should have seen the first several things I tried that didn't work. :lol: I'm glad you're finding it helpful. Feel free to PM me if you have any questions about the code.

-Tyson

  • Like 1

Share this post


Link to post
Share on other sites

Thank you, I like to bang my head against the wall for many hours first. That way if I get it  I feel more accomplished lol.

  • Like 1

Share this post


Link to post
Share on other sites

We have put this MOD through the ringer on Urath its its performing so much better than we ever expected.   tmarchuk you did a great job!   This is exactly what we needed for the Trade Pact system.

Share this post


Link to post
Share on other sites

Love this mod on Ages of Urath. Stablesmaster waves me every morning at my shoreside :P

  • Like 1

Share this post


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

We have put this MOD through the ringer on Urath its its performing so much better than we ever expected.   tmarchuk you did a great job!   This is exactly what we needed for the Trade Pact system.

 

5 hours ago, Jaz said:

Love this mod on Ages of Urath. Stablesmaster waves me every morning at my shoreside :P

 

Thank you both for the kind words. I'm glad you are enjoying it!

  • Like 1

Share this post


Link to post
Share on other sites

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

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
Sign in to follow this