Open JBoneDS opened 8 years ago
I had a look at this on Friday and created a fork for development. Added an array of team specific treasuries to the RULES array and updated the team creator to reference it. That works fine. However, there are issues in a multi-league install as the RULES array is not regenerated when the league selection is changed which causes issues with this and other league specific options.
Rather than open a new issue, I'll add the bug here: In a multi-league setup when you go to the the Team Creator page, it reads in the RULES variable from the default league. However, when the league dropdown is changed, the RULES are not updated. This means that the team selection (which optional teams are included) and starting treasury value are not updated for the new league. (There may be other implications I've missed too). Simplest solution may be to set the page to redirect to itself when the league dropdown is changed and pass the league selection in. However, would be neater if we could load the data in the background via an ajax call or similar.
How much work would be required to write game_data.php et al to the database on league creation and then provide a UI for modifying? This would open the door to custom races (e.g. Stunty Leeg) or tweaking of existing races (e.g. CRP+). Bit off-topic/out of scope for this issue but would provide a natural home for things like starting race treasury.
The treasury and team information come from local_settingsX.php, in that they're league specific. I think moving that information into the DB should be a medium-term goal for NAFLM. Game_data I think should be consistent across all installs. Custom teams etc should probably belong in local_settings (or its successor) as they'll still be league specific. They can overwrite the info from game_data.
I've tested this on my dev site and looks to be good. JBone is willing to test on his league site, so I'm going to forward the updated files to him too. Submitted a Pull Request for the work.
I have tested this and it appears to be working well! The coaches are setting up their teams for the new season and the custom treasuries are all in place for the different races. Thanks!
How would I go about implementing this in my league?
I would appreciate if a function was added whereby I could effectively tier the races in OBBLM by allowing different races to have different starting treasury amounts. If I could allow lower tiered teams to have higher starting treasury amounts this would encourage players to diversify their race choices.