Commit f6412a5
Re-Enable HumansVsNations 🎉 (#2689)
## Description:
**HumansVsNations is back!**
The original PR had an issue: only the nations listed in the map’s
`manifest.json` were being spawned, which resulted in completely
unbalanced games.
What did I change with this PR?
- The number of humans and nations is now always the same.
- If a map contains too many nations, we take a random subset.
- If a map doesn’t contain enough nations, we dynamically add additional
ones. These get random spawn locations, and their names are taken from
the new name generator `NationNames.ts`. The name generator was taken
from the closed PR #2245 (idea from @VariableVince).
These changes apply to private lobbies and singleplayer as well. In
singleplayer, you now simply play a 1-vs-1 against a nation.
For public lobbies, we use 50% of the regular team-game player count.
The remaining 50% are nations.
We are also using the Hard difficulty for HumansVsNations.
At the moment, it’s important that nations cheat a little because humans
can donate troops, whereas nations cannot, at least not yet. In the
future, we may make that work.
We might need to adjust the difficulty or do fine-tuning depending on
the humans’ win rate in production. Ideally, we want a ~50% win rate;
otherwise, the mode may become boring. Over time, humans will likely
develop strategies that nations can’t counter, in which case we’ll need
to improve the nation AI.
Here is a screenshot showing that the number of nations now matches the
number of humans in the private lobby UI:
<img width="806" height="304" alt="Screenshot 2025-12-25 004023"
src="https://github.com/user-attachments/assets/cb4ac6f6-13cc-452c-8cc5-7a500670d7f2"
/>
The `PuplicLobby` display was a bit bugged for HumansVsNations:
<img width="532" height="191" alt="Screenshot 2025-12-23 221832"
src="https://github.com/user-attachments/assets/3950bcd9-0072-4c28-b1a0-83c0a24e9b8e"
/>
So I fixed it to look like this;
<img width="532" height="195" alt="Screenshot 2025-12-23 224127"
src="https://github.com/user-attachments/assets/690fc554-b607-4c8a-8b22-0c2912ee671a"
/>
## Please complete the following:
- [X] I have added screenshots for all UI updates
- [X] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [X] I have added relevant tests to the test directory
- [X] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced
## Please put your Discord username so you can be contacted if a bug or
regression is found:
FloPinguin
---------
Co-authored-by: iamlewis <lewismmmm@gmail.com>1 parent 581fec5 commit f6412a5
File tree
9 files changed
+362
-22
lines changed- resources/lang
- src
- client
- core
- configuration
- execution
- game
- server
9 files changed
+362
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
277 | | - | |
| 277 | + | |
| 278 | + | |
278 | 279 | | |
279 | 280 | | |
280 | 281 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
551 | 551 | | |
552 | 552 | | |
553 | 553 | | |
554 | | - | |
| 554 | + | |
555 | 555 | | |
556 | | - | |
| 556 | + | |
557 | 557 | | |
558 | 558 | | |
559 | 559 | | |
| |||
564 | 564 | | |
565 | 565 | | |
566 | 566 | | |
567 | | - | |
| 567 | + | |
568 | 568 | | |
569 | 569 | | |
570 | 570 | | |
| |||
876 | 876 | | |
877 | 877 | | |
878 | 878 | | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
879 | 894 | | |
880 | 895 | | |
881 | 896 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| 138 | + | |
138 | 139 | | |
139 | 140 | | |
140 | 141 | | |
| |||
241 | 242 | | |
242 | 243 | | |
243 | 244 | | |
244 | | - | |
| 245 | + | |
245 | 246 | | |
246 | 247 | | |
247 | 248 | | |
| |||
265 | 266 | | |
266 | 267 | | |
267 | 268 | | |
| 269 | + | |
268 | 270 | | |
269 | 271 | | |
270 | | - | |
271 | | - | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
272 | 276 | | |
273 | 277 | | |
274 | 278 | | |
| |||
282 | 286 | | |
283 | 287 | | |
284 | 288 | | |
285 | | - | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
286 | 294 | | |
287 | 295 | | |
288 | 296 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | 12 | | |
14 | 13 | | |
15 | 14 | | |
| |||
26 | 25 | | |
27 | 26 | | |
28 | 27 | | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
68 | 65 | | |
69 | 66 | | |
70 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
190 | | - | |
| 190 | + | |
| 191 | + | |
191 | 192 | | |
192 | 193 | | |
193 | 194 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
120 | 128 | | |
121 | 129 | | |
122 | 130 | | |
| |||
194 | 202 | | |
195 | 203 | | |
196 | 204 | | |
| 205 | + | |
| 206 | + | |
197 | 207 | | |
198 | 208 | | |
199 | 209 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
312 | 312 | | |
313 | 313 | | |
314 | 314 | | |
315 | | - | |
| 315 | + | |
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
| |||
0 commit comments