This makes it possible to make units heavier, which both push more & get
pushed less by other units.
In particular, the diff does it for siege units & elephants.
This improves movement for these units in crowd situation, since they
will now basically not move when other regular units push into them.
Supported By: asterix, marder
Refs #6127
Differential Revision: https://code.wildfiregames.com/D4452
This was SVN commit r26275.
This is a paradigm change for AI computation.
Historically, the AI was intended to be run in a separate thread from
the simulation. The idea was that slow AI wouldn't stop the renderer
from being smooth.
In that original design, the AI received a copy of the game world and
used that to run its logic. This meant the simulation could safely do
whatever it wanted in the meantime. This copy was done via AIProxy &
AIInterface.
This design ended up having significant flaws:
- The copying impacts the simulation negatively, particularly because
AIProxy subscribes to a lot of messages (sometimes sent exclusively to
it). This time cannot be threaded, and impacts MP games without AIs.
- Copying the data is increasingly difficult. Modifiers are a headache,
LOS is not implemented. Lots of logic is duplicated.
The intended benefits of the design also failed to realise somewhat:
- The AI was never threaded, and in fact, it is probably better to try
and thread Sim + AI from the renderer than just the AI, at which point
threading the AI specifically brings little benefit.
The new design is much simpler and straighforward, but this has some
side-effects:
- The AI can now change the simulation. This can be used for cheating,
or possibly for a tutorial AI.
- The AI runs in the same GC zone as the simulation, which may lead to
more frequent Sim GCs (but overall we might expect a reduction in
temporary objects).
- The AI state was essentially cached, so replacing some functions with
Engine.QueryInterface might be slower. The tradeoff should be balanced
by lower AIProxy computation times.
Future work:
- Threading some specific AI tasks could still be worthwhile, but should
be done in specific worker threads, allowed to run over several turns if
needed.
Technical note: the AI 'global' is in its own Realm, which means name
collisions with the same are not possible.
Other notes:
- The RL Interface uses the AI Interface and thus will gradually lose
some data there. Given that the RL Interface can now request data
however, this should be dine.
Refs #5962, #2370
Differential Revision: https://code.wildfiregames.com/D3769
This was SVN commit r26274.
6581796103 removed the ability for terrain to affect movement speed. The
JPS pathfinder cannot support it, and the approach was poor anyways,
coupling rendering data with simulation data.
This lets us remove the dependency on CTerrainTextureManager everywhere.
Tested by: langbart
Differential Revision: https://code.wildfiregames.com/D4459
This was SVN commit r26269.
The new values in 158cf8ea8d were too high, units would push each other
too much when building. This lower value should fix that, though further
adjustements may be necessary.
Reported by: Freagarach.
Differential Revision: https://code.wildfiregames.com/D4461
This was SVN commit r26261.
Moves the work done from cmpResearcher to cmpTechnologyManager.
No functional changes.
It allows fancy stuff in the future (#6364).
Differential revision: https://code.wildfiregames.com/D4438
This was SVN commit r26252.
The main change is the introduction of a 'pushing pressure' counter on
units. This counter increases when units get pushed around, and
decreases over time. In essence, units under high pressure move slower &
are harder to push around.
The major effect is that units can now get bogged down when very dense
groups start colliding. This makes movement more realistic, makes unit
movement more 'chokepointy', and generally improves the mathematical
soundness of the system (lower values are easier to handle for our 200ms
turns).
Other changes:
- The logic to detect units crossing each other's path has been
reworked. Units that run towards each other should not more obviously
avoid each other.
- New parameters: 'Spread' is a measure of how strong the pushing effect
is based on distance. With the current settings, static-pushing is
rather 'on/off', whereas moving-pushing is more gradual (and thus the
max influence distance was increased when moving).
- Default values have been tweaked for lower overlap.
- Units only looked at other units within their grid region. This led to
overlap near grid-borders. Units now look at neighboring grid elements,
which largely removes this issue. While this may be slower, the
performance of pushing was largely negligible before, so it is unlikely
to become a main cause of lag (and overlap was generally disliked by
players).
- Units no longer orient in the direction of pushing, but instead keep
facing their target. This can look slightly odd under very heavy pushing
forces, but vastly improves behaviour of very slow units such as rams
(since they spend much less time turning around). As a side-effect,
clean up angle code following acc780bcbb .
Engine changes:
- Add a debug rendering mode at compile-time to help understand what is
happening.
- Make it possible to constexpr initialise fractional fixed numbers by
using FromFraction
The 'pressure' change was inspired by alre's suggestion at
https://wildfiregames.com/forum/topic/56436-for-a-better-unit-movement/#comment-461987
Refs #6127
Differential Revision: https://code.wildfiregames.com/D4439
This was SVN commit r26245.
dropsiteSupplies kept a list of resources and did not remove exhausted
resources, leading to possibly buggy resource-management in the AI code
(and needless computations).
Differential Revision: https://code.wildfiregames.com/D4442
This was SVN commit r26244.
One needs UnitAI to be able to use a formation, so include the spec
therein (to keep information close to where it is used).
Modders can change their templates with the following script:
https://code.wildfiregames.com/P261.
Differential revision: https://code.wildfiregames.com/D4443
Comments by: @Stan
Idea accepted by: @wraitiiFixes: #6399
This was SVN commit r26235.
The ResourceTrickle component has been changed to a global aura instead.
It increases the trickle slightly, but catafalques are unbalanced
anyway.
Patch by: @Grapjas
Differential revision: https://code.wildfiregames.com/D4383
Refs. #6032 by fixing the Macedonian specific case, but not showing the
tooltips, as requested.
This was SVN commit r26234.
In GL3.0 alpha test mode was deprecated and removed in GL3.3. We should
use discard/kill in shaders instead.
In shaders alpha test was removed in d3a24c26ba, in FFP it was removed
with FFP in b7e6811ea6.
Differential Revision: https://code.wildfiregames.com/D4434
This was SVN commit r26211.
8d80a2186e removed the values for the tech cost multipliers from the
templates, since the component uses those default values, but failed to
account for modifications thereof.
Those weren't applied since the template value didn't exist.
This changes that to iterating over all resources.
Reported by: @Langbart
Differential revision: https://code.wildfiregames.com/D4409
Tested by: @Langbart
Fixes: #6408
This was SVN commit r26192.
Issue noticed by Exodarion.
After researching technology for resourcetrickle modifiers were
returning old cached value because modifiers were not cleared for
structure when it was build and changed owner from invalid_owner to the
player so old values were kept.
Cause:
global cache depends on originalvalue.
Health and other modifiers use also player-wide modifiers and result
from that is used as the key, what means global cache is never used
because originalvalue will differ in that case.
That does not look to be case for resourcetrickle and possibly for
another scenarios.
Modifiers that get cached on init and do not get changed by player-wide
modifiers in combination with ownership being changed afterwards will
bug.
Since we dont reset cache for ownership going from invalid_player, the
old global cache is kept and used.
Another solution would be to not cache on init, but thats workaround to
hide the issue.
Differential revision: D4395
This was SVN commit r26134.
To catch e.g. typos.
- Use the same structure in the ProductionQueue item (de)serialisation
as in Trainer and Researcher.
- Also iterate over the serialisable attributes on deserialize, as
proposed by @elexis (on IRC), for its symmetry.
Proposed by: @Stan
Differential revision: D4388
This was SVN commit r26133.
This patch attempts a more systematic approach, by standardizing the
<Loot/xp> to 20% of <Health/Max>.
Differential revision: D3681
Patch by: @Nescio
Reviewed by: @borg- @wowgetoffyourcellphone
Comments by: @Palaxin
This was SVN commit r26110.
A typo in the serialisation function.
Also just serialise the properties that are assigned in cmpResearcher
and cmpTrainer.
Introduced in e4925e02d0
Reported by: @nwtour
Differential revision: https://code.wildfiregames.com/D4386
Tested by: @nwtour
This was SVN commit r26105.
Some languages use singular form for another counts than 1, what makes
singular strings in english with hardcoded number causing incorrect
string to be displayed.
Adding special branch for english singular string since it looks nicer.
Differential revision: D4377
Patch by: @nwtour
This was SVN commit r26096.
Reported by @nani:
Sorting by "has password" in lobby game list does nothing
Add sorting value.
Differential revision: D4382
Reviewed by: @FreagarachFixes: #6392
Introduced in: c2155e31c0
This was SVN commit r26090.
-Standardize naming convention (sample_01_01, where first 01 = type and
following, 01 = subtype)
-Add new variants
-Minor update to previous textures
This was SVN commit r26086.
`ElevationBonus` is vague, as discussions proved. Therefore it is
renamed to `Origin`, which, describes better what the value stands for.
`Delay` is also quite vague, so renamed to `EffectDelay`.
Differential revision: https://code.wildfiregames.com/D2016
Comments by: @bb, @nani, @Nescio, @Silier, @Stan, @wraitii
This was SVN commit r26074.
- Use the correct material, as texture has no alpha, therefore no player
color
- Add missing textures where necessary
- Use null_white for hele_blacksmith_bucket_water instead of loading
useless textures.
Refs: #6326
This was SVN commit r26054.
In 2f24006afb, the siege state for no trainer was not assigned to
variable but used in condition.
Making use of that state actually.
Differential revision: D4367
Patch by: @JCWasmx86
This was SVN commit r26053.
There was an infinite loop:
Order.Gather -> MustKill (L497) -> PushOrderFront(Attack) (L526) ->
NotInRange (L410) -> NotAbleToMove, thus finish order (L426/427) ->
Restart from Order.Gather.
We do two things here:
- Assume we don't have vision when garrisoned, which is not a bad
assumption.
- Check the range and if we are not able to move and not in range,
finish the order.
Introduced in: d3c3072c83
Reported by: @Langbart
Differential revision: https://code.wildfiregames.com/D4349Fixes: #6377
Tested by: @Langbart
Comments by: @Silier, @Stan
This was SVN commit r26044.
-Sword sheath position switch
-Make heroes look more historically accurate
-New hero textures (Caradoc and Boudicca)
Reviewed by: Genava55, wowgetoffyourcellphone and other community
members
This was SVN commit r26037.
This would cause fishes to be spawned on land under a specific set of
conditions. Cases where the concerned land is not painted clPlayer for
example (which fish also avoids).
Added by @marder: spacing of the forest and wood amount was corrected as
the above ^ pushed the wood away from the player.
Original patch by: @smiley
Additional changes by: @marder
Differential revision: https://code.wildfiregames.com/D1729
Comments by: @elexis
Tested by: @FreagarachFixes: #5797
Refs. #3746
This was SVN commit r26003.
The task of the production queue should first and foremost be that; a
queue for production items.
Hence, the specifics of training/researching are delegated to specific
components.
As a side effect, this improves the test coverage and fixes:
- Resource not refunding when hitting the entity limit. Introduced in
b8758c8941.
- Autoqueue changing when unable to spawn. Introduced in 956b3f96db.
Modders can change their templates using
https://code.wildfiregames.com/P256.
Differential revision: https://code.wildfiregames.com/D4333Fixes: #6363
Comments by: @Silier
Refs. #6364
This was SVN commit r26000.
344d1cc837 introduced a tech that percentually increased the required XP
for archers, showing a decimal value.
This rounds that up, for 150/150 without being promoted looks bad as
well.
Patch by: @Langbart
Differential revision: https://code.wildfiregames.com/D4322
Reviewed by: @Angen
This was SVN commit r25984.
Allows devs (and players) to skip the summary page when they don't need
them.
Patch by: @Schweini
Differential revision: https://code.wildfiregames.com/D3958
Reviewed by: @Langbart
Fixes: #4300
Comments by: @nwtour, @Stan
This was SVN commit r25978.
Triple click should have been an <Alt>+DoubleClick.
While at it, removed the unneeded brackets at the hotkey translations.
Patch by: @Langbart
Differential revision: https://code.wildfiregames.com/D4314Fixes: #5409
This was SVN commit r25977.
Cursor should not blink in read-only.
The path was too similar to the list and thus easy to miss, it has been
changed to a 'golden' colour.
A tooltip was added to the path.
The border colour of input fields was changed from white to gold.
The buttons at the bottom of the page are spread evenly.
Patch by: @Langbart
Differential revision: https://code.wildfiregames.com/D4296
Refs: #6350
This was SVN commit r25976.
Required experience can be set to 0 initially and because entity is
upgrated after simulation starts, there was division by 0 in atlas for
such entities causing experience bar going to infinity.
Differential revision: D4317
Fixes: #6362
Patch by: @Langbart
Reviewed by: @Angen
This was SVN commit r25974.
Our bridges are nothing more than actors, so using one is correct.
We also delete the template files to prevent others from making the same
mistake (if someone encountered and fixed the bug in a mod they have
modified templates anyway).
Patch by: @Langbart
Differential revision: https://code.wildfiregames.com/D4297
Reviewed by: @bb
Comments by: @Angen
Fixes#6352
This was SVN commit r25972.
Use dropdown with values. Implement confirmation box with countdown to
revert scale change because buttons can get unable to click.
Differential revision: D3037
Comments by: @vladislavbelov, @Stan, @wraitii, @pieq, @sera
Tested by: @Langbart
This was SVN commit r25966.
If someone would try to copy petra and use it as base of own ai, one
would not be able to run both ais at the same time and had to fix that
global constant anyway.
Differential revision: D4301
Reviewed by: @Freagarach
This was SVN commit r25957.
It was reported that the word farm in the Introductory Tutorial is
incorrect and it should be replaced with Field.
Game refers to them as 'Field' so change is correct.
Differential revision: D4299
Patch by: @Langbart
Fixes: #6345
This was SVN commit r25955.
Deselecting a part of a formation didn't deselect the whole formation,
since the logic was done quite weirdly.
This clarifies and fixes that.
Reported by: @Langbart on D4282.
Differential revision: https://code.wildfiregames.com/D4285
Comments by: @Angen, @Langbart
Tested by: @Langbart
This was SVN commit r25948.
FinishOrder called SetWaitingOnController, although the order
(constructing) had pushed another order (gather).
This is done now by telling we finished the order only when really idle.
This seems to boil down to the question: If we issued an order to a
formation, and its members have wandered off (imagine attacking an
entity and our members have finished the initial target but attack
nearby ones) do we want the whole formation to continue attacking or
execute the next order.
Also fixes reforming whilst attacking when an attack order was issued by
the player.
Reported by: @Langbart at https://code.wildfiregames.com/D2175#182343
Differential revision: https://code.wildfiregames.com/D4282
Tested by: @Langbart
This was SVN commit r25947.
Fixes an infinite loop when the next treasure is outside LOS.
Differential revision: https://code.wildfiregames.com/D4286
Comments by: @Angen, @bbFixes: #6329
This was SVN commit r25946.
This adds minor regeneration to fish (when not gathered) and fruit
(always) as a nice extra for casual players.
The values are chosen to be low, as to not affect competitive play much.
Patch by: @Nescio
Differential revision: https://code.wildfiregames.com/D3868
Comments by: @chrstgtr, @marder, @Stan, @wraitii
This was SVN commit r25940.
It removes the software implementation intentionally. Because it
duplicates SDL functionality. But it might be added in future on demand.
Tested By: bb, Langbart
Differential Revision: https://code.wildfiregames.com/D4278
This was SVN commit r25936.
Don't try to research some techs which are useless when we have no ally.
Ideally we don't put these techs in the config as well, but check the
usefulness and/or dependencies.
Differential revision: https://code.wildfiregames.com/D4218
Reviewed by: @Angen
Comments by: @Stan
This was SVN commit r25923.
With the addition of the new resource icons for stone and metal, the
text was too close to the icon so the distance between the text and the
icon is increased.
Also, synchronises the colour of the number of gatherers in the top
panel with the colour in the tooltip explanation.
Patch by: @Langbart
Differential revision: https://code.wildfiregames.com/D4032
Comments by: @Stan, @wraitii
This was SVN commit r25922.
Message is translated correctly.
Issue was sprintf replaced %(unit)s before message was going to be
translated so string was never found in dictionary.
Introduced in b97d251322
Differential revision: D4254
Patch by: @Ceres
Based on code by: @nwtour
Reviewer: @Angen
This was SVN commit r25916.
After 738b200dda, where the mirage should be queried in the
Start/StopAttacking functions.
Reported by: @bb
Differential revision: https://code.wildfiregames.com/D4267
Reviewed by: @bb
This was SVN commit r25914.
Introduced in c888844b3a.
The problem was trying to set the amount to Infinity by substracting
Infinity from it.
Differential revision: https://code.wildfiregames.com/D4263
Tested by: @Langbart
Fixes: #6317
This was SVN commit r25912.
Introduced in 4e664dd712.
The basesManager assumed at least one base (as was the case earlier).
`this` was used in a passed function, which therefore was undefined.
Differential revision: https://code.wildfiregames.com/D4253
Tested by: @marder
Comments by: @Langbart, @Stan
This was SVN commit r25911.
Not done in afd1eaee0d.
Also remove references to `queued` and `pushFront` in the `setStance`
functions, since they (currently) have no meaning.
Reported by: @bb
Differential revision: https://code.wildfiregames.com/D4261
Reviewed by: @bb
This was SVN commit r25902.
Put passability values to prototype variables.
Code looks more readable.
Differential revision: D4236
Refs: #6256
Comments by: @Freagarach, @Stan
This was SVN commit r25883.
public mod does not have to be activated, moving compatibilityColor to
mod
Differential revision: D4237
Refs: #6294
Comments by: @bb
This was SVN commit r25881.
Tell user about help command, when requested command is not supported
Differential revision: D4229
Reviewed by: @Langbart, @Freagarach
Comments by: @bb
This was SVN commit r25880.
The HQ should only care about high-level stuff, hence something like
managing/looping individual bases is now done in a `BasesManager`,
similar to the `AttackManager`.
Differential revision: https://code.wildfiregames.com/D4192
Comments by: @Angen
Fixes: #6185
This was SVN commit r25876.
Removes the manual hotkey tooltips from summary and gamesetup in favor
of the general one.
Based on patch By: ffffffff
Reviewed By: Freagarach
Comments By: elexis, Stan
Differential Revision: D1264
This was SVN commit r25872.
Background pause does require a game restart to take effect.
Adding function to update it on runtime since only place where it is
used is in main.cpp.
Differential revision: D4181
Fixes: #6236
Tested by: @Langbart
This was SVN commit r25866.
Metadata are stored in an object {} making check for key in the object
irrelevant, since not existing key will result in returning undefined
value.
On top of that, merging metadata existance if condition into returning
statement.
Differential revision: D4195
Reviewed by: @Freagarach
This was SVN commit r25862.
Differential revision: D4209
Since some revision wraitii will probbaly know, I am not going to look
for it, guiobjects require exact data type so casting does not work when
it is not done beforehand.
Error reported by Stan.
Now installing pyromod should not trigger errors.
This was SVN commit r25849.
Introduced in c87229aa48, FindWalkAndFightTargets returns after the
first UnitAI finds a target, instead of also querying the rest of the
members.
Differential revision: https://code.wildfiregames.com/D4208
Comments by: @Stan, @wraitiiFixes: #6260
This was SVN commit r25847.
Attack orders can be and looks like are pushed in front of formationwalk
order.
That is generally also logic in single entity behaviour.
In case formation gets destroyed and then target dies, attacker is
supposed to stop attacking target immediately.
That essentially leads to getting to old formationwalk command, what was
not issue for packable units until 674cdae166, that introduced
formationcompoennt into the order.
Hovewer abandoning this order without being in formation makes more
sense. Probably this one and FormationLeave should be FORMATIONMEMBER
specific commands and error out in INDIVIDUAL state, but thats too much
refactoring and potential rabbit hole.
Differential revision: D4206
Reviewed by: @wraitii
Accepted by: @asterixFixes: #6263
This was SVN commit r25845.
Since 3d7af82328 PetraAI constructed many ships (and cavalry) because
they have the "Ranged" class and we didn't check for "Infantry" anymore
when training workers.
Basically a patch by: @Angen
Differential revision: https://code.wildfiregames.com/D4193
Reviewed by: @Angen
Refs. #6250 by fixing the ships case.
Fixes the concern on 3d7af82328.
This was SVN commit r25828.
PetraAI can't cope with that and it may be a suprise for other players
as well, when a captures production entity has autoqueue enabled.
Differential revision: https://code.wildfiregames.com/D4185
Refs: #6213
This was SVN commit r25819.
Fix map not generating with nubia and steppe biomes (Missing farmsteads
and mercenaries)
Fix an oak being placed no matter the biome and use a biome tree instead
Use the goat instead of a sheep for the alpine biome.
Refs: 4de9c4c164, #6180
This was SVN commit r25816.
I had used a debug image which I left in and which looks broken.
Removing it defaults to the normal 'missing preview' 0 A.D. image which
looks more correct.
Differential Revision: https://code.wildfiregames.com/D4172
This was SVN commit r25801.
Settings like Landscape, Daytime & team placement are map dependent. If
"random" map is chosen, we first must select the map before selecting
these.
This wasn't done correctly and so starting "random" map that picked e.g.
Unknown could fail.
Biomes were already correctly handled.
Reported by: langbart
Fixes#6227
Differential Revision: https://code.wildfiregames.com/D4173
This was SVN commit r25800.
e0800bc092 introduced a `repairable` toggle, but did not mirage that
function, meaning one could not repair an allied miraged structure.
Reported by: Langbart
Patch by: Freagarach
Refs #6226
Differential Revision: https://code.wildfiregames.com/D4171
This was SVN commit r25799.
Prevents overflow in some translations, and aligns it better with the
tip image.
Patch by: Langbart
Fixes#4754
Differential Revision: https://code.wildfiregames.com/D4167
This was SVN commit r25793.
Updates the map previews of all the Best for MP maps & Empire
This removes the fancy mainland biome switch because it was the only map
to do that and we lack the tools to automate it.
Differential Revision: https://code.wildfiregames.com/D4159
This was SVN commit r25789.
- Actually win at the end, thus advancing the campaign
- Count rams properly
- Show the ready button for the city-phase when cheating.
Reported by: langbart
Fixes#6188
Differential Revision: https://code.wildfiregames.com/D4161
This was SVN commit r25788.
Too similar to either Nearestern Badlands or Mainland.
It seems better to remove it from the filter for this release.
Differential Revision: https://code.wildfiregames.com/D4160
This was SVN commit r25787.
Link to the forums instead of solely the known issues. We have an FAQ
button already, and there are fewer known issues than in the past.
Remove the bit about formations, which isn't really relevant anymore,
and instead add a request for contributions.
Differential Revision: https://code.wildfiregames.com/D4156
This was SVN commit r25785.
The pathfinders are not aware about turn time, and pathing becomes quite
poor with such low turn rates, leading to units that take much longer to
move than they used to.
Until the pathfinders are updated, we should refrain from using very low
turn rates on actual units.
Refs #6142
Differential Revision: https://code.wildfiregames.com/D4163
This was SVN commit r25784.