Author Topic: points system  (Read 3473 times)

wagnes

  • Newbie
  • *
  • Posts: 1
    • View Profile
points system
« on: February 06, 2007, 08:53:17 PM »
I have a table of points we use as follows.

Not sure if can be formulated or not.


                1-10      11-14   15-18     19-22   23-26   27-30
place
1st             100      140       180       220      260     300
2nd              80      112       144       176      208     240   
3rd               70       98        126       154      182     210
4th               60       84        108       132      156     180
5th               50       70         90        110      130     150
6th               40       56         72         88       104    120
7th               30       42         54         66        78      90
8th               20       28         36         44        52      60
9th                                      18         33        44      52
10th                                                 22        36      44
11th                                                 22        30      38
12th                                                             26      34
13th                                                             26      32
14th                                                                      30
15th                                                                      30



If anyone could help me, it would be great!!!

Thanks :)

PPPanimal

  • Jr. Member
  • **
  • Posts: 93
    • View Profile
Re: points system
« Reply #1 on: February 09, 2007, 02:28:20 AM »
OK, this will take care of your 1-10 player games.  The others will take some more work. 
If i get some time i might look into it for ya.


if (r<9,(if (r<2,(n-r+1)*10,(n-r)*10)),0)

PPPanimal

  • Jr. Member
  • **
  • Posts: 93
    • View Profile
Re: points system
« Reply #2 on: February 09, 2007, 03:29:01 AM »
ok, i got bored and found some time.  I kinda enjoy this sorta formula stuff.  Here goes another.

this one will handle 1-14 players
it is setup to allow any diff point payout, just change the numbers to whatever you want each rank to get.


if (r<9,(if (r=1,140,(if (r=2, 112,(if (r=3, 98,(if (r=4, 84,(if (r=5, 70,(if (r=6, 56,(if (r=7, 42,(if (r=8, 28,0)))))))))))))),0)))

so if rank is less than 9, give 140 for 1st, 112 for 2nd etc.

PPPanimal

  • Jr. Member
  • **
  • Posts: 93
    • View Profile
Re: points system
« Reply #3 on: February 09, 2007, 03:40:05 AM »
15-18 players, points to top 9 only


if (r<10,(if (r=1,180,(if (r=2, 144,(if (r=3, 126,(if (r=4, 108,(if (r=5, 90,(if (r=6, 72,(if (r=7, 54,(if (r=8, 36,(if (r=9, 18,0)))))))))))))))),0)))


If i continue to work on this, i will do each diff game size formula first, then try to gang them all into one formula that will change the point system for you as your game size changes.  As far as things go now, just use the formula that matches your game size.

PPPanimal

  • Jr. Member
  • **
  • Posts: 93
    • View Profile
Re: points system
« Reply #4 on: February 09, 2007, 03:44:33 AM »
19-22 players


if (r<12,(if (r=1,220,(if (r=2, 176,(if (r=3, 154,(if (r=4, 132,(if (r=5, 110,(if (r=6, 88,(if (r=7, 66,(if (r=8, 44,(if (r=9, 33,(if (r=10, 22,(if (r=11, 22,0)))))))))))))))))))),0)))

PPPanimal

  • Jr. Member
  • **
  • Posts: 93
    • View Profile
Re: points system
« Reply #5 on: February 09, 2007, 03:48:37 AM »
23-26 players

if (r<14,(if (r=1,260,(if (r=2, 208,(if (r=3, 182,(if (r=4, 156,(if (r=5, 130,(if (r=6, 104,(if (r=7, 78,(if (r=8, 52,(if (r=9, 44,(if (r=10, 36,(if (r=11, 30,(if (r=12, 26,(if (r=13, 26,0)))))))))))))))))))))))),0)))

PPPanimal

  • Jr. Member
  • **
  • Posts: 93
    • View Profile
Re: points system
« Reply #6 on: February 09, 2007, 03:53:04 AM »
27-30 players


if (r<16,(if (r=1,300,(if (r=2, 240,(if (r=3, 210,(if (r=4, 180,(if (r=5, 150,(if (r=6, 120,(if (r=7, 90,(if (r=8, 60,(if (r=9, 52,(if (r=10, 44,(if (r=11, 38,(if (r=12, 34,(if (r=13, 32,(if (r=14, 30,(if (r=15, 30,0)))))))))))))))))))))))))))),0)))

PPPanimal

  • Jr. Member
  • **
  • Posts: 93
    • View Profile
Re: points system
« Reply #7 on: February 09, 2007, 04:47:53 AM »
OK, so far so good.  This formula will handle from 1 to 26 players.
It will adjust the point system to match the number of players in your game.


if (n<11,          if (r<9,(if (r<2,(n-r+1)*10,(n-r)*10)),0),
if (n<15,          if (r<9,(if (r=1,140,(if (r=2, 112,(if (r=3, 98,(if (r=4, 84,(if (r=5, 70,(if (r=6, 56,(if (r=7, 42,(if (r=8, 28,0)))))))))))))),0))),
if (n<19,          if (r<10,(if (r=1,180,(if (r=2, 144,(if (r=3, 126,(if (r=4, 108,(if (r=5, 90,(if (r=6, 72,(if (r=7, 54,(if (r=8, 36,(if (r=9, 18,0)))))))))))))))),0))),
if (n<23,          if (r<12,(if (r=1,220,(if (r=2, 176,(if (r=3, 154,(if (r=4, 132,(if (r=5, 110,(if (r=6, 88,(if (r=7, 66,(if (r=8, 44,(if (r=9, 33,(if (r=10, 22,(if (r=11, 22,0)))))))))))))))))))),0))),
if (n<27,          if (r<14,(if (r=1,260,(if (r=2, 208,(if (r=3, 182,(if (r=4, 156,(if (r=5, 130,(if (r=6, 104,(if (r=7, 78,(if (r=8, 52,(if (r=9, 44,(if (r=10, 36,(if (r=11, 30,(if (r=12, 26,(if (r=13, 26,0)))))))))))))))))))))))),0))))))),
0)

I am having a problem with the last formula when i add it to this one.  So for now it will only handle up to 26 players.
I will sort out the other part later and get it working for your 27-30 player games.  Don't worry about the spaces or carrage returns in the formula.
TD handles them fine.  Just copy and past this to TD.  I just spaced it out so i could keep track of what part does what a bit better.

PPPanimal

  • Jr. Member
  • **
  • Posts: 93
    • View Profile
Re: points system
« Reply #8 on: February 09, 2007, 05:19:29 AM »
OMG its after 6am here.  lol
I could not sleep, i had to finish this.
So here it is, one big formula that will handle any tourny of any size while automatically adjusting the point system to match
how many players bought-in.  lol, i think i even pee'ed a little bit when i finally got this to work.  lmao.
Anyway, hope you enjoy it, or atleast use it.

One last thing.  How do you want points handled if there are less than 10 players?
say only 4 are in your tourny.  does first get 100 and 4 still get 60 even though he is in last?
right now, this formula will pay fewer points for games less than 10 players.
Have a look, see what you think.



if (n<11,          if (r<9,(if (r<2,(n-r+1)*10,(n-r)*10)),0),
if (n<15,          if (r<9,(if (r=1,140,(if (r=2, 112,(if (r=3, 98,(if (r=4, 84,(if (r=5, 70,(if (r=6, 56,(if (r=7, 42,(if (r=8, 28,0)))))))))))))),0))),
if (n<19,          if (r<10,(if (r=1,180,(if (r=2, 144,(if (r=3, 126,(if (r=4, 108,(if (r=5, 90,(if (r=6, 72,(if (r=7, 54,(if (r=8, 36,(if (r=9, 18,0)))))))))))))))),0))),
if (n<23,          if (r<12,(if (r=1,220,(if (r=2, 176,(if (r=3, 154,(if (r=4, 132,(if (r=5, 110,(if (r=6, 88,(if (r=7, 66,(if (r=8, 44,(if (r=9, 33,(if (r=10, 22,(if (r=11, 22,0)))))))))))))))))))),0))),
if (n<27,          if (r<14,(if (r=1,260,(if (r=2, 208,(if (r=3, 182,(if (r=4, 156,(if (r=5, 130,(if (r=6, 104,(if (r=7, 78,(if (r=8, 52,(if (r=9, 44,(if (r=10, 36,(if (r=11, 30,(if (r=12, 26,(if (r=13, 26,0)))))))))))))))))))))))),0))),
if (r<16,(if (r=1,300,(if (r=2, 240,(if (r=3, 210,(if (r=4, 180,(if (r=5, 150,(if (r=6, 120,(if (r=7, 90,(if (r=8, 60,(if (r=9, 52,(if (r=10, 44,(if (r=11, 38,(if (r=12, 34,(if (r=13, 32,(if (r=14, 30,(if (r=15, 30,0)))))))))))))))))))))))))))),0)))    )))))

URSHARKB8

  • Newbie
  • *
  • Posts: 30
    • View Profile
Re: points system
« Reply #9 on: February 09, 2007, 03:09:11 PM »
MAN,  BRO!!!   that was very very VERY vool of you to work on it that long!!!!
and thanks for the formula.

PPPanimal

  • Jr. Member
  • **
  • Posts: 93
    • View Profile
Re: points system
« Reply #10 on: February 11, 2007, 01:43:46 AM »
Hey, no problem man.  I was bored and just had to try my hand at programming again.
This is the first formula I have ever made for TD and the first Programming of any kind i have done it a few years.
After making that formula i looked around the site at others here and found i did it the hard way.
I guess he added some cool SWITCH and ASSIGN commands that will make easier and shorter work
of my formula.  Here is what he wrote on the topic.

btw, just a little preview.  The next version will have two added formula functions: switch() and assign()

switch() will help to eliminate a bunch of if() statements:

if(r==1, 50,0) + if(r==2, 30, 0) + if(r==3, 10, 0) + if(r==4, 7, 0) + if(r==5, 3, 0)

can be expressed as:

switch(r, 1, 50, 2, 30, 3, 10, 4, 7, 5, 3, 0)


assign() will allow you to assign values to your own variables and use them.  So, in the formula above I use the expression (round(bc / 10) * n) over and over.  assign() will allow you to assign that value to your own variable and then reference the variable instead.  (Multiple statements can actually already be used, by the way...)

assign("pp", (round(bc / 10) * n))

So, the formula in the previous post can be knocked down to:

assign("pointspool", round(bc / 10) * n);
if(n < 9, assign("percentage", switch(r, 1, .5, 2, .3, 3, .2, 0)));
if(n > 8 && n < 13, assign("percentage", switch(r, 1, .4, 2, .25, 3, .2, 4, .15, 0)));
if(n > 12, assign("percentage", switch(r, 1, .4, 2, .25, 3, .2, 4, .10, 5, .05, 0)));
pointspool * percentage;