-
Notifications
You must be signed in to change notification settings - Fork 494
Added modoptions for extra starting metal and energy per team #6299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Added modoptions for extra starting metal and energy per team #6299
Conversation
This allows for team-specific balancing for asymetric games (Both from player counts in king of the hill style events, or mismatch of OS events such as discord wars.).
sprunk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice if the added stuff was put into functions (GetAllyTeamStartMetal etc?) since there's a bit of copypaste and the function is starting to get bloated.
|
What if there's more than 2 teams? |
|
Wanted to comment in similar vain, perhaps worth adding a dropdown with team number, supporting the current number of teams or if too difficult to dynamicly pick it up, supporting team 1-16? |
|
I didn't want to touch too much of the original function, but I'll do a refactor of it to clean it up. For the multiple teams: Coding-wise this is easy to do. The tricky part is supporting this nicely in the modoptions-gui. Currently it's 4 values that have to be filled in which supports different starting values for up to 3 teams. If there's a way to dynamically change the modoptions.lua depending on the amount of teams in the game this could be an option, but would need an extra tab just to support it (or go to a less intuitive syntax, and parse that). Note: Nothing will crash for more than 3 teams with the current implementation. It is however not possible to adjust the starting resources per team for more than 3 teams. I'm not too much of a fan of the per-team option tab unless there is more in there than just the starting bonuses. I would rather go for a json string input then of something of the form: [t1:{500,500),t2:{200,200}] where the first number is metal and the second is energy, but this is a lot less intuitive. |
|
Code refactored to clean up the main function and re-tested for both teams and games with more teams. As far as I can see, there is no easy way to support modifications for an arbitrary number of teams in a way that doesn't bloat the gui, or make it unnecessarily hard to use when the default usecase is 2 (or 3 in rarer cases) teams. Any extra teams will obtain the default starting metal in the current implementation. |
|
To avoid bloat, an alternative idea: a single toggle with "apply handicap bonus to starting resources/metal/energy and storage". Although that couples it to the bonus so functions quite differently, it would be a lot simpler. |
It would indeed strongly couple a boost at the start with a boost to the exponential scaling instead of them being independent, which makes it a bit harder to tweak things. I do think there is something to be said for the simplicity of it though, and it would also address the concerns for doing it with many teams by essentially making it a toggle in the modoptions. Any further thoughts/comments before I refactor it once more to go towards that instead? |
… bonus based on their income multiplier
|
Updated the code to give a bonus to the starting metal and energy based on the bonus itself. While this couples the bonuses together, it scales for many teams without gui-bloat (single toggle button) and is less of a hassle to setup. |

This allows for team-specific balancing for asymetric games (Both from player counts in king of the hill style events, or mismatch of OS events such as discord wars.).
Work done
Extra modoptions for extra starting energy for team 1 and 2 added. Adding it for more teams would quickly clog op the UI.
Test steps
Set extra start metal/energy for Team 1/2 to non-zero in the experimental settings.
Verify that starting metal and energy is correct.
Screenshots:
If you're making visible changes, add before/after screenshots or videos of the major
changes so it's easier for reviewers to see what is different in this PR
BEFORE:
AFTER: