Commit Graph

30441 Commits

Author SHA1 Message Date
Ashley Newson
ad19506836 Fix TilingPath bugs affecting unofficial mods
TilingPath had some bugs when working with single-point segments,
which exist outside of the official mods. This change fixes a few
problems:

- Avoid unbounded length zero-cost, zero-progression loops that could
  be formed by an arbitrary number of single-point corners. These
  could pop up arbitrarily in the middle of paths.
- Avoid zero-progression loops short-circuiting looped paths.
- Fix missing end type matching during back-tracing stage.
- Enhance lint check to ensure starts/ends have a valid directions.
- Remove some dead code.
2025-06-13 18:52:05 +03:00
Matthias Mailänder
0b13ee3e49 Update to lowest supported Windows server image. 2025-06-12 20:04:35 +03:00
Ashley Newson
c92a6be4af Respect MultiBrush weights when path tiling
Allows biasing path tiling towards or away from using certain
MultiBrushes using their existing weight property. Note that the
probability of brush selection depends on multiple factors, not just
their direct weight.
2025-06-08 16:29:03 +03:00
Ashley Newson
561466d822 Fix Path Tiling tool rally confusion and crash
If the path being planned by the Path Tiling tool overlaps itself such
that a later rally intersects an earlier line, attempting to interact
with this later rally caused the UI to instead select the rally
associated with the earlier line. This at best leads to user confusion
and at worst leads to a crash if they then drag the rally over another
rally.

This commit fixes the UI logic to correctly identify the rally being
clicked on.
2025-06-08 16:14:50 +03:00
Ashley Newson
c6ed381085 Remove empty Path Tiling Tool dropdown tooltips
I'd accidentally copy-pasted the wrong item template in the original
TilingPathToolLogic implementation. This change uses the normal
tooltipless LABEL_DROPDOWN_TEMPLATE.
2025-06-08 16:03:05 +03:00
Bryan Quigley
aae2ec109b Add 2 obstacles to europe to help AI
AI likes to make a naval building in the top right tiny water area.
This PR adds 2 rocks to that area blocking any building so the AI
is not going to waste time on it.
2025-06-08 15:58:18 +03:00
Ashley Newson
9c8470d18e Preview clipboard when copy-pasting in the map editor 2025-05-31 10:39:39 +03:00
Ashley Newson
c4332c808b Fix copy-paste editor crash for RectangularIsometric
EditorBlit was incorrectly using CellRegion.Contains instead of
CellRegion.CellCoords.Contains (i.e. CellCoordsRegion.Contains). This
resulted in a crash upon attempting to paste within the editor for
RectangularIsometric maps (such as in TS).

This change updates the code to use the correct region type and fixes
the crash.
2025-05-31 10:31:23 +03:00
JovialFeline
1cdc823bca Add The Tiberium Strain mission (CnC) 2025-05-30 16:10:51 +03:00
Ashley Newson
5c7188be81 Avoid denoising unbiased resources in map generator
Resource placement is usually biased by mpspawns or resources spawns
(mines or blossom trees), which feed into a mutilplier for the
resource noise. Previously, all cells outside of the circle of
influence of a bias source got a multiplier of zero, essentially
giving them no noise pattern. This could lead to ugly horizontal
streaks of resources for which the layout was determined only by the
internals of PriorityArray.

This change fixes this by ensuring the noise multiplier has a
baseline value of 1.
2025-05-30 15:31:19 +03:00
Ashley Newson
2a0e787ae7 Check for and fix non-unit MultiBrush segment steps
TilingPath's algorithms are designed on the assumption that MultiBrush
segments use unit steps in their point sequences. Non-unit
sequences can result in incorrect or suboptimal tilings.

This change ensures point sequences are validated for unit steps, and
fixes a non-compliant cliff tile across all tilesets.
2025-05-30 15:22:53 +03:00
Ashley Newson
7538943f59 Convert Direction.cs to enums and extensions
- Converts OpenRA.Mods.Common/MapGenerator/Direction.cs over to using
  Direction and DirectionMask enums
- Moves direction-related utilities into Exts classes.
- Simplifies some direction utility logic.

Only very small numerical precision behavioral changes.
2025-05-30 15:15:15 +03:00
JovialFeline
99253702c5 Add IsDead checks to Fall of Greece 1 2025-05-20 22:25:52 +03:00
Ashley Newson
5c09d5d828 Support PickAny templates in MultiBrushes
Allows PickAny templates to be used in MultiBrushes, which can be
painted with random selection. This avoids the need to define various
separate MultiBrushes for each tile combination.

Note that all combinations count as part of a single MultiBrush, which
may influence selection weighting.

This MultiBrush feature is not presently used in OpenRA's official
mods, but is useful for unofficial mods using more general PickAny
templates.
2025-05-19 22:18:12 +03:00
Ashley Newson
daf36769d6 Add additional MultiBrush segments for RA and CnC
Adds MultiBrush definitions for River (RA and CnC) and WaterCliff (RA
only), allowing them to be tiled with the Path Tiling tool.

A small enhancement to the MultiBrush and TilingPathTool code is added
to allow the inner type to be derived from start and end types. This
allows segments that interface between types (such as WaterCliff to
Beach) to be usable when tiling either WaterCliffs or Beach. Whilst
this makes the inner types of many of the existing MultiBrushes
redundant, no simplification is performed as part of this change.
2025-05-19 22:01:25 +03:00
Михаил Васильев
ba444de014 Fix link to Lua API in README.md 2025-05-19 21:33:04 +03:00
Paul Chote
6a67906823 Improve --check-yaml robustness against bogus maps. 2025-05-19 21:30:07 +03:00
Paul Chote
681edb1879 Fix button order in save browser. 2025-05-15 23:14:48 +03:00
Paul Chote
b7d929de5a Precache generated map for the host. 2025-05-15 23:08:13 +03:00
Paul Chote
6ffd786d5b Add Generate Map tab to the lobby map chooser. 2025-05-15 23:08:13 +03:00
Paul Chote
979483b63c Add MapClassification.Generated.
Generated maps are created at runtime using a
mod-defined trait. They are embedded directly
into replays and save games as they exist in
memory only, and disappear after the game exits.
2025-05-15 23:08:13 +03:00
Paul Chote
6be947bbf0 Support serializing/loading ReadWriteZipFile as base64 string. 2025-05-15 23:08:13 +03:00
Paul Chote
5292919917 Move Boundary Shape option before Players. 2025-05-15 23:08:13 +03:00
Paul Chote
497b5e30ad Extract a MapSizeLabel helper method. 2025-05-15 23:08:13 +03:00
Paul Chote
4f1b17b832 Allow MapGeneratorSettings to be initialized from MapGenerationArgs. 2025-05-15 23:08:13 +03:00
Ashley Newson
ad08045e5f Add path auto-tiling tool to map editor
Exposes the TilingPath code used by the map generator as a map editor
tool to help automate the process of tiling sequences of templates
together.

No additional template stitching definitions are added as part of this
commit. As such, the tool currently only supports the same auto tiling
as the map generator does. This includes:

- RA and CnC support.
- Beaches, land cliffs, and roads.

Support for additional mods and templates can be added in follow-ups
by adding the necessary MultiBrush definitions.

Related changes included in this commit to support this work include:

- Add support for sparse EditorBlits.
- Add support for MultiBrush to EditorBlitSource conversion.
- Add support for EditorBlitSource previewing.
- Adjust the "Road" types used in segmented MultiBrush definitions.
2025-05-15 22:41:43 +03:00
michaeldgg2
d3d949176d ProductionTabsWidget: fix updating tabs when new production building is built 2025-05-11 22:20:04 +03:00
michaeldgg2
89d906a613 ProductionTabsWidget: fix updating internal cache for production queue 2025-05-11 22:20:04 +03:00
Михаил Васильев
8f3ca30840 Fix typo in soviet 04b mission description 2025-05-11 21:59:23 +03:00
N.N
c5e4545ecd Add muzzle effect into the sequences
- remove Armament@muzzle
- remove HMG_muzzle, HMGo_muzzle
2025-05-10 19:12:13 +03:00
JovialFeline
894d08adf0 Add missing campaign bots 2025-05-10 16:31:19 +03:00
RoosterDragon
92b3dde789 When pathing, prefer optimal paths over short distances.
The default path weight of 125% allows paths up to 25% longer than the optimal path to be returned, which improves the performance of path searches.

Over short distances, players are likely to be sensitive to suboptimal paths this can produce, so instead use a weight of 100% over short distances to ensure these paths are optimal. As the search area is limited, the additional performance impact is also capped. The hierarchical path finder already has a speculative check for short paths within a 20 cell area (twice the grid size of 10 cells), which allows it to skip a hierarchical search if a path within that area can be found. We can piggy back on this short path logic and use a weight of 100%.

Over longer distances, players are less likely to notice the suboptimal paths, and the performance benefit is more noticeable, so continue to use the 125% weight in these scenarios.
2025-05-10 16:18:52 +03:00
RoosterDragon
7fb88b974e Expose HeuristicWeightPercentage on PathFinder trait.
Maintain the default weight of 125%, but allow this to be modified via config.
2025-05-10 16:18:52 +03:00
Matthias Mailänder
798593bede Enable Dependabot for GitHub Actions. 2025-05-09 17:54:51 +03:00
Paul Chote
3e06749006 Rewrite fluent lint check. 2025-05-09 16:28:04 +03:00
Paul Chote
9ffa7be606 Remove mod-specific keys from common fluent. 2025-05-09 16:28:04 +03:00
Paul Chote
0313d04970 Polish map generator settings. 2025-05-05 20:50:55 +03:00
michaeldgg2
ad13658076 Make WithMuzzleOverlay and Info class public 2025-05-01 20:42:57 +03:00
atlimit8
0b110a0423 ping when non-structures are attacked 2025-04-30 22:22:53 +03:00
atlimit8
34a92f3406 Remove BaseAttackNotifier trait 2025-04-30 22:22:53 +03:00
atlimit8
b792e3eecf add update rule for replacing BaseAttackNotifier 2025-04-30 22:22:53 +03:00
atlimit8
e27aa0d379 replace use of BaseAttackNotifier trait w/ DamageNotifier 2025-04-30 22:22:53 +03:00
atlimit8
2b1121b970 add DamageNotifier 2025-04-30 22:22:53 +03:00
michaeldgg2
5537a194fa DockClientManager: enter cursor per DockHost's DockType 2025-04-30 21:46:56 +03:00
Paul Chote
56c615d890 Fix invalid CachedTransform uses of MapPreview. 2025-04-30 14:06:42 +03:00
Paul Chote
e8d710dee4 Prevent remote map searches overwriting local or generated state. 2025-04-30 13:21:26 +03:00
Ashley Newson
4a4217c3b3 Fix resource calculation in map generator
The editor's resource value calculation logic was fixed in #21820 to
match actual gameplay. The map generator logic originally copied the
editor logic from EditorResourceLayer rather than ResourceLayer and
associated game logic. As such, it inherited incorrect calculations.

This change updates the map generator logic to match the now
consistent logic in both ResourceLayer classes. Map generator resource
settings are also adjusted -25% to continue roughly matching the
previous resource output.
2025-04-30 12:51:14 +03:00
Paul Chote
965a490b70 Dynamically populate map chooser tabs. 2025-04-29 12:17:27 +03:00
Paul Chote
5b7a714ac2 Replace Tileset id with Environment name. 2025-04-28 15:41:54 +03:00
Paul Chote
90013bc6d3 Migrate tileset names to Fluent. 2025-04-28 15:41:54 +03:00