Sign in to follow this  
Ayluin

Server Vote Reward Mod

Recommended Posts

I've coded a simple vote reward mod. I've seen a few servers with this, and some posts on here asking for such a mod with some claiming to have paid for it, so I figured I'd just write it and make it public.

 

Configurable Options:

 

APIKEY= Your Wurm-Unlimited.com server API key. This can be found here:

 

rCdFZLp.png

 

rewardamt= The amount of coins you want players to receive when they vote

rewardmsg= The message you want to display when they successfully claim their vote

claimedmsg= The message you want to display when they haven't voted, or have already claimed their vote.

 

Checking or claiming the vote can be done in-game with the command /vote

 

Release:

https://github.com/revelation343/VoteReward/releases/latest

 

Open to any suggestions for the mod. Wurm-Unlimited.com allows voting each day, so be careful with those reward amounts.

 

Share this post


Link to post
Share on other sites

Thank you for creating and sharing this mod. One suggestion would be for a seperate reward that can be configured if a player votes each day for a full month. They would get the reward on the last day of the month in addition to the normal reward.

Share this post


Link to post
Share on other sites

We also pay out the coins at 1. day of the next month, it would be realy amazing if this mod also would collect the votes and pay out Money after a full month.

 

Great mod!

 

Eject

Share this post


Link to post
Share on other sites
Posted (edited)

It could potentially be done I suppose with something like /monthly from a player perspective, but the primary challenge is that the claim part of the API only works for individual daily votes. When looking at current month votes from the API it lists it out by steam name rather than ID so pretty useless for those purposes. And then also ensuring it only does the monthly reward once would be the issue of trying to have steam ID's added to the array that is generated from the monthly stats. Maybe if I could hook it into a .db file to only count the successful votes on /vote, and then the player were to run a /monthly sort of command that checked it against the value in the db. Another route would be to discuss if there can be an extension into the API to be able to create a claim key which seems far easier, but at the mercy of the website on that. My SQL isn't too sharp, so I'll look at it but those are the main barriers for a monthly reward.

Edited by Ayluin

Share this post


Link to post
Share on other sites
Posted (edited)

For us, daily pay out would also be fine, better dont pump up the db ^^ this mod is very cool and make some work for the gm´s because we until  now payed out coins manual with an excell list to check who player is who steam user.

 

thank you very much for this mod

 

with this, we also can now make easy a vote rally like around christmas (december) and in summer with higher the given coins.

Edited by Eject

Share this post


Link to post
Share on other sites

can i make the command /votes after some days and get all the coins?

Some people cant login all days but are voting.

 

Eject

Share this post


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

can i make the command /votes after some days and get all the coins?

Some people cant login all days but are voting.

 

Eject

 

No the claim key expires after 24 hours at the reset time for Wurm-Unlimited.com and is checked against their API, not anything stored within the mod.

Share this post


Link to post
Share on other sites

Could you solve this with the moddsupport.db or would this be a too hard work?

 

Thanks in advance

Eject

Share this post


Link to post
Share on other sites

It could be possible by having the server ping results once a day and store the number of votes since last claiming. It could provide a reward based on the number then clear the vote number when the command is used. It is not horribly hard but also not super simple either. One of the biggest perks of a mod like this though is to keep players logging in as much as possible. A lot of times you might log in just to claim the vote and end up spending an hour or two online because a friend wanted to do something with you. If you make it so you don't have to log in then it takes that incentive away and ultimately could reduce the active population. I do want to thank the author of the mod. This was needed for a long time. 

Share this post


Link to post
Share on other sites

Until this mod we had no knowledge how often players logged in and payed the silvercoins at the end of the month.

Some players are working 60 hours in the week and playing 20-30 hours at weekend...more than others in the whole week, and because this players they are also supporting our servers, it would be nice, if they could claim the coins each time or weekly or monthly.

The silver payment is a gift for voting, not for login in.

 

Eject

 

Share this post


Link to post
Share on other sites
Posted (edited)

Yeah as stated previously, it could only be done by tracking the amount of times a user has claimed a vote, so based on what you're describing with logins vs. votes it may not be all that useful even if you were to utilize modsupport.db 

 

The reason:
Wurm-Unlimited.com's API uses a steam login when voting. When you utilize their claim vote key, you can check this against steam ID. 

 

Wurm-Unlimited.com's total monthly API does not utilize steam key but rather steam name and the total number of votes for the steam name. Unless you require members of your server to change their steam name to Wurm player name, there would be no real way to check against the array you download into json/xm/html. We could see if they can include the monthly API or better yet, a claim key for X votes on their end utilizing a steam ID rather than printing out steam names. But you can see what I mean with this: 
 

 

{ "name":"[PVE] Genesis -- 2x\/4x Actions -- Free Deed\/Upkeep", "address":"107.152.101.18", "port":"15020", "month":"201905", "voters": [ { "nickname":"tinamusen", "votes":"14" }, { "nickname":"Bravyn", "votes":"13" }, { "nickname":"I am Groot", "votes":"13" }, { "nickname":"Zedrow1", "votes":"13" }, { "nickname":"Willow", "votes":"12" }, { "nickname":"LucasR", "votes":"12" }, { "nickname":"Jessie", "votes":"12" }, { "nickname":"akipoyo", "votes":"12" }, { "nickname":"Bludragon", "votes":"12" }, { "nickname":"richpaveysr", "votes":"12" }, { "nickname":"Billie", "votes":"11" }, { "nickname":"CrazyDad", "votes":"11" }, { "nickname":"zues_wolf", "votes":"11" }, { "nickname":"adknudso", "votes":"10" }, { "nickname":"the_bfg", "votes":"10" }, { "nickname":"Jethil", "votes":"10" }, { "nickname":"Odin-sama", "votes":"9" }, { "nickname":"jhgft4r", "votes":"9" }, { "nickname":"The Waitress", "votes":"8" }, { "nickname":"Skarr Talin", "votes":"7" }, { "nickname":"brauerjoseph", "votes":"7" }, { "nickname":"Shadow", "votes":"6" }, { "nickname":"slack", "votes":"6" }, { "nickname":"jackobrian", "votes":"6" }, { "nickname":"Kintec", "votes":"5" }, { "nickname":"FuriousGnat", "votes":"4" }, { "nickname":"nomadicgamer", "votes":"4" }, { "nickname":"Katna13", "votes":"4" }, { "nickname":"Londoe Black", "votes":"4" }, { "nickname":"Demmu", "votes":"4" }, { "nickname":"Bobby G", "votes":"3" }, { "nickname":"Infamous Mug", "votes":"3" }, { "nickname":"Salad Snake", "votes":"3" }, { "nickname":"Catnip", "votes":"3" }, { "nickname":"Fatwill", "votes":"3" }, { "nickname":"NotAPerson", "votes":"3" }, { "nickname":"Ficticia", "votes":"3" }, { "nickname":"Confiture[QC]", "votes":"3" }, { "nickname":"pmm1220", "votes":"3" }, { "nickname":"Behemoth", "votes":"2" }, { "nickname":"Moontsu", "votes":"2" }, { "nickname":"koshka", "votes":"2" }, { "nickname":"teal488", "votes":"2" }, { "nickname":"hyrle", "votes":"1" }, { "nickname":"dzsoni_robi", "votes":"1" }, { "nickname":"138mic", "votes":"1" }, { "nickname":"Vonsway89", "votes":"1" }, { "nickname":"CyberNator-QC", "votes":"1" }, { "nickname":"Bobbysepp", "votes":"1" }, { "nickname":"charlottepedersen65", "votes":"1" }, { "nickname":"felixsited", "votes":"1" }, { "nickname":"BamBam", "votes":"1" }, { "nickname":"jonwoo2x", "votes":"1" } ] }

 

This information, does not tie in with Wurm in any way and would be useless to gather in modsupport.db You could say ok, just create your own table everytime there is a successful vote, but the argument is we should reward people with more playtime than votes/logins, but I think a /playtime related rewards could be done, but would not involve the Wurm-Unlimited.com api in any sort of way so it would need to be a separate mod, since this is now featured on Wurm-Unlimited.com as a vote reward mod. 

Edited by Ayluin

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