30 July 2012

Loot buying

One of the features of my corp is that we buy any and all loot, gas and ore acquired through the running of sites in wormhole space. Of course, we take a cut for the hassle of shipping it out and selling it but folks are welcome to move things out themselves if they so choose. The main advantage for us running this scheme is this helps ensure a fair distribution of proceeds from wormhole activities to all that took part. Giving the corp 'pocket money' is an added bonus which only really benefits the corp members anyway.

We've always used a google docs spreadsheet for splitting the loot proceeds. In the old C2 it was filled out by the person responsible for payouts; in the current C4 it was the responsibility of the person who did the salvaging. There was always the danger of accidents in deleting the formulae which did all the calculations, and that did happen a couple of times, but the spreadsheet worked well. At least, it worked well for the submitter of loot.

Payday comes every two weeks and that basically meant I would spend a good hour or two tabulating all the payouts per person per op so the spreadsheet could add it all up. Talk about RSI? I think that was possibly the only task I've encountered due to EVE that was more laborious and repetitive than setting up five planets of PI. And with the PI you don't redo it twice a month. So I took it on myself to create a web-based form with a database back-end to do all the heavy lifting. This would save me loads of time and wear out less mice in the long run.

Leave all melted nano-ribbons here please.
After a couple of false starts because I got tied up on the auth side of things I eventually got going. My go-to language of choice is PERL as I've been writing in that for far too many years. It didn't take too long to design a decent database and create the submission form off the back of it. Of course, if people are submitting loot then they'll want some form of receipt showing what they put in and what it's worth. Again, not particularly hard. Then I added in the admin side of stuff, listing the submissions, confirming them, listing payout values. Crap, did I just spend 25 hours doing all this?

So once it was fully functional I had to make it pretty. It's a fact that HTML without style is, well, style-less. These days the entire world+dog is using Bootstrap, from Twitter. Given the clean look it produces I wasn't about to go against the grain. Bang goes another 25 hours while working out how to convince PERL to make nice webpages (unheard of, I know) and then doing so.

Testing is important so I unleashed a copy of the new site onto my corpies. Most people were happy during the testing except for one slight problem - the in-game browser doesn't support basic auth. Yes, I'd copped out of writing a proper auth system and was replying on something  not supported. Oops. Time to learn about cookies I guess...

Cookies were implemented in a day around other my real life stuff and I had a very shiny website that worked in-game. So I put it live and it seemed to work. Within a day I had four feature requests - a reference ID, adding notes, viewing past submissions, viewing everyones totals (i.e. a leaderboard). The reference ID was easy as it was already in place. The others are all done now except for the leaderboard. I just wonder how long it will be before I save the time doing payouts that I just spent creating this masterpiece.

The whole admin side is still pretty ugly as only I'll see that. There are also a few things I need to drop to the database to do, such as correcting item counts in submissions or adding missing members to a submission. It also assumes everyone gets an equal share as that's how we do it in Z3R0. All these things can be fixed though, when they need to be.

No comments:

Post a Comment