Commit Graph

21174 Commits

Author SHA1 Message Date
s0600204 ababc796b4 Remove unneeded bonus info from {civ}.json files
This commit removes two things from the `{civ}.json files, for the
following
reasons:

1. The team-bonus information, as the only thing that was reading it
(the
   `civinfo` page) no longer does so.

2. Information about civ-bonuses that have been implemented via a single
   auto-researchable technology, as the `civinfo` page is now capable of
   displaying information from technology files and, in fact, now does
so.

This was SVN commit r24494.
2021-01-01 05:58:34 +00:00
s0600204 ad6263a5a6 Remove entity information from {civ}.json files
As of 190d6e7cf5, the `civinfo` page no longer reads information about
Heroes and Special Structures/Technologies from the `{civ}.json` files,
but
from relevant templates.

Nothing else uses the entity/tech descriptive information contained in
the
`{civ}.json` files, so we can safely remove it.

Note: The Team and Civilisation Bonus information contained within the
      `{civ}.json` files are not touched in this commit.

This was SVN commit r24493.
2021-01-01 02:58:21 +00:00
s0600204 190d6e7cf5 Adapt the civinfo page to read from templates
Instead of loading information about heroes, special buildings, et al.,
from the
`{civ}.json` files, load the information desired from templates.

Determination of "specialness" works as follows:

 * Heroes are detected via the `Hero` class.
 * Special Structures are detected via the `SpecialBuilding` or `Wonder`
class.
 * Technologies are determined to be "special" when they can be
researched by
   the currently selected civ, but are not open to be researched by
every civ.
 * Team Bonuses are any applicable aura that reside in the appropriate
folder.


Accepted by: Freagarach
Comments by: Stan
Differential Revision: https://code.wildfiregames.com/D759
This was SVN commit r24492.
2021-01-01 01:55:13 +00:00
Stan 3ec8a91f30 Fix incorrect prop height for floating objects.
Differential Revision: https://code.wildfiregames.com/D3033
This was SVN commit r24491.
2020-12-31 16:17:58 +00:00
Stan 1bb336829d Add initial support for MCST Elbrus 2000 (e2k) CPU architecture
patch by: @r-a-sattarov
Reviewed by: @Stan
Fixes #5877, Refs #5869

Differential Revision: https://code.wildfiregames.com/D3162
This was SVN commit r24490.
2020-12-31 15:52:12 +00:00
Stan d28d17e96c Remove SSE detection duplication in Colors and ModelRenderer
- Rename macros to be more explicit
 - Move detection code to a separate file
 - Remove a lot of checks in ARB mode (ModelDef.cpp would check for sse
multiple times per frame)
 - Make explicit the SSE2 dependency for Windows

Comments by: @vladislavbelov @wraitii @OptimusShepard
Differential Revision: https://code.wildfiregames.com/D3212
This was SVN commit r24489.
2020-12-31 15:37:28 +00:00
Stan e009d322cc Add missing files in 4942cabab5
This was SVN commit r24488.
2020-12-31 14:27:02 +00:00
Stan 4942cabab5 Fix most Clang 10 Warnings
Refs: #5550, #5294

Remove dead code from f71be3c764
Fix buggy code from ff50b0b74c
Comments by: @wraitii, @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D3177
This was SVN commit r24487.
2020-12-31 14:25:37 +00:00
Stan a395a0ab66 [BOOST 1.75 2/2] Update binaries for windows (1.65 → 1.75).
Refs #3004

This was SVN commit r24484.
2020-12-31 12:13:25 +00:00
Stan e3c5cc83b7 Fix oversight in 0d28281485
This was SVN commit r24482.
2020-12-31 11:07:10 +00:00
Stan 0d28281485 Update JSON_SPIRIT from 4.06 to 4.08
This was SVN commit r24481.
2020-12-31 10:25:34 +00:00
wraitii 59d0885d68 Allow picking a default formation for walk (and walk-like) orders.
This allows choosing a "default formation", which is activated
automatically for units given walk orders (and attack-walk etc.).
Conversely, units in formation that are given a gather/build/... order
are taken out of formation and given the order individually.
The default formation can be selected by right-clicking on any formation
icon.

This leverages formations for walking, where they are quite efficient
(in fact, perhaps too efficient), while circumventing issues with
various orders.

Choosing the "null formation" as the default formation de-activates the
behaviour entirely, and plays out exactly like SVN.

This makes it possible to queue a formation-order then a
noformation-order (i.e. walk then repair), though the behaviour isn't
very flexible.

For modders, it should be relatively easy to change the setup for each
order, and/or to force deactivating/activating formations in general.

Tested by: Freagarach, Angen
Refs #3479, #1791.
Makes #3478 mostly invalid.

Differential Revision: https://code.wildfiregames.com/D2764
This was SVN commit r24480.
2020-12-31 10:04:58 +00:00
Freagarach 83a1f93828 [Gameplay A24] - Allow building palisades in neutral territory.
This is a rather controversial change, so if it feels compleatly off, we
should revert.
The game is Alpha, so try anyways.

Patch by: @Nescio
Differential revision: D2507
Accepted by: @borg-, @Lionkanzen,
In favour: @borg-, @Lionkanzen, @wraitii
Reservations: @elexis, @Feldfeld, @badosu
Reservations against former patch: @chrstgtr, @PhyZic, @Stan, @ValihrAnt

This was SVN commit r24479.
2020-12-31 08:33:48 +00:00
Freagarach 85f46d6d66 Introduce macemen templates.
For easier differentiation.

Patch by: @Nescio
Differential revision: D1354
This was SVN commit r24478.
2020-12-31 07:31:07 +00:00
Freagarach db6f7c1471 [Gameplay A24] - Alter Roman army camp production queue.
Removes siege engines from them such that if one wants siege engines,
they need to construct an arsenal.
Instead it now trains advanced melee infantry.

Patch by: @Nescio
Differential revision: D3174
Reviewed by: @borg-
Comments by: @Freagarach, @Stan
This was SVN commit r24477.
2020-12-31 07:22:20 +00:00
Freagarach 88b5eec22f [Gameplay A24] - Deprecate Stoa and their champions.
For their current implementation is historically problematic:
-
https://wildfiregames.com/forum/index.php?/topic/28464-can-we-give-macedonians-some-love/
-
https://wildfiregames.com/forum/index.php?/topic/28099-thracian-mercenaries/
- https://wildfiregames.com/forum/index.php?/topic/28002-royal-stoa/
- https://wildfiregames.com/forum/index.php?/topic/27997-macemen/
-
https://wildfiregames.com/forum/index.php?/topic/25504-special-units-and-so-on/
-
https://wildfiregames.com/forum/index.php?/topic/25503-special-buildings-and-so-on/

Patch by: @Nescio
Differential revision: D2863
Reviewed by: @borg-
Comments by: @badosu, @wowgetoffyourcellphone, @wraitii
This was SVN commit r24476.
2020-12-31 07:16:04 +00:00
Freagarach d2b9f40e73 [Gameplay A24] - Standardise archer attack speeds.
Gives all archers a reload time of 1 s and gives 1:2:4 damage ratio for
basic, champion and hero archers.

Patch by: @Nescio
Differential revision: D3235
Reviewed by: @borg-
Comment by: @ValihrAnt
This was SVN commit r24475.
2020-12-31 06:59:06 +00:00
Freagarach 0fed3bd452 [Gameplay A24] - Balance hero health.
Standardises heroes health to:
- Healer/Infantry: 1000
- Cavalry: 1200
- Elephant: 1500

Patch by: @borg-
Differential revision: D3250
Reviewed by: @Nescio
This was SVN commit r24474.
2020-12-31 06:55:25 +00:00
vladislavbelov 84c8ec6cf3 Orients toward default angle for snapping to edges when possible
Fixes #5807

Tested By: Freagarach, wowgetoffyourcellphone, wraitii
Differential Revision: https://code.wildfiregames.com/D3238
This was SVN commit r24473.
2020-12-30 21:04:37 +00:00
Freagarach 95e84fa923 Standardise hero regnal numbers.
- Uppercase -> lowercase.
- Title -> regnal number.
- Added where appropriate.
Actors are not changed.

Patch by: @Nescio
Differential revision: D2156
This was SVN commit r24472.
2020-12-30 08:02:22 +00:00
bb 3dc19aa753 Only have techs that affect the bolt and art tower researchable there.
Patch By: Nescio
Differential Revision: D3266
refs 136022564d

This was SVN commit r24471.
2020-12-29 21:22:05 +00:00
Freagarach c4eeb82d83 [Gameplay A24] - Enable stable for all civilisations.
Moves cavalry there.
Moves chariots there.
Moves wardogs there.
Makes the unlock_champions tech cheaper because it now only unlocks
infantry.

Removed increased cost of cart_temple since the kush one doesn't have
that either.

Patch by: @Nescio
Differential revision: D2801
Reviewed by: @borg-, @ValihrAnt
Comments by: @Angen, @badosu, @Feldfeld
This was SVN commit r24470.
2020-12-29 11:57:12 +00:00
Freagarach 521639cad6 [Gameplay A24] - Tweak maceman attacks.
- Raises the champion's reload time but ensure same DPS for better
visuals.
- Changed citizen's attack to be like the champion's.
- Macemen don't benefit from steelworking tech (which is about swords).

Patch by: @Nescio
Differential revision: D3234
Reviewed by: @borg-, @ValihrAnt
This was SVN commit r24469.
2020-12-29 11:41:14 +00:00
Freagarach a79a47effe Allow to limit unit count per match.
This allows to limit the number of times a specific template can be
constructed/trained/created during a match.

Part of:
https://wildfiregames.com/forum/index.php?/topic/27214-borg-expansion-pack-mod-implementation-in-0ad-alpha-24-release/
Refs.
https://wildfiregames.com/forum/topic/24682-champions-and-civilisations-balance-mod-for-a23/

Differential revision: D2411
Reviewed by: @wraitii
Comments by: @Angen, @Stan
This was SVN commit r24468.
2020-12-29 11:00:54 +00:00
wraitii 71a61d5f50 Fix Idle formation rearranging when an entity dies.
Idle formations re-arrange whenever a member leaves the formation.
Because Idle formation entities can attack nearby units (the formation
stays idle for this), any death will re-arrange the formation, causing
the entities to move in formation before going back to attack.

This looks odd and makes formation less usable. Given that it's tricky
to change the controller state with the current code, this instead
reforms the formation on a timer, only when all members are IDLE.

It fixes the issue and looks generally similar in other cases.

Reported By: wowgetoffyourcellphone
Reviewed By: Freagarach
Differential Revision: https://code.wildfiregames.com/D3236
This was SVN commit r24467.
2020-12-29 10:08:55 +00:00
wraitii f0faab7a42 Fix serialization errors when hosting MP game.
Follows D2746 / 9fc6c3c897 and dad2857538.
Player colors are copied from the settings, which are deep-frozen, thus
not extensible. Cloning them restores that, allowing serialization.

Reported By: Angen
Differential Revision: https://code.wildfiregames.com/D3263
This was SVN commit r24466.
2020-12-28 17:44:20 +00:00
wraitii 9fc6c3c897 Correctly serialize/deserialize user-defined JS objects.
Generalize component/AI serialization system to any user-defined JS
object. This includes Vector2D/3D, fixing an old issue.
As with components/AI, JS Objects may implement a Serialize/Deserialize
function to store custom data instead of the default, which attemps to
serialize all enumerable properties.

Fixes #4698

Differential Revision: https://code.wildfiregames.com/D2746
This was SVN commit r24462.
2020-12-27 17:18:13 +00:00
Angen 1432343eeb Fix upgrades not being sorted by phase in structuretree
Currenlty there is regression in structuretree from b2842e8021, when
upgrade for sentry tower is not in the correct phase row.
Thix is fixing that.
Probably typo in condition.

Differential Revision: D3252
Reviewed by: bb
This was SVN commit r24461.
2020-12-27 15:47:30 +00:00
Angen 06dfd3eaa0 [gameplay-a24] Lower cost of briton special tech for grain gather rate
The technology introduced in 586b045d09 for gauls is a bit overprised.
This is lowering the price to the original cost of rotarymill and
lowering gain a bit more because the tech is not just gobal but
available in phase earlier. Also it is "almost" half on cost and effect
of the current phase II tech which is available for everyone.

Differential Revision: D3253
Reviewed by: borg-
This was SVN commit r24460.
2020-12-27 15:46:00 +00:00
wraitii ae9ea5b859 Map browser, used in the gamesetup and in the main menu.
This grid-based system allows browsing all available maps at a glance,
encouraging more diversity and making it nicer to pick a map.

Moves the mapCache and the map filters controller to the gui maps/
folders, and include that folder where it is used, instead of them being
in common/ or the gamesetup.

Comments By: Freagarach
Patch By: Nani (reworked by elexis then wraitii)
Fixes #5315 (though further work, such as proper scrolling, would be
nice).

Differential Revision: https://code.wildfiregames.com/D1703
This was SVN commit r24459.
2020-12-27 15:26:19 +00:00
wraitii f31443eccb Increase projectile speed slightly across the board.
This bumps arrows from 75 to 100, slingers to 90 and javelins from 62.5
to 70. It's both slightly more realistic and helps with dancing, since
the problem is the ratio of unit speed vs projectile speed.

Further increases would reduce dancing, but also make it harder to see
projectiles which isn't desirable.

Refs #5106

Differential Revision: https://code.wildfiregames.com/D3179
This was SVN commit r24458.
2020-12-27 08:26:32 +00:00
wraitii eafc2a4ea8 Don't show the sword-shield icon if there is nothing to show.
Reviewed By: Freagarach
Refs #5883

Differential Revision: https://code.wildfiregames.com/D3258
This was SVN commit r24457.
2020-12-27 08:12:44 +00:00
wraitii d7caa91420 Switch to the running animation only above a certain ratio of the walk speed.
Following D3221/38c3827d3b, units switch to the 'run' animation when
moving faster than their walkspeed.
This makes formations 'flickery' because units often move slightly
faster than their walkspeed when the formation rotate slightly, which
happens often. It looks fairly bad.

This switches to the running animation halfway through, though a more
general system would be more desirable.


Approved By: Angen
Reviewed By: bb
Differential Revision: https://code.wildfiregames.com/D3224
This was SVN commit r24456.
2020-12-27 08:07:10 +00:00
wraitii 1e8299dcdb Fix off-by-one line number in JS error reporting.
Post SM60 upgrade, CompileFunction started actually adding a line in
front of the source buffer, shifting the error reporting in the
simulation and other callers of LoadScript.
The GUI isn't affected as it uses LoadGlobalScript, which uses Evaluate
directly.

Refs #5859
Fixes #5895

Differential Revision: https://code.wildfiregames.com/D3257
This was SVN commit r24455.
2020-12-27 07:51:30 +00:00
wraitii 8a77efd849 Fix no-pch builds following 5b46ce0778
Component.h is loaded by convention in all CmpComponents and is
requireed to use CmpPtr.

Fixes #5898

Differential Revision: https://code.wildfiregames.com/D3259
This was SVN commit r24454.
2020-12-27 07:48:26 +00:00
Freagarach 4c1d6eb236 Fix entities turning when attacking while fleeing.
Bug revealed by non-instantaneous turning.

Code by: @bb
Differential revision: D3241
Reviewed by: @wraitii
This was SVN commit r24453.
2020-12-27 07:21:18 +00:00
Freagarach 7f6602cffd Show the number of builders together with build time.
Also adds the remaining time to the tooltip.

Differential revision: D2425
Reviewed by: @bb
This was SVN commit r24452.
2020-12-27 06:56:37 +00:00
Freagarach 6a3cad75eb Correct technology specific names.
Also:
- Added generic Greek names for Ptolemies and Seleucids.
- Remove those where requirements prevent it for a civ.
- Simplified Greek romanisation, per
https://wildfiregames.com/forum/index.php?/topic/25202-transliteration-of-ancient-greek-into-english/page/3/&tab=comments#comment-378658.

Patch by: @Nescio
Differential revision: D2025
This was SVN commit r24450.
2020-12-26 06:21:37 +00:00
Freagarach 47b9d2a02e Play sound of entity that is able to perform a command.
In unit_actions.js sounds of the first entity that is able are now
played, instead of trying to play a sound of the first entity of the
selection, which may or may not be able to perform the command.

Differential revision: D3099
Reviewed by: @bb
This was SVN commit r24449.
2020-12-26 05:46:13 +00:00
Angen fe1356b80c [Petra/AI] Fix wrong function call in worker.js after FastMoving class introduction
Introduced in 164af0742a.
Missed when doing review.
Reported by: Freagarach
This was SVN commit r24448.
2020-12-25 17:46:35 +00:00
bb 9ae637bd43 var => let and some periods in fogging
Implicitly reguested by Freagarach

This was SVN commit r24447.
2020-12-25 17:02:52 +00:00
bb 136022564d Change tower armour tech to a roughly equivalent health one
Patch By: Nescio
Comments By: borg, Freagarach
Differential Revision D2937

This was SVN commit r24446.
2020-12-24 17:02:01 +00:00
bb 87849f4fe9 Fix some translatable strings
Patch By: Nescio
Comments By: Freagarach
Differential Revision: D3134
This was SVN commit r24445.
2020-12-24 16:25:32 +00:00
Freagarach e90609fa28 Some cleaning in unit_actions.js.
Let the `hotkeyActionCheck` and `preselectedActionCheck` use the regular
`actionCheck` to reduce duplication.
Save the first able entity used to orderOne.
Removed some functions which were used merely once.
Combined non-target actions with the regular ones.

Differential revision: D3222
Reviewed by: @bb
Comments by: @wraitii
This was SVN commit r24444.
2020-12-24 07:45:42 +00:00
Freagarach 3d61c227f3 Make slaughter actually kill animals in one strike.
Changed in 37d3adcf23, presumably erroneous given a relevant IRC log
(2012-12-02), and in daf572eb43.

Refs. D193.

Differential revision: D3233
Reviewed by: @Nescio
This was SVN commit r24443.
2020-12-24 06:35:33 +00:00
bb 19762acf03 Also do transform
This was SVN commit r24441.
2020-12-23 17:48:24 +00:00
bb 6205f687e4 cp => CapturePoints
Reviewed By: Angen
Differential Revision: D3248
This was SVN commit r24440.
2020-12-23 17:26:36 +00:00
Angen 75b8d3194e Show a default value in playersFilter input to show user what it is for [v2]
Redo original diff D245 by ffffffff after commit of cpp changes for
input placeholders.

Differential revision: D3245
Reviewed by: bb
Comments by: Stan, wraitii
This was SVN commit r24439.
2020-12-23 15:50:16 +00:00
bb 0fe7f86b6d Display header from c8fda40b02 also for upgrades.
refs 024aa77c35, D2654
Reviewed by: Freagarach
Comments By: elexis
Differential Revision: D3008
This was SVN commit r24437.
2020-12-22 22:27:10 +00:00
Angen 6b353c4ae5 [Petra/Ai] Get landaccess of garrison holder if entity is garrisoned
Position of garrisoned entities is undefined, thats why landaccess
fails, when asking for position in some cases.
Last replay in ticket is from a23b.

source of the issue was this.target in attackplan got garrisoned so it
got undefined possition.

Solution applied is to ask for landaccess of garrisonholder if current
entity is garrisoned inside the function itself, instead doing it in
every place possible and forget it the future additions. If calling code
does not want to deal with garrisoned entities, it should check for that
case separately.

For attack plan, when it happened is fine, because it will deal with
garrisoned entity later.

Differential revision: D3244
Fixes: #5589

This was SVN commit r24436.
2020-12-22 11:11:18 +00:00