OBBLM - Activating Bretonnian List

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

greggm1
Rookie
Rookie
Posts: 8
Joined: Tue Oct 19, 2010 4:48 am

OBBLM - Activating Bretonnian List

Post by greggm1 »

Working on setting up OBBLM v.91 for for my TT league. I have the basics taken care of, I think... now I'd like to figure out how to make the Bretonnian list legal for the coaches. This note here is a little vague for a development noob like me.

Does anyone have any advice for getting it to work? I see that the package already has a file called /lib/game_data_brett.php with the stats all setup. Is there a simple switch somewhere to make this active or can I insert something somewhere?

Appreciate any guidance you can provide.

Gregg

(If you're interested or it helps, I have the league setup here: BPBBL.)

Reason: ''
User avatar
nicholasmr
Experienced
Experienced
Posts: 110
Joined: Mon Oct 22, 2007 1:01 pm
Location: Copenhagen, Denmark
Contact:

Re: OBBLM - Activating Bretonnian List

Post by nicholasmr »

I have updated the wiki page.
Please tell me if it is instructive enough now :-).

Nicholas.

Reason: ''
greggm1
Rookie
Rookie
Posts: 8
Joined: Tue Oct 19, 2010 4:48 am

Re: OBBLM - Activating Bretonnian List

Post by greggm1 »

Thanks for the quick response, Nicholas! :D

So, when I open lib/game_data_lrb6.php to edit it, I do not see this line:

require_once('lib/game_data_lrb6.php');

What I DO see is this line:

require('lib/game_data_lrb6x.php');

I've checked both the v0.91 and v0.95 packages, and both versions of that file contain the "require" line reference lrb6x, not "require_once" referencing lrb6.

I did try replacing that line, by the way, and the site got a little funky. :) I also tried just adding the new line in under it, and it made it worse. I've since reverted back to the original state, and figured I'd wait to hear from you again here.

Again, I'm grateful for your help.

GM

Reason: ''
User avatar
nicholasmr
Experienced
Experienced
Posts: 110
Joined: Mon Oct 22, 2007 1:01 pm
Location: Copenhagen, Denmark
Contact:

Re: OBBLM - Activating Bretonnian List

Post by nicholasmr »

Sorry, my bad. I guess I wrote that too early in the morning, haha. I made some serious typos.

Anyway, I've now corrected the page and it should be OK. Please let me know :-).

Reason: ''
greggm1
Rookie
Rookie
Posts: 8
Joined: Tue Oct 19, 2010 4:48 am

Re: OBBLM - Activating Bretonnian List

Post by greggm1 »

LOL! I thought for sure I was going crazy. :)

I'll tale a look at it when I get home from work this evening, and I'll holler if I have any struggles.

One additional question: if I want both Brett & Khorne lists active, am I reading it right that I need to install v0.95? And in that instance, should I insert both lines in the header.php file?

Thanks,

GM

Reason: ''
User avatar
Shteve0
Legend
Legend
Posts: 2479
Joined: Thu May 07, 2009 10:15 am
Location: Wellington, New Zealand

Re: OBBLM - Activating Bretonnian List

Post by Shteve0 »

I asked something similar a while ago and never got an answer. Let me know if you crack it! :)

Original post:

---

Fab, thanks Nicholas. I contacted the guys at those sites a couple of weeks ago, so I guess I'll just wait and see. Since the current points system will be disrupted if we moved straight to the current site, I'll hold off until next season - perhaps take a vote about what rules and tracking to use based on what OBBLM can support.

So, I'll be holding off on making changes to the core rules for a while yet - and I was perhaps blinded to the functionality of OBBLM by my own ridiculous requirements. If you're using it out of the box, I can see that it's a great tool.

One thing I'd like to look at in the meantime though is making sure I'm doinf the right thing with coding for new rosters. For example I'd like to add the following code - do I do this in game_data_LRB6x.php, or is there a specific hierarchy I need to follow? If anyone fancies checking over my code, I'd be very grateful for that too :)

Cheers!

Steve

Code: Select all

define('T_RACE_KHORNE_DAEMONS', 25);
define('T_RACE_APES_OF_WRATH', 26);

$DEA['Khorne Daemons'] = array (
    'other'	=> array (
        'rr_cost' => 70000,
        'icon' => 'chaos.png',
        'race_id' => T_RACE_KHORNE_DAEMONS, # (Khorne Daemons)
    ),
    'players'	=> array (
  			'Pit Fighter'		=> array (
    				'ma'        	=> 6,
    				'st'        	=> 3,
    				'ag'        	=> 3,
    				'av'        	=> 8,
    				'def'	    => array (5),
    				'norm'		=> array ('G', 'P'),
    				'doub'		=> array ('A', 'S'),
    				'qty'			  => 16,
    				'cost'			  => 60000,
    				'icon'			  => 'nlineman1an',
    			    'pos_id'          => 238,
  			),
  			'Bloodletter Daemon'	=> array (
    				'ma'        	=> 6,
    				'st'        	=> 3,
    				'ag'        	=> 3,
    				'av'        	=> 7,
    				'def'	    => array (75, 53, 103),
    				'norm'		=> array ('G', 'A', 'S'),
    				'doub'		=> array ('P'),
    				'qty'			  => 4,
    				'cost'			  => 80000,
    				'icon'			  => 'cbeastman1an',
    			    'pos_id'          => 239,
  			),
  			'Khorne Herald'		=> array (
    				'ma'        	=> 6,
    				'st'        	=> 3,
    				'ag'        	=> 3,
    				'av'        	=> 8,
    				'def'	    => array (113),
    				'norm'		=> array ('G', 'S'),
    				'doub'		=> array ('A', 'P'),
    				'qty'			  => 2,
    				'cost'			  => 70000,
    				'icon'			  => 'cwarrior1an',
    			    'pos_id'          => 240,
  			),
  			
  			'Bloodthirster'		=> array (
    				'ma'        	=> 6,
    				'st'        	=> 5,
    				'ag'        	=> 1,
    				'av'        	=> 9,
    				'def'	    => array (99, 112, 71, 5, 75, 53, 103),
    				'norm'		=> array ('S'),
    				'doub'		=> array ('G', 'A', 'P'),
    				'qty'			  => 1,
    				'cost'			  => 180000,
    				'icon'			  => 'minotaur2an',
    			    'pos_id'          => 241,
  			)
    )
);

$DEA ['Apes of Wrath']	=> array (
		'other'	=> array (
			'rr_cost' => 60000,
			'icon' => 'amazon.png',
			'race_id' => T_RACE_APES_OF_WRATH, # (Apes of Wrath)
		),
		'players'	=> array (
			'Line Ape'	=> array (
				'ma'        	=> 6,
 				'st'        	=> 3,
 				'ag'        	=> 3,
 				'av'        	=> 7,
 				'def'	    => array (73),
 				'norm'		=> array ('G'),
 				'doub'		=> array ('A', 'S', 'P'),
 				'qty'			=> 16,
				'cost'			=> 50000,
				'icon'			=> 'olineman1an',
			    'pos_id'        => 242,
			),
			'Thrower'	=> array (
				'ma'        	=> 5,
 				'st'        	=> 3,
 				'ag'        	=> 3,
 				'av'        	=> 8,
 				'def'	    => array (73, 70, 58),
 				'norm'		=> array ('G', 'P'),
 				'doub'		=> array ('A', 'S'),
 				'qty'			=> 2,
				'cost'			=> 70000,
				'icon'			=> 'othrower1an',
			    'pos_id'        => 243,
			),
			'Gorilla'	=> array (
				'ma'        	=> 5,
 				'st'        	=> 4,
 				'ag'        	=> 2,
 				'av'        	=> 8,
 				'def'	    => array (73, 51, 112),
 				'norm'		=> array ('G', 'S'),
 				'doub'		=> array ('A', 'P'),
 				'qty'			=> 4,
				'cost'			=> 80000,
				'icon'			=> 'oblackorc1an',
			    'pos_id'        => 244,
			),
			'Runner'	=> array (
				'ma'        	=> 7,
 				'st'        	=> 3,
 				'ag'        	=> 3,
 				'av'        	=> 7,
 				'def'	    => array (73, 14),
 				'norm'		=> array ('G', 'A'),
 				'doub'		=> array ('S', 'P'),
 				'qty'			=> 2,
				'cost'			=> 80000,
				'icon'			=> 'oblitzer1an',
			    'pos_id'        => 245,
			),
			'Silverback'	=> array (
				'ma'        	=> 5,
 				'st'        	=> 5,
 				'ag'        	=> 1,
 				'av'        	=> 9,
 				'def'	    => array (99, 73, 51, 112, 54),
 				'norm'		=> array ('S'),
 				'doub'		=> array ('G','A', 'P'),
 				'qty'			=> 1,
				'cost'			=> 130000,
				'icon'			=> 'ogre4an',
			    'pos_id'        => 246,
			)
		)
);

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
nicholasmr
Experienced
Experienced
Posts: 110
Joined: Mon Oct 22, 2007 1:01 pm
Location: Copenhagen, Denmark
Contact:

Re: OBBLM - Activating Bretonnian List

Post by nicholasmr »

greggm1:
That's correct (both things). Note however that there is a new 0.95 beta out as of today. If you decide to use it please report bugs you may find. :-).


Shteve0:
OK. Well, the only thing I have to say about points is that almost every league calculates points in a different way. Thus, it's VERY hard for me to generalize this into a points-algorithm for OBBLM because of the vast diversity in how points can be created. Not that it would be impossible to do, but I don't have the time to put into the effort it would require to get done :-(. It is after all a hobby project of mine (not to mention the other OBBLM contributors).
Regarding you adding your own races. That's perfectly fine and harmless, and OBBLM supports it. BUT, you should pick a race ID far above the current number 24 (I think it's 24?). Otherwise you'll be in serious trouble when more teams officially get added to OBBLM and overlap with your race ID. I'd recommend picking something like race ID = 100. Of course you could not know this because I have not documented this properly on the wiki - I'm doing that now, though,
Apart from the race image (which you have set as the amazon image, it looks OK :-).

Nicholas.

Reason: ''
greggm1
Rookie
Rookie
Posts: 8
Joined: Tue Oct 19, 2010 4:48 am

Re: OBBLM - Activating Bretonnian List

Post by greggm1 »

So I can't seem to get it to work, even with the new instructions. If I make ANY change to the header.php file at all, I get this error:
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/greggm1/public_html/obblm/header.php:1) in /home/greggm1/public_html/obblm/header.php on line 34
When I undo the change and restore the file to its original state, the error persists. Doesn't appear to impact functionality from what I can tell, but I'd not likely recognize it easily, if I saw it.


Removing this line:

require_once('lib/game_data_lrb6.php'); # LRB6 (Module settings might depend on game data, so we include it first)#

and leaving this:

require_once('lib/game_data_cyanide.php'); # Use this instead of above line for LRB6 + Cyanide "Daemons of Khorne" race.

Removes ALL of the Races from the drop down on the New Team page in Coaches Corner, and returns the following errors when Synch'ing the PHP-stored game data from the OBBLM core panel:
Warning: Invalid argument supplied for foreach() in /home/greggm1/public_html/obblm/lib/class_sqlcore.php on line 37

Warning: Invalid argument supplied for foreach() in /home/greggm1/public_html/obblm/lib/class_sqlcore.php on line 51

Warning: Invalid argument supplied for foreach() in /home/greggm1/public_html/obblm/lib/class_sqlcore.php on line 58
So I tried restoring everything and taking a different approach. I went to the game_data_lrb6x.php file and inserted the code for Khorne that Shteve0 posted above, and I was able to get it to work, I think. So... at this point, I'm considering reverting to v0.91 and simplying modifying game_data_lrb6x.php to include code for Khorne and Brett. I hate giving up on the "official" method, but I'm just not able to make it work thus far.

Heading to work for now - if you have any other recommendations before I get home, I'd be willing to try them before doing the "edit ...lrb6x.php" thing.

Sorry for all of the trouble. As always, grateful for your help.

GM

Reason: ''
User avatar
nicholasmr
Experienced
Experienced
Posts: 110
Joined: Mon Oct 22, 2007 1:01 pm
Location: Copenhagen, Denmark
Contact:

Re: OBBLM - Activating Bretonnian List

Post by nicholasmr »

I don't think this is suitable to discuss here. Please create a thread at code.google.com/p/obblm and we'll figure it out there.

Reason: ''
greggm1
Rookie
Rookie
Posts: 8
Joined: Tue Oct 19, 2010 4:48 am

Re: OBBLM - Activating Bretonnian List

Post by greggm1 »

Will do, sir.

Reason: ''
greggm1
Rookie
Rookie
Posts: 8
Joined: Tue Oct 19, 2010 4:48 am

Re: OBBLM - Activating Bretonnian List

Post by greggm1 »

Just one more post to let you know that I did decide to install 0.91 and make manual changes to the game_data_lrb6x.php file to include the Bret & Khorne lists. Worked like a charm. :D

I absolutely love your work here, Nicholas. My league will definitely be donating toward the cause.

Thanks again,

Gregg

Reason: ''
User avatar
Shteve0
Legend
Legend
Posts: 2479
Joined: Thu May 07, 2009 10:15 am
Location: Wellington, New Zealand

OBBLM - Activating Bretonnian List

Post by Shteve0 »

Fanrastic, cheers for the replies, guys! I'll try it out myself then, see how I get on. Glad my first attempt at php coding seems to have come up trumps!

Nicholas, sorry not to have cropped the message - I was focussing only on the coding part with this question.

Another thing: is it possible to have a front page dashboard that just links to several individual league summaries? I'm wondering to what extent two or more leagues can share a site without giving one priority over the other(s). Just a curiosity.

Cheers!

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
Shteve0
Legend
Legend
Posts: 2479
Joined: Thu May 07, 2009 10:15 am
Location: Wellington, New Zealand

Re: OBBLM - Activating Bretonnian List

Post by Shteve0 »

[partial] success!

Okay, so two problems: one, I've set up a league ID=2 alongside my league ID=1 and can navigate to either of them from the front page (though =1 is the default - can I link to the other one directly?). Issue here is that when setting up a team I can't select either league to enter the team into, so it goes to 'none' as default on saving.

Second, I've set up my Khorne code in the lrb6x file (when I tried Apes it crashed my site, so I'll have to look into that) and can set up the Khorne team as an option. Unfortunately though, I can't hire any players... have I missed a step?

Cheers for all this!

Steve

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
nicholasmr
Experienced
Experienced
Posts: 110
Joined: Mon Oct 22, 2007 1:01 pm
Location: Copenhagen, Denmark
Contact:

Re: OBBLM - Activating Bretonnian List

Post by nicholasmr »

greggm1
The first error you wrote is very likely to be because you have accidently added a space or linebreak at the top of the header.php file. The absolutely first thing in that file should be <?php ..without any space in front of it. See if that helps. :-)
I wonder if doing this removes all the problems. I would think so (remember to sync the game data!). Also, you should know that the newer ruleset used by OBBLM is LRB6 (game_data_lrb6.php), not the experimental LRB6 (game_data_lrb6x.php) you are using. Thus loading the brett and cyanide game data sets also loads the LRB6, not LRB6x.
Note that you need to obblm 0.95 rc2 version for this.

You are of course welcome to use the 0.91 version, but note my above comments on the LRB6/LRB6x game data sets. :-)

Shteve0
Yes, each leagues is completely separated from one another, and multiple (real, physical) leagues can actually share the same site if they wish. Any coach, however, must be a member of that league in order to create teams in it and play matches in it - this is done in the user management admin section. Linking directly to individual leagues will be difficult. But, once a coach is logged in his "home league" (selected in his coach corner settings) will load by default.
I'm not sure if you missed any steps (did you sync the BB game data from the core panel?). But, it is very hard for me to figure out what happens when you edit the game data files yourself. It's most likely you left behind a coding error of some sort .

Reason: ''
User avatar
nicholasmr
Experienced
Experienced
Posts: 110
Joined: Mon Oct 22, 2007 1:01 pm
Location: Copenhagen, Denmark
Contact:

Re: OBBLM - Activating Bretonnian List

Post by nicholasmr »

Okay guys.

I have been thinking a bit about this and decided to change how to do this (since you are not the only ones wanting to fiddle with the races).

I have added a new patch at http://code.google.com/p/obblm/downloads/list
Download and install the 0.95 RC2 version and then apply the patch by overwrite files with the files contained in the patch-zip file.

Now, simply open the settings.php file and enable the extra races you wish (I've added the Apes race too now).
After that, please go to the core panel and sync the game data as usual.

Shteve0
Are you absolutely sure that the Apes race you wrote is correct? When I google the race it seems to differ somewhat from yours?

Reason: ''
Post Reply