From d97184af35a418b579d5eb48740ccb360442082d Mon Sep 17 00:00:00 2001 From: Evan Date: Thu, 30 Oct 2025 19:23:00 -0700 Subject: [PATCH 1/2] add credits link to starting modal (#2333) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description: * Create CREDITS.md * add all link to it on loading page Screenshot 2025-10-30 at 6 24 07 PM ## 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 --- CREDITS.md | 28 ++++++++++++++++++++++++++++ resources/lang/en.json | 4 ++-- src/client/GameStartingModal.ts | 33 +++++++++++++++++++++++++++++++-- 3 files changed, 61 insertions(+), 4 deletions(-) create mode 100644 CREDITS.md diff --git a/CREDITS.md b/CREDITS.md new file mode 100644 index 000000000..0528ed38b --- /dev/null +++ b/CREDITS.md @@ -0,0 +1,28 @@ +# Credits + +## Code + +OpenFront is licensed under AGPL-3.0. +See [Contributors](https://github.com/openfrontio/OpenFrontIO/graphs/contributors) for code contributors. + +## Map Data + +### OpenStreetMap + +© [OpenStreetMap contributors](https://www.openstreetmap.org/copyright) +Licensed under ODbL + +### Natural Earth + +[Natural Earth](https://www.naturalearthdata.com/) +Public Domain + +### Bedmap3 Antarctica Dataset + +Pritchard, H.D., Fretwell, P.T., Fremand, A.C. et al. Bedmap3 updated ice bed, surface and thickness gridded datasets for Antarctica. _Sci Data_ 12, 109 (2025). +[https://doi.org/10.1038/s41597-025-04672-y](https://doi.org/10.1038/s41597-025-04672-y) +Licensed under [CC-BY 4.0](https://creativecommons.org/licenses/by/4.0/) + +## Icons + +Icons from [The Noun Project](https://thenounproject.com/) diff --git a/resources/lang/en.json b/resources/lang/en.json index 1f20d7d22..04581e7b8 100644 --- a/resources/lang/en.json +++ b/resources/lang/en.json @@ -262,8 +262,8 @@ }, "game_starting_modal": { "title": "Game is Starting...", - "code_license": "Code licensed under AGPL-3.0", - "desc": "Preparing for the lobby to start. Please wait." + "credits": "Credits", + "code_license": "Code licensed under AGPL-3.0" }, "difficulty": { "difficulty": "Difficulty", diff --git a/src/client/GameStartingModal.ts b/src/client/GameStartingModal.ts index ebbeea98b..4e11778a3 100644 --- a/src/client/GameStartingModal.ts +++ b/src/client/GameStartingModal.ts @@ -51,6 +51,13 @@ export class GameStartingModal extends LitElement { } .modal p { + margin: 2px 0; + font-size: 14px; + } + + .modal .loading { + font-size: 16px; + margin-top: 20px; margin-bottom: 20px; background-color: rgba(0, 0, 0, 0.3); padding: 10px; @@ -88,16 +95,38 @@ export class GameStartingModal extends LitElement { .copyright { font-size: 32px; margin-top: 20px; + margin-bottom: 10px; opacity: 1; } + + .modal a { + display: block; + margin-top: 10px; + margin-bottom: 15px; + font-size: 20px; + color: #4a9eff; + text-decoration: none; + transition: color 0.2s ease; + } + + .modal a:hover { + color: #6bb0ff; + text-decoration: underline; + } `; render() { return html` `; } From 1165126a6590942effe426727c0a2c6c3c8d34b3 Mon Sep 17 00:00:00 2001 From: Evan Date: Thu, 30 Oct 2025 19:27:46 -0700 Subject: [PATCH 2/2] meta update: use rational function to discourage short trades, buff trains (#2337) ## Description: Use a rational function to strongly nerf short trades. At 50 tiles the reward is halved. To compensate, increase gold given by trains by 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: evan --- src/core/configuration/DefaultConfig.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/core/configuration/DefaultConfig.ts b/src/core/configuration/DefaultConfig.ts index 722a3b8f8..a1fd6dcef 100644 --- a/src/core/configuration/DefaultConfig.ts +++ b/src/core/configuration/DefaultConfig.ts @@ -345,7 +345,7 @@ export class DefaultConfig implements Config { trainSpawnRate(numPlayerFactories: number): number { // hyperbolic decay, midpoint at 10 factories // expected number of trains = numPlayerFactories / trainSpawnRate(numPlayerFactories) - return (numPlayerFactories + 10) * 20; + return (numPlayerFactories + 10) * 16; } trainGold(rel: "self" | "team" | "ally" | "other"): Gold { switch (rel) { @@ -370,7 +370,8 @@ export class DefaultConfig implements Config { } tradeShipGold(dist: number, numPorts: number): Gold { - const baseGold = Math.floor(100_000 + 100 * dist); + // Smooth anti-cheese formula: base reward scales with distance using rational function, heavily penalizing short trades while converging to original rewards at long distances + const baseGold = Math.floor(100_000 * (dist / (dist + 50)) + 100 * dist); const numPortBonus = numPorts - 1; // Hyperbolic decay, midpoint at 5 ports, 3x bonus max. const bonus = 1 + 2 * (numPortBonus / (numPortBonus + 5));