OBBLM - Change points awarded for Kills

However you play online - Java, Vassal, Email, Cyanide etc - talk about it here.
This is also the place for discussing the various tools for managing leagues, teams and so on.

Moderator: TFF Mods

Post Reply
User avatar
Dark Duke
Veteran
Veteran
Posts: 201
Joined: Wed Jan 26, 2005 7:57 am
Location: Valencia

OBBLM - Change points awarded for Kills

Post 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?

Reason: ''
Life is short, block fast.
User avatar
Sainthropee
Experienced
Experienced
Posts: 145
Joined: Sun Sep 07, 2014 10:32 am

Re: OBBLM - Change points awarded for Kills

Post 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

Reason: ''
Image

"Vice is a miscalculation in the pursuit of happiness"
(J. Bentham)
User avatar
Dark Duke
Veteran
Veteran
Posts: 201
Joined: Wed Jan 26, 2005 7:57 am
Location: Valencia

OBBLM - Change points awarded for Kills

Post 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)

Reason: ''
Life is short, block fast.
User avatar
Shteve0
Legend
Legend
Posts: 2479
Joined: Thu May 07, 2009 10:15 am
Location: Wellington, New Zealand

Re: OBBLM - Change points awarded for Kills

Post 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)';

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
User avatar
Sainthropee
Experienced
Experienced
Posts: 145
Joined: Sun Sep 07, 2014 10:32 am

Re: OBBLM - Change points awarded for Kills

Post by Sainthropee »

Ah Ok.

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

Reason: ''
Image

"Vice is a miscalculation in the pursuit of happiness"
(J. Bentham)
User avatar
Dark Duke
Veteran
Veteran
Posts: 201
Joined: Wed Jan 26, 2005 7:57 am
Location: Valencia

OBBLM - Change points awarded for Kills

Post by Dark Duke »

Thanks for the code, Shteve0, I'll try that when I'm back at home on Sunday

Reason: ''
Life is short, block fast.
User avatar
Shteve0
Legend
Legend
Posts: 2479
Joined: Thu May 07, 2009 10:15 am
Location: Wellington, New Zealand

Re: OBBLM - Change points awarded for Kills

Post 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... ;)

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
User avatar
Dark Duke
Veteran
Veteran
Posts: 201
Joined: Wed Jan 26, 2005 7:57 am
Location: Valencia

Re: OBBLM - Change points awarded for Kills

Post by Dark Duke »

We tried it yesterday for the first time and it works perfectly, thanks again Shteve0!

Reason: ''
Life is short, block fast.
Post Reply