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
Refactor powermodifier.js #3725
Conversation
I'm not sure why you add all those if statement if all you try to do is to make I just want to throw it here : I give an UBI to all players in NRS that amount to 2/5 of the total expected power in the map, Turns out scaling that UBI with the bots makes the AI much more predictable than scaling just the oil power. Most of the excess power usage that AI use comes from the research that they do very poorly and base building that they don't always need. So UBI for all AIs! That's my slogan for the day... |
Ahh yes, i see what you mean. Yeah, i can greatly simplify it to just 1 line that way. As for the rest of your comment, i want this PR to be as uncontroversial as possible, i am sure your suggestion would be very controversial. I also don't want to change or affect the balance outside of the bots. |
Simplified to 1 line per difficulty check.
I am an idiot, i just realized the current code is trying to do the same thing i am doing, it just sucks at it. |
Simplify the logic for the player(s) to 1 line as well.
Add some help for modders.
Extend the modding help info.
Hmm... Should the documentation i added inside powermodifier.js be moved into a separate doc file? |
Remove `~` to make it clearer that the percentages are now exact.
Remove `~` to make it clearer that the percentages are now exact.
Remove `~` to make it clearer that the percentages are now exact.
Remove `~` to make it clearer that the percentages are now exact.
Remove `~` to make it clearer that the percentages are now exact.
Remove `~` to make it clearer that the percentages are now exact.
Remove `~` to make it clearer that the percentages are now exact.
You could do something like this:
This way the formula doesn't get duplicated a bunch. |
Further simplified the code; reduced formula re-usage.
I like the approach you've taken here, nice work. "Change the Power Modifier for the Medium bot to be 10% more, the bots waste a lot of power, and the intent of Medium is a fair match with a competent AI, most average players playing casually can defeat the Medium bot as is, this aims to make things more equitable. This change can be dropped if needed. My thoughts are that for Easy and Insane this makes sense to have modifiers in place... but for both Medium and Hard I'd prefer those to be untouched, in the way of no bonus modifier being applied. Whether others agree or disagree, the thought occurs that having an option within the menu UI to Enable / Disable power modifiers per AI bot and or Human players as a kind of handicap option would be useful for this (separate from difficulty), so it can be set maybe even dynamically within a given range. Though let us keep it simple here, with AI bots first. When it comes to having competent playing AI bots at each difficulty level in an equitable manner to each other whilst being appropriately scaled, this is best solved directly within the AI bot code itself. Something to which I am currently undertaking and wish to provide. |
Hard already gets a ~50% bonus (it varies between ~30% and ~50%), this PR aims to improve the code, and not make any big changes to the way the game plays, so removing the bonus for hard would be a separate PR. As for the 10% bonus for medium, it will do for now, until the AIs can be improved. |
I think i will update the translatable strings, there shouldn't be any issues if i do. |
Add the new/changed strings, this also includes stuff from the campaign update, but that shouldn't be an issue.
…/Warzone2100_Dev into power_modifier_refactor
Please do not do this - these files are updated by a maintenance task on our GitHub CI, and it makes it more difficult to merge and review changes. |
Ahh, i see. I misunderstood https://github.com/Warzone2100/warzone2100/blob/master/doc/Translations.md#notes-for-developers (my mistake, the wording there is fine) |
This reverts commit 039d0a0.
…/Warzone2100_Dev into power_modifier_refactor
Rebalance. Remove +10% bonus for medium bots.
Gets 10% more power from each oil derrick --> Gets the same power from each oil derrick as the player
After testing against bots for a while with these changes, i have determined that the +10% bonus for medium bots was too much (a few extra tanks makes a big difference in non-NTW). I have also observed that hard and insane are far more difficult than before, i think this is because the average power modifier bonus has increased with this PR. Easy bots are also far easier now (same reason, in reverse). |
Closed.