OBBLM - Change points awarded for Kills
Moderator: TFF Mods
- Dark Duke
- Veteran
- Posts: 201
- Joined: Wed Jan 26, 2005 7:57 am
- Location: Valencia
OBBLM - Change points awarded for Kills
I was wondering if there is a way of changing how many points are given for Kills. We want to implement a House Rule to give 3 points when the casualty results in a kill and maintain 2 points for badly hurts and serious injuries. Is that possible to implement?
Reason: ''
Life is short, block fast.
- Sainthropee
- Experienced
- Posts: 145
- Joined: Sun Sep 07, 2014 10:32 am
Re: OBBLM - Change points awarded for Kills
// Rule #1
$hrs[1]['rule'] = array('-pts', '-td', '-cas'); // Sort teams against: most points, then most TDs and then least sportsmanship points.
$hrs[1]['points'] = '3*[won] + 1*[draw] + 0*[lost]'; // The definition of points.
edit this line in settings.php, in points, 3*[ki] and 2*[bh] or 2*[si]
I think this is easier mode to do it.
http://www.nicholasmr.dk/obblmwiki/ind ... l_settings
here are every the fields, so, the can be points too. I think
$hrs[1]['rule'] = array('-pts', '-td', '-cas'); // Sort teams against: most points, then most TDs and then least sportsmanship points.
$hrs[1]['points'] = '3*[won] + 1*[draw] + 0*[lost]'; // The definition of points.
edit this line in settings.php, in points, 3*[ki] and 2*[bh] or 2*[si]
I think this is easier mode to do it.
http://www.nicholasmr.dk/obblmwiki/ind ... l_settings
here are every the fields, so, the can be points too. I think
Reason: ''
- Dark Duke
- Veteran
- Posts: 201
- Joined: Wed Jan 26, 2005 7:57 am
- Location: Valencia
OBBLM - Change points awarded for Kills
But that affects only to the points awarded to the team after a game, doesn't it? What I'm trying to achieve is to modify the points awarded to a player after causing a casualty (just to make sure I explain myself properly)
Reason: ''
Life is short, block fast.
- Shteve0
- Legend
- Posts: 2479
- Joined: Thu May 07, 2009 10:15 am
- Location: Wellington, New Zealand
Re: OBBLM - Change points awarded for Kills
Try this (always take a backup first!), about line 120 in lib/class_sqlcore.php:
Change to:
Code: Select all
$common_fields = 'IFNULL(SUM(td),0), IFNULL(SUM(cp),0), IFNULL(SUM(intcpt),0), IFNULL(SUM(bh),0), IFNULL(SUM(si),0), IFNULL(SUM(ki),0), IFNULL(SUM(mvp),0), IFNULL(SUM(bh+si+ki),0), IFNULL(SUM(bh+si+ki+td),0), IFNULL(SUM(cp*1+(bh+si+ki)*2+intcpt*2+td*3+mvp*5),0)';
Code: Select all
$common_fields = 'IFNULL(SUM(td),0), IFNULL(SUM(cp),0), IFNULL(SUM(intcpt),0), IFNULL(SUM(bh),0), IFNULL(SUM(si),0), IFNULL(SUM(ki),0), IFNULL(SUM(mvp),0), IFNULL(SUM(bh+si+ki),0), IFNULL(SUM(bh+si+ki+td),0), IFNULL(SUM(cp*1+(bh+si)*2+ki*3+intcpt*2+td*3+mvp*5),0)';
Reason: ''
League and tournament hosting, blogging and individual forums - all totally free. For the most immersive tabletop sports community experience around, check out theendzone.co
- Sainthropee
- Experienced
- Posts: 145
- Joined: Sun Sep 07, 2014 10:32 am
Re: OBBLM - Change points awarded for Kills
Ah Ok.
Then, Steve0 is your man. You want to change xps nor points to the team. Sorry I misunderstand you
Then, Steve0 is your man. You want to change xps nor points to the team. Sorry I misunderstand you
Reason: ''
- Dark Duke
- Veteran
- Posts: 201
- Joined: Wed Jan 26, 2005 7:57 am
- Location: Valencia
OBBLM - Change points awarded for Kills
Thanks for the code, Shteve0, I'll try that when I'm back at home on Sunday
Reason: ''
Life is short, block fast.
- Shteve0
- Legend
- Posts: 2479
- Joined: Thu May 07, 2009 10:15 am
- Location: Wellington, New Zealand
Re: OBBLM - Change points awarded for Kills
No worries. I can't guarantee it'll work but it looks like a likely culprit. You may need to resync the database etc too; once the change is made run through all the tasks in the admin panel to see if it's taken hold!
Don't forget the bit about backing up...
Don't forget the bit about backing up...
Reason: ''
League and tournament hosting, blogging and individual forums - all totally free. For the most immersive tabletop sports community experience around, check out theendzone.co
- Dark Duke
- Veteran
- Posts: 201
- Joined: Wed Jan 26, 2005 7:57 am
- Location: Valencia
Re: OBBLM - Change points awarded for Kills
We tried it yesterday for the first time and it works perfectly, thanks again Shteve0!
Reason: ''
Life is short, block fast.