Commit Graph

17116 Commits

Author SHA1 Message Date
Vantha 1cc3020049 Call buildFirstBase correctly
`this.buildFirstBase` doesn't exist so this caused errors since 8b1e78ae1e
2026-09-10 11:27:27 +02:00
eZamus e5e22c1deb Spectate Mode: Display Gaia's emblem
Fixes #7592
2026-09-02 10:41:56 +02:00
ShadowOfHassen aa86258751 Added ruins 2026-08-27 11:07:53 +02:00
ShadowOfHassen 14f9c9aaff Add treasure history entries 2026-08-27 11:07:53 +02:00
ShadowOfHassen a6b1318164 Add generic text attribute to credit json parser 2026-08-27 11:07:53 +02:00
Lancelot de Ferrière 2cc0cf457a Fix the callers of GetEffectiveAttackRange's out-of-reach range
Follows db23584fc3 - the caller of GetEffectiveAttackRange's didn't
really use the NEVER_IN_RANGE result properly.
The C++ engine does not handle Infinity (treated as 0).
This also changes MoveToTargetAttackRange to explicitly try to get
closer if the parabolic range is not in range, but it seems like a flat
range could - on the assumption that once we get closer, the terrain
height difference is lower.
2026-08-26 10:55:27 +02:00
Lancelot de Ferrière ce119cd461 Fix towers firing at targets they cannot reach
Since 38b33b0484, the range check happened in CanAttack, however the
check there is too permissive.
This meant it was possible for towers to attack certain targets outside
their actual range, depending on the query results and unit AI focus
fire.
2026-08-26 10:55:27 +02:00
Lancelot de Ferrière d60e36c74a Remove unused BuildingAI.CheckTargetVisible
FireArrows now checks range/visibility via CanAttack directly (see next
commit), leaving this method unused.
2026-08-26 10:55:27 +02:00
Lancelot de Ferrière 63b0f05b43 UnitAI: keep chasing on forced orders.
Following 38b33b0484, units on aggressive stance no longer chase beyond
their own vision, including on player-forced orders. This fixes that
regression.
(Note that approaching and chasing are a bit inconsistent).
2026-08-26 10:55:27 +02:00
Lancelot de Ferrière cb6f46db71 UnitAI: Simplify GetQueryRange and fix issues
38b33b0484 partly rewrote GetQueryRange but ended up with two
bugs/regressions:
- in standGround, melee units used an effective max-range of 0 instead
  of their melee attack max range
- units that have a min-range did not see units within their min-range
  (even though they can move).

This fixes these issues and rewrite the function in a simpler fashion
for readability.
2026-08-26 10:55:27 +02:00
obelix e4b72711e6 Add proper SpecificNames to germ heroes
Proposed by @Vantha, elaborated by @Genava55:
https://wildfiregames.com/forum/topic/140675-more-ai-names-for-the-germans/?do=findComment&comment=618302

Refs: #8755
2026-08-23 02:22:15 +02:00
obelix 95ca5cebb6 Fix grammar for GenericName of germ Catafalque
Reported by @Vantha

Refs: #8755
2026-08-23 02:22:15 +02:00
joeybadz 74e1f088a0 Reduce serialization footprint in ResourceGatherer
Avoids serializing fields that can be derived at deserialization time to save serialization space

Fixes: #7263
2026-08-22 18:18:38 +02:00
phosit 7892a4f40f Fix "I will return" button
When temporarly leaving a multiplayer game the "I will return" button
didn't work. This was because there was no valid `closeSession`.
Since it requires accessing `this` the function can't be an arrow
function anymore.

Introduced in 2520c45220

Fixes: #9086
2026-08-20 21:35:18 +02:00
joeybadz 478acbdf5c Reconcile Teutobod's speed bonus and tooltip values
Updates the tooltip to match the actual speed bonus

Fixes #8864
2026-08-19 19:49:42 -04:00
Lancelot de Ferrière 4e04ccca4d UnitAI: properly follow queued return resources orders
GATHER.FINDINGNEWTARGET inserts a ReturnResource order ahead of the
next queued order when the unit is still carrying resources, but
skips doing so if the next order already returns those resources.
Unfortunately, the check was incorrectly written, missing a `.type`.
This meant we always added a fresh order.

Units could then sometimes return resources to the closest dropsites,
then move to the actually queued dropsite, which could lead to
unexpected pathing.

Introduced in 0dda3b579c where the feature was added.
2026-08-19 11:15:27 +02:00
joeybadz 2add365a4f Add camera view config options
Adds a variety of settings for the camera: scroll speed, zoom speed, smoothness, etc.

Fixes #4638
2026-08-19 04:19:45 +02:00
Lancelot de Ferrière 8acec374be Fix a ModifiersManager bug when changing player entities
The cache invalidation was incorrectly using forEach, which failed to invalidate the cache.
This never actually caused a bug because the game currently does not silently swap active player entities.
2026-08-16 17:37:51 +02:00
phosit 6ffc251114 Make timedconfirmation.js a module
Refs: #8081
2026-08-14 12:41:45 +02:00
phosit 0f939b8abf Make termsdialog.js a module
Refs: #8081
2026-08-14 12:41:45 +02:00
phosit bf0c3af75a Make mod/gui/pregame/mainmenu.js a module
Refs: #8081
2026-08-14 12:41:45 +02:00
phosit 497efe5a99 Make msgbox.js a module
Refs: #8081
2026-08-14 12:41:45 +02:00
phosit 609efa7e32 Make modmod/help/help.js a module
Refs: #8081
2026-08-14 12:41:44 +02:00
phosit 9adb3e7889 Make modmod.js a module
Actions in xml files only has access to the global scope, not the module
scope. So define them in the js file.

Refs: #8081
2026-08-14 12:41:44 +02:00
phosit 2c4f7d85b6 Make modio.js a module
Actions in xml files only has access to the global scope, not the module
scope. So define them in the js file.

Refs: #8081
2026-08-14 12:41:44 +02:00
phosit 8918cfb0a7 Make incompatible_mods.js a module
Refs: #8081
2026-08-14 12:41:44 +02:00
Atrik 38b33b0484 Enable attacks on foes visible through shared LOS
Adds baseRange parameter to parabolic queries for combined
2D + parabolic detection. StandGround and Chase stances now
use attack range (parabolic) with vision as baseRange, allowing
units to attack enemies visible through friendly vision.
Buildings benefit as well via BuildingAI.
2026-08-12 22:40:59 +02:00
Atrik ceca608848 Filter out hidden targets in CanAttack
Units should not be able to attack entities with "hidden" visibility.
Visible and fogged (mirage/retainInFog) targets remain attackable.
2026-08-12 22:40:59 +02:00
Atrik f84b51212a Add tests for CanEverReachTarget and its helpers 2026-08-12 22:40:59 +02:00
Atrik fc3c0d7876 Prevent targeting unreachable turreted entities
Introduce CanEverReachTarget in the Attack component to check whether
a target is geometrically reachable at all, accounting for height
offsets and turreted units inside buildings.

For non-parabolic attacks (e.g. melee), a simple 3D distance check
from the closest approach point is used.

For parabolic attacks (e.g. ranged), the parabolic range formula
is used to determine if the height difference is surmountable
from the closest horizontal distance to the target.

Add GetClosestApproachDistanceToTurretPoint to TurretHolder
to estimate the minimum horizontal distance to a turret point,
using its local offset and the holder's obstruction size.
Passable buildings are not considered obstacles.

Fixes units on the ground trying to attack unreachable units on walls
or towers when the projectile's arc cannot reach the required height.
2026-08-12 22:40:59 +02:00
Atrik db23584fc3 Add GetEffectiveAttackRange wrapper
Wraps RangeManager.GetEffectiveParabolicRange for unified range
resolution. Maintains symmetry with GetRange(), improves readability,
and consistently translates NEVER_IN_RANGE.

Simplifies callers in UnitAI and Attack.
2026-08-12 22:40:59 +02:00
Atrik f12975e9b9 Fix range target detection for StandGround stance
StandGround units now use parabolic range queries to detect enemies,
accounting for terrain elevation and height offsets. This ensures
units on hills or when 'turreted', can detect enemies
that are in parabolic range but outside flat range.

Previously, StandGround detection used flat circular queries,
causing units to miss enemies in their elevation-buffed range.
Other stances are unaffected since they chase targets anyway.
2026-08-12 22:40:59 +02:00
Atrik a8426f06a9 Fix renamed entities on TurretPoint
Oversights from fb1c0d2a82

Fixes #8808
2026-08-12 22:40:59 +02:00
Atrik 57a5740cce Remove dead territory ownership code 2026-08-12 22:40:59 +02:00
phosit 756b9b68c5 Expand the tooltip for population cap 2026-08-12 17:17:04 +02:00
phosit 9f6a309434 Readd description for gatherers to the tooltip
It was removed in dee2b73c7d since it wasn't noticed that it referred to
the number in the top panel. Adding the number should make this more
clear. The color is only applied to the number instead of the whole line
so that it's harder to mistake it with just some fancy formatting.

Fixes: #7851
2026-08-12 17:17:04 +02:00
Jonny McCullagh 1c2dbf2eb0 Add more diverse quotes 2026-08-10 10:53:00 +02:00
ShadowOfHassen 84567e66c2 Fix catafalque aura typos 2026-08-06 13:30:42 +02:00
Atrik 9ab89b01c2 Add Langbart to art credits 2026-07-30 20:54:19 +02:00
Atrik dcce6666ae Add missing garrison flag to some houses
Art work by @Langbart

Fixes #6911
2026-07-30 20:54:19 +02:00
Atrik 202bdb133a Add Atrik to art credits 2026-07-30 20:54:19 +02:00
Atrik 46981d2b90 Add missing garrison flag to German houses 2026-07-30 20:54:19 +02:00
Atrik 91a37e32f6 Sort units spatially for freehand selection 2026-07-30 17:19:39 +02:00
Atrik 139b08fe6d Add tests for SelectionBoxTargeting 2026-07-30 17:19:39 +02:00
Atrik dc6da217fd Enable using SelectionBox for targeting
Introduce a new  input, a command handler and adapt
UnitAI to handle arrays of targets in a single order
2026-07-30 17:19:39 +02:00
Atrik e41dd2d3a4 Add Math.clamp utility function 2026-07-30 17:19:39 +02:00
Atrik 0da1e0c398 Reveal Gaia wonders to players 2026-07-29 18:02:37 +02:00
Atrik dc1e7179a3 Reveal and notify Wonders being constructed
Fixes #8683
2026-07-29 18:02:37 +02:00
Vladislav Belov f781181899 Adds sRGB support for proper lighting
Currently we're incorrectly using sRGB colors as raw inputs for lighting
instead of conversion to linear space. For proper PBR we need linear
values.
2026-07-29 01:29:09 +02:00
Vladislav Belov b3165505b6 Fixes possible artifacts with GPU skinning on GL
std140 requires 16 bytes alignment and it makes alignment of uvec2 in
SkinData be equal to 16 bytes instead of 8 bytes.
2026-07-28 18:12:21 +02:00