Fantasy Haxball Point Calculator

Fantasy Haxball Point Calculator

Postby saviola » January 2nd, 2015, 10:46 am

Hi,

I like the idea of Fantasy Haxball, and when I read through the rules that are used to determine players' points in a match, I immediately thought: Wouldn't it be awesome to calculate the points automatically? I then asked MrP if they already used some kind of tool or script to automate point calculation, which he denied.

So I sat down over the last couple of weeks and created such a script, the Fantasy Haxball Point Calculator (FHPC).

Here's how it works: First you enter the URL to a game on the FM site. Upon pressing the "Load game" button, the script will then load

  • The teams' available players
  • The goals scored in the match (with scorer and assister)

The user then has to choose the actual lineups for the teams (because those are not stored on the FM site). And that's all the manual work necessary. When pressing "Calculate points", the rules are applied and the points for each player are calculated.

Here is an example of how that would look. (I know it looks shitty, I'm not a designer. :D Improved CSS files are always welcome.)

The script is still in an early development stage, and some things are missing / buggy, more specificially, the script

  • is generally pretty buggy, feedback is always welcome
  • does not implement the "suspension" rule (because it is pretty irrelevant)
  • does not implement the "team of the week" rule (because these points are usually awarded at a later stage, so it's probably more realistic that these points are added manually)
  • can't handle subbing during halves (i.e., players playing less than a complete half; which luckily doesn't happen too often)

I hope this tool is useful and will reduce the time spent on calculating Fantasy Haxball points in the future. Again: Any feedback is welcome. I don't have any experience with the Fantasy Haxball rules, so I might have applied some of them wrongly.

* Let's talk about the "Per 2 goals conceded / scored" rules. There are basically three distinct cases for this rule: a.) a player plays on the same position throughout the game. No problem, rule can be applied easily. b.) a player plays on different positions in the first and second half, and b.1) there is an even number of goals in each half. Each half can be calculated separatedly for the position the player played on (is that how it is done? or is only the first / main position used?), or b.2) there is an uneven number of goals in both halves (i.e. one goal conceded / scored in the first half and one in the second). Will these simply be ignored? Will they be added and calculated using the first / main position?
  • 46

Last edited by saviola on January 3rd, 2015, 10:44 am, edited 1 time in total.
User avatar
saviola
 
Posts: 144
News Articles: 0
Reputation: 661

Joined: December 9th, 2012, 5:08 pm


Re: Fantasy Haxball Point Calculator

Postby Jai » January 2nd, 2015, 11:45 am

did you watch eastenders last night
  • 3

Image
User avatar
Jai
 
Posts: 261
News Articles: 0
Reputation: 374

Joined: February 10th, 2013, 3:16 pm

Position: Goalkeeper

Re: Fantasy Haxball Point Calculator

Postby Ron » January 2nd, 2015, 3:25 pm

Very nice idea Saviola :cheers:

Ron
 



Re: Fantasy Haxball Point Calculator

Postby mlfaijati » January 2nd, 2015, 4:25 pm

If I could rep you I would
  • 0

FM record:

G.I. Joehans:
[s]Won Div 2 and Cup[/s] Got carried by Fritz.

ARRIBA!:
Got carried by jonny then disbanded the team.

NWA:
Came like 6th in Div 2B then disbanded the team.

The Real Rocknrolla:
When the going gets tough...

ACDP:
Benchride to title!

Overall:
A travesty.

User avatar
mlfaijati
 
Posts: 828
News Articles: 2
Reputation: 82

Joined: February 15th, 2012, 12:00 am
Location: North London

Position: Defensive Midfielder
Division 2 Winner: Season 4
Cup Winner: Season 4

Re: Fantasy Haxball Point Calculator

Postby Tanzim » January 3rd, 2015, 12:31 am

gd job :thumbup:


also is dere a english translation of ur thesis????

EDIT: WTF whats difference between proejct thesis nd bachelors thesis????
  • 0

User avatar
Tanzim
 
Posts: 100
News Articles: 0
Reputation: 97

Joined: December 24th, 2012, 1:52 am


Re: Fantasy Haxball Point Calculator

Postby saviola » January 3rd, 2015, 10:52 am

Thanks for your comments!

After talking to MrP, I added a button to copy the line-ups from the first to the second half, and (hopefully) correctly implemented the "X per 2 goals scored / conceded" rules.

Tanzim wrote:also is dere a english translation of ur thesis????

EDIT: WTF whats difference between proejct thesis nd bachelors thesis????


Unfortunately, there is no translation of my project thesis (should have written it in English in the first place, as I did with my bachelor's thesis).

As to difference between the two: in our curriculum, we have to do a "project" before our bachelor's thesis. It's more pratical overall, involving more programming and less theory / writing, and most people use it to prepare for their bachelor's thesis (as did I). The project thesis is basically a documentation of what you did during the project, a little less scientific than the bachelor's thesis.
  • 4

User avatar
saviola
 
Posts: 144
News Articles: 0
Reputation: 661

Joined: December 9th, 2012, 5:08 pm


Team of the Week image generator

Postby saviola » March 6th, 2015, 2:05 pm

Hello again,

I came up with another script, after MrP told me through how many steps he has to go each time he creates the "team of the week" image:

http://s1.saviola.de/fhpc/totw/

The idea is to enter the links to the players' page on the FM site, and the script then loads player name, team name and team colors from the FM site (just took some of the CSS/JS code that is used to display team colors on the FM site) and overlay the information on an emtpy "team of the week" image. Team names (in case abbreviations are desired) and players' points can then be changed / set, and a screenshot can be taken of the result.

Hope this helps.
  • 54

User avatar
saviola
 
Posts: 144
News Articles: 0
Reputation: 661

Joined: December 9th, 2012, 5:08 pm


Re: Fantasy Haxball Point Calculator

Postby MrP » March 6th, 2015, 5:03 pm

thank u soooo much! :thumbup:
  • 0

User avatar
MrP
 
Posts: 1555
News Articles: 32
Reputation: 1167

Joined: September 9th, 2012, 11:00 pm
Location: Berlin

Division 1 Winner: Season 8
Cup Runner-up: Season 4


Return to Season 11

Who is online

Users browsing this forum: No registered users and 1 guest