Skip to content

Conversation

@maxie12
Copy link

@maxie12 maxie12 commented Nov 23, 2025

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:

image

AFTER:

image

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.).
Copy link
Collaborator

@sprunk sprunk left a 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.

@Damgam
Copy link
Member

Damgam commented Nov 25, 2025

What if there's more than 2 teams?
What if there's 200 teams?

@PtaQQ
Copy link
Collaborator

PtaQQ commented Nov 25, 2025

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?

@sprunk
Copy link
Collaborator

sprunk commented Nov 25, 2025

Extra teams would be GUI bloat and changing resources doesn't really allow balancing FFAs anyway (if you give more resources to a noob, you're probably actually just giving more reclaim to the adjacent pro who will kill him anyway).

For avoiding GUI bloat, either Chobby would have to support something like show the input box for team N+1 only if the box for team N is filled (maybe already implemented for tweakdefs? since tweaks also have like 10 of them), or perhaps move per-team options out of the usual modoptions popup altogether and add a "per-team options" button in the team rosters area like
image

@maxie12
Copy link
Author

maxie12 commented Nov 25, 2025

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.

@maxie12
Copy link
Author

maxie12 commented Nov 26, 2025

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.

@TheChronographer
Copy link
Collaborator

TheChronographer commented Nov 27, 2025

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.

@maxie12
Copy link
Author

maxie12 commented Nov 27, 2025

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?

@maxie12
Copy link
Author

maxie12 commented Nov 28, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants