3066 Commits

Author SHA1 Message Date
evanpelle fac5611c75 matchmaking 2026-01-30 17:20:39 -08:00
Evan 6c2e0d1528 Fix matchmaking double join bug (#3065)
## Description:

There were several issues with the matchmaking modal:

1. It was defined twice (once before login, and once after login), so
players would sometimes join the matchmaking queue twice.
2. When clicking away from the modal (not clicking the back button), the
"onClose" callback was not triggered. So if a person closed & reopened
the modal, they would join twice'
3. Cache the userMe response so it can be called multiple times

## 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:

evan
v0.29.11
2026-01-30 15:27:34 -08:00
Evan 02dc5fc153 Add glowing red dot on store when skins change (#3066)
## Description:

Hash the pattern + is for sale and store it in local storage. then check
if the new cosmetics hash is different from the one we last saw. If it's
different, add a glowing red dot on the store. After user clicks it,
then update the hash and remove the dot.
<img width="1030" height="143" alt="Screenshot 2026-01-29 at 3 54 46 PM"
src="https://github.com/user-attachments/assets/e5727764-40e4-45e1-b651-65816e657067"
/>

## 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:

evan
2026-01-30 14:24:55 -08:00
FloPinguin 683ba4c6c1 Make easy difficulty easier 📊 (#3072)
## Description:


https://www.reddit.com/r/Openfront/comments/1qquvdg/difficulty_scaling_in_single_player/
People seem to feel that easy is not easy enough, even after the various
nerfs in multiple places.
So let's touch DefaultConfig.

## 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
2026-01-30 13:45:19 -08:00
Evan 1eed561be5 Add enzo video tutorial in the help modal (#3059)
## Description:

Add video at top of help section, also show a glowing dot for new
players.

<img width="301" height="133" alt="Screenshot 2026-01-28 at 7 25 23 PM"
src="https://github.com/user-attachments/assets/c6b01853-f066-470f-a22d-8995fd81fe0f"
/>

## 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:

evan
v0.29.10
2026-01-28 19:43:25 -08:00
Ryan 80c8ddda0f Shop new tag (#3057)
adds a "tag" of NEW to the shop which pulses
<img width="159" height="83" alt="image"
src="https://github.com/user-attachments/assets/603adbaa-0699-443b-b7de-2fe383cdf759"
/>

- [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

regression is found:

w.o.n
v0.29.9
2026-01-28 16:09:11 -08:00
evanpelle 936b689769 bugfix: duplicate matchmaking modals causing elo to display unknown v0.29.8 2026-01-28 13:06:43 -08:00
evanpelle dec926c54c bugfix: usernames are reset after each game v0.29.7 2026-01-28 12:13:59 -08:00
FloPinguin a0ec1dd646 For v29.6: More team games 🧑‍🤝‍🧑 (#3051)
## Description:

Use ffa:teams ratio of 3:2

## 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
v0.29.6
2026-01-28 11:30:26 -08:00
FloPinguin 054fa91dee Changelog cache busting 🔧 (#3047)
## Description:

Added cache busting for `changelog.md`

## 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
2026-01-28 11:30:19 -08:00
FloPinguin 965dd0f482 Confirm alliance break ⚠️ (#3033)
## Description:

People accidentally clicked the betray button because it's at the same
position as the ally button.
So let's add a small confirmation step.


https://github.com/user-attachments/assets/754f2d33-7419-42fc-a732-197c3107236e

## 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
2026-01-28 11:30:09 -08:00
Evan cb3128f390 Better CrazyGames integration (#3055)
## Description:

Better integration with CrazyGames:

* Don't show login because accounts have not been integrated with
CrazyGames yet
* Integrate CG invite links & usernames
* Refactor match making logic to Matchmaking.ts
* Allow periods to support crazy game usernames
* Create a no-crazygames class that disabled elements when on crazygames

## 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:

evan
2026-01-28 11:29:27 -08:00
Aotumuri 71c5102981 mls (v4.15) (#3019)
## Description:

mls for v29
Version identifier within MLS: 4.14

This is the last mls for v29.

## 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:

aotumuri

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2026-01-26 21:56:10 +00:00
Simon Schaarschmidt 2984bec4d1 Fix: Extended spawn immunity in 1v1s (#3010) (#3028)
If this PR fixes an issue, link it below. If not, delete these two
lines.
Resolves #3010 

## Description:

Extended the spawn immunity in 1v1s from 5 to 30 seconds, to prevent
spawn killing.

## 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:

@xtonai

Co-authored-by: Ryan <7389646+ryanbarlow97@users.noreply.github.com>
v0.29.5
2026-01-26 13:51:02 -08:00
Evan 9aed372425 Added afterEach cleanup to call inputHandler.destroy(), which clears the setInterval before jsdom tears down and removes window. (#3030)
## Description:

Fixes the failing test:coverage ci.

## 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:

evan
2026-01-26 13:50:58 -08:00
Evan 3d9f0aec6c Migrate from publift to playwire ads (#3039)
## Description:

Use playwire ad integration

## 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:

evan
2026-01-26 13:34:04 -08:00
Mattia Migliorini a72c87baa0 Change join-changed event listener to fix Game Replay functionality (#2968)
Resolves #2967 

## Description:

The "Replay" action on recent games doesn't work anymore after the
release of v29.

The problem arises because `AccountModal.viewGame()` correctly calls
`history.pushState()` with the game URL and then dispatches the
`join-changed` event.
The `join-changed` event listener in `Main.ts` calls `onHashUpdate()`,
which first calls `JoinPrivateLobbyModal.close()` and then handles the
new URL.

The problem is that `JoinPrivateLobbyModal.onClose()` resets the modal
UI, but also replaces the history state with `/`, therefore
`handleUrl()` receives the homepage URL instead of the game URL.

This PR fixes the above by creating a dedicated callback for the
`join-changed` event (which is dispatched only by `AccountModal` ATM),
skipping the `JoinPrivateLobbyModal.close()` call.

## 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:

deshack_82603
2026-01-25 20:40:44 -08:00
FloPinguin 3f95a45eaf Nations donate troops now 💀 (In team games) (#2984)
## Description:

For v29, balances the HvN winrate.

In team games, nations now donate troops to their weakest team members
(if they have no attack options available).
How often they donate depends on the difficulty.

This PR also has some other little fixes:
- For HvN games, always return true in `shouldAttack()` (make nations a
bit more aggressive).
- Early exit in `attackWithRandomBoat()` for performance
- Early exit in `findNearestIslandEnemy()` for performance AND to make
sure nations which are encircled by friends don't run into this method
(=> no donation happening!)

## 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
2026-01-25 20:40:13 -08:00
evanpelle 87dab71e42 delay 1v1 game start from 5s=>7s to give more time for players to join the game v0.29.4 2026-01-24 15:50:54 -08:00
Mattia Migliorini dfd6a1f5f9 Replace donate buttons with attack ones for AFK friendly players in radial menu (#2987)
Resolves #2986

## Description:

Shows donate actions in radial menu only when friendly player is NOT
disconnected.
This is needed in order to let mobile/touch users attack AFK teammates.

Current behavior:
<img width="525" height="514" alt="image"
src="https://github.com/user-attachments/assets/78b95e27-443a-4dd5-934b-c8a841b4bf97"
/>

With this PR:
<img width="545" height="457" alt="image"
src="https://github.com/user-attachments/assets/e9792478-6ccd-415f-9199-cff7bfc9356f"
/>


## 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:

deshack_82603
2026-01-23 14:18:50 -08:00
FloPinguin be958dd6c2 Fix NewsModal design a bit 🖌️ (#3002)
## Description:

Fix \<ul> margins.
Maybe for v29, so people get less eye cancer 😄

Previous: 

<img width="788" height="651" alt="Screenshot 2026-01-22 234602"
src="https://github.com/user-attachments/assets/e1945704-c572-4617-b15c-d5053d0bddc4"
/>

Now:

<img width="781" height="652" alt="Screenshot 2026-01-22 234535"
src="https://github.com/user-attachments/assets/6179ce29-349a-4216-8530-08e767bf645a"
/>

## 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
2026-01-22 15:20:20 -08:00
FloPinguin c90435fc20 Fix: Nuking an Ally that is Disconnected shows a Red background ghost. Shouldn't be Red as not a Betrayal (#2988)
## Description:

Previous behavior: https://youtu.be/Lv0RuBYh9qw?t=1359

New behavior:


https://github.com/user-attachments/assets/acfcc4f0-157e-44a0-be28-802927a3c787

## 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
2026-01-22 14:35:19 -08:00
Vivacious Box ae3adf915c Fix nuke telegraph for allies (#2983)
## Description:

Adds back the nuke overlay for teammates

## 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:

Mr. Box
2026-01-21 15:48:52 -08:00
evanpelle 207d6b0a28 cache cosmetics.json on client 2026-01-21 15:13:09 -08:00
FloPinguin e9e2f06d69 Humans are severely skill issued ⚠️ Change HvN difficulty to Medium (#2971)
## Description:

For v29

HvN winrate is between 10 and 15%, but should be around 50%.

1. Change HvN difficulty to Medium
2. Little balance change in `NationAllianceBehavior`

## 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
v0.29.3
2026-01-20 10:44:06 -08:00
FloPinguin 4d668e299c Optimize team game frequency (#2970)
## Description:

I analyzed the avg fill time of team games (past 30 days) and was able
to confirm what people in the main discord said: Duos / Trios / Quads
fill slower.
Might be something for v29.

| Game Mode | Games | Avg Fill Time |
|-----------|-------|---------------|
| **FFA** (Excluding ranked) | 53,654 | **29s** |
| Team: 2 teams | 3,379 | 33s |
| Team: 3 teams | 3,291 | 32s |
| Team: 4 teams | 3,242 | 31s |
| Team: 5 teams | 3,364 | 32s |
| Team: 6 teams | 3,381 | 31s |
| Team: 7 teams | 3,227 | 31s |
| Team: Duos | 3,295 | **43s** |
| Team: Trios | 3,300 | 39s |
| Team: Quads | 3,299 | 37s |
| Team: Humans Vs Nations | 101 | **24s** |

Therefore I propose to decrease the chance of Duos, Trios and Quads
(especially Duos).
Also, increase the chance of HumansVsNations because its special and
unlike all the other team modes.

| Team Config | Previous | New |
|-------------|----------|-----|
| 2 teams | 10% | 10% |
| 3 teams | 10% | 10% |
| 4 teams | 10% | 10% |
| 5 teams | 10% | 10% |
| 6 teams | 10% | 10% |
| 7 teams | 10% | 10% |
| **Duos** | 10% | **5%** ↓ |
| **Trios** | 10% | **7.5%** ↓ |
| **Quads** | 10% | **7.5%** ↓ |
| **HumansVsNations** | 10% | **20%** ↑ |

## 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
2026-01-20 10:33:42 -08:00
evanpelle cf63340227 reduce frequency of didier 40=>1 2026-01-20 10:31:07 -08:00
evanpelle 776c644a84 increase frequency of didier v0.29.2 2026-01-20 06:25:36 -08:00
Arkadiusz Sygulski f6454963b2 Pathfinding refinements (#2959)
## Description:

### Short path for multi-source HPA*

Math was not mathing, increased the bounds to 260x260, it is a bit
slower but should work better. The short path was breaking when player
owned a lot of shores. This is because the bounding box of tiles with
less than 120 distance + 10 padding could be as big as 260x260 and the
optimized array was set to 140x140. I made mistake of calculating it as
`2 * (60 + 10)` instead of `2 * (120 + 10)`.

### LoS path refinement

Previously, we ran 2 passes of LoS smoothing on the path. However, since
we are effectively tracing the same path, the line of sight is
essentially the same. This PR makes second line of sight stop on water
tiles with magnitude `n + 1` compared to first path. Practically, this
means it'll attempt LoS exactly 1 tile after previous corner. See
screenshot.

<img width="1299" height="1151" alt="image"
src="https://github.com/user-attachments/assets/726be236-1ff8-406c-896a-02902a762ab0"
/>

### SendBoatAttackIntentEvent

The flow of sending transport ships is currently strange. This PR makes
the flow more sane.

**Old flow**
```
- Player clicks TARGET tile, it can be deep inland
- Client asks Worker for the best START tile to TARGET tile
- Worker answers `false`, since the tile is inland
- Client sends BoatAttackIntent with START=false and TARGET tiles set
- Worker accepts BoatAttackIntent, computes DESTINATION as closest shore to TARGET
- Worker re-computes best START to DESTINATION
- Worker sends boat from START to DESTINATION
```

**New flow**
```
- Player clicks TARGET tile, it can be deep inland
- Client sends BoatAttackIntent with TARGET
- Worker accepts BoatAttackIntent, computes DESTINATION as closest shore to TARGET
- Worker computes START as the best tile to DESTINATION
- Worker sends boat from START to DESTINATION
```

## 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:

moleole
v0.29.1
2026-01-19 19:28:45 -08:00
evanpelle 697a346c86 Increase worker initailization timeout from 5=>20s to prevent worker timeout, add duration logging to some longer operations 2026-01-19 19:26:09 -08:00
FloPinguin 9d0ae10912 Quickfix: Disable nations in ranked and change map selection (#2957)
## Description:

Quickfix: Disable nations in ranked and change map selection 

(Lewis wanted these, Australia three times so it occurs more often)

Just a quickfix, we will probably have to improve the map selection
later on, and maybe play on non-compact maps too?

## 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
2026-01-19 16:36:42 -08:00
FloPinguin 21a035cdb4 Fix random spawn (#2958)
## Description:

"You can pick your spawn in random spawn games in v29. You need to open
the menu and click on the attack button. That's it."

Thats the fix for this problem.
Radial menu no longer allows to attack (pick a spawn) while random spawn
is enabled.
And SpawnExecution got a check so you cannot send malicious intents.

## 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
2026-01-19 16:28:14 -08:00
Arkadiusz Sygulski ac56fccd8e Fix warship pathfinding (#2955)
## Description:

As reported on Discord, warship could get stuck. This PR fixes the
issue.

## 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:

moleole
v0.29.0
2026-01-19 09:16:47 -08:00
FloPinguin c71af0e602 Fix map name formatting for Baikal Nuke Wars 🔧 (#2922)
## Description:

Fixes this little i18n problem:

<img width="732" height="172" alt="Screenshot 2026-01-16 050833"
src="https://github.com/user-attachments/assets/65fe27a6-f77a-49d9-94a9-145b4e719a88"
/>

## 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: Ryan <7389646+ryanbarlow97@users.noreply.github.com>
2026-01-19 09:16:44 -08:00
DevelopingTom f367ea1940 Record human/nation/bot conquests (#2949)
## Description:

Conquests are currently mixing all player types.

This is not ideal as people wonders why a 50 player game can lead to
hundred of kills.
Having separate records can also help with achievements and better
balancing.

This PR splits the conquests record into 3 categories: human, nations
and bots.

It is linked to this infra PR:
https://github.com/openfrontio/infra/pull/246

<img width="895" height="497" alt="image"
src="https://github.com/user-attachments/assets/66e49100-8114-4406-84ab-d9627355956d"
/>

While the recorded data make a distinction between bots/nations, it's
only displayed here as a single "bot" category.

## 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:

IngloriousTom
2026-01-18 20:51:12 -08:00
Aotumuri d92008f96b mls (v4.14) (#2953)
## Description:

mls for v29
Version identifier within MLS: 4.14

## 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:

aotumuri

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2026-01-18 20:46:08 -08:00
WillTHomeGit be4cabdde9 fix (pathfinding): prioritize best connected water neighbor in ShoreCoercingTransformer (#2937)
## Description:

**Describe the PR.**

This PR improves how pathfinding finds a starting water tile when
launching a transport ship from a shore.

Previously, the code simply picked the first water neighbor it found.
This caused issues where, if a boat were traveling east, it might launch
out of a northern tile from a shore.

<img width="896" height="353" alt="image"
src="https://github.com/user-attachments/assets/69d83012-3397-43b3-8ab0-9ebde6ffea97"
/>

<img width="342" height="219" alt="image"
src="https://github.com/user-attachments/assets/a191f5cf-97da-4e34-a191-55ce14c794f0"
/>

The new logic checks all water neighbors and picks the "best" one by
counting how many water tiles surround it. This ensures transport ships
launch into the main body of water instead of suboptimal positions.

If two tiles have water neighbors with the same score, they are
tie-broken through a euclidean distance check.

## 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:

Scisyph

---------

Co-authored-by: WilliamT-byte <williamt2023@tamu.edu>
Co-authored-by: Ryan <7389646+ryanbarlow97@users.noreply.github.com>
2026-01-18 13:05:53 -08:00
Arkadiusz Sygulski b75df821cd Fix rail pathfinding (#2950)
## Description:

This PR resolves a crash related to rail pathfinding reported on
Discord.

```
git checkout c179249cdd
npm run dev:staging
Replay id: kEbHPSP3
```

## 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:

moleole

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Ryan <7389646+ryanbarlow97@users.noreply.github.com>
2026-01-18 13:04:38 -08:00
evanpelle e08b8f8bdc add Sierpinski to public map rotation 2026-01-17 21:33:54 -08:00
FloPinguin 239f7910ad Add nation count loading for JoinPrivateLobbyModal (Part 2) (#2942)
## Description:

Use `this.getEffectiveNationCount()` everywhere inside of
`LobbyPlayerView`, instead of `this.nationCount`. So the team player
counts always update properly.

## 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
2026-01-17 21:32:29 -08:00
FloPinguin 4a0ce7128e Fix for v29: Add nation count loading for JoinPrivateLobbyModal; change HvN difficulty (#2941)
## Description:

1. In JoinPrivateLobbyModal the nation count loading was missing. That
caused the team preview UI to show different player counts compared to
the HostLobbyModal. For example it showed 0/0 nations for the
HumansVsNations team mode (instead of 2/2):

<img width="726" height="217" alt="Screenshot 2026-01-16 211337"
src="https://github.com/user-attachments/assets/8b4219de-e2b2-46ff-a600-c86915e5bdb3"
/>

2. Turn down HvN difficulty from Impossible to Hard. 
We steamrolled over Hard nations in the playtest (at least in two of the
three games) because we donated lots of troops to each other.
But after some API data research I noticed that only 33% of players in
public team games ever use the donate functionality.
And we probably have less skilled players in public games than in the
playtest.
So its probably better to use the Hard difficulty to ensure balanced
gameplay.
I know, I'm overthinking this 😂

## 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
2026-01-17 21:32:21 -08:00
Ryan c8e0838b15 CopyButton, extract into component (#2934)
## Description:

Extracted the CopyButton into its own component, and now reusing it in
"Account" too.

## 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:

w.o.n
2026-01-17 21:31:45 -08:00
Wraith d2712d2f14 fix: performance overlay positioning (#2943)
## Description:

fix: performance overlay positioning

## 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:

wraith4081
2026-01-17 13:31:17 -08:00
Ryan 0d81626760 Revert "Fix for v29: Add nation count loading for JoinPrivateLobbyModal; change HvN difficulty" (#2940)
Reverts openfrontio/OpenFrontIO#2933
2026-01-17 15:46:45 +01:00
FloPinguin dba04027df Merge pull request #2933 from FloPinguin/fix-nation-loading
Fix for v29: Add nation count loading for JoinPrivateLobbyModal; change HvN difficulty
2026-01-17 14:35:26 +00:00
FloPinguin c6021ab38e Fix for v29: Increase chance of starting gold in random game modifiers from 3% to 5% 🙂 (#2936)
## Description:

While looking at the game rotation on my localhost page I noticed that
the cool new starting gold modifier came up veeeery rarely.
Every 33th game is just too rare, lets do "Every 20th game" 🙂

## 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
v0.29.0-beta4
2026-01-16 19:09:06 -08:00
Mattia Migliorini b1d63533d5 Handle confirmation on popstate event if player is active in a game (#2777)
Please merge it into v29, since in that version the back navigation out
of a game is currently **broken** after switching from hash-based to
path-based routing via #2740

## Description:

Protect against players accidentally leaving an active game by pressing
the browser back button. Uses the same confirmation dialog as the game
exit button.

Partially handles issue #1877 (protects against back button, not closing
tab or editing the URL directly).

<img width="861" height="373" alt="image"
src="https://github.com/user-attachments/assets/167cc137-6df3-44a7-a594-91ffd904857d"
/>

Partial credit to PR #2141

## 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:

deshack_82603
2026-01-16 17:09:08 -08:00
Arkadiusz Sygulski 2fcca8ee26 Pathfinding - optimize naval invasions (#2932)
# Pathfinding pt. 4

https://pf-pt-4.openfront.dev/

## Description:

Hello again! Pathfinding. It's fast, but inaccurate. This PR makes it
more accurate and actually faster. Sadly it is _faster_ because of a
blunder in previous PR (using BucketQueue where MinHeap would be
better), not because of a new tech. More importantly, it is more
accurate. And that's what people apparently want.

## What changed?

Most of the functional changes relate to `SpatialQuery` module. This is
the thingy that answers "we know the target, which tile of my territory
is the best to launch an invasion". To make it compute a path from South
America to the deep inland China river, it has to work on a coerced map,
one with a very small resolution, so small in fact, that every 4096 map
tiles gets compressed to just one pixel. I hope you see where this is
going.

Previously we selected a random coastal tile within this big pixel
(honestly it wasn't random at all, but could very well be for the
illustrative purposes). Now, we try to be a bit more deliberate. Since
we already know the rough location of the probably best tile, we can
exclude all other tiles from the computation. Imagine a player's
territory spans both Americas on global map - that's a lot of shores.
But since we already know the best tile is somewhere close to Miami, the
problem space was greatly reduced, no need to consider all other shores.
But pathing to the target in China from Miami is still crazy expensive.

This is where second trick comes to play - instead of pathing all the
way to China, we select a _waypoint_ in the rough direction of China,
about 100 to 200 tiles away. This way we fairly cheaply select best tile
to launch an invasion towards this abstract point. And chances are, this
point is far enough, the newly computed path is very close to being
optimal. When you throw a dart from far away, the difference between
scoring 10 and missing is very small. This is why aiming in the general
direction of the board - as opposed to the ceiling - is usually good
enough.

## Okay, but what about the crazy paths when I send invasion to the
opposed bank of a river?!

Well, pathing from America to China is cool, but most players wouldn't
notice the difference on such long paths, what about the short ones? We
now try more accurate pathing first and defer to hierarchy only if it
fails. This produces much better paths for short invasions. While the
fix described above ensures the accuracy is improved also on
medium-to-long routes.

## Playground

Yes.


https://github.com/user-attachments/assets/9cf9586f-c99a-416d-b856-8cf0a21c35ed

## CodeRabbit

Grab a 🥕. Remember `tests/pathfinding/playground` is mostly generated
code and go easy on it. It's enough for it to work and do it's job of
visualizing the paths. No need for throughout review of these files.

## 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:

moleole
2026-01-16 16:27:55 -08:00
FloPinguin 4e8454f3cc Lobby Gold Options (Starting Gold, Gold Multiplier) 💰 (#2915)
## Description:

We might want to add this to v29 to have a third possible public game
modifier from the beginning on 😄 Would be fun

- Add starting gold option (0 to 1_000_000_000 allowed, also applies to
nations)
- Add gold multiplier option (0.1 to 1000 allowed, also applies to
nations and bots)
- Add third public game modifier (3% chance of starting with 5M gold)
- Why 5M? It's enough gold to massively change the game start but not
enough to insta-hydro someone (launcher + hydro is 6M)

<img width="357" height="140" alt="image"
src="https://github.com/user-attachments/assets/72acc15c-e788-4e04-8590-ac72dd9657c7"
/>


## 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
2026-01-16 10:20:35 -08:00
Ryan d0fda1d535 mergestats (#2904)
If this PR fixes an issue, link it below. If not, delete these two
lines.
Resolves #2704
## Description:

Merges together easy + medium difficulties.

Before:
<img width="1500" height="580" alt="image"
src="https://github.com/user-attachments/assets/26199d52-8ef2-4feb-ae87-bbfff35e3115"
/>

After:
(dont have one to show oop)

(btw that win ratio in the first screenshot is not mine.. 💀) 

## 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:

w.o.n
2026-01-16 10:20:28 -08:00