Register    Login    Forum    FAQ

Board index » Community Discussion » Digital format




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: OBBLM team tiering?
 Post Posted: Thu Jul 14, 2016 2:49 pm 
Super Star
Super Star
User avatar

Joined: Sun Feb 23, 2014 6:40 pm
Posts: 895
Location: Derby, UK
I am looking to add a little incentive for players in the DBBL to take certain lower tier teams.

I plan on simply adding a little boost to the treasury. Now, I think I have found a bit of code in the OBBLM system that will allow me to do this.

Has anybody else done this? The piece of code I think I need to alter is below.

"public function dtreasury($delta) {

/**
* Add a delta to team's treasury.
**/

$query = "UPDATE teams SET treasury = treasury + $delta WHERE team_id = $this->team_id";
if (mysql_query($query)) {
$this->treasury += $delta;
return true;
}
else {
return false;
}
}"

_________________
The brains behind the Double Skulls Podcast http://doubleskulls.libsyn.com/

Chief dream maker at J-Bone Industries https://igg.me/at/jbonefrogmen


Top 
 Profile  
 
 Post subject: Re: OBBLM team tiering?
 Post Posted: Thu Jul 14, 2016 3:10 pm 
Super Star
Super Star
User avatar

Joined: Wed Dec 03, 2003 8:25 pm
Posts: 1109
Location: Chelmsford, Essex (UK)
Would it be easier to manually boost their treasury when they create their teams using the admin option?


You do not have the required permissions to view the files attached to this post.

_________________
Image
Have played 22 out of the 24


Top 
 Profile  
 
 Post subject:
 Post Posted: Thu Jul 14, 2016 7:00 pm 
Legend
Legend
User avatar

Joined: Thu May 07, 2009 11:15 am
Posts: 2479
Location: Wellington, New Zealand
J_Bone, that code is an sql query that handles routine adjustment of an existing team's treasury - either as howlonggriffon has already screenshot, or in the match result report, or [potentially] both. I'd advise against tweaking it, personally!

If you want to manually alter a team's treasury, you can do that using the admin tools in the team's screen, as Hg said.

Another option maybe, you could change the starting treasury of teams to be dependent on their race id number? It'd mean adding an if statement in the team creation process.

_________________
League and tournament hosting, blogging and individual forums - all totally free. For the most immersive tabletop sports community experience around, check out theendzone.co


Top 
 Profile  
 
 Post subject: Re:
 Post Posted: Fri Jul 15, 2016 12:49 am 
Super Star
Super Star
User avatar

Joined: Sun Feb 23, 2014 6:40 pm
Posts: 895
Location: Derby, UK
Shteve0 wrote:
J_Bone, that code is an sql query that handles routine adjustment of an existing team's treasury - either as howlonggriffon has already screenshot, or in the match result report, or [potentially] both. I'd advise against tweaking it, personally!

If you want to manually alter a team's treasury, you can do that using the admin tools in the team's screen, as Hg said.

Another option maybe, you could change the starting treasury of teams to be dependent on their race id number? It'd mean adding an if statement in the team creation process.


Yes, I realised that shortly after posting. I would rather set up a statement related to the race ID number but am not sure how to go about it.

I have to spent a fair amount of time herding the teams in the DBBL anyway so anything that would stop me having to ask people to set up a team so I can then add a treasury boost to it would be great. I know somebody would get confused / be a pain in my arse.

_________________
The brains behind the Double Skulls Podcast http://doubleskulls.libsyn.com/

Chief dream maker at J-Bone Industries https://igg.me/at/jbonefrogmen


Top 
 Profile  
 
 Post subject: Re: OBBLM team tiering?
 Post Posted: Fri Jul 15, 2016 12:14 pm 
Super Star
Super Star
User avatar

Joined: Sun Jun 08, 2008 9:27 am
Posts: 821
Location: Glasgow
I'm doing some OBBLM fiddling today - if I can see a quick fix, I'll put something together.


Top 
 Profile  
 
 Post subject: Re: OBBLM team tiering?
 Post Posted: Fri Jul 15, 2016 3:37 pm 
Super Star
Super Star
User avatar

Joined: Sun Feb 23, 2014 6:40 pm
Posts: 895
Location: Derby, UK
Vanguard wrote:
I'm doing some OBBLM fiddling today - if I can see a quick fix, I'll put something together.


Brilliant. Thanks mate. I've got the page all set up for next season so this is the very last piece of the puzzle. It's be great if you could help me out with it.

_________________
The brains behind the Double Skulls Podcast http://doubleskulls.libsyn.com/

Chief dream maker at J-Bone Industries https://igg.me/at/jbonefrogmen


Top 
 Profile  
 
 Post subject: Re: OBBLM team tiering?
 Post Posted: Fri Jul 15, 2016 3:43 pm 
Super Star
Super Star
User avatar

Joined: Sun Feb 23, 2014 6:40 pm
Posts: 895
Location: Derby, UK
I am wondering if there is something I can insert into lib/game_data.php to sort it...

_________________
The brains behind the Double Skulls Podcast http://doubleskulls.libsyn.com/

Chief dream maker at J-Bone Industries https://igg.me/at/jbonefrogmen


Top 
 Profile  
 
 Post subject: Re: OBBLM team tiering?
 Post Posted: Fri Jul 15, 2016 5:00 pm 
Super Star
Super Star
User avatar

Joined: Sun Feb 23, 2014 6:40 pm
Posts: 895
Location: Derby, UK
Essentially, I know the IF function for my tiers should look SOMETHING like this...

I'm just not sure how to integrate this kind of thing into the OBBLM site.

if (race_id=T_RACE_GOBLIN,T_RACE_HALFLING,T_RACE_OGRE) {
treasury = 1150000;
} else if (race_id==T_RACE_CHAOS_PACT,T_RACE_NURGLE,T_RACE_SLANN,T_RACE_UNDERWORLD,T_RACE_VAMPIRE) {
treasury = 1100000;
} else if (race_id=T_RACE_BRETONNIA,T_RACE_CHAOS,T_RACE_ELF,T_RACE_HIGH_ELF,T_RACE_HUMAN,T_RACE_KHEMRI,T_RACE_DKHORNE,T_RACE_LIZARDMAN,T_RACE_NECROMANTIC,T_RACE_NORSE) {
treasury = 1050000;
} else {
treasury = 1000000;
}

_________________
The brains behind the Double Skulls Podcast http://doubleskulls.libsyn.com/

Chief dream maker at J-Bone Industries https://igg.me/at/jbonefrogmen


Top 
 Profile  
 
 Post subject:
 Post Posted: Fri Jul 15, 2016 5:40 pm 
Legend
Legend
User avatar

Joined: Thu May 07, 2009 11:15 am
Posts: 2479
Location: Wellington, New Zealand
I'm on vacation right now and miles away from a PC. If Vanguard can't sort you out I'll take a look (though I'd rate his php skills above mine)

_________________
League and tournament hosting, blogging and individual forums - all totally free. For the most immersive tabletop sports community experience around, check out theendzone.co


Top 
 Profile  
 
 Post subject: Re: OBBLM team tiering?
 Post Posted: Sat Jul 16, 2016 12:34 pm 
Super Star
Super Star
User avatar

Joined: Sun Feb 23, 2014 6:40 pm
Posts: 895
Location: Derby, UK
I have spoken to William at OBBLM and he said the following:

"The game_data.php file does not control the treasury as it is not a race specific item. Also this file isn't read on every load. I believe it is used to build a table in the database.

https://github.com/TheNAF/naflm/blob/ma ... s_team.php has a create function that could be modified to do what you need. The treasury might be in the $input array there. You could try a switch statement there with each team that you want to do a check on and modify the $input['treasury'] right there. You might also find where the create method is called and then afterwards use the Team:dtreasury() method. Not sure if an object will be in that area of the code to make it easy or not.

It isn't something I will go into much further. It would take a bit of time to do and test, but as I said, the naflm project on GitHub has been making a lot of changes and probably would add in this request."

I have put in a request for the updated version of OBBLM but will have a look into class_team to see if I can find the function he mentioned.

_________________
The brains behind the Double Skulls Podcast http://doubleskulls.libsyn.com/

Chief dream maker at J-Bone Industries https://igg.me/at/jbonefrogmen


Top 
 Profile  
 
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 10 posts ] 

Board index » Community Discussion » Digital format


Who is online

Users browsing this forum: No registered users

 
 

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to: