1
0
forked from 0ad/0ad
Commit Graph

15403 Commits

Author SHA1 Message Date
374b869480 Tweaks to the alpine RM biome
- Rename to subalpine to fit the theme better & tweak tooltip
- improve the shore textures
- remove the snow dir texture which contrasted too heavily.

Differential Revision: https://code.wildfiregames.com/D4027
This was SVN commit r25701.
2021-06-06 08:24:39 +00:00
3f2265a09e Update for the Steppe RM biome
- Change the grass actor, which was too lighting dependent and heavy on
performance
- Change the main terrain texture which was quite noisy
- Change shore textures to be more seamless.

Based on a patch by: marder
Differential Revision: https://code.wildfiregames.com/D4025
This was SVN commit r25700.
2021-06-06 08:21:35 +00:00
8af0689b5f Fix gamesetup player assignment issue when joining
Switch some logic from C++ to JS in PREGAME for player assignments. Refs
#3049

Fixes #6204

Reported by: Imarok
Tested By: Imarok
Differential Revision: https://code.wildfiregames.com/D4092
This was SVN commit r25699.
2021-06-06 08:02:28 +00:00
73dcf36976 Remove territory root from fortresses.
Reverts D1762 / 014c2922f2.
Because any territory connected to a root does not decay, this made it
possible to anchor CC territories by adding a fortress somewhere, thus
making it much, much harder to push against an enemy territory.
This led to a much more turtley gameplay and overall made the game
worse.

For now, I do not reintroduce the larger territory range (which was
reduced in 014c2922f2).

Differential Revision: https://code.wildfiregames.com/D3989
This was SVN commit r25697.
2021-06-06 07:35:40 +00:00
fdb4040838 Adds HiDPI mode for testing. HiDPI on Windows isn't supported in SDL yet. So we use a custom code.
Differential Revision: https://code.wildfiregames.com/D4076
This was SVN commit r25692.
2021-06-05 19:01:37 +00:00
8e63a0322c Map flares
Add flaring on the map and resize the minimap buttons.
Target marker and button by Stan.
Reviewed/Commented by wraitii, elexis, vladislavbelov
Refs: #3491
Refs: #57

Differential Revision: https://code.wildfiregames.com/D1751
This was SVN commit r25691.
2021-06-05 17:37:18 +00:00
3bb5f364c2 (Reference Suite) Support aura-based civilization bonuses
As a side effect of 6b7a80b260, this is now trivial to do.

We don't (currently) have any aura-based civ bonuses in Vanilla 0A.D.,
but hopefully modders will find it useful.

This was SVN commit r25690.
2021-06-05 16:39:59 +00:00
6b7a80b260 (Reference Suite) Fetch teambonus auras from player_{civ}.xml files
(The `civ` key (in the team bonus aura templates) was added in
190d6e7cf5 for the
purpose of identifying which aura belongs to which civ. It's no longer
used.)

Proposed by: @Nescio
Comments by: @Freagarach
Refs: 190d6e7cf5
Differential Revision: https://code.wildfiregames.com/D3864
This was SVN commit r25689.
2021-06-05 16:24:25 +00:00
ad8c7cb2e0 Fixup artic biome: add lillies replacement
Since lillies wouldn't make too much sense, add rocks.

Differential Revision: https://code.wildfiregames.com/D4087
This was SVN commit r25688.
2021-06-05 10:47:20 +00:00
7de9487a87 "New maps" demo campaign
This shows off the new maps, and shows off campaigns in a straighforward
manner.

Differential Revision: https://code.wildfiregames.com/D4020
This was SVN commit r25684.
2021-06-04 18:04:17 +00:00
498c2f402d Allow setting a custom page for the 'back' page in the gamesetup.
Forgotten in c012888e2a. This is useful for campaigns that would want to
use the full gamesetup, and in general makes the gamesetup slightly more
flexible.

Differential Revision: https://code.wildfiregames.com/D4082
This was SVN commit r25683.
2021-06-04 17:22:15 +00:00
f2c9c392bb Rework metal/stone techs to cost Food and Stone.
Food/Wood techs now cost Wood and metal (with food techs being slightly
less expensive as they provide less bonus). Metal/Stone techs now cost
Food and Stone instead of Wood and Metal, reducing the load on those
resources, and making Stone slightly more critical.

Initial work by: Nescio
Accepted By: chrstgtr, Valihrant
Differential Revision: https://code.wildfiregames.com/D3704
This was SVN commit r25682.
2021-06-04 17:20:15 +00:00
a359275841 Map touchup: Corinthian isthmus
- Support biomes
- Hills, forests, food & metal mines won't spawn on the isthmus anymore,
to avoid obstructions and make things a little fairer
- Stone mines spawn only on the isthmus and players start only with
small stones
- Tidier forests
- The central passageway is sometimes slightly offset left/right
- The central passageway is surrounded by a walkable shallow, which
prevents effectively walling the actual passageway.
- Widen the river slightly.

Overall the intention is to make the map less of a turtle-fest, though
it remains chokepointy by nature.

Differential Revision: https://code.wildfiregames.com/D4062
This was SVN commit r25681.
2021-06-04 17:08:10 +00:00
eae2538802 Map touchup: gulf of bothnia
- Denser forests
- frozen lake biome gets some watery holes in there, just to make it
slightly more mazey.
- Tweak the lighting of the specific biomes to avoid overexposing the
ground textures.

Differential Revision: https://code.wildfiregames.com/D4073
This was SVN commit r25680.
2021-06-04 16:50:44 +00:00
76191d43c8 Map touchup: River/Lake/Mainland/Continent
- Slightly denser forests with the new helper
- good default biome for African Plains in Atlas.

Differential Revision: https://code.wildfiregames.com/D4072
This was SVN commit r25679.
2021-06-04 16:36:02 +00:00
bc17e1ade3 Map touchup: neareastern badlands
- Support African biomes
- Tidier forests

This was SVN commit r25678.
2021-06-04 16:34:09 +00:00
990eea63b9 Map touchup: Cantabrian Highlands
- Support biomes
- Tidier forests

This was SVN commit r25677.
2021-06-04 16:32:37 +00:00
146b680d63 Fix borders of game description in gamesetup
Spotted by Langbart
Reviewed by Langbart
Refs 6f9a162dfa

Differential Revision: https://code.wildfiregames.com/D4074
This was SVN commit r25676.
2021-06-04 16:30:36 +00:00
c1d3584da3 Map touchup: hyrcanian shores
- Properly split mainland & highland forests
- slightly tidier forests
- support biomes

Differential Revision: https://code.wildfiregames.com/D4063
This was SVN commit r25675.
2021-06-04 16:21:59 +00:00
e865db3bfb Map touchup: Ardennes forest
- reuse settings from the temperate biome
- More wood / slightly denser
- replace the aleppo pine with the Fir, looks better
- Rework the terrain textures

Differential Revision: https://code.wildfiregames.com/D4061
This was SVN commit r25674.
2021-06-04 16:16:53 +00:00
5e0b65853b Map touchup: African plains
- Support the 3 african biomes.
- Bigger forests (same # of trees overall)
- More hills/watering holes, more animals there.

Differential Revision: https://code.wildfiregames.com/D4060
This was SVN commit r25673.
2021-06-04 16:00:37 +00:00
2599289872 Update the Savanna RM biome
Patch by: marder
Differential Revision: https://code.wildfiregames.com/D4067
This was SVN commit r25672.
2021-06-04 15:39:43 +00:00
d1e51593cd Fix water texture in aegean biome
The new texture is less visually intrusive thus a better general fit.

Patch by: marder
Differential Revision: https://code.wildfiregames.com/D4026
This was SVN commit r25671.
2021-06-04 15:24:48 +00:00
93e450c433 Increase the size of the Lobby Create match dialog
Based on a patch by: langbart
Fixes #6202

Differential Revision: https://code.wildfiregames.com/D4081
This was SVN commit r25670.
2021-06-04 13:10:34 +00:00
54dae5257d Make Stable technologies more affordable
Patch by: ValihrAnt
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D3919
This was SVN commit r25669.
2021-06-04 13:00:25 +00:00
db7d63f208 Add a 'createDefaultForests' wrapper around createForests
This new helper gives fewer but larger forests by default.

Follows 70a4406bef

Differential Revision: https://code.wildfiregames.com/D4071
This was SVN commit r25668.
2021-06-04 12:57:05 +00:00
f9ed769355 Add a mahout for the Maurya support elephant. Re-enabling building should be done in a separate [gameplay] differential.
Fixes: #6091
Thread:
https://wildfiregames.com/forum/topic/37023-task-add-mahout-to-mauryan-worker-elephant/

This was SVN commit r25666.
2021-06-04 10:34:53 +00:00
b2f887da2c Improved Seleucid pikemen and Archers.
Patch by: @wowgetoffyourcellphone
This was SVN commit r25665.
2021-06-04 08:59:11 +00:00
741d53e3e7 Do not go to the nearest dropsite when full and asked to hunt/slaughter and attack instead. This is fine as long as units don't decay.
Comments by: @wraitii, @Freagarach
Reported by: @FeldFeld
Fixes: #5954
Refs: 6d187f2145
Differential Revision: https://code.wildfiregames.com/D3444
This was SVN commit r25664.
2021-06-04 08:44:15 +00:00
dd61eb4751 Update "autumn" biome
Patch by: marder
Differential Revision: https://code.wildfiregames.com/D4065
This was SVN commit r25663.
2021-06-04 08:33:13 +00:00
b360b7bd2b Disallow hardware without VBO support to simplify vertex buffer usages.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4054
This was SVN commit r25659.
2021-06-03 22:06:59 +00:00
45d7bee29b Revert the UI change.
It looks bad on the summary graph, and might need further adjustments in
general.

Discussed with: @Langbart, @Imarok, @wraitii
cc @wowgetoffyourcellphone

This was SVN commit r25658.
2021-06-03 17:02:02 +00:00
0ebc08b13c Thread the pathfinder computations using the task manager.
The pathfinder computations are run asynchronously (and potentially on
the main thread) in-between simulation turns, thus reducing
pathfinder-related lag considerably in common cases.

To make this most efficient, the number of paths computed during a turn
via MaxSameTurnMoves is reduced from 64 to 20.

This has a hard dependency on the obstruction manager (via the vertex
pathfinder) not being modified in-between simulation turn (or to put it
more generally on the simulation state not changing outside of turn
computation), otherwise results will be non-deterministic and go OOS.
This is currently entirely safe (as in, it indeed does not happen that
the simulation state changes in-between turn), but future work towards
improving simulation sandboxing would be good.

Thanks to Kuba386 for maintaining & improving the patch in 2020
Thanks to everyone who tested the various iterations of this patch.

Fixes #4324

Differential Revision: https://code.wildfiregames.com/D14
This was SVN commit r25657.
2021-06-03 16:21:28 +00:00
c78ead79e6 Standardize prepare time for ranged units.
Prepare time is the time between an attack order and the arrows actually
flying.

Archers go from 500ms to 800ms standard, making them slower to fire than
other ranged units, and making them slightly harder to micro against
e.g. raids.
Javelineers go from 750ms to 400ms, for the opposite effect.
Crossbowmen, as a 'special' feature, get 200ms, meaning they fire their
first volley really fast despite their long repeat rate.

This also standardizes all javelineer units to have 1250ms repeat time.

Differential Revision: https://code.wildfiregames.com/D4050
This was SVN commit r25655.
2021-06-03 13:49:07 +00:00
5d542ab63b Fix new biomes: small mines are again small
The terrain update introduced large actors for both small and large
stone and metal actors. This replaces the small ones by the appropriate
small actors.

Patch by: marder
Differential Revision: https://code.wildfiregames.com/D4057
This was SVN commit r25654.
2021-06-03 13:44:14 +00:00
70a4406bef Allow specifying forest size in createForests
This makes it easier to have more forests with fewer trees, or fewer
larger forests.

Differential Revision: https://code.wildfiregames.com/D4059
This was SVN commit r25653.
2021-06-03 13:40:48 +00:00
37d979d898 Fix wrong textures in nubia/savanna biome
Differential Revision: https://code.wildfiregames.com/D4068
This was SVN commit r25652.
2021-06-03 13:39:32 +00:00
dd0d4dc57a Some more fixes for miletus.
Patch by @wowgetoffyourcellphone.

This was SVN commit r25650.
2021-06-03 07:08:32 +00:00
94d669c198 Fix ignoring arrays as supported biomes in gamesetup
Fix regression of dc18d94030.
Spotted by: marder
Reviewed by: wraitii
Differential Revision: https://code.wildfiregames.com/D4044
This was SVN commit r25647.
2021-06-02 22:03:59 +00:00
ad9cb9d467 Use new small shields for mace archers too.
This was SVN commit r25644.
2021-06-02 18:53:29 +00:00
c8c2b03a08 Differentiate Ptolemaic archers from Seleucid ones. Use a fancier shield mesh.
Patch by: @wowgetoffyourcellphone, @Alexandermb, @Stan
Reported by @Hidan

This was SVN commit r25643.
2021-06-02 18:49:39 +00:00
6243fd07da New UI background
Patch by: @wowgetoffyourcellphone
This was SVN commit r25641.
2021-06-02 18:04:19 +00:00
d4cf36574e Some map tweaks
Patch by: @wowgetoffyourcellphone
This was SVN commit r25640.
2021-06-02 18:03:38 +00:00
Angen
dfbc481ec1 [Mod] Fix list and filter in mod selection breaking page when mod is missing some attribute
In case mod is missing some required field, for example label or version
for some reason, mod page would stop functioning.
Adding default to empty string in list and filter.

Differential revision: D4028
This was SVN commit r25639.
2021-06-02 17:58:49 +00:00
Angen
0f8ba775c3 Fix areFilters
Removed in 0d87ec5cf4.

Differential revision: D4041
Tested by: @marder
Reviewed by: @wraitii
This was SVN commit r25638.
2021-06-02 17:45:17 +00:00
be3749a788 New savanna textures based on cc0 textures
Patch by: @marder
This was SVN commit r25637.
2021-06-02 17:44:20 +00:00
c012888e2a Allow switching to the gamesetup from the campaign screen
This allows switching to the gamesetup, with a harcoded map, from the
campaign screen. Lets player sets up a few things (e.g. their civ &
favorite AI), which can be convenient for some simple campaigns that
lack options.

Differential Revision: https://code.wildfiregames.com/D4039
This was SVN commit r25636.
2021-06-02 17:37:29 +00:00
48ea6ee7d2 Moddability for pushing: radius in XML, allow deactivating globally/some templates.
Differential Revision: https://code.wildfiregames.com/D4040
This was SVN commit r25635.
2021-06-02 17:36:32 +00:00
07e44a75a1 Allow mods to say they should be ignored in replay/MP compatibility checks
Since it is very non-trivial to determine which mods change checksums
and which don't, this relies on modder goodwill (and on verification on
our end for signed mods).

The declaration is an optional "ignoreInCompatibilityChecks" boolean in
mod.json

Also rework slightly the MP lobby mod display to always show the host
mods in a clear manner.

Differential Revision: https://code.wildfiregames.com/D3968
This was SVN commit r25634.
2021-06-02 06:50:16 +00:00
693f296e71 Improve 'incompatible mods' splash screen
Fix some language elements, add some details, and update to SVN specs.
Make the window wider to have the first phrase take a single line in
English/most languages hopefully.

Differential Revision: https://code.wildfiregames.com/D4049
This was SVN commit r25633.
2021-06-02 06:44:43 +00:00
0cc0852683 Remove build limits of structures that train champions.
The champions these structures built were not very usable in practice
because of their limited build rate.
Apadanas are a special case since they grant resources, their limit is
increased to 2 and their resource rate divided by two (this reduces
their economic impact early on, but increases their potential military
impact).
The preferred solution would be giving apadanas a pop count, but that
does not work very well right now given that they grant resources and
can still be built.

Patch by: Valihrant
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D3897
This was SVN commit r25627.
2021-06-01 08:09:43 +00:00
eda3eb7cc6 Speed up citizen rotation & differentiate ranged infantry unit move speed
Refs 42c70cd508, be286d4345, refs #5106

The introduction of "turn time" in A24 has been pointed out as a
gameplay change that made rushing less viable, and made the game more
turtley overall. Combined with other changes in the same direction, this
was seen by several top MP players as a step back.
Increasing turn times to 14 for infantry makes them somewhat irrelevant,
and a value of 10 for cavalry makes them noticeably more reactive while
keeping a little speed debuff.

Champions have a lower value, and heroes keep their lower values still
to prevent a reintroduction of 'dancing'.

Patch by: Valihrant
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D3971
This was SVN commit r25626.
2021-06-01 07:45:36 +00:00
9e0c30f316 Improve Cart tech 'colonization'
It was underpowered and too costly.

Patch by: borg`
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D3698
This was SVN commit r25625.
2021-06-01 07:26:07 +00:00
44ea80977a Tweak mercenaries: no food cost, advanced rank, faster training
The intention is that while mercenaries are still difficult and costly
to train, they are more effective in their particular niche.

Patch by: Nescio
Differential Revision: https://code.wildfiregames.com/D3699
This was SVN commit r25624.
2021-06-01 07:20:21 +00:00
2147da9aa6 Revert citizen train times to A23 values
The significant slowdown in train times, particularly for infantry
resulted in an increase in the # of barracks and overall contributed to
shifting towards a defensive, turtley gameplay.
Cavalry was already reverted in 8bd7a4f4b5.

Reverts parts of D2866/8726a2abbf.

Patch by: ValihrAnt
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D4033
This was SVN commit r25623.
2021-06-01 07:16:16 +00:00
6cc6d8c156 Speed up and simplify TileClass implementation
Use a more memory-efficient layout, reducing memory usage and speeding
things up considerably.

Patch by: smiley
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D4021
This was SVN commit r25622.
2021-06-01 07:06:36 +00:00
b86b4d352e Fix broken SP persisted settings
The MP ones were always used instead.

Differential Revision: https://code.wildfiregames.com/D4038
This was SVN commit r25618.
2021-05-31 16:27:50 +00:00
3d20791837 Add a "Best for MP" filter for random maps
This allows picking 'random' on a bunch of maps known to be playable in
MP, with the hope of increasing variety in actual maps played.

Discussed with players on the balancing forums.

Differential Revision: https://code.wildfiregames.com/D4012
This was SVN commit r25617.
2021-05-31 13:44:02 +00:00
42e67be0ee Fix crash when pushing a page while pushing a page.
Because the page stack is a vector, if during PushPage, a new page is
pushed, the vector may re-allocate. This 'pulls the rug out' from
underneath the code stack that originally pushed, which then crashes.

To fix this, use a deque, since push/pop won't invalidate references.

Reported by: Imarok.
Based on a patch by: Imarok (tests are his)
Differential Revision: https://code.wildfiregames.com/D4037
This was SVN commit r25616.
2021-05-31 13:42:08 +00:00
b1902d8e80 Allow setting texture quality in the config file. Fixes a todo.
Differential Revision: https://code.wildfiregames.com/D3020
This was SVN commit r25615.
2021-05-31 12:52:43 +00:00
fcd8035fd4 Use the new "Lod" Feature for aprons
* Disable "aprons" on low quality
* Disable cast shadows on medium quality

This was SVN commit r25614.
2021-05-31 12:00:05 +00:00
0bc7ba50ea Add an option to reduce the diversity of actor variants
Variants can now have limited or no diversity. This can occasionally
speed rendering slightly (5-10% FPS increase was reported on Combat Demo
Huge, which is very variant-heavy).

Reported by: bb
Based on a patch by: bb
Fixes #5831

Differential Revision: https://code.wildfiregames.com/D3035
This was SVN commit r25613.
2021-05-31 11:42:46 +00:00
6f72560228 Use the new "Lod" Feature for celt barrels
* Disable "castshadow" on low quality
* Adds new low quality versions for medium and low quality.

This was SVN commit r25612.
2021-05-31 11:38:34 +00:00
9cc6228b28 Fix random biome not working.
As the available biome was a Set, pickRandom didn't work.

Reported by: Langbart
Refs #6190

Differential Revision: https://code.wildfiregames.com/D4036
This was SVN commit r25611.
2021-05-31 07:49:20 +00:00
4188e7ff18 Remove unuseful 'siege bolt accuracy' from Kushites arsenal
Kushites should not have a bolt accuracy upgrade in arsenal, as they do
not have the ability to produce bolts.

Fixes #6167

Patch By: Langbart
Differential Revision: https://code.wildfiregames.com/D4035
This was SVN commit r25609.
2021-05-31 06:53:07 +00:00
7f6ef5db79 Removes gui_solid material usage from CChart.
This was SVN commit r25605.
2021-05-30 18:13:23 +00:00
1f192f1593 Removes low level GL code from GUI sprite rendering and switches to Canvas2D.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4031
This was SVN commit r25603.
2021-05-30 13:48:58 +00:00
Angen
c388ef64ad Add missing credits in 7e92f714ca
This was SVN commit r25602.
2021-05-30 10:44:48 +00:00
Angen
0d87ec5cf4 Fix and simplify areFilters functions
Workaround is not needed anymore since 37e08a4ffb

This was SVN commit r25601.
2021-05-30 09:32:18 +00:00
Angen
7e92f714ca [PetraAI] - Make easy difficulties of AI weaker
This patch decreases the popScaling so that the easy AI difficulties
have lower targeted population.
And it also decreases the size & priority of the attacks from the easy
an very easy AI.

Refs: #6149
Differential revision: D3997
Patch by: @marder
Tested by: @Langbart
Comments by: @wraitii, @Freagarach
This was SVN commit r25600.
2021-05-30 09:07:27 +00:00
283f524fcf Implements DrawRect in Canvas2D, removes CConsole background drawing with low level GL calls.
This was SVN commit r25590.
2021-05-29 12:31:14 +00:00
6f9a162dfa CList, COList, CDropdown, CText, CInput: Draw borders above the rest and improve scrollbar drawing order
Fixes: #6055
Differential Revision: https://code.wildfiregames.com/D4004
This was SVN commit r25587.
2021-05-28 16:32:04 +00:00
d50ca8e8ec Slight tweak to the grass texture.
Patch by: @marder
This was SVN commit r25586.
2021-05-28 13:11:16 +00:00
3d7af82328 Improve support for classes in PetraAI.
Let PetraAI use MatchesClassList more.

Differential revision: https://code.wildfiregames.com/D2150
Reviewed by: Angen
Comments by: Stan
This was SVN commit r25584.
2021-05-28 06:54:48 +00:00
f7ad2daf62 Removes gui_solid material shader usages from scene rendering.
This was SVN commit r25582.
2021-05-27 20:13:47 +00:00
25b9faf1cb Split graphics options in two tabs
To allow incorporating more options, this splits the graphics settings
into two tabs, one containing general options (such as
silhouettes/windowed), and one with more advanced settings.

Accepted by: asterix
Differential Revision: https://code.wildfiregames.com/D3985
This was SVN commit r25581.
2021-05-27 10:12:13 +00:00
f57c2f71d5 Fix map names
Noticed by @wraitii

This was SVN commit r25580.
2021-05-27 09:18:00 +00:00
bcac3bb896 Fix two issues noticed by @marder.
Disable AO on quarried objects as its arguably broken.
Adds a second uv in case it's enabled again to prevent crashes in Atlas.
Use normal instead of parallax for the texture that do not have height
information.

This was SVN commit r25576.
2021-05-26 15:18:25 +00:00
18372d665c Campaign menu: reuse default map preview if available.
Differential Revision: https://code.wildfiregames.com/D4019
This was SVN commit r25575.
2021-05-26 14:45:44 +00:00
81457ef952 Fix potential undefined conversion.
Summary: Ran into this when testing things in the lobby - I'm not sure
it can happen if everything is working correctly, but I've had it
repeatedly when testing broken stuff. Feels safer.

Test Plan: ^

Differential Revision: https://code.wildfiregames.com/D4018
This was SVN commit r25574.
2021-05-26 13:29:11 +00:00
bce26e905f Mod selector: "start mods" saves the configuration.
Differential Revision: https://code.wildfiregames.com/D3992
This was SVN commit r25573.
2021-05-26 13:27:43 +00:00
35601a7bb3 Fix some error in rmgen.
Reviewed by: kalimaps
Refs: #6180
Differential Revision: https://code.wildfiregames.com/D4017
This was SVN commit r25570.
2021-05-25 21:26:48 +00:00
3f371f40b1 Replace missing biomes by the closest we now have.
Reported by:  @Freagarach
This was SVN commit r25565.
2021-05-25 14:17:39 +00:00
23d7969ffd Fix city phase requirements in PetraAI HQ.
Defence towers were removed from the requirements in 29ab4b5af3, but
PetraAI was not made aware of this.

Differential revision: https://code.wildfiregames.com/D4015
Reviewed by: @Angen, @wraitii
Comment by: @Imarok
This was SVN commit r25564.
2021-05-25 13:46:03 +00:00
44f935562c Update mainland icons
This was SVN commit r25563.
2021-05-25 12:26:29 +00:00
95e576dbe3 Use new biomes for random maps,
Patch by: @wowgetoffyourcellphone
This was SVN commit r25562.
2021-05-25 12:25:39 +00:00
de1a10ca53 New maps using the new biomes.
Patch by: @wowgetoffyourcellphone
- cisalpine_winter_2p
- crocodilopolis_4p
- gallic_highlands_2p
- hindu_kush_2p
- hydaspes_river_4p
- magadha_2p
- miletus_peninsula_2p
- nubian_frontier_2p
- saharan_oases_2p
- scythia_4p
- white_cliffs_of_dover_5p

This was SVN commit r25561.
2021-05-25 12:18:40 +00:00
88d3f50f7e Update some maps with new terrains
Patch by: @wowgetoffyourcellphone
- syria_2p
- sporades_islands_2p
- saharan_oases_4p
- butana_steppe_2p
- bactria_2p
- alpine_valleys_2p
- belgian_bog_2p

This was SVN commit r25560.
2021-05-25 12:15:41 +00:00
20bb3ea4a3 Add trading posts and shrines as map props
Add a placement obstructor (idea by @Grapjas) to prevent  construction
but not movement

This was SVN commit r25559.
2021-05-25 11:32:07 +00:00
92a4fdc8e4 Add more ruin objects
Add a new metal type of ruins
Update templates accordingly.

Patch by @wowgetoffyourcellphone

This was SVN commit r25558.
2021-05-25 11:00:13 +00:00
c8f1501db4 Add templates for the new rock and stone mines
This was SVN commit r25557.
2021-05-25 10:57:22 +00:00
b6ae8915de Add more prop actors for maps
- Update the stone and metal mine meshes and
textures/skins/gaia/decal_quarry_sahara_a.png
- Slight tweak to the steppe grass
- Add some ptol eyecandy

Templates will come in a following commit.

This was SVN commit r25556.
2021-05-25 10:53:20 +00:00
ac33c8513b More grass types for biomes
Patch by @wowgetoffyourcellphone

This was SVN commit r25555.
2021-05-25 10:44:19 +00:00
63199dac2d Some tweaks to the grass fields.
This was SVN commit r25554.
2021-05-25 10:40:39 +00:00
47fc344567 Update the resource icons.
Patch by @wowgetoffyourcellphone.

This was SVN commit r25553.
2021-05-25 10:21:52 +00:00
463775faa4 Slight tweaks to particles.
This was SVN commit r25552.
2021-05-25 10:07:04 +00:00
6324f3369a Use correct projectiles for artillery.
Patch by @wowgetoffyourcellphone

This was SVN commit r25551.
2021-05-25 10:06:34 +00:00
b3aa84adea New shark and whale icons. update the berry an tree and artic wolf icons.
This was SVN commit r25550.
2021-05-25 09:24:23 +00:00
fb84adda3b New autoqueue icons.
This was SVN commit r25549.
2021-05-25 08:35:46 +00:00
863ef0f88a Tweak sound distance attenuation & add configurability
Following D3108 / 876f6d5e50, sounds are attenuated by their actual
distance. However, as noted by players on A24, the dropoff is stark and,
when zoomed out, can easily result in not hearing things that are
happening in the middle of the screen.

The new default settings almost double the max-range, change the minimum
range to have greater dynamic range, and reduce the stereo depth
slightly to better match the default camera FOV.

These are stored per sound-grounp, possibly allowing future tweaks on a
per-soundgroup basis, and are configurable.

Tested by: Imarok
Discussed over mail with: Samulis, Porru

Differential Revision: https://code.wildfiregames.com/D3612
This was SVN commit r25547.
2021-05-25 06:19:25 +00:00
1fd940b3d0 Adjust position of replay filters
Differential Revision: https://code.wildfiregames.com/D4010
This was SVN commit r25542.
2021-05-24 20:04:28 +00:00
3e5638e548 Removes hardcoded 1px width borders from GUI sprites.
Tested By: Imarok
Differential Revision: https://code.wildfiregames.com/D4008
This was SVN commit r25541.
2021-05-24 18:42:51 +00:00
8054097daf Mouse event mask for the diplomacy colors button
Differential Revision: https://code.wildfiregames.com/D4011
This was SVN commit r25540.
2021-05-24 12:09:30 +00:00
581e5b8752 Remove differences in territory decay rates.
Structures now decay in the same time span, including walls/palisades.
This buffs houses/storehouses against capture slightly.

Exceptions:
- Fortresses decay 4 times slower (but, as of now, they are also
territory roots).
- Wonders decay 4 times slower.

Differential Revision: https://code.wildfiregames.com/D3993
This was SVN commit r25539.
2021-05-24 10:45:38 +00:00
Angen
c1f8e74717 Add Filter placeholder text to modio filter field
Differential revision: D4000
Reviewed by: @Imarok
This was SVN commit r25532.
2021-05-23 08:55:38 +00:00
0728c58a4d Removes unnecessary z-level from GUI sprite rendering.
Tested By: Imarok
Differential Revision: https://code.wildfiregames.com/D4003
This was SVN commit r25524.
2021-05-22 18:06:18 +00:00
80a8c3827b Fix CanAttack for mirages following 88549e77e1
CanAttack queries the miraged Resistance which did not exist, thus
failing.
This mirages Resistance explicitly (fixing parts of #5883)

Fixes 88549e77e1, reverts the mirage.xml change in 738b200dda

Refs #5883

Reported by: Asger_Spear
Differential Revision: https://code.wildfiregames.com/D4001
This was SVN commit r25517.
2021-05-22 10:56:40 +00:00
0dfebc8d2b Let PetraAI check for different templates when finding the best dropsite.
Loops buildable templates to find the best.

Differential revision: https://code.wildfiregames.com/D3876
Comments by: @Angen, @Stan, @wraitii
This was SVN commit r25514.
2021-05-22 07:53:47 +00:00
494d12fb9c Let PetraAI check for droppable resources when finding the best dropsite location.
Instead of hardcoding resources.

Differential revision: https://code.wildfiregames.com/D3874
Comments by: @Angen, @Stan
This was SVN commit r25513.
2021-05-22 07:51:08 +00:00
012ac9f36b Add rated game information to the objectives dialog.
So an joined observer can see that information.

Patch by: @Langbart
Differential revision: https://code.wildfiregames.com/D3964
Comment by: @wraitii
Idea accepted by: @asterix
This was SVN commit r25512.
2021-05-22 07:39:17 +00:00
340aa419f4 Deduplicate add/remove entity to/from AIs resource map.
Also moves the function to the shared_script, since that is the
prototype it uses and the function doesn't use anything of the
terrain_analysis (as per @Angen's request).

Differential revision: https://code.wildfiregames.com/D3906
Comments by: @Angen, @wraitii
This was SVN commit r25511.
2021-05-22 07:35:16 +00:00
8f8e29c092 Fix incompatible mods start: show both incompatible and enabled mods;
As noted by Angen in a26535d023, refs 3bcf360107
When starting with incompatible mods, the non-incompatible mods were no
longer shown. This fixes that.
I think the code looks cleaner from this new control flow that
explicitly only mounts "mod".

Tested by: Angen
Differential Revision: https://code.wildfiregames.com/D3996
This was SVN commit r25510.
2021-05-22 07:33:49 +00:00
3548feb16a Fix entities receiving double hunt order only attacking.
Caused by: 293cd95ccb.
Noticed by @Asger and @Kate.
Special case hunting.

Differential revision: https://code.wildfiregames.com/D3986
Comment by: @wraitii
This was SVN commit r25509.
2021-05-22 05:27:51 +00:00
b2e1181982 Partly revert 5f1f768ed5.
The underlying cause was fixed by 8eb4871c9b.
Reviewed by: wraitii
Differential Revision: https://code.wildfiregames.com/D3836
This was SVN commit r25505.
2021-05-21 21:37:07 +00:00
fe4890e0b2 Improved particles by @wowgetoffyourcellphone
This was SVN commit r25496.
2021-05-21 10:49:11 +00:00
9756fb3dad Darker AO for the stone quary
This was SVN commit r25495.
2021-05-21 10:42:20 +00:00
274fadaf30 More consistent animal portraits by @wowgetoffyourcellphone
This was SVN commit r25494.
2021-05-21 10:41:41 +00:00
bdfacbfdd3 Add a round 9x9 decal
This was SVN commit r25493.
2021-05-21 10:40:20 +00:00
15140751a7 Improved farm decals by @wowgetoffyourcellphone
This was SVN commit r25492.
2021-05-21 10:33:13 +00:00
19f7db1681 Remove the floating property from shipwrecks.
Patch by: @wowgetoffyourcellphone
EOL native.

This was SVN commit r25491.
2021-05-21 09:49:32 +00:00
db829373cb Add new cliff textures
Patch by: @wowgetoffyourcellphone
Textures from: https://cc0textures.com/
Thread
https://wildfiregames.com/forum/topic/17326-your-0-ad-screenshots/page/30/

This was SVN commit r25490.
2021-05-21 09:23:08 +00:00
809dba254a Add new indian biome
Patch by: @wowgetoffyourcellphone
Textures from: https://cc0textures.com/
Thread
https://wildfiregames.com/forum/topic/17326-your-0-ad-screenshots/page/30/

This was SVN commit r25489.
2021-05-21 09:22:17 +00:00
70a6826b51 Add new nuba biome
Patch by: @wowgetoffyourcellphone
Textures from: https://cc0textures.com/
Thread
https://wildfiregames.com/forum/topic/17326-your-0-ad-screenshots/page/30/

This was SVN commit r25488.
2021-05-21 09:21:22 +00:00
e10fa5b80f Add new saharan biome
Patch by: @wowgetoffyourcellphone
Textures from: https://cc0textures.com/
Thread
https://wildfiregames.com/forum/topic/17326-your-0-ad-screenshots/page/30/

This was SVN commit r25487.
2021-05-21 09:19:46 +00:00
b5a1e9ba51 Add new steppe biome
Patch by: @wowgetoffyourcellphone
Textures from: https://cc0textures.com/
Thread
https://wildfiregames.com/forum/topic/17326-your-0-ad-screenshots/page/30/

This was SVN commit r25486.
2021-05-21 09:18:20 +00:00
b00f000477 Add new sudd biome
Patch by: @wowgetoffyourcellphone
Textures from: https://cc0textures.com/
Thread
https://wildfiregames.com/forum/topic/17326-your-0-ad-screenshots/page/30/

This was SVN commit r25485.
2021-05-21 09:16:38 +00:00
91e244d364 Add new temperate europe biome
Patch by: @wowgetoffyourcellphone
Textures from: https://cc0textures.com/
Thread
https://wildfiregames.com/forum/topic/17326-your-0-ad-screenshots/page/30/

This was SVN commit r25484.
2021-05-21 09:15:47 +00:00
8e3ef8dd8f Add new aegean alpine arctic biome
Patch by: @wowgetoffyourcellphone
Textures from: https://cc0textures.com/
Thread
https://wildfiregames.com/forum/topic/17326-your-0-ad-screenshots/page/30/

This was SVN commit r25483.
2021-05-21 09:12:35 +00:00
baeceab0c8 Add new aegean anatolian biome
Patch by: @wowgetoffyourcellphone
Textures from: https://cc0textures.com/
Thread
https://wildfiregames.com/forum/topic/17326-your-0-ad-screenshots/page/30/

This was SVN commit r25482.
2021-05-21 09:11:42 +00:00
0aedcced74 Remove Gate/Defensive from ram preferred classes
This leaves them with 'Structure', undifferentiated. This avoids the
issue reported in #6096 that rams can try to hit unreachable buildings
indefinitely.

Based on a patch by: Nescio
Differential Revision: https://code.wildfiregames.com/D3684
This was SVN commit r25481.
2021-05-21 07:47:54 +00:00
b6f2dee43b Increase pushing range by 60%
Reduces the 'clumpiness' of units, particularly when ordered to move to
a single point. The minimum pushing force was increased to compensate.

Differential Revision: https://code.wildfiregames.com/D3978
This was SVN commit r25479.
2021-05-21 07:23:47 +00:00
37c8e9caa8 Allow right-clicking to show template panel on queued items.
Request at:
https://wildfiregames.com/forum/topic/40311-a24a23-context-information/.

Differential revision: https://code.wildfiregames.com/D3983
This was SVN commit r25478.
2021-05-21 07:11:05 +00:00
e1f9304601 Fix alpine biome in Wild Lake RM.
After 8ee6774d12.

Differential revision: https://code.wildfiregames.com/D3984
This was SVN commit r25477.
2021-05-21 07:07:47 +00:00
a26535d023 Fix mistake in 3bcf360107 which stopped the incompatible mods page from showing.
I didn't quite understand what was supposed to happen here. This makes
things work as before.
While at it, fix a conversion bug & do some more tweaks.

Differential Revision: https://code.wildfiregames.com/D3990
This was SVN commit r25475.
2021-05-20 17:11:26 +00:00
3bcf360107 Mod and mod-mounting cleanup and improvements.
- Non-visual replays now automatically try to load the replay mods. This
removes the annoyance that -mod=public usually had to be passed.
- MountMods is no longer called in InitVfs but later, making it possible
to load the game in one pass & simplifying things considerably.
- Explicitly ignore duplicates when loading mods
- Interface cleanup: failed mods and incompatible mods were redundant,
only incompatible mods is kept.
- Interface cleanup: `AreModsCompatible`becomes
`CheckForIncompatibleMods`, which becomes a private pure function,
simplifying the control flow somewhat.
- Interface cleanup: `CheckAndEnableMods` is just `EnableMods`, which
explicitly updates loaded & incompatible mods.
- `CacheEnabledModVersions` becomes private and is called on behalf of
the user, removing the need to be careful about updating that (fixes my
concern at 44ec2e324e)

Overall, the logic around mounting & enabled mods should be easier to
understand.

Differential Revision: https://code.wildfiregames.com/D3982
This was SVN commit r25474.
2021-05-20 14:36:42 +00:00
21b7e8faaf Better quality acacia trees by @Sundiata. Needed for the map overhaul.
This was SVN commit r25472.
2021-05-20 11:26:49 +00:00
eda2901a33 Translate the default campaign name in NewCampaignModal
Patch by: nwtour
Differential Revision: https://code.wildfiregames.com/D3977
This was SVN commit r25471.
2021-05-20 10:03:51 +00:00
5e6038eeaf Change the visuals of the counters in the top panel.
- Abbreviate large numbers (fixes #6063).
- Added popMax to the population counter.
- Also show `0` gatherers, highlights and changes the font.

Patch by: @Langbart
Differential revision: https://code.wildfiregames.com/D3911
Reviewed by: @Angen, @Freagarach
Comments by: @asterix, @nwtour, @s0600204, @wraitii
This was SVN commit r25470.
2021-05-20 08:55:08 +00:00
13c1b55f42 Fix UnitAI states in PetraAI.
Sometimes PetraAI relies on UnitAI state of an entity, but those were
not changed after modifying UnitAI.
Introduced in ea96e81098 and 3579097d95.

Differential revision: https://code.wildfiregames.com/D3976
This was SVN commit r25468.
2021-05-20 08:31:30 +00:00
453fe486de Triggers: prevent event names from conflicting with added methods
Refs c0157d613d / D3913 which removed the 'actions' suffix. The reason
for this suffix was probably avoiding this type of conflict, but this
new solution does a better job.

Fixes (at least) Survival of the Fittest, which used an
OnOnwershipChanged trigger.

Differential Revision: https://code.wildfiregames.com/D3979
This was SVN commit r25467.
2021-05-20 08:26:04 +00:00
575cd6c953 Removes unused uniforms and attributes from water shader.
This was SVN commit r25466.
2021-05-19 21:51:36 +00:00
88549e77e1 Require 'Resistance' in CanAttack
This was already effectively the case, so this change increases
coherence.

Accepted By: Freagarach
Differential Revision: https://code.wildfiregames.com/D3980
This was SVN commit r25465.
2021-05-19 12:36:22 +00:00
1619be9902 Differentiate movement speeds of ranged cavalry
Ranged cavalry goes from a base 0.89 walkspeed multiplier to:
- 0.8 for crossbowmen
- 0.85 for archers
- 0.9 for javelineers

The intention is to nerf archers slightly.

Patch By: Nescio
Accepted By: ValihrAnt, chrstgtr
Differential Revision: https://code.wildfiregames.com/D3758
This was SVN commit r25464.
2021-05-19 08:21:05 +00:00
5d1d2d27d7 Outposts have vision without garrisoning again.
Reverts D2986 / f9f7b4d49f.

Outposts have 90 base vision, increasing to 120 with the 'Carrier
pigeon' technology.
Outposts no longer decay in neutral territory, thus not needing
garrisoning. To compensate, they decay 10x faster in enemy territory.

Differential Revision: https://code.wildfiregames.com/D3898
This was SVN commit r25463.
2021-05-19 08:13:35 +00:00
9093e7bbe2 TreasureCollecter -> TreasureCollector.
Noticed by @Stan on ea96e81098.

Differential revision: https://code.wildfiregames.com/D3949
This was SVN commit r25461.
2021-05-18 16:51:44 +00:00
4195205904 Use a set for the selection internals.
Avoids recreating an object and frequent casting.
Allows some optimisations.
Simplifies some calls.

Differential revision: https://code.wildfiregames.com/D3934
Comment by: @Stan
This was SVN commit r25460.
2021-05-18 15:56:47 +00:00
40f9372d29 Allow decaying only in enemy territory.
Reviewed By: Freagarach
Differential Revision: https://code.wildfiregames.com/D3969
This was SVN commit r25458.
2021-05-18 12:43:01 +00:00
3939e0f035 Fix autostart without default difficulty.
If a default difficulty is given by the map, use that. Else use the
default of the game.

Patch by: @JCWasmx86
Differential revision: https://code.wildfiregames.com/D3951
This was SVN commit r25455.
2021-05-17 15:59:05 +00:00
2034136560 Implement a workaround for routers without NAT loopback.
This allows joining a lobby game hosted on the same network (behind the
same NAT gateway).
This is relatively primitive to keep things simple: if the server and
the client have the same public IP, it is assumed that they are on the
same network and the client instead requests the local IP.

Differential Revision: https://code.wildfiregames.com/D3944
This was SVN commit r25448.
2021-05-16 15:34:38 +00:00
6b0802836a Fix duplicating promoting entities in XP trickling structures.
The entity received a value modif. message while promoting, triggering a
second promotion.

Differential revision: https://code.wildfiregames.com/D3918
Fixes: #6162
Comments by: @Angen, @Stan
This was SVN commit r25439.
2021-05-15 05:40:13 +00:00
66c75068bc Fix broken non pot texture by @m7600
Reported by: @nwtour
Fixes: #6177 and 318a5d7a2b

This was SVN commit r25437.
2021-05-14 18:06:00 +00:00
79e294ec06 Make fruit (berries and some fruit trees)'s obstructions smaller.
Patch by: @nani
Liked by: @ffffffff
Tested by: me and @Langbart
Differential Revision: https://code.wildfiregames.com/D3957
This was SVN commit r25436.
2021-05-14 15:13:55 +00:00
cb263b9f26 Add a decal to the berry bushes to make them more visible and make the fruits bigger
Suggestions by: @m7600, @wraitii, @JCWasmx86
Reported by: @Yekaterina
Thread:
https://wildfiregames.com/forum/topic/39973-a25-feedbacks-from-testing/

This was SVN commit r25429.
2021-05-13 11:19:37 +00:00
bb
412e870c55 Add defeat condition on civil centre loss
Somewhat obsoleting 171afdc7a6.

Reviewed By: Freagarach
Comments By: Stan, Nescio and wowgetoffyourcellphone
Differential Revision: D3530
This was SVN commit r25422.
2021-05-12 13:34:50 +00:00
441c122331 Fix collecting treasures near position.
Also refactors the order a bit to be more equal to other orders.
Removes the `autocontinue` because it was not useful (since that is more
about doing other tasks than the one ordered).
Follows ea96e81098 97addf2aa7.

Differential revision: https://code.wildfiregames.com/D3942
Tested by: @Langbart
Fixes: #6175

This was SVN commit r25421.
2021-05-11 07:41:40 +00:00
ad62707eef Ensure rated game and cheat won't be enabled at the same time.
Reported by: Freagarach
Differential Revision: https://code.wildfiregames.com/D3943
This was SVN commit r25418.
2021-05-10 07:49:30 +00:00
8f8996e338 Allow registering custom data for triggers
This allows easier handling of e.g. range triggers calling into the same
function.

The original trigger data is also forwarded for convenience.

Differential Revision: https://code.wildfiregames.com/D3904
This was SVN commit r25413.
2021-05-09 16:55:36 +00:00
Angen
f1acd22455 Do not allow to start pyrogenesis with incompatible mods
Fixing following problems:
Issue number one:
Enable mod with a23 compatibility in a23b.
Save configuration.
Start a24.
Better result:
Mod will be enabled and invisible in mod selection screen producing
various errors.
Worse result:
Game will crash and refuse to start.

Issue number two:
Mods can silently set loaded mods without restarting the engine, so mods
can unlist themselves from compatibility detection.

Solution:
Enable necessary mods instead if running with gui and open mod page.
Open information window on top of mod page to infom why mod page is
showing up.
On mod page show mods which failed in compatibility check and color the
resposnible ones.
Disable start button without enabled mods.
Show non existed mods if they failed in compatibility check.

Else just log to mainlog and close.

Another fixes:
Display in enabled mods really enabled mods as current logic confuses
players about which mods they have enabled and is not helpful (ref
#4881)

Note:
this will not solve issue with mods claiming being compatible with
engine version while in fact being incompatible.

Comments by: @vladislavbelov, @Stan, @Imarok
Tested by: @wraitii
Differential revision: D3592
Fixes: #6044 #4881

This was SVN commit r25410.
2021-05-09 13:53:25 +00:00
Angen
933b331c1b Hide icon for matches without password
This should help with better visual experience.
Icon introduced in c2155e31c0.

Differential revision: D3939
Fixes: #6153

This was SVN commit r25409.
2021-05-09 13:47:03 +00:00
3af1fc64d2 Allow GUI elements to define custom mouse event mask shapes.
This allows GUI elements to use a texture as their "mouse event mask",
making it possible to have arbitrarily-shaped GUI elements with regards
to mouse interactions.

Used for the minimap idle worker button as a proof-of-concept.

Differential Revision: https://code.wildfiregames.com/D3814
This was SVN commit r25408.
2021-05-09 13:08:07 +00:00
e94faf7827 Don't hardcode the "0ad" resource into lobby XMPP & hosting
XMPP JID has a concept of 'resources', which can be used to
differentiate multiple clients of the same account.

We currently hardcode this 'resource' to '0ad' in two places:
- The 0 A.D. client always uses '0ad'
- The network code expects a host resource to be '0ad' when connecting.

As noted in 0fd8aa2a77#31215, it is less effort to store the JI
D directly. This patch does that. It also makes 0 A.D. use a different
resource each time.
Note that resources ought not contain particular information, as the
XMPP server is free to
 clobber it. I keep '0ad-' here for debug purposes.

This allows:
- multiple 0 A.D. instances to log on the lobby at the same time (not
massively useful, but good for debugging sometimes)
- hosting a game with a custom resource, which will potentially make it
easier to have dedi
cated servers on one account.

Note that hosting multiple games on one account is currently not
supported and will have weird behaviour on the lobbybots side. They
should be upgraded independently of this.

Refs #3556

Differential Revision: https://code.wildfiregames.com/D3500
This was SVN commit r25407.
2021-05-09 12:51:32 +00:00
88810524b3 Make it explicit that technology specific names expect an object.
Simple strings would trigger errors.

Patch by: nwtour
Differential Revision: https://code.wildfiregames.com/D3921
This was SVN commit r25406.
2021-05-09 12:46:58 +00:00
1e1af6e2df Separate campaign replays in replay page & fix for i18n
The 'map name' dropdown filter did not work in localised interfaces.

Patch by: nwtour
Differential Revision: https://code.wildfiregames.com/D3883
This was SVN commit r25404.
2021-05-09 08:39:38 +00:00
14324b8918 Fix auto-complete chat entries for Biome names in GameSetup
The line altered here was returning an Array of Objects. This array
would
eventually passed to code that expected it to be an Array of Strings.
This was
causing an error to thrown that could be replicated by going to the
Multiplayer
GameSetup, entering text (e.g. "Winter", "Dry", "lol") into the chat
field, and
pressing `Tab` to trigger the auto-complete.

This line now returns an Array containing the user-facing names of the
Biomes
available to the selected map (if it has them), which is what this
method was
returning prior to dc18d94030.


Related: dc18d94030, dc18d94030

This was SVN commit r25403.
2021-05-08 20:45:20 +00:00
f008edea73 Fx low resource supply tricking AI.
Strength was floored, resulting in possibility for `0`, which was not
handled gracefully by the map.
Since the strength is multiplied by something that can be non-integer in
the map, the floor is not needed.

Differential revision: https://code.wildfiregames.com/D3884
Comments by: @Angen, @smiley
This was SVN commit r25400.
2021-05-07 09:07:20 +00:00
a18d97b047 Let team bonuses also apply to own player.
Requested in D3810 (and other places).
It was weird that e.g. the Romans gave their allies a training bonus but
lacked that themselves.

Differential revision: https://code.wildfiregames.com/D3899
Reviewed by: @ValihrAnt
Comment by: @darkcity
Idea approved by: @wraitii
This was SVN commit r25399.
2021-05-07 08:48:51 +00:00
2dfc8681d2 Fix returning resources by formation members.
Noticed by @mysticjim.
Introduced in 21645f5c1c.

Differential revision: https://code.wildfiregames.com/D3931
Differential revision: D3838
Fixes: #6170
Reviewed by: @wraitii
This was SVN commit r25397.
2021-05-07 07:05:57 +00:00
d2d0c6b347 Some small fixes for the AutoQueue feature.
51ab4315ff
Fix using the hotkey on entities that don't have a Production Queue.
Fix showing the icon on entities that don't produce entities.

Differential revision: https://code.wildfiregames.com/D3932
Fixes: #6172
Comment by: @wraitii
Tested by: @Langbart
This was SVN commit r25396.
2021-05-07 07:01:39 +00:00
e0800bc092 Allow toggling repairability.
Useful for trigger maps.

Differential Revision: https://code.wildfiregames.com/D3901
This was SVN commit r25393.
2021-05-06 14:25:33 +00:00
c2167ffc7e Differentiate a bit the spart and athen rams.
- Use Athenian Shields
- Reduce Duplication
- Add default material

Patch by: @wowgetoffyourcellphone & @Stan`
This was SVN commit r25390.
2021-05-06 07:17:09 +00:00
781afea4b1 More broken implicit conversions.
Differential Revision: https://code.wildfiregames.com/D3928
This was SVN commit r25386.
2021-05-05 15:39:44 +00:00
51ab4315ff Enable production entities to autoqueue.
This adds a new command button that enables training of units
automatically.
Use:
- Enable auto-queue.
- Train an entity.

This adds a new item to the queue whenever the previous item starts,
such that good micro is more resource-efficient.

Patch by: @azayrahmad
Differential revision: https://code.wildfiregames.com/D3865
Comments by: @Langbart, @nani, @Stan, @wraitii
This was SVN commit r25381.
2021-05-05 06:12:31 +00:00
fe3ff1b0ff Map browser fixes and improvements
- 'Random' map is filtered correctly
 - When in 'fallback to all' mode, selecting something works (#6165).
 - Fix hotkeys being broken (fixes map browser following 0406c4dfde)
 - Clear filters when reopening the map browser (seems natural).

Based on a patch by: nani
Refs #6045.
Fixes #6165.

Differential Revision: https://code.wildfiregames.com/D3833
This was SVN commit r25379.
2021-05-04 16:40:16 +00:00
911f49c655 Gamesetup: make sure GameSpeed is a number
The dropdown converted the numbers to string, and the code expected
numbers.

Differential Revision: https://code.wildfiregames.com/D3924
This was SVN commit r25376.
2021-05-04 13:59:30 +00:00
a1010b83d3 Enable specifying the trigger action independently of the trigger name.
Trigger functions/actions were tied to the trigger 'identifier'. This is
inconvenient if several triggers should call the same function, e.g. for
range triggers.

By setting an 'action' in the trigger data, one can now specify the
function to call independently of the trigger name.

For clarity, the 'action' parameter in RegisterTrigger is changed to
'name'. By default, the action still matches the trigger name for
compatibility and convenience.

Differential Revision: https://code.wildfiregames.com/D3903
This was SVN commit r25374.
2021-05-04 12:33:45 +00:00
c0157d613d Simplify trigger event naming scheme.
Reduces confusion and string manipulation.

Refs #52.

Differential Revision: https://code.wildfiregames.com/D3913
This was SVN commit r25373.
2021-05-04 09:46:38 +00:00
79118e6716 Remove castshadow from decals.
This was SVN commit r25372.
2021-05-04 09:21:32 +00:00
6663b27fa2 Disable shadows for blood. Since they are decals it doesn't seem to make much difference.
This was SVN commit r25371.
2021-05-04 09:06:13 +00:00
2efe255bbd Fix error when hosting lobby game.
Revealed by 0406c4dfde. The fix also avoids sending a redundant
lobbyregistration message.

Reported by: langbart
Differential Revision: https://code.wildfiregames.com/D3923
This was SVN commit r25369.
2021-05-04 08:58:22 +00:00
738b200dda Let entity react on target death directly.
Don't let entities waste a repeat time when they've killed their target.
Done by storing a list of attackers in cmpResistance (since that cmp is
obligatory anyway).

Differential revision: https://code.wildfiregames.com/D2129
Comments by: @Angen, @wraitii
This was SVN commit r25368.
2021-05-04 05:18:11 +00:00
0406c4dfde Throw errors instead of warnings on wrong implicit conversions.
This prints out a stack trace, which is quite helpful when debugging.
Also fixes an issue with stack trace not always being reported.

Differential Revision: https://code.wildfiregames.com/D3210
This was SVN commit r25365.
2021-05-03 15:44:06 +00:00
5287dd768d Add some missing credits.
@mysticjim and @Sundiata manage the community, but were not named in
those credits yet.
@Langbart does a lot of valuable work (amongst which is writing patches)
and was not credited at their first patch (my fault).

Differential revision: https://code.wildfiregames.com/D3880
This was SVN commit r25364.
2021-05-03 14:03:43 +00:00
48cb9a2d6f Allow triggers to spawn turreted entities.
After 21e866fcf0.

Differential revision: https://code.wildfiregames.com/D3872
Comments by: @Angen
This was SVN commit r25363.
2021-05-03 08:54:54 +00:00
Angen
0ad3dba097 Do not transfer xp twice on Promotion
ChangeEntityTemplate used by Promotion is transfering xp from old unit
to new one, but also Promotion component itself does the same thing.
Introduced in cc1ea7cca0

Differential revision: D3915
This was SVN commit r25356.
2021-05-01 17:40:26 +00:00
8633a28b00 TriggerPoint - default required component is '0'.
Differential Revision: https://code.wildfiregames.com/D3902
This was SVN commit r25351.
2021-05-01 09:02:30 +00:00
3579097d95 Count resource gatherers also when returning their resources.
Followup on 1e0a6f66f0.
This gives a better image of the amount of units which are gathering.
By decision, entities are _not_ accounted from when the player tasks
them to return their resources.

Refs. #643
Differential revision: https://code.wildfiregames.com/D3226
Comments by: @wraitii
This was SVN commit r25345.
2021-04-30 06:24:13 +00:00
2ce4c2e7d5 Unify pierce resistance of defensive structures.
Defensive buildings now have 25H/35P/3C resistance.

Patch by: Nescio
Differential Revision: https://code.wildfiregames.com/D3757
This was SVN commit r25342.
2021-04-29 07:35:27 +00:00
f0b2c31533 Buff stone throwers: increased range and HP.
Patch by: borg-
Differential Revision: https://code.wildfiregames.com/D3781
This was SVN commit r25341.
2021-04-29 07:32:49 +00:00
70149803c5 Introduce a specific limit to domestic animals pop.
- Prevents lag
- Prevents abuse by using animals to break pathfinding.

Patch by: Nescio
Differential Revision: https://code.wildfiregames.com/D3777
This was SVN commit r25340.
2021-04-29 07:29:48 +00:00
b1267f7878 Unify resistances of non-buildable structures.
Resistance is unified to 1H/10P/1C.

Patch by: Nescio
Differential Revision: https://code.wildfiregames.com/D3756
This was SVN commit r25339.
2021-04-29 07:27:12 +00:00
04d242c456 Introduce an Hoplite tradition tech for Athens/Sparta.
Similar to the archer tradition tech.
Intended to boost usage of melee units.

Patch by: borg-
Differential Revision: https://code.wildfiregames.com/D3688
This was SVN commit r25338.
2021-04-29 07:26:00 +00:00
e3c7c4656a Increase archer spread slightly, introducing a compensating technology.
This new value was last changed in 4a2cc3273e. The new value sits
halfway.
The technology is available at the forge for all civilizations with
archers and independent of the already existing “Archery Tradition”
technology.

Patch by: Nescio
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D3736
This was SVN commit r25337.
2021-04-29 07:22:20 +00:00
d981536a5e Fix horses props going OOS when gathering.
- EOL native and xml mime type
- Add player_trans_norm_spec.xml
- Disable cast shadow for manes.
- Use norm instead of parallax

Reported by @Freagarach

This was SVN commit r25333.
2021-04-28 11:03:15 +00:00
cbd91ca999 Translation fixes.
- Fix in tooltip context for healing 'Health'
- Fix in tooltip for splash shape.
- Translate locale_advanced
- Translate specific name in the structure truee
- Translate player name in gamesetup.

Patch by: nwtour
Differential Revision: https://code.wildfiregames.com/D3889
This was SVN commit r25332.
2021-04-28 08:04:13 +00:00
4718760754 Fix ugly water color in polynesia.xml
This was SVN commit r25327.
2021-04-27 14:09:57 +00:00
67948e4229 Fix flag position for barracks.
Refs: #6160

This was SVN commit r25322.
2021-04-26 15:33:54 +00:00
9957ff1b08 Fix broken garrison flag on the athenian temple.xml
Refs: #6160

This was SVN commit r25319.
2021-04-26 14:56:50 +00:00
Angen
45805043a1 Use better colour in multiplayer lobby for away status
Colour for away status, makes it hard to spot among busy statuses.
Setting more orange colour for this.

Differential revision: D3856
Ref: #6055
Accepted by: @asterix
Comments by: @Langbart
This was SVN commit r25311.
2021-04-25 10:56:57 +00:00
1ccb85d8d7 Unify damage of arrow-shooting structures
- Arrow shooting structures (towers, CC, fortress, camps...) now deal 10
pierce data per arrow, one arrow every 2 second (i.e. 5 pierce DPS).
- Adjust the count of arrows per building accordingly.

This makes these buildings easier to compare.

Accepted By: #balancing, borg-, wraitii
Differential Revision: https://code.wildfiregames.com/D3668
This was SVN commit r25309.
2021-04-24 13:46:36 +00:00
52258ce48b Use the new "Lod" Feature for reins
* Disable "castshadow" on medium quality
* Disable them on low for performance.
* EOL & Mime Type

This was SVN commit r25305.
2021-04-23 09:38:23 +00:00
6f1644aac3 Some translation fixes.
Patch by: @nwtour
Differential revision: https://code.wildfiregames.com/D3875
Comment by: @vladislavbelov
This was SVN commit r25301.
2021-04-22 07:41:56 +00:00
19e055c6e1 Store build time modifier in template.
Instead of hardcoding it in the component.
Allows modders to easily change the value.

Differential revision: https://code.wildfiregames.com/D3792
Comments by: @Angen, @Nescio, @Stan
This was SVN commit r25299.
2021-04-22 06:18:00 +00:00
56aabc1242 Add note about patience on the chat-button and add FAQ-button.
We have a FAQ, that is now pretty up-to-date, so use it.
Also add note that people may want to be more patient when chatting with
us on IRC.

Patch by: @Langbart
Differential revision: D3499
Comment by: @Stan
This was SVN commit r25298.
2021-04-22 04:52:38 +00:00
8332425142 Use the new "Lod" Feature for handgrips
* Disable "castshadow" as they are never much larger than the shields
* Disable them on medium because they are part of the texture
* Disable them on low for performance.
* EOL & Mime Type
* Add a new materials/basic_trans_norm_spec.xml to disable parallax
(while keeping normal and transparency) when not needed and use it for
the handgrips with transparency.

This was SVN commit r25297.
2021-04-21 09:26:23 +00:00
228a2f49e0 Use the new "Lod" Feature for greaves
- Disable "castshadow" as they are never much larger than the legs
- Disable them on medium because they are part of the texture
- Disable them on low for performance.
- Add a missing mesh reported by @wowgetoffyourcellphone the r variant
was used for the l actor
- EOL & Mime Type

- Add a new materials/no_trans_norm_spec.xml to disable parallax (while
keeping normal) when not needed and use it for the greaves.

This was SVN commit r25296.
2021-04-20 21:27:26 +00:00
e2b43b2fbf Fix no idle alarm sound;
Noticed & Tested by: @Langbart
Tweaks by: @Samulis
This was SVN commit r25294.
2021-04-20 17:15:21 +00:00
8d02102885 Fix triggerhelper for 59d0885d68
59d0885d68 made formation take "formation", not "name". This broke
TriggerHelper.

Reported by: Angen
Reviewed By: Angen
Differential Revision: https://code.wildfiregames.com/D3873
This was SVN commit r25293.
2021-04-20 09:36:33 +00:00
80e9f2c517 Fix typo in PetraAI's extended entity.
Called the member instead of the function.
Introduced in ea96e81098. Noticed by @Angen.

Differential revision: https://code.wildfiregames.com/D3870
Reviewed by: @Angen
This was SVN commit r25291.
2021-04-19 06:43:50 +00:00
fe991aaa62 Moves cinematic overlay to GUI.
Differential Revision: https://code.wildfiregames.com/D3869
This was SVN commit r25289.
2021-04-18 16:23:10 +00:00
9450cfcbda Move custom JS data structures to globalscripts.
These don't depend on the simulation and can be useful for e.g. the GUI
(the FSM) or map scripts.
Confer also the vector implementation.

Differential revision: D3863
Comment by: @wraitii (agreed with concept)
This was SVN commit r25288.
2021-04-18 08:31:30 +00:00
fb3e9ad96e Play a sound when there are no idle entities.
If there are no idle units and the idle-unit hotkey is pressed there is
now a sound played.
Beneficial when there are already units selected since selection doesn't
change.

Sound courtesy of @Samualis.

Refs. #5360
Based on a patch by: @cpc
Differential revision: https://code.wildfiregames.com/D1692
Comments by: @asterix, @smiley, @Stan, @vladislavbelov
This was SVN commit r25287.
2021-04-18 08:10:00 +00:00
5c51ce2e2f Removes old ARB state.matrix usages.
This was SVN commit r25285.
2021-04-17 23:08:55 +00:00
b7e6811ea6 Removes fixed shader technique from effects.
This was SVN commit r25283.
2021-04-17 22:07:18 +00:00
fd008e11ad Fix some translations.
- Idle builder hotkey 28bd4f0092.
- "Other hotkey"-catagory.
- Tooltipless hotkeys.

Patch by: @nwtour
Differential revision: https://code.wildfiregames.com/D3862
This was SVN commit r25282.
2021-04-17 07:47:30 +00:00
b3e3d1f715 Use a map for the weighted list.
Less object creations at addition time, more intuitive handling.

Differential revision: https://code.wildfiregames.com/D3854
Comments by: @Stan, @wraitii
This was SVN commit r25276.
2021-04-16 07:02:58 +00:00
4329dd90ce Rename Attacking.js-helper to Attack.js and its global to AttackHelper.
16b452cf91#inline-4026

Differential revision: https://code.wildfiregames.com/D3858
Comment by: @wraitii
This was SVN commit r25275.
2021-04-16 06:55:23 +00:00
3184a51787 Add stable to fortress random map.
Replaces a house by a stable.
Since c4eeb82d83 cavalry cannot be trained at the barracks anymore.

Patch by: @Nescio
Differential revision: D3691
This was SVN commit r25274.
2021-04-16 06:26:37 +00:00
2e69526e26 Correct Arthashshastra quotes.
Chanakya was the teacher and minister of Chandragupta Maurya, whereas
Kautilya is the author of the Arthashshastra. While the two are often
equated (out of ignorance or for ideological reasons), they are
different persons, and the first versions of the Arthashshastra were
composed only a few centuries after the Mauryas were gone. See
https://wildfiregames.com/forum/topic/27113-bibliography-and-references-about-ancient-times-book-reviews/?tab=comments#comment-402302
for a more detailed explanation.
This patch therefore:
- changes the author from Chanakya to Kautilya;
- lists the quotes at the correct location in the file (under K instead
of C);
- removes the chapter titles (which depend on the text edition or
translation) and give a more precise location, to make it easier for
people to look up.

For those interested, the Sanskrit is:
KAZ01.4.07 na-iti kauṭilyaḥ | 7 |
KAZ01.4.08 tīkṣṇa.daṇḍo hi bhūtānām udvejanīyo bhavati | 8 |
KAZ01.4.09 mṛdu.daṇḍaḥ paribhūyate | 9 |
KAZ01.4.10 yathā.arha.daṇḍaḥ pūjyate | 10 |
and:
KAZ01.19.01 rājānam utthitam anūttiṣṭhante bhṛtyāḥ | 1 |
KAZ01.19.02 pramādyantam anupramādyanti | 2 |

And the translations in Patrick Olivelle King, Governance, and Law in
Ancient India / Kauṭilya’s Arthaśāstra / A New Annotated Translation
(Oxford 2013) are on p. 69:
7 “No,” says Kauṭilya;
8 “for one who punishes severely terrifies the people,
9 and one who punishes lightly is treated with contempt,
10 whereas one who dispenses appropriate punishment is treated with
respect.
and on p. 92:
1 When the king is energetic, people in his service, in turn, become
energetic;
2 and when he is lethargic, they, in turn, become lethargic.

Patch (and description above) by: @Nescio
Differential revision: https://code.wildfiregames.com/D3598
This was SVN commit r25273.
2021-04-16 06:23:16 +00:00
4a51012442 Adds line drawing to DebugRenderer.
This was SVN commit r25271.
2021-04-15 22:51:25 +00:00
Angen
57e85c195e Fix wrongly placed parameter in 841bf5f2dd
Correctly colour url of invalid mod.

This was SVN commit r25270.
2021-04-15 20:21:47 +00:00
Angen
f1a1cf11d3 Check for replay compatibility when opening summary screen
Summary screen and mainly its statistics can be influenced by mod as
much as replay itself with mod removing or adding classes and trackers
to the game.
Summary screen allows to replay the match without checking
compatibility, that is fine I think if it is prevented to see summary of
incompatible replay in a first place.

Therefore this is adding compatibility check for opening summary of
replay.

Differential revision: D3799
Fixes: #6119
Tested by: @Langbart
This was SVN commit r25268.
2021-04-15 17:19:27 +00:00
Angen
894fc1dd5d Fix EstimateFuturePosition in UnitMotionFlying
Introduced in f737831167

Differential revision: D3855
Fixes: #6141

This was SVN commit r25267.
2021-04-15 17:15:40 +00:00
b74ab54cf7 Fix translation of damage types.
Broken in d28a91b83d.
Due to not checking for `template_helpers` in the game's files.

Patch by: @nwtour
Differential revision: https://code.wildfiregames.com/D3850
This was SVN commit r25265.
2021-04-15 05:47:54 +00:00
079212fe46 Fix entities able to attack allied structures in rare cases (take 2).
Caused by not checking the attack type whilst performing an attack.

Fixes: #5511
Differential revision: D3845
Refs. #3484

This was SVN commit r25264.
2021-04-15 05:45:13 +00:00
f57ac432e8 Show correct cost/phase of template-variants in structree whilst maintaining correct build lists in viewer
("Variant" in this case means a template that is functionally the same
as its
base template - but is a different promotion level, requires a
technology to
unlock (that the base template doesn't), is an upgrade of its base, or
is a
trainable version.)

Should fix concern raised on b2842e8021.

Accepted by: Angen
Differential Revision: https://code.wildfiregames.com/D3347
This was SVN commit r25260.
2021-04-14 20:05:26 +00:00
63224865d5 Fix selection height for the apple, banana, date, fig, olive and palm trees. Use the biggest variation as reference. Forgotten in https://code.wildfiregames.com/24043 (Height was 10 initially)
Reported by: @nani
Fixes: #6075

This was SVN commit r25259.
2021-04-14 16:55:44 +00:00
43a780504a Delete "Compact RelaxNG" / .rnc files
(Follows 76acc4e146 where I deleted actor.rnc)

This deletes the .rnc validation files, upgrading the .rng files to
being the source of truth.

- The engine uses, via LibXML2, .rng files to validate XML schemas, to
the .rnc files are redundant.
- The RelaxNG "Compact" format is a DSL for the RelaxNG XML format. Its
syntax is unique, unlike .rng files which are XML.
- Some errors are likely - I'm not sure anyone has converted the compact
files in years.
- The tool to generate .rng from .rnc files is trang
(https://github.com/relaxng/jing-trang), which runs on the JVM and is
quite annoying to install compared to "your usual text editor".
- The JS components use the full .rng format in XML, so editing this
format is already familiar to most people that mod the game.

The .rnc files were added in 2c9939ac74 along the .rng files.

Refs #413, #245

Differential Revision: https://code.wildfiregames.com/D3824
This was SVN commit r25258.
2021-04-14 07:39:36 +00:00
fde66f5134 Fix 4 small gamesetup issues
- Random lanscape option now works properly.
- Non-host clients now see the game attributes correctly in the loading
screen, including in particular the map name.
- AI bots are again translated.
- 'Cheat' setting is persisted correctly in MP gamesetup.

Reported by: myself, Freagarach, nwtour
Differential Revision: https://code.wildfiregames.com/D3841
This was SVN commit r25257.
2021-04-14 07:30:26 +00:00
1508031f09 Scale down turret icons so that they don't overflow.
Reported by: @nwtour
This was SVN commit r25252.
2021-04-13 17:15:34 +00:00
67fe65e85b Fix mismatching range checks in finding a new target when gathering.
While gathering resources entities may be tasked to gather near a
position. The range check for that is 10 m. However, the relaxed range
check for the walking state is this.DefaultRelaxedMaxRange, which is 12
meter, currently. Meaning it would lead to a slow infinite loop.

Differential revision: D3839
Comments by: @wraitii
Tested by: @gameboy
(https://wildfiregames.com/forum/topic/38131-tutorial-bug/)

This was SVN commit r25249.
2021-04-13 06:48:13 +00:00
5df6e688e2 Revert 189d00d811 - infinite loop in UnitAI when slaughtering.
Reverting to get some time to investigate.

Reported by: langbart
This was SVN commit r25246.
2021-04-12 16:16:57 +00:00
2078abdcc4 Fix issue with 37790e099c
Cost cannot be non-integer, and rounding issues happened.

Reported by: gameboy
This was SVN commit r25245.
2021-04-12 14:07:59 +00:00
6d5b710877 Fix undefined values in barter tooltip.
Patch by: nwtour
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D3829
This was SVN commit r25244.
2021-04-12 13:51:02 +00:00
21645f5c1c Minor fixes after Gathering refactoring.
- `initPos` was used wrong.
- There were two `CanGather` functions in `cmpResourceGatherer`.
- Reduced some duplication in the ReturnResource order.

Differential revision: D3838.
This was SVN commit r25243.
2021-04-12 12:50:17 +00:00
189d00d811 Fix entities being able to attack allied structures in rare cases.
Caused by not checking the attack type while performing an attack.

Closes: #5511
Differential revision: D3840
References #3484

This was SVN commit r25242.
2021-04-12 12:41:35 +00:00
b7db124cb5 Crops minimap view bounds to map size.
Differential Revision: https://code.wildfiregames.com/D3837
This was SVN commit r25241.
2021-04-12 12:39:07 +00:00
e17cd7754e Split hotkeys of turrets.
Following 21e866fcf0.
Also support leaving a turret by using a hotkey.
Currently the hotkeys are by default bound to the same ones as
garrisoning.

Differential revision: D3773
Icons by: @wowgetoffyourcellphone and @Stan.
This was SVN commit r25240.
2021-04-12 12:31:29 +00:00
d0a0ed0b1c Mixins: deduplicate Athen-specific data.
Puts the athen-specific data in the mixin `civ/athen`. Deduplicates.

Differential Revision: https://code.wildfiregames.com/D3831
This was SVN commit r25239.
2021-04-12 11:30:38 +00:00
37790e099c Mixins: Remove the special mercenary technology, apply template changes directly.
Reviewed By: Freagarach
Differential Revision: https://code.wildfiregames.com/D3832
This was SVN commit r25238.
2021-04-12 11:28:18 +00:00
318a5d7a2b Improve Caratacos' portrait.
Patch by: @m7600
Refs: d8709f84f3

This was SVN commit r25237.
2021-04-12 09:13:34 +00:00
3097a7c302 Attack using cmpAttack instead of UnitAI.
Keep responsibilities separated, allow easier modding of attacking
behaviour.
Ideally the BuildingAI attacking routine would be merged in here as
well, but not done for now.

Part of #5810
Differential revision: D3816
Comments by: @smiley, @Stan
This was SVN commit r25235.
2021-04-12 06:51:39 +00:00
ea86790e4e Profile the Transform helper.
Differential revision: D3825
Comments by: @Stan, @wraitii
This was SVN commit r25234.
2021-04-12 06:23:30 +00:00
8acc3b049f Combine attack times in a single node.
Reduces duplication, allows all attack types to cause splash damage.
While at it, makes delay and minimal range optional (for obvious
defaults are available).

Split from D368, so basically a patch by @bb.

Note that it may seem like one can arbitrarily name an attack now, but
that is not true.

Differential revision: D2002
Comments by: @bb, @Nescio, @Stan, @wraitii
This was SVN commit r25233.
2021-04-12 06:17:13 +00:00
8eb4871c9b Draws GUI elements by Z order.
Tested By: wraitii
Differential Revision: https://code.wildfiregames.com/D3780
This was SVN commit r25229.
2021-04-11 11:27:53 +00:00
d73a3f59ad Allow arbitrary compositions in TemplateLoader template names.
- Allows compositing any two templates in TemplateLoader, and not just
filters: 'A|B|C' is now valid for any template A, B and C.
- Allows parents to be composited paths 'A|B|C'. In such a schema, if A
or B themselves specify a parent, the actual composition becomes
A|pA|B|pB|C and so on.

This allows, by leveraging the common schema of our entities, to reduce
duplication.

For convenience, templates in "special/filters/" and "mixins/" can be
included by their direct name. Others have to be completely specified.

See the two provided cases for examples:
- 'hoplite' becomes a mixin that can be used to apply the Phalanx
formation
- 'builder' becomes a mixin that can be give a template the ability to
build the standard structures, and gives the 'Builder' identity class.
This also allows deduplicating that list of tokens.

Update checkrefs & swap std::map for std::unordered_map in
TemplateLoader.

Differential Revision: https://code.wildfiregames.com/D3801
This was SVN commit r25223.
2021-04-09 15:43:50 +00:00
14d24e03f2 Fix promoting entities going back to default stance.
Introduced in 93d22ef16b.
Brings back the less intrusive bug of transforming while garrisoned of
turreted and unloading results in the default stance. That needs to be
fixed again.

Differential revision: D3822
This was SVN commit r25221.
2021-04-09 08:46:39 +00:00
f7f82ecf25 Use explicit functions for passing on a builders list.
Instead of relying on the assumption that an entity which transforms
only has one of the two (and the same) before and after.
Fixes 5b3bdf3647.

Differential revision: D3821
Comment by: @Stan
This was SVN commit r25220.
2021-04-09 08:42:43 +00:00
b1c1cb1657 Fix pickup error.
Introduced by forgetting to change a line in fd1d7d5d83.

This was SVN commit r25217.
2021-04-09 07:08:33 +00:00
8f04d2ee90 Move function to perform trade to substate.
Don't pretend it to be a callable function, while it is certainly part
of the FSM.
(Also makes it easier for us to implement a duration for the trading in
the future, might we ever want to.)

Differential revision: D3813
Comment from: @Angen
Closes: #6135

This was SVN commit r25216.
2021-04-09 06:29:49 +00:00
7ba4b1ffc8 Split dropping resources from approaching in UnitAI.
Allows for non-moving entities to drop resources. (When someone checks
those cases in the order.)
(Also makes it easier for us to implement a duration for the dropping in
the future, might we ever want to.)

Differential revision: D3817
This was SVN commit r25215.
2021-04-09 06:25:47 +00:00
6023a273df Fix phasing requirements of tutorial.
Introduced in 2ef3fd7a77.
Fixed by switching the order of task of the barracks and outpost.

Patch by: @nwtour
Differential revision: D3820
This was SVN commit r25214.
2021-04-09 06:02:22 +00:00
294d102a6f Queue techs at structure with the lowest queue length.
Instead of queueing all techs at the lowest ID.

Patch by: @n1xc0d3r
Differential revision: D3798
Tested by: @Langbart
This was SVN commit r25213.
2021-04-09 05:55:05 +00:00
f5a0ab81b6 Fix missing return in 3c4a341906.
Caused entities to walk to the edge of the map when their dropsite was
destroyed.

This was SVN commit r25211.
2021-04-08 10:34:48 +00:00
76acc4e146 Implement quality levels for actors & corresponding setting.
An actor file, as referenced by the VisualActor, can now define
different actors for different "quality level" setting.
In this initial version, the quality is handled directly by the object
manager.

Actor format impact:
- '<qualitylevels>' may be used as the root node, containing actor nodes
as children.
  - such actor nodes can refer to a file, or to an inline actor, or
simply be inlined.
  - such actor nodes may have a 'quality' attribute, specifying the
maximum quality level of this actor. By default, 255 (the maximum) is
implied.
- The actor format remains valid, but 'groups', 'variants', 'material',
'castshadow' and 'float' can be given a [minquality, maxquality[ range
via XML attributes. Outside of this range, the XML node is ignored
(making it possible to define, in a single actor file, several quality
levels).

Quality is a 0-255 value, with:
- Range 0-99 intended for lower level-of-detail actors (billboards,
etc.)
- Range 100-200 the 'normal' range for models. 100 is "low", 150
"medium", and 200 "high".
- Range 201-255 used for higher quality actors that might be used for
e.g. cinematics.
The range is wide to make it easier to add intermediate levels in the
future and it seemed easier given that an integer value of some kind was
required anyways.

Engine impacts:
- A new CActorDef class is introduced, wrapping an art/actors XML file
and its different quality levels. ObjectBase remains the definition of a
given 'actor', now at a given quality level.
- CActorDef imposes a maximal # of quality level for a particular actor
definition (5 currently).
- CUnit is made to refer to an Actor Definition explicitly, not a
particular ObjectBase.
- As a minor optimisation, variation keys are calculated on
pointer-to-sets-of-selections, instead of raw sets-of-selections, as
this reduces copying.
- some refactoring, including better const-correctness and hotloading
support via std::shared_ptr.

Differential Revision: https://code.wildfiregames.com/D3787
This was SVN commit r25210.
2021-04-08 07:22:24 +00:00
e3695abe59 Build using Builder instead of UnitAI.
Moves the building logic from UnitAI to Builder.
Makes it easier for modders to change building behaviour, e.g. letting
structures build.

Differential revision: D3812
Comment by: @Angen
This was SVN commit r25208.
2021-04-08 05:50:18 +00:00
f2d5603422 Heal using Heal instead of UnitAI.
Moves the healing logic from UnitAI to Heal.
Makes it easier for modders to change healing behaviour, e.g. letting
structures heal (instead of using an aura).

Differential revision: D2680
Comments by: @Stan, @wraitii
This was SVN commit r25207.
2021-04-08 05:40:49 +00:00
3c4a341906 Gather using ResourceGatherer instead of UnitAI.
Moves the gathering logic from UnitAI to ResourceGatherer.
Makes it easier for modders to change gathering behaviour, e.g. letting
structures gather.
Refs. #4293 by optimising a bit.

Differential revision: D2662
Comments by: @bb, @Stan, @wraitii
This was SVN commit r25206.
2021-04-08 05:31:34 +00:00
a7d777d69b Don't store origin market in this.goods in cmpTrader.
It was introduced in 9b98585275 but made obselete in 98b4fe6d00.

Differential revision: D3809
This was SVN commit r25204.
2021-04-07 07:04:57 +00:00
9ee4ccd8ec Split commit from build in cmpFoundation.
Useful if e.g. a modder wants to commit a structure before building it.

Differential revision: D3806
This was SVN commit r25203.
2021-04-07 07:02:12 +00:00
ac7db9850b Move trader gain to cmpMarket.
Deletes the helper, since we need at least one market anyway.

Differential revision: D3808
Closes: #5890

This was SVN commit r25202.
2021-04-07 06:58:36 +00:00
f1e4a0e6f6 Some cleaning in cmpFoundation.
- `var` -> `let`.
- Remove some comments.

Differential revision: D3803
This was SVN commit r25199.
2021-04-06 13:35:29 +00:00
e208b703ca Only tell stuff to move from foundation when trying to commit it.
It is wasteful to do and seems not needed anymore.

Differential revision: D3802
Comments by: @Angen, @Stan
Reverts b478b9742a, b478b9742a
Refs. #3410

This was SVN commit r25198.
2021-04-06 13:06:27 +00:00
5b3bdf3647 Use transform to finish construction.
Decreases duplication.

Differential revision: D3804
Comment from: @wraitii (also on IRC)

This was SVN commit r25197.
2021-04-06 12:54:33 +00:00
973de1ccd7 Fix foundation committing following 592453c62f (pushing)
592453c62f added a flag to "GetBlockMovementFlag" to return either the
current or the template value, and by default it returns the template
value.
Foundation logic needed it to return the current value.

Gates are also updated to avoid changing behaviour in unpredictable
ways.

Differential Revision: https://code.wildfiregames.com/D3796
This was SVN commit r25196.
2021-04-06 12:28:53 +00:00
93d22ef16b Allow to specify subunits on creation.
This basically does two things:
- Allow turrets on moving entities (fixes serialisation in cmpPos).
- Allow an entity to be present on another when the other is created.

That makes it basically a boiled down version of a prior patch, omitting
the part where orders could be passed on.
This does allow e.g. ranged units on chariots that fire while the
chariot moves.

Original diff by: @sanderd17
Redone by: @Stan
Differential revision: D1958
Comments by: @Alexandermb, @Angen, @bb, @Langbart, @Nescio, @Stan,
@wraitii
Refs. #2577 by implementing the entity on platform case.

This was SVN commit r25192.
2021-04-05 05:22:25 +00:00
e2f4ce0649 Add Upkeep component.
Adds a new component effectively handling negative resource trickles.
Prevents resources from going negative and provides an effect for not
being able to pay.
The effect chosen for 0 A.D. is having the entity not being
controllable.

Not used in the public mod itself, but it is in quite some mods.

Based on an idea of @Nescio
Differential revision: D1323
Comments by: @Angen, (@smiley,) @Stan
This was SVN commit r25191.
2021-04-04 06:52:20 +00:00
7562354c49 Don't pass owner to initialise a foundation.
As ownership is already set.
Refs. bdbd0b9dbf and 9213ee8c27.

Differential revision: D3795
This was SVN commit r25190.
2021-04-04 06:38:16 +00:00
58ec287b1f Use interval instead of timeout for healing in GarrisonHolder.
Prevents constant recreation of a timeout.

Differential revision: D3791
Refs. #6081

This was SVN commit r25189.
2021-04-04 06:32:53 +00:00
0d630fb113 Fix garrison rally point when unloading.
Revealed by f884848745. Noticed by @Langbart.
The holder was deleted after being tasked to garrison the new target,
but with still a holder we were not allowed to garrison.

Differential revision: D3794
Closes: #6128
Tested by: @Lanbart
This was SVN commit r25188.
2021-04-04 05:57:42 +00:00
52e8a0c5fb Fix chasing after Motion Manager & Pushing.
The motion manager introduced in bae258f9a1 makes 'chasing' (e.g. an
entity targeting another entity, which also applies to fleeing)
behaviour symmetrical: both units see the initial state instead of it
being ID-dependent.
This allows removing hacks introduced in 6a66fb8205 (and refined in
7b88b1a0f9).

Differential Revision: https://code.wildfiregames.com/D3785
This was SVN commit r25185.
2021-04-03 07:00:58 +00:00
fb498d97d9 Fix raising alert.
After 21e866fcf0.
AllertRaiser replaced the order instead of just calling the required
function.
While at it, check for the garrisonable size when looking for buildings.

Differential revision: D3789
Tested by: @Langbart
This was SVN commit r25183.
2021-04-02 17:01:59 +00:00
592453c62f Add a simple 'pushing' logic to unit motion to improve movement.
This implements a form of crowd movement that I've generally called
'unit pushing' in the last few years.
Essentially, any two units will push each other away when they're too
close. This makes it possible to ignore unit-unit obstructions, and thus
makes movement much smoother in crowds.
This first iteration of this system only allows pushing between idle
units and between moving units (i.e. a moving unit does not affect an
idle one).
This is because the unitMotion logic to detect it is stuck & needs to
use the pathfinders starts breaking: units can fail to move because they
are pushed away from their intended movement, and the current logic
fails to handle this gracefully.
Thankfully, the most value of this patch in terms of player experience
is found in the improvements to group movements and shuttling.

Other impacts:
- As the short pathfinder is called less often, we can increase the
starting search range & reduce the # of max turns, both improving
collision recovery.
- The performance of idle units is slightly worsened, as they must be
checked for idle-idle collisions. If needed a 'sleeping' system, as used
in physics engine, could be implemented.
- In general, however, expect slight performance improvements, as fewer
short paths are computed.
- Gathering efficiency should increase slightly, since shuttling times
are likely reduced slightly.
- As a sanity change to improve some edge cases (units that say they're
moving, i.e. pushable, but don't actually move), the 'going straight'
logic is turned off if a short path has been computed. This requires a
few cascading changes to work correctly.

Technical notes:
- To reduce the cost of the n^2 comparisons that pushing requires, units
are only compared within a small square on a grid which is lazily
reconstructed each turn. The overhead seems rather small, and this is
much simpler than keeping an up-to-date grid.
- The design is intended to be parallelisable if needed someday.
- The pathfinder's CheckMovement ignores moving units in UnitMotion, as
that is now the spec. Idle units are not ignored, which is required for
the 'collision' detection to work correctly (see above).

Refs #3442 (not fixed - idle units are not pushed by moving units).
Fixes #5084 (the overlap can still happen, but units will push each
other away).

Differential Revision: https://code.wildfiregames.com/D1490
This was SVN commit r25182.
2021-04-02 16:30:59 +00:00
8ed1bc2fd1 Don't error in the network delay notifier.
Differential Revision: https://code.wildfiregames.com/D3788
This was SVN commit r25181.
2021-04-02 14:20:37 +00:00
6842eacde9 Fix allowed classes on turret points.
Should use `_string` on init. Noticed by @wraitii.

Differential revision: D3783
This was SVN commit r25178.
2021-04-02 07:15:46 +00:00
ae1bc9b785 Show non-default hotkeys that appear in JSON spec files in the hotkey editor.
This makes sure all hotkeys from hotkeys/spec/*.json files are displayed
in the editor, even if they are not found in configuration files.

Differential Revision: https://code.wildfiregames.com/D3767
This was SVN commit r25175.
2021-04-01 09:20:29 +00:00
28bd4f0092 Introduce a 'Builder' class for entities that can build structures.
- Increases moddability
- Increases the clarity of visible classes (gatherer & builder vs
Worker)
- Introduce an 'Idle builder' hotkey.

Patch by: Nescio
Differential Revision: https://code.wildfiregames.com/D3290
This was SVN commit r25174.
2021-04-01 07:26:59 +00:00
22ea79a56f Fix the 'Introductory Tutorial' found in the 'tutorial campaign'.
Some information & resources were outdated, preventing progress.

Patch by: nwtour
Differential Revision: https://code.wildfiregames.com/D3764
This was SVN commit r25171.
2021-03-31 15:58:16 +00:00
4b46c09222 Do not trigger "HotkeyPress" events when releasing a key.
Follows d0a42f2f00.
Because only the most specific hotkeys can be active at any time,
releasing a key may require re-activating less specific hotkeys.
There were two issues with this behaviour:
- It was buggy, as it only checked one active key, when any still active
key can trigger hotkeys.
- "HotkeyPress" and "HotkeyDown" events where sent, as if the hotkey was
pressed, which was unexpected for most code/users (it is unusual to have
a "Press" event on key release).

This fixes these issues by "silently" re-triggering the hotkeys in such
a case. It also makes it easier for JS code to use "hotkeyPress" instead
of "hotkeyDown" for non-continuous behaviour.

Accepted By: nani
Fixes #6123
Refs #6064 (fixes the problem, but not the code weirdness)

Differential Revision: https://code.wildfiregames.com/D3766
This was SVN commit r25169.
2021-03-31 15:50:25 +00:00
457c538780 GameSetup: fix selecting a map with up/down keys.
Fixes dc18d94030.
Using down/up to change the map in the map selection dropdown in the
gamesetup has a one-element lag. The reason is that on dropdown up/down,
two events are sent:
- first the current highlighted item is selected (it's usually the
selected one).
- then the new item is selected.

Because of faulty timer logic, only the first update went through.

Differential Revision: https://code.wildfiregames.com/D3774
This was SVN commit r25168.
2021-03-31 13:10:07 +00:00
6c6204f007 Add missing player number to skirmish map names & filenames.
Patch by: langbart
Fixes #6105

Differential Revision: https://code.wildfiregames.com/D3682
This was SVN commit r25167.
2021-03-31 06:53:05 +00:00
f50c98cfd1 Check for ability to move on orders that need to move.
Not all orders were checked, which would cause problems when receiving
an order that needed moving and that did not handle not being able to
move properly.

Differential revision: D3771
This was SVN commit r25164.
2021-03-30 15:50:03 +00:00
496884ac73 Some fixes after the split of turrets.
21e866fcf0
Crossbowmen should be able to turret (noted by @Nescio).
TurretHolders should be able to pick entities up.

Differential revision: D3744
This was SVN commit r25163.
2021-03-30 11:24:08 +00:00
fd1d7d5d83 Reduce UnitAI duplication in range checks.
By querying the range and passing a target along.

Differential revision: D3748
Comments by: @wraitii
This was SVN commit r25162.
2021-03-30 11:17:46 +00:00
e5b971c2bf Allow modifiers without "affects" list.
This allows modifiers without "affects", or with empty "affects" lists,
to do something.
This makes it possible to force a modifier on an entity without classes
(e.g. trees) or with unknown classes.

Accepted By: asterix
Differential Revision: https://code.wildfiregames.com/D3761
This was SVN commit r25157.
2021-03-29 08:10:08 +00:00
5ebf2020b0 Netcode: allow observers to lag behind the live game.
Observers no longer lag the game for players. There is still some time
to serialise the game when sending it to a joining observer, and
depending on the chosen 'max lag' the game may stop while observers
sufficiently catch up, but this impact too is reduced.

- Make the NetServerTurnManager ignore players marked as 'observers' for
the purpose of ending a turn, effectively making it possible for
observers to lag without it affecting the players in any way.
- Add a config option (network.observermaxlag) that specifies how many
turns behind the live game observers are allowed to be. Default to 10
turns, or 2 seconds, to keep them 'largely live'.
- The controller is not treated as an observer.
- Implement a simple UI to show this delay & allow the game to speed up
automatically to try and catch up. This can be deactivated via
network.autocatchup.
- Move network options to the renamed 'Network / Lobby' options page.
- Do not debug_warn/crash when receiving commands from the past -
instead warn and carry on, to avoid DOS and "coop play" issues.

Refs #5903, Refs #4210

Differential Revision: https://code.wildfiregames.com/D3737
This was SVN commit r25156.
2021-03-29 07:53:06 +00:00
e3a254225a Introduce generic template for support elephants.
To keep civ-specific stuff in civ-specific templates.

Patch by: @Nescio
Differential revision: D3690
This was SVN commit r25154.
2021-03-29 06:59:34 +00:00
969112b9c8 Replaces CPos by more a consistent CVector2D, reduces geometry code duplication.
Tested By: Freagarach, Langbart
Differential Revision: https://code.wildfiregames.com/D3759
This was SVN commit r25152.
2021-03-28 21:55:13 +00:00
37cc13010c Fix missing context in hotkey page translations.
Patch by: nwtour
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D3754
This was SVN commit r25148.
2021-03-28 07:59:38 +00:00
2ee0e62a0e Fix 1adedf447c and 31808e6fa3
Fix 1adedf447c and 31808e6fa3.

Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D3752
This was SVN commit r25146.
2021-03-28 07:01:03 +00:00
734b672569 Removes unused and limited cell sprite functionality.
Tested By: Freagarach
Differential Revision: https://code.wildfiregames.com/D3749
This was SVN commit r25140.
2021-03-27 11:38:34 +00:00
f884848745 Move Can*-function implementations from UnitAI to their respective components.
Makes for less duplicated logic, easier modding and better split
responsibilities.

Differential revision: D3638
Closes: #5884

This was SVN commit r25139.
2021-03-27 11:22:34 +00:00
d0de32b2a8 Fix 8bd7a4f4b5 - crossbowman introduced in 7bf2f9ed74
This was SVN commit r25138.
2021-03-27 09:48:30 +00:00
31808e6fa3 Fix 1adedf447c
The patch did not apply cleanly and I failed to notice it when merging.

This was SVN commit r25137.
2021-03-27 09:45:03 +00:00
1adedf447c Remove the attack from wall turrets.
Wall turrets/towers have more HP & are cheaper than free-standing
towers, and have no build restriction distance. Their attack, while
limited, is still high when garrisoned, and this makes them awkward to
balance and is poor design in general.
This removes their attack capability entirely, and standardizes the rest
of their statistics.

Patch by: Nescio
Accepted By: borg-, wowgetoffyourcellphone, wraitii
Differential Revision: https://code.wildfiregames.com/D3706
This was SVN commit r25135.
2021-03-26 17:35:51 +00:00
0baeb8d1fd Increase gather rate technology effects / revert 3731886e2c
Reverts D3404 / 3731886e2c, thus making economic technologies more
effective.
The lower values led to resource shortages in the late game.

Patch by: Nescio
Accepted By: borg-, chrstgtr, wowgetoffyourcellphone
Differential Revision: https://code.wildfiregames.com/D3703
This was SVN commit r25134.
2021-03-26 17:30:25 +00:00
29ab4b5af3 Exclude Towers from Town->City phase requirements.
Towers, unlike walls, palisades, and outposts, counted towards the
required Town Phase structures for City Phase. Given the requirement to
build 4 structures, this pushed players into making them.

This removes that, and lowers the requirement to 3.

Patch by: Nescio
Accepted By: ValihrAnt, borg-, wowgetoffyourcellphone, wraitii
Differential Revision: https://code.wildfiregames.com/D3686
This was SVN commit r25133.
2021-03-26 17:21:03 +00:00
5376ed3e10 Unlock the Iberian monument in Town Phase
This can give Iberian an edge at defensive play earlier, fitting their
civ theme.

Approved by: borg-, wowgetoffyourcellphone, berhudar
Differential Revision: https://code.wildfiregames.com/D3685
This was SVN commit r25132.
2021-03-26 17:14:14 +00:00
4ca8cb70dd Change 'Archery Tradition' tech to an attack range increase.
This new bonus makes the tech more predictable.
Cost has been reduced slightly.

Patch by: Nescio
Differential Revision: https://code.wildfiregames.com/D3671
This was SVN commit r25131.
2021-03-26 17:09:16 +00:00
ac6fe96eac Unify the resistance of foundations.
All foundations now have a resistance of 1 Hack, 1 Crush, 10 pierce.

Patch by: Nescio
Differential Revision: https://code.wildfiregames.com/D3600
This was SVN commit r25130.
2021-03-26 17:05:27 +00:00
8bd7a4f4b5 Reduce cavalry training time and increase movement speed for ranged cavalry.
The early-game cavalry rush was overly nerfed in A24 with longer train
time, slower speed, and the need for stables.
This rolls that back slightly by reducing train tim from 16 to 15, and
increasing the movement speed of ranged cavalry from 15 to 16.

Patch by: borg-
Differential Revision: https://code.wildfiregames.com/D3664
This was SVN commit r25129.
2021-03-26 17:03:45 +00:00
eda03c54f6 Remove then entity limit for the Embassy.
Was previsouly bumped to 3 in A24.

Patch by: borg-
Approved By: ValihrAnt, chrstgtr, wraitii
Differential Revision: https://code.wildfiregames.com/D3666
This was SVN commit r25128.
2021-03-26 16:59:48 +00:00
d01a995cbb Fix missing translations (from missing context) in tooltips.
Fixes:
- A logic issue in the attack name tooltip.
- A missing context in the status effects tooltip

Patch by: nwtour
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D3745
This was SVN commit r25127.
2021-03-26 16:52:09 +00:00
8eca1facde Fix the description of garrison hero aura.
Since siege engines are not capturable anymore, since d583048690.

Fixes: d583048690.
Differential revision: D3742
Reviewed by: @Nescio
This was SVN commit r25124.
2021-03-26 10:37:52 +00:00
21e866fcf0 Technically seperate Turrets from GarrisonHolder.
While they often look alike, their behaviour is totally different.
This split has some implications:
- There are now separate auras for garrisoning and turrets.
- Entities can now have both turret points and garrison slots,
independent of eachother.

In general previous behaviour is maintained as much as possible.

Differential revision: D3150
Comments by: @Nescio, @wraitii
Tested by: @v32itas
This was SVN commit r25123.
2021-03-26 10:18:30 +00:00
7bf2f9ed74 Introduce crossbowman templates.
Allows for easier differentiation. No values were changed in this patch.

Differential revision: D2886
Comments by: @Angen, @borg-, @Stan, @ValihrAnt, @wraitii
This was SVN commit r25122.
2021-03-26 09:55:52 +00:00
db21f246f1 A bit more cleanup in ProductionQueue.
- Removed some useless comments.
- Don't assume an item only has either a tech or a unit in
ProgressTimeout.
- Don't initialise boolean values (refs. #5979).

Differential revision: D3739
Comment by: @wraitii
This was SVN commit r25119.
2021-03-25 15:55:54 +00:00
0ff0282b8f Removes unused code for GPU skinning introduced in 779a33ee30 and forgotten in 97b46d402c.
This was SVN commit r25118.
2021-03-25 13:18:49 +00:00
ebc2ec5498 Give option to switch between specific and/or generic entity names.
As requested on the forums (e.g.
https://wildfiregames.com/forum/index.php?/topic/25202-transliteration-of-ancient-greek-into-english/&tab=comments#comment-378174).

Differential revision: D2126
Closes: #3397

This was SVN commit r25116.
2021-03-25 06:58:47 +00:00
4e728bf68f Uses sky as a water reflection instead of a fixed color.
Differential Revision: https://code.wildfiregames.com/D3734
This was SVN commit r25114.
2021-03-24 16:40:03 +00:00
275a5bccde Always pass a civcode to Viewer when instatiated by the session gui
Previously this was only done for technologies.

The Viewer tries to determine an appropriate civcode from a passed
template,
however trainable gaia-animals have a template-assigned civ of `gaia`
(and
technologies don't have one at all).

The behaviour of the Viewer isn't changed by this commit: it will still
prefer
whatever civ is set within a template before falling back to the passed
civcode.

However, trained gaia-animals now have something to fall back to,
permitting the
appropriate build list (the list of buildings that train the animal) to
be
displayed.

This was SVN commit r25110.
2021-03-23 15:44:01 +00:00
f06bdb31bf Use Treasure tooltip function in Template Viewer
Function added in ea96e81098

This was SVN commit r25109.
2021-03-23 13:38:16 +00:00
87a2c3347f Make real directory paths on the VFS predictable (retry)
This is the same commit as 4bb31f084e, reverted in 5d1899785a. Noted
issues were fixed.

Partial revert/fix of 2f19cf86d3 and 2567fee329.

Before this diff, it was possible for a mod containing a cache/ or a
config/ folder to get written to incorrectly.
The issue is VFS can map multiple directories to one 'virtual' path, for
reading mods. However, writing data is problematic: which path to
choose?
The only viable solution is to use a path relative to the highest
priority directory encountered in the VFS path, or write paths could be
'hijacked' by lower-priority mods.

This fixes these issues by:
- Adding a new lookup mode ('Real-path') that explicitly picks the real
path relative to the highest-priority subdirectory in the VFS Path.
- Preventing overwriting a real directory with a lower priority one in
general.
- Revert c0c8132dd4's GetRealPath change, re-introducing the function as
GetOriginalPath.

This also cleans up some duplication that led to empty mod folders in
the user mod path, and cleans up loading the 'user' mod.
It also makes it explicit that a directory must be passed to Mount().

Note that the new 'realpath' lookup can still be somewhat complex with
many mount points at various hierarchy levels, but it is at least
predictable/deterministic without having to be careful about populating
order.

Fixes #2553

Differential Revision: https://code.wildfiregames.com/D3728
This was SVN commit r25107.
2021-03-23 12:46:59 +00:00
5d1899785a Revert 4bb31f084e
4bb31f084e led to an issue in windows-specific code not detected by the
tests. I'll debug later.

This was SVN commit r25105.
2021-03-22 19:52:07 +00:00
4bb31f084e Make real directory paths on the VFS predictable.
Partial revert/fix of 2f19cf86d3 and 2567fee329.

Before this diff, it was possible for a mod containing a cache/ or a
config/ folder to get written to incorrectly.
The issue is VFS can map multiple directories to one 'virtual' path, for
reading mods. However, writing data is problematic: which path to
choose?
The only viable solution is to use a path relative to the highest
priority directory encountered in the VFS path, or write paths could be
'hijacked' by lower-priority mods.

This fixes these issues by:
- Adding a new lookup mode ('Real-path') that explicitly picks the real
path relative to the highest-priority subdirectory in the VFS Path.
- Preventing overwriting a real directory with a lower priority one in
general.
- Revert c0c8132dd4's GetRealPath change, re-introducing the function as
GetOriginalPath.

This also cleans up some duplication that led to empty mod folders in
the user mod path, and cleans up loading the 'user' mod.

Note that the new 'realpath' lookup can still be somewhat complex with
many mount points at various hierarchy levels, but it is at least
predictable/deterministic without having to be careful about populating
order.

Fixes #2553

Differential Revision: https://code.wildfiregames.com/D3217
This was SVN commit r25104.
2021-03-22 18:49:42 +00:00
a048271806 Fix AI+Player from persistent settings (again)
Reintroduced in fa3b341b57, as I changed the execution order of onLoad.

This fixes the problem by explicitly handling this case, which should
avoid accidentally reintroducing the problem.

Differential Revision: https://code.wildfiregames.com/D3724
This was SVN commit r25103.
2021-03-22 16:57:10 +00:00
c87229aa48 Optimise FindWalkAndFightTargets.
FindWalkAndFightTargets is used during attack-walk (and a few other
situations) to find new entities to attack. This function can be a bit
slow, taking large chunks of time during battles.

This optimises it by assuming that one of the surrounding unit will
match preferred criteria (which, for most soldiers, are 'Human'), thus
returning the first attackable entity. In the worst case, it should
still be slightly faster than the current code.

Differential Revision: https://code.wildfiregames.com/D3446
This was SVN commit r25102.
2021-03-22 13:27:33 +00:00
72f0fdb41b GameSetup GUI cleanup - Renaming.
- rename 'Controls' class to 'Controllers' to avoid ambiguity and mimic
MVC lingo.
- rename GameRegisterStanza into LobbyGameRegistration, and make it
explicitly a controller.
- rename GameSettingsFile to PersistentMatchSettings & move it to its
own folder (since it could be reused independently of the controllers)
- remove the StartGameController & move `launchGame` to the
GameSettingsController (simplifies the control flow)
- the GUI Object "setupWindow" was actually the GameSettingsPage, this
is corrected.
- the LoadingPage was showing the GameSettingsPage -> in the current
code, it makes more sense to have both handle their own visibility.
- make the NetMessages class independent of other gamesetup logic, so
that it can be reused by other code. Remove the custom XML object.

Differential Revision: https://code.wildfiregames.com/D3719
This was SVN commit r25101.
2021-03-22 12:26:48 +00:00
293cd95ccb Flush order queue when given an order to perform a action on the same entity.
Follows a4c698ac48.

Fixes: #6046
Differential revision: D3587
Reviewed by: @wraitii
This was SVN commit r25100.
2021-03-22 11:36:50 +00:00
87fc52b780 MP: don't enforce game init attributes synchronization in PREGAME.
The NetServer stored a complete copy of the game Init Attributes, which
it sent to new clients on updates from the controller. This worked well,
but prevents incremental updates and other unrelated messages from being
sent.

This changes the system so that:
- in PREGAME state, the server does not update its copy of the game init
attributes
- the server forwards game setup messages from the controller to all
clients
- Joining clients get a full copy of the Settings, when joining, from
the controller (this is a js-driven behaviour - other situations might
not need do it).
- Make the StartNetworkGame message take a copy of the final init
attributes, to ensure synchronization (and simplify some logic).

In practice, this:
- makes it possible to send different types of gamesetup messages (this
introduces two: a regular update and the full 'initial-update' for new
clients).
- moves some C++ hardcoding into JS - here in essence the PREGAME server
state is now init-attributes-agnostic.
- does not change much for readiness control - the server already needed
to force a change at game start to set random elements.

Note that the loading page is currently still receiving the 'local' game
attributes, which assumes that all clients are correctly synchronized
(they should be).

Refs #3806, #3049

Differential Revision: https://code.wildfiregames.com/D3714
This was SVN commit r25099.
2021-03-22 10:13:27 +00:00
8c2ab4df62 Improve & translate hotkey name/descriptions.
Improve the hotkey translations. This adds them to messages.json for
translation, closing the work from 09ad8bfbe5

Refs #5867, refs #5996

Differential Revision: https://code.wildfiregames.com/D3641
This was SVN commit r25097.
2021-03-21 14:23:57 +00:00
fa3b341b57 Further gamesetup fixes & tweaks.
Fixes dc18d94030

- Player assignment still had some trouble. This cleans things up by
moving a little more logic in the controller & fixing other usage.
 - As a consequence, in MP, if the host swaps two player, the change
will take a few frames to register. It shouldn't be too much of a
problem in practice.
 - Fix issues with AI being assigned to player slots for joiners.
- Fix issues with similar color not being correctly picked when swapping
a map.
- Fix issues with rating & locked team settings.

Reported by: langbart
Differential Revision: https://code.wildfiregames.com/D3723
This was SVN commit r25096.
2021-03-21 13:09:52 +00:00
Angen
841bf5f2dd Color incompatible mods and add filter
This helps to see compatible mods in the list, which can get a bit long.
For incompatible mods in disabled section use gray colour.
For incompatible mods in enabled section use red colour (what can happen
when using arguments to start the game or they can be in config file).
Add option to filter compatible mods, this does not affect enabled
section, because if there is incompatible mod, it is error and it needs
to be always visible.
Add function recomputeCompatibility and g_ModsCompatibility to avoid
recomputing aredependenciesmet when coloring mods, because every column
is colored separately.
Disable enable mod button if mod is incompatible.
Remove all dependencies met messages as they are now replaced by this
mechanism.

fix getSelectedModUrl in process

Differential revision: D3687
Fixes: #6053
Tested by: @Freagarach
Comments by: @vladislavbelov
This was SVN commit r25095.
2021-03-21 10:22:50 +00:00
Angen
1c68d9890b Remove redundant applyFilters method from modmod
All functionality in applyFilters is handled by displayModLists and
modSelected functions.
This is also fixing issue of triggering selected event on the same list
multiple times and not updating mod description and buttons when
applying filters.

Differential revision: D3722
This was SVN commit r25094.
2021-03-21 08:51:17 +00:00
Angen
84bafd82b1 common-api entity.js cleanup
Do not check for undefined when result is returning undefined or the
variable and nothing else is done.
Dont create variables when might not be used or are returned without
other usage after.
Dont call get with same parameter more than necessary.

Differential revision: D3652
Comments by: @Freagarach
This was SVN commit r25093.
2021-03-21 08:49:26 +00:00
aa9292b1fc Fix fishing boats hunting whale.
Accidentally introduced in 24f0cc7695.

Fixes: #6110
Patch by: @Langbart
Differential revision: D3716
Reviewed by: @Nescio
This was SVN commit r25092.
2021-03-20 20:08:48 +00:00
7b00d93298 Fix MP Player assignment
Players could not be assigned beyond the first N slots.

Reported by: langbart
Differential Revision: https://code.wildfiregames.com/D3721
This was SVN commit r25091.
2021-03-20 18:04:22 +00:00
07908dfd8c Store components to be miraged in cmpFogging.
Allows modders (and us) to just add an IID to the array and ensure the
`Mirage()`-function to exist in the respective component.

Differential revision: D3713
Comment by: @wraitii
This was SVN commit r25090.
2021-03-20 16:14:35 +00:00
a4a7ef983e Move Mirage information to respective components.
Moves the functions that define the properties/functions to mirage to
their respective components, making it easier for modders to know their
existence and to modify.

Closes: #5985
Differential revision: D3695
Comments by: @wraitii
This was SVN commit r25089.
2021-03-20 16:01:11 +00:00
dd74837e6e Convert InitAttributes disabled techs/templates & starting tech to triggers.
Disabled technologies & templates are not really gamesetting concerns,
since they are map-specific and de-activating these generally does not
make sense.
Starting technologies is unused and not the correct granularity level
for game setup.

Triggers do a better job of specifying these things on a per-map basis
(in fact, some maps already use triggers for that).

Changes:
- StartingTechnologies was used by the cart sandbox and is simply
removed.
- DisabledTechnologies was used by Polar Sea RM, which already had
triggers -> into triggers.
- DisabledTemplates was used for the Ptol Lighthouse on a few maps ->
since we changed the ability to "a lot of range", it's no longer OP on
these maps and the restriction is simply lifted.
- DisabledTemplates was used on Death Canyon Invasion Force -> into
triggers.

Differential Revision: https://code.wildfiregames.com/D3712
This was SVN commit r25088.
2021-03-20 09:36:56 +00:00
c3da0cdd0f Fix cosmetic ESLint warnings in JS components (and their tests).
Which were autofixable, with slight modifications.
Not done are the slightly more complex changes.

Refs. #5524
Patch by: @Krinkle
Differential revision: D2279
Comments by: @elexis, @Stan
Reviewed by: @wraitii
This was SVN commit r25087.
2021-03-20 09:02:22 +00:00
30432574fa Fix issues with dc18d94030
Issues from dc18d94030 fixed:
- The AI config page does not work
- Player Color/Civ/Team did not reset when switching out of Scenario,
which locked the setting
- Player color had weird issues with resetting when changing map too.
- Pop Cap could not be changed.
- Explored/Revealed were swapped in the game description (this was
actually fixed at some point in the original diff then reverted).

Reported by: Submariner and langbart

Differential Revision: https://code.wildfiregames.com/D3715
This was SVN commit r25084.
2021-03-19 16:41:17 +00:00
76c5263607 Rename GameAttributes to InitAttributes
The initial settings for a game, used to create the map in RM & tosetup
the simulation, are named InitAttributes in the C++, but generally
referred to as GameAttributes in the JS GUI. This renames the latter to
the former to avoid confusion, since these settings are immutable once
the map starts, so InitAttributes is more accurate.

Differential Revision: https://code.wildfiregames.com/D3705
This was SVN commit r25083.
2021-03-19 10:02:10 +00:00
ce0fb7770c Clean mirage internals.
Redo 9f27f0eed8. Now! with not broken serialisation :D

Use a map that stores the functions, instead of them being part of the
Mirage component.
Doesn't need to initialise the variables anymore (refs. #5979).

Saves the mirages in a global to allow (de)serialisation.
Only assign values on Init, not on Construction (to allow
deserialisation).

Refs: #5985
Differential revision: D3702
Comments by: @wraitii
This was SVN commit r25079.
2021-03-18 17:34:53 +00:00
dc18d94030 Separate Game Settings from the GUI Gamesetup
Split the gamesetup in two: the 'GameAttributes' part into gamesettings/
and the GUI/Presentation part in gamesetup/. This makes it easier to
separate the presentation from the data.

The immediate benefit is that campaigns & autostart scripts don't need
to load the gamesetup folder at all. This also makes it much easier for
any modder that would want to to change the GameSetup itself.

Each 'game attribute' is given a unique class extending GameSetting
(with a few exceptions), in charge of:
- 'Serializing' to the JSON-compatible 'InitAttributes' format, which is
used for persisted settings, network synchronization, map script
settings, hotloading.
- Deserializing from the same format.
- Watching for settings it depends on (such that e.g. unexploring the
map also unreveals it).

The GUI controls remain in charge of presenting the state accurately,
however they now directly subscribe to changes of the GameSettings for
update. The updating logic in general has been lightened on the GUI
side, making it more straightforward to know when something will update,
and reducing un-necessary computations (in theory - in practice, I
believe the gamesetup was already fairly good about this).
The 'Controller' class of the gamesetup have also been lightened, since
more responsibility now lies with GameSettings. In particular, this
include code to actually launch a game.

In general the GameSettings class is permissive - the GUI gamesetup has
tighter restriction for what the player can/cannot modify. This is
intended to give flexibility for campaign maps, which may want to change
arbitrary settings.

Further work would be useful, non-exhaustively:
- the setting of default values remains messy. They currently exist
somethings in GameSettings, sometimes in the GUI gamesetup, and in the
simulation itself (in case attributes are not set).
- the availability and 'lockedness' of settings remains a
work-in-progress.
- some attributes, like disabled technologies, should probably be
removed and triggers used instead.
- the Handling of AI and player-specific data could be improved.
- settings Persistence should follow its own path - not all settings are
worth persisting.
- GAIA settings are added simulation-side but not in the GUI, which is
confusing.

Thanks langbart & Freagarach for testing.

Follows the gamesetup rewrite in 34138a7764.

Refs #3049

Differential Revision: https://code.wildfiregames.com/D3243
This was SVN commit r25077.
2021-03-18 13:59:53 +00:00
413315024d Revert cleaning the mirage internals.
Broke serialisation.
Reverts 9f27f0eed8. (9f27f0eed8)

Refs. #5985
Differential revision: D3701
This was SVN commit r25076.
2021-03-18 09:42:15 +00:00
446c134feb Fix infinite loop in healing & potential one elsewhere.
HEAL can infinite loop: if the HEAL.APPROACHING:MoveTo call fails, the
unit will fallback to FINDINGNEWTARGET, which looks for new targets to
heal, which can loop around.
In #6106, the cause was that the target was not visible despite the
order being given (presumably a rangemanager/los incompatibility issue).
When MoveTo() fail, orders usually call FinishOrder as that's
irrecoverable.

Further, GATHERING/COLLECTINGTREASURE also did not FinishOrder - there,
we do want to consider new resources if the target is e.g. unreachable,
so add an explicit check for AbleToMove.

Reported by: moiman
Reviewed By: Freagarach
Fixes #6106

Differential Revision: https://code.wildfiregames.com/D3689
This was SVN commit r25075.
2021-03-18 09:01:19 +00:00
ae07dcb4ff Removes joystick from camera controller.
Differential Revision: https://code.wildfiregames.com/D3700
This was SVN commit r25070.
2021-03-17 16:28:48 +00:00
8cdfc107b7 Let garrisoned entities be IDLE.
The "GARRISONED"-state was quite strange, for entities being garrisoned
can just as well perform other tasks (see e.g. turrets).
Also, the need for keeping a "garrison" order on the stack is removed.

Fixes: #6022
Differential revision: D3656
Refs. #6081

This was SVN commit r25069.
2021-03-17 14:53:09 +00:00
9f27f0eed8 Clean mirage internals.
Use a map that stores the functions instead of them being part of the
Mirage component.
Means that a lot doesn't need to be inited now (refs. #5979).

Ticket: #5985
Differential revision: D3694
Comments by: @wraitii
This was SVN commit r25068.
2021-03-17 14:42:06 +00:00
b989a6dc8f Minor improvements to campaigns support.
- Remove LevelID harcoding
- Forward the initial data to the endgame script.
- Update the currentRun logic to make it behave more expectedly.

Differential Revision: https://code.wildfiregames.com/D3649
This was SVN commit r25065.
2021-03-16 14:48:12 +00:00
a72423d3dc Clean up SpawnUnits in ProductionQueue.
Have an entity cache per item (refs. #6104) (which means it doesn't need
to be created at init; refs. #5979).
Cache the PQ-position instead of querying it for every spawned entity.
One could use any arbitrary player for spawning entities now, increasing
mod support.

Differential revision: D3669
Comment by: @wraitii
This was SVN commit r25064.
2021-03-16 06:01:23 +00:00
df45f538df Clean up AddBatch (AddItem) in ProductionQueue.
Removes indentation.
Adds return value.
Cache owner instead of querying often.

This function can be cleaned even more later.

Differential revision: D3670
Comments by: @wraitii
This was SVN commit r25063.
2021-03-16 05:55:04 +00:00
93fe2ffa8a Handle aura and production pause on GarrisonedStateChanged message.
This reduces hard-coupling between the components.

Refs. #6081
Differential revision: D3683
Reviewed by: @wraitii
This was SVN commit r25062.
2021-03-16 05:49:36 +00:00
5cbbd570c0 Add range overlay to artillery.
Structures have them since ad1ab0c3d3, but units were excluded there due
to their mobility and amounts.
Artillery is not that easily massed and also not very mobile, but has a
high range and damage with a low reload time, making it nice to know
their approximate range.

Patch by: @Nescio
Differential revision: D3606
Comments by: @Angen, @borg-, @wraitii
This was SVN commit r25061.
2021-03-16 05:35:19 +00:00
54fc516679 Fix rebase error in 8e34371deb
Reported by: Nescio
This was SVN commit r25060.
2021-03-15 18:53:35 +00:00
9db72570c2 Disable wicker baskets on polar sea.
There is no fruit on the map, therefore much like wood techs, the fruit
tech is disabled.

Patch by: Nescio
Differential Revision: https://code.wildfiregames.com/D3595
This was SVN commit r25059.
2021-03-15 15:52:32 +00:00
8e34371deb Streamline ship stats.
- Fishing boat build time from 20 to 15 (5 less than bireme/merchant).
- Quinquereme population from 3 to 5 (biremes have 2, triremes 3)
- Warships get a 2:1 wood to metal cost
- Loot is standardized to 20% of costs, XP to 10% of health, similar to
siege engines and structures.
- Fishing boath & Merchant ship have the same resistance as warships but
accordingly lower HP, for easier stat comparison.

Patch by: Nescio
Accepted By: borg-, wraitii
Differential Revision: https://code.wildfiregames.com/D2956
This was SVN commit r25058.
2021-03-15 15:45:20 +00:00
f05235ec09 Lower cavalry melee attack range again.
D3482/5701ffccf8 raised the melee attack range to 6 to compensate for
movement over a turn with 500ms MP turns.
Following D3275/d4c2cf4430, this is no longer necessary. Revert to 4
(half the footprint length + 1 & their capture range).

Patch by: Nescio
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D3673
This was SVN commit r25057.
2021-03-15 15:38:41 +00:00
ab53a351ba Fix siege_attack tech not affecting Maurya.
Patch by: borg-
Accepted By: Nescio, wraitii
Differential Revision: https://code.wildfiregames.com/D3655
This was SVN commit r25055.
2021-03-15 10:15:00 +00:00
7026d1a702 Fix typo in prop-point of Iberian blacksmith.
Patch by: @nwtour
Differential revision: D3667
Reviewed by: @Stan
This was SVN commit r25054.
2021-03-15 08:49:52 +00:00