Posted April 16, 2019 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: 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. 5 Share this post Link to post Share on other sites
Posted April 16, 2019 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. 1 Share this post Link to post Share on other sites
Posted May 4, 2019 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 May 4, 2019 (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 May 4, 2019 by Ayluin 2 Share this post Link to post Share on other sites
Posted May 4, 2019 (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 May 4, 2019 by Eject Share this post Link to post Share on other sites
Posted May 11, 2019 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
Posted May 12, 2019 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
Posted May 12, 2019 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
Posted May 13, 2019 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
Posted May 14, 2019 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 May 14, 2019 (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 May 14, 2019 by Ayluin Share this post Link to post Share on other sites
Posted December 13, 2019 (edited) nvm i had it paying too little,,,,doh Edited December 13, 2019 by evilkilem Share this post Link to post Share on other sites
Posted March 17, 2020 (edited) Is this still working? I just tried adding it to my server, but when players vote it keeps saying they have already voted for this server today, but then when they /vote they get a message that they have either not voted yet or have already claimed their reward. More than one player had the same experience. In-game, they click a link and it takes them to the vote place. That's where they click the Vote button and get this message. Edited March 17, 2020 by Batta Share this post Link to post Share on other sites
Posted March 17, 2020 Works fine for us still, maybe you got the api wrong? Share this post Link to post Share on other sites
Posted March 17, 2020 5 hours ago, evilkilem said: Works fine for us still, maybe you got the api wrong? Hmm, so it's just us. I copied and pasted the api, but I'll check anyway. Thanks. Share this post Link to post Share on other sites
Posted March 18, 2020 Works fine. Easier to check if it's working based on whether or not the actual server is getting votes on Wurm-Unlimited.com If there are votes, then the API key is likely incorrect. Share this post Link to post Share on other sites
Posted March 18, 2020 (edited) I'm embarassed to say I figured it out and the problem was that I hadn't deleted the lines after API= before pasting it. When I went back and removed them, it worked. I post this dumb error here in case it will help someone else. Now I'll go hide my face for awhile, lol. Edited March 18, 2020 by Batta Share this post Link to post Share on other sites
Posted March 19, 2020 21 hours ago, Batta said: I'm embarassed to say I figured it out and the problem was that I hadn't deleted the lines after API= before pasting it. When I went back and removed them, it worked. I post this dumb error here in case it will help someone else. Now I'll go hide my face for awhile, lol. It happens to the best of us. If I had a nickle for every dumb thing I have screwed up in .properties files since starting my server.. I don't want to admit how rich I'd be. Glad it's working for you Batta. 2 Share this post Link to post Share on other sites