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
Option to enforce structure limits #409
Option to enforce structure limits #409
Conversation
Maybe there should be code to disable this for challenges. |
c59984b
to
7e27dd5
Compare
Force pushed a new version which disables the buttons if challenge is active. |
7e27dd5
to
5da19bc
Compare
I added a commit to disable AA structures when there can be no VTOLs. |
a6ef33f
to
d182441
Compare
Pushed a fix for Windows build. Earlier I added optimizations to avoid useless research. |
I don't think hardcoding what research to disable is a good idea. A stat mod could easily include a ton more research related to VTOLs, cyborgs, lassats, and uplinks. Perhaps a new key-value JSON pair could be added to all the relevant research and then another function could find all those research items to pass to RecursivelyDisableResearch(). 0 = don't disable The above just demonstrates an example. |
d182441
to
188076c
Compare
Yes, that's better. There's still a special case for Sat Uplink vs. LasSat: can't disable Uplink research if LasSat is not disabled. |
Lassat research doesn't disable if Lassat limits are 0. |
@KJeff01 I could not reproduce this, what was your setup? |
The research is only disabled if structure limits are enforced at start, because if the map contains for example VTOL factories, the players should be able to research VTOLs and their upgrades and AA should not be disabled. But that rule could be relaxed for Lassat and Uplink: whether the structures exist at start or not does not matter if you can't build replacements and there are no related upgrades. Then the research can be disabled even if there is no enforcing. |
@topimiettinen Ah, you're right. I didn't notice that the limits must be enforced for disabling the research. |
188076c
to
0823f6a
Compare
I updated so that LasSat and Uplink research is not conditional to forced limits anymore. |
The button to enforce structure limits doesn't disable. If I try to go back to non-enforcement settings it simply stays in the enabled state. At least after pressing the checkmark button, anyway. Aside from the above, I've tested some skirmishes and a few local multiplayer games and it all looks to be working without issues. |
As a new option, remove structures which exceed structure limits. This allows use of full bases while still making meaningful limits.
If structure limits are enforced and VTOLs are disabled, disable also AA structures and related research. This improves the AIs in no-VTOL games. Likewise, disable useless research for no-cyborg, no-lassat and no-satlink games. Closes Warzone2100#510.
0823f6a
to
0212719
Compare
Thanks for testing, should be fixed now. |
As a new option, remove structures which exceed structure limits. This
allows use of full bases while still making meaningful limits.