Page 1 of 1

OBBLM - Change points awarded for Kills

Posted: Fri May 13, 2016 6:04 pm
by Dark Duke
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?

Re: OBBLM - Change points awarded for Kills

Posted: Fri May 13, 2016 6:26 pm
by Sainthropee
// 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

OBBLM - Change points awarded for Kills

Posted: Fri May 13, 2016 7:30 pm
by Dark Duke
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)

Re: OBBLM - Change points awarded for Kills

Posted: Fri May 13, 2016 7:43 pm
by Shteve0
Try this (always take a backup first!), about line 120 in lib/class_sqlcore.php:

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)';
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)*2+ki*3+intcpt*2+td*3+mvp*5),0)';

Re: OBBLM - Change points awarded for Kills

Posted: Sat May 14, 2016 5:24 am
by Sainthropee
Ah Ok.

Then, Steve0 is your man. You want to change xps nor points to the team. Sorry I misunderstand you

OBBLM - Change points awarded for Kills

Posted: Sat May 14, 2016 8:07 am
by Dark Duke
Thanks for the code, Shteve0, I'll try that when I'm back at home on Sunday

Re: OBBLM - Change points awarded for Kills

Posted: Sat May 14, 2016 8:30 am
by Shteve0
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... ;)

Re: OBBLM - Change points awarded for Kills

Posted: Tue May 17, 2016 5:17 am
by Dark Duke
We tried it yesterday for the first time and it works perfectly, thanks again Shteve0!