Page 2 of 2

Re: OBBLM Fan Factor

Posted: Thu Mar 09, 2017 7:53 am
by cptdaver
Vanguard wrote:Found time to do some digging tonight and I think I've solved the problem.
In lib\game_data.php you can set the FF cost, which I've changed from the default 10k to 0k.
In localsettings\settings_2.php (note, 2 is the ID for my League, yours may differ) I've set the Initial_Fan_Factor to 5.
Also, Post_Game_FF is set to false, which prevents players from purchasing FF after they've played their first game.

Hopefully that'll work as intended, we'll see soon enough. :)

Hi,

I know this tread is already 2 years old but I'm struggling with the same issue. (...except for the initial Fan Factor which stays zero in our league.)
I've changed the FF cost in the lib\game_data.php to 0K and run 'Re-install database back-end procedures and functions.' in the core panel.
Unfortunately nothing changes in the team creator. The factor stays 10K.

I tried this procedure in different browsers, cleared cache etc.
Obviously I'm doing something wrong.

Can someone help me out with this issue?

Thanks.

Re: OBBLM Fan Factor

Posted: Thu Mar 09, 2017 10:22 am
by Vanguard
Hi,

After you've ran Re-install database back-end procedures and functions from the Core panel you'll also need to run SyncAll().
The Re-Install procedure loads the game data into the database, so the modified FF value should be brought in at this point. However, it does not recalculate the team values, so you won't see any difference yet. SyncAll() prompts OBBLM to recalculate everything, so you should see the new FF value take effect after that.

Let me know if that doesn't work, as there have been a few changes in the new version.

Re: OBBLM Fan Factor

Posted: Thu Mar 09, 2017 12:38 pm
by cptdaver
Nope. I already tried that. It has no effect.
Is there something else I can try?

Re: OBBLM Fan Factor

Posted: Fri Mar 10, 2017 11:00 am
by Vanguard
I've just tested this on my own site, and changing the value in game_data.php followed by the re-install and syncAll() correctly updates all the TVs for me.
Where is your site hosted?

Re: OBBLM Fan Factor

Posted: Fri Mar 10, 2017 11:58 am
by cptdaver
obblm

@Vanguard see PM

Re: OBBLM Fan Factor

Posted: Fri Mar 10, 2017 8:50 pm
by funnyfingers
Vanguard,

Are you using the release version of NAFLM?

Re: OBBLM Fan Factor

Posted: Mon Mar 13, 2017 10:42 am
by Vanguard
Yes, I'm using the NAFLM release, although I've a few custom tweaks too, so may not be the best reference case.
Had some follow up chat with CptDaver via PM and the issue was that the apparent TV cost was not changing on the team creation page. Looks as though that is hard-coded for display purposes. I'll flag it up on the GitHub site as a bug but looks as though it should still calculate correctly. CptDaver was going to do some test teams to confirm, so hopefully he can let us know.

Re: OBBLM Fan Factor

Posted: Mon Mar 13, 2017 11:48 am
by cptdaver
Hi,

I just did some testing;
Even if you changed the FF-value in lib\game_data.php to 0K, the 'team creator' does still count the FF towards the TV on creating your team. In other words; on creating your team you'll still be able to select FF 5 f.e. and this wil count as 50K towards your TV. Once your team has been created though the TV will be reduced by the chosen FF again. (because of the customized lib\game_data.php)

So I can confirm Vanguard; the FF in the 'team creator' is hard coded. (=not linked to the FF in lib\game_data.php) As long as you choose FF 0 upon team creation everything is fine - otherwise this can be confusing.

Grtz.

Re: OBBLM Fan Factor

Posted: Mon Mar 13, 2017 2:42 pm
by Vanguard
I've had a quick look at the Team Creator module and think it should be an easy fix. Leave it with me and I'll see if I can put something together.

Re: OBBLM Fan Factor

Posted: Mon Mar 13, 2017 2:54 pm
by jcopersito
Vanguard - any chance you can field some similar questions from me too?

Re: OBBLM Fan Factor

Posted: Mon Mar 13, 2017 3:53 pm
by Vanguard
I've updated the class_team_creator.php file which should fix the issue. If you want to try it, replace the original file with the attached version on your install of OBBLM (\modules\teamcreator). I highly recommend keeping a copy of the original file and switching them back if you encounter any issues. The attached file is .txt to enable it to be uploaded, you can just change the extension to .php when putting it on your server.
jcopersito wrote:Vanguard - any chance you can field some similar questions from me too?
Happy to take a look, but can't make any promises. If it's not Fan Factor related though, I'd say put it in a new thread for clarity.

Re: OBBLM Fan Factor

Posted: Mon Mar 13, 2017 4:47 pm
by cptdaver
Nailed it! Nice job, Vanguard.

Thanks a lot.