That commit illegaly polled SDL events from a different thread which for
an unknown reason did not error on Windows and GNU/linux.
Refs #4822 / D1304, similarly 8fec942e8a.
Differential Revision: https://code.wildfiregames.com/D1484
Previous iteration tested on OSX and some comments with regards to
letter case by Vladislav (refs 27da92e55f, 4c73614955).
This was SVN commit r21818.
Use an enum to indicate the type of engine shutdown instead of three
bools.
State in the comments that the program is restarted within the same
process.
In preparation of introducing an IsQuitRequested function (which shall
not be named is_quit_requested as stressed by Vladislav):
Rename kill_mainloop to QuitEngine, restart_mainloop to RestartEngine,
restart_mainloop_in_atlas to StartAtlas to not break consistency.
Don't rename RestartInAtlas in JS just now.
Group declarations at the top of main.cpp.
This was SVN commit r21817.
Declare the g_GameRestarted hack from 12f0720f31 in main.cpp, because it
is main.cpp and Game.cpp who provide it's value.
Move the comment so that the connotation becomes clear when reading
main.cpp.
Remove the extern declaration introduced to the Renderer in fb035d08e3
that became obsolete with ed7c66eb82.
This was SVN commit r21816.
Fixes issues with wxWidgets and curl reported by foxhack. Fixes premake4
build scripts after an oversight in 833c9f108c.
Reviewed By: vladislavbelov
Differential Revision: https://code.wildfiregames.com/D1468
This was SVN commit r21808.
This should be unneeded if the settings were parsed rather than copied
directly.
Differential Revision: https://code.wildfiregames.com/D1475
Reviewed By: Itms
This was SVN commit r21802.
JSInterface_L10n.cpp from d6db5a466d,
JSInterface_Renderer.cpp and JSInterface_GUITypes.cpp from 4b1297b328,
JSInterface_VisualReplay.cpp from b830233498,
JSInterface_Game.cpp from 5f8be8e0c6,
JSInterface_Simulation.cpp from 921c5515a6,
JSInterface_Debug.cpp from d6cb9c845b,
JSInterface_Main.cpp from 486aec18d4, refs #4772,
JSInterface_Mod.cpp where it was incorrectly removed in af03c72f76.
Refs D1470.
Sort includes alphabetically, add recent Coding Convention macro
comments.
This was SVN commit r21789.
Remove unused (wrong copy&paste) includes from 86fcf0de8c in
JSInterface_ModIo.*, initially hinted at by leper.
Remove a forward declaration in JSInterface_Console.h that should have
become an include with 4b1297b328, because CxPrivate must be declared
before its reference too.
Remove a forward declaration in JSInterface_Mod.h from 64bfa089af that
should have been the include added in af03c72f76 which in turn omitted
to remove this forward declaration.
Remove a forward declaration in Renderer.h that became unused with
1ddd24bb8c.
Differential Revision: https://code.wildfiregames.com/D1470
Reviewed By: Itms
This was SVN commit r21788.
Packable units should pack in the attack order after the standground
check, and they should pack before chasing.
Reported by: bb
Comments by: mimo at D1458
This was SVN commit r21784.
Remove unneeded, slightly different sinkrate from the hellenic epic
temple.
Differential Revision: https://code.wildfiregames.com/D1467
Baed on patch by: Nescio
This was SVN commit r21783.
The check should have been in there for mods (garrisonable CCs) since
the first version, but it was needed the hard way by units becoming
targets in 76d648349d.
This was SVN commit r21782.
Also avoids some unneded player entity aura cleans.
Differential Revision: https://code.wildfiregames.com/D1453
Reported and comments by: fatherbushido
Reviewed By: temple
refs #5099
This was SVN commit r21779.
As demonstrated by Dizaka, it allowed players to win a game by deleting
all buildings, sending one unit across the map and having the enemy get
defeated by the double gaia count.
It also means that players that still have buildings but no CCs/Wonders
are targetted by elephants.
This was SVN commit r21777.
At most send an attack order for one target before patroling
(targetCount),
because adding further targets can end in the gaia unit being blocked
and slaughtered by the player without difficulty and
because the mechanism isn't as relevant for ships as it was envisioned
to be (since most ofen the 3 closest ships already are in the same
location).
Patch By: (-_-) aka smiley
Differential Revision: https://code.wildfiregames.com/D1449
This was SVN commit r21767.
mod.io is a new platform for sharing mods, that 0 A.D. can make use of
in order to download mods and install them.
Based on patch by leper, numerous changes from s0600204, vladislavbelov,
Imarok, elexis, temple and myself.
Differential Revision: https://code.wildfiregames.com/D1029
This was SVN commit r21759.
Place more mines on nomad in the fertile land.
Chose better fitting templates for the fertile land.
Alternate passage locations, so the gameplay purpose of the irrigation
canals is met (increasing the distance between opponents).
Increase the size of the city on larger maps.
Don't have bumps near gates.
This was SVN commit r21743.
because they can open the lobby as a dialog while replaying the game in
this release.
Differential Revision: https://code.wildfiregames.com/D1237
Patch By: fpre / ffffffff
This was SVN commit r21742.
Discovered by Undying Nephalim.
Investigated by s0600204
Reviewed by: s0600204
Differential Revision: https://code.wildfiregames.com/D1455
This was SVN commit r21736.
Have strongly garrisoned buildings in the city capturable to incentivize
players to break the walls.
Use "probabilistic rounding" for unit counts, so that on a 1v1 with a
normal mapsize on medium difficulty,
don't round to 0 elephants per stable in the first wave as it is too few
and
don't round to 1, because that were too many.
Place Sentry towers in easy difficulty instead of none.
This was SVN commit r21735.
Make their decaying faster too so they do not stay too long under the
ground for no reason.
Leave it some time still so players can still have an idea on how many
dead units are there.
This was SVN commit r21732.
This also reduces the attackercount slightly, because gaia is now
excluded when counting players.
PlayerManager.GetActivePlayers helper function.
This was SVN commit r21730.
pyrogenesis can now take a zip file (rename it to .pyromod for direct
file association following 943a61e4ea) and install it. It then starts
the mod selector.
Patch by vladislavbelov, with contributions from Imarok, elexis and
myself.
Differential Revision: https://code.wildfiregames.com/D1142
This was SVN commit r21726.
The new pyrogenesis.xml file should go under
`$XDG_DATA_DIRS/mime/packages/` before running update-mime-database (see
https://www.freedesktop.org/wiki/Specifications/AddingMIMETutor/ for
more information).
Patch by s0600204 and myself.
This was SVN commit r21723.
Based on patch by scythetwirler, fix and improvements by user1, Dunedan
and myself.
Differential Revision: https://code.wildfiregames.com/D206
This was SVN commit r21718.
Besides the performance improvement for that hypothetical case,
it also means OnGlobalPlayerDefeated is used consistently and
an oversight like the one fixed by 2651caa885 might become easier to
notice.
From Differential_Revision: https://code.wildfiregames.com/D1426
Reviewed By: temple
Refs #5099
This was SVN commit r21712.
The next diff changes this to a global message subscription, so that it
is easier to recognize.
Fixes#5099.
From Differential_Revision: https://code.wildfiregames.com/D1426
Pointed out by: fatherbushido
Reviewed By: temple
This was SVN commit r21711.
always displaying the follow-player option for gaia.
Differential Revision: https://code.wildfiregames.com/D1443
Reviewed By: bb
This was SVN commit r21693.
They were never captured before as there is no reason to, while with
this patch, it becomes easy enough and the little local attack and
gather bonus as well as the possibility to hide are interesting enough.
This was SVN commit r21671.
Add an autostart-player option, so that one can start as an observer too
and watch some knockout bots.
Precise the "Needed for autostart loading option" comment from
d5bd374586 which
become increasingly incomprehensible with each a68d5dae0d, 506350d6fa,
9f796068f8 and 6c5a8269f3.
This was SVN commit r21659.
These three dialogs assume to be able to read the gameSettings, but
Atlas doesn't provide them yet following the commits in #3143 and #3263.
Refs #4199.
This was SVN commit r21658.
Move all GUI init calls from init to initGUIObjects.
Move all GUI logic from init and initGUIObjects to functions called from
the latter.
This was SVN commit r21657.
Fix redundant props in horse props
Add a new floor gathering anims for cavalry
Move cavalry anim file to a subfolder
Add reins for cavalry
Add trot animation replacing the new and now old ones
This was SVN commit r21653.
Just test if a NetClient is present rather than passing a state boolean
from GUI page to GUI page (since 1c0536bf08 or sooner).
This was SVN commit r21650.
Let every elephant attack a different target, yielding a more uniform
attacker distribution.
Spawn elephants at the Wonder too, preventing a deadlock when players
have no more units while the buildings are still ignored by soldiers.
Reported by mapkoc at
https://wildfiregames.com/forum/index.php?/topic/24153-is-this-fixed/
Increase time until the first attacker wave on nomad slightly.
Make it depend on the difficulty, as suggested by nani.
This was SVN commit r21644.
Add EOL properties to fixed files
Rename some AO textures to fit the convention,
Remove copy pasta mess, hence fixing the errors spam when deleting
buildings
Fixes#5105
This was SVN commit r21636.
Replace deprecated createObjectGroups on River Archipelago to ensure
mine placement, refs #4695.
As request by Hannibal Barca, remove the arctic fox on Scythian Rivulet.
As reported by (-_-) / smiley, place tilapia instead of tuna fish at the
nile river.
This was SVN commit r21635.
Remove iberian starting walls but keep the towers as requested by lobby
players.
Update mappreview to include the walls from 7e207e1f4c.
Use Basic rank, since Gaia doesn't have a TechnologyManager and since
the rank bonuses are autoresearched-techs
(noted by temple recently and FeldFeld in a match before the first
version of D204).
This was SVN commit r21631.
Fixes two bugs with unresponsive units on walls because they weren't
recognized as turrets.
Differential Revision: https://code.wildfiregames.com/D1403
Reviewed by: mimo
Comments by: elexis
This was SVN commit r21627.
Clean the code by removing the animal hardcoding in the Foundation
component and adding a flag DeleteUponConstruction to the Obstruction
component.
Have locked gates and upgraded entities equally delete entities when
transforming.
Add a workaround for trees inside walls on random maps.
Reviewed by: temple
Differential Revision: https://code.wildfiregames.com/D1415
Refs #4268
This was SVN commit r21624.
If there are less spawn points, the groups of spawned units is increased
proportionally.
The new balancing should yield the same results as a 1v1 on medium
mapsize or a 4v4 on a normal mapsize in the previous balancing.
Notice that the number of elephant stables (and hence elephants) can
still vary.
This was SVN commit r21613.
Preferably, the buildings should be rotated so that they face the path,
refs #5090.
Start attacks again in case a player dared to rebuild a CC.
Fix missing negation in 0b0fb8838a.
Variable naming consistency.
This was SVN commit r21611.
Order half of all elephants to attack any structure while the other half
still focuses Defensive buildings.
Add 50% more elephants to compensate the existing elephants not being as
effective militarily anymore.
This was SVN commit r21605.
Support multiple graphs with different scales, units, rounding and
descriptions and use it for memory allocation and number of garbage
collections.
Have the X axis in number of turns (instead of that divided by 20).
Don't have the legend hide part of the graph.
Add references to that hardcoded 20.
Move graph JS to a separate JS file.
Use JSON instead of JS.
Add legal html structure.
Comments By: Vladislav in irc yesterday
This was SVN commit r21602.
so that units don't try to gather forever while not being able to reach
it and
so that the sheep corpse can't be selected and seen anymore.
Differential Revision: https://code.wildfiregames.com/D21Fixes#4268
Based On Patch By: wraitii
Reviewed By: temple
Previously Reviewed By: Itms
This was SVN commit r21597.
Paint a path texture at the city gates to indicate it's passability.
Increase palm distances in the city to lessen the likelihood of units
spawned in formation being trapped at the spawnpoint.
This was SVN commit r21589.
Move a color to a global so that mods can change it.
Proposed by Vladislav in eee8217b45
Reviewed by Vladislav in irc today
This was SVN commit r21586.
All maps should now have correct team placement in terms of
sortAllPlayers vs primeSortAllPlayers.
Differential Revision: https://code.wildfiregames.com/D1392
Reviewed by: elexis
This was SVN commit r21574.
The other maps had never read this playerID, so it wasn't noticed until
Jebel Barkal read it.
Paste: https://code.wildfiregames.com/P115
Reviewed By: temple
This was SVN commit r21568.
Allow random map scripts to read the difficulty setting.
Very Easy: Only temples and civil buildings
Easy: CivicCenter, Stables, Barracks, Embassy
Medium: Walls, Fortress, ElephantStables, Tower
Hard: Garrisoned wall turrets and one citizen archer on the walls
Very Hard: 3 Archer champions per wall segment
This was SVN commit r21565.
Display "Napata will attack in %(time)s!" to observers, string addition
permitted by Itms.
Mapgen:
Use the EntitiesObstructionPlacer from 04679a8e2b, the wall constraints
and return values from 8b2a7f26e0,
so that there are no walls at the hill and to keep gates free.
Add palms to the city blocks and guardians at the central path.
Carve out temple areas using the EntitiesObstructionPlacer, rather than
having half the temple submerged by the mountain.
More treasures on the hill and in the city and allow mines on top of the
hill.
Triggerscript:
Make units always patrol, since the attack-walk order runs out and then
units accumulated after eradicating a player.
This also fixes the inconsistency that units captured after that order
ran out, but not before.
Don't use the violent stance since this also allows capturing.
Move attacker targetClasses to attacker balancing composition object, so
that it can be fine-tuned for every attackergroup.
Balancing:
Place Stables which only spawns melee cavalry which only attack traders,
women and siege engines.
Nerf fortresses by not exclusively spawning champions (temples still
do).
This was SVN commit r21556.
Return the placed entities, so that one can parse and elegantly avoid
them afterwards, in particular determine gate positions.
placeCircularWall uses the startAngle as orientation, since that is much
easier to pass than the opposite vector of the center of the wall.
This was SVN commit r21554.
This is especially relevant for triggerscript maps with spawned gaia
units, such as Jebel Barkal, Danubius, Survival Of The Fittest.
Differential Revision: https://code.wildfiregames.com/D1384
Reviewed By: temple
Cheering By: bb, fpre, Imarok
This was SVN commit r21548.
Prevent crash of the map when an odd playercount was chosen due to
primeSortPlayers returning a wrong number of elements as reported by
temple.
Remove some TODOs that likely won't be done soon and don't seem crucial.
Fix missing atlas biome rename in Aethiopia / Fields of Meroe.
This was SVN commit r21531.
Update the RangeOverlay config option only when the options dialog was
closed, not each turn, refs ee5bb1fd61.
Patch By: temple
Differential Revision: https://code.wildfiregames.com/D1291
This was SVN commit r21527.
Features:
* a mountain created in atlas, refs #4816
* a procedurally generated city, refs #5061
* scripted city guards and reoccuring gaia attackers
* attacker composition depend on the remaining buildings of the city
* random irrigation canals that indirectly increase the distance between
the two teams
Needs map description and player feedback to become complete.
Hill based on the Napata Reconstruction hill created by Skhorn of
8615acb2fc.
Consulting By: Sundiata, Skhorn
This was SVN commit r21488.
Add an anti-champ/hero bonus to Meriotic Temple Guards.
Make the Temple of Amun a unique building available in the City phase.
Adjust some auras and add one for cheaper triremes.
Nerf clubman attack, remove spearmen tweaks.
Change barracks cost.
Fix some icons.
Differential Revision: https://code.wildfiregames.com/D1343
Patch by: Hannibal_Barca
Comments by: Nescio, Grugnas, elexis, Sundiata, mimo
This was SVN commit r21477.
Excluding the changes to scenario and skirmisch maps
Transform gameType string to victoryCondition array in load/replaymenu
Adapt the gamesetup to use checkboxes for every victory condition and an
array for storing them
Allow multiple queries in conquestCommon
Remove conquest from regicide, wonder and capture the relic
Move the endless gamedescription from settings to gamedescription
Fixing wrong tabulation from a8a29271ce
This commit will break all scenario and skirmisch maps, their "Gametype"
string needs to be transformed in a "VictoryCondition" array as is done
in the tutorial map (counting endless as an empty array). This counts
for mods too!
Old svn replays and savegame will throw warnings/errors as they are
incompatible after this commit. So svn users will need to delete all
those.
Comments on ai and autostart games By: mimo
Comments on Atlas By: Vladislav
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D1240fixes: #4014
This was SVN commit r21474.
Since healers can't attack enemies, they have left the gaia attacker
group immediately to start patroling.
To fix that, change healers to guard random soldiers of that group,
preferably heroes or champions.
Use absolute formation template paths.
This was SVN commit r21465.
Removes repetitive RangeManager and Identity component querying from
triggerscripts.
It means that mostly map specific logic remains in the triggerscript.
This should bring TriggerScript coding a bit closer to map authors who
aren't exactly software developers.
Call the RangeManager entity getters on Danubius and Survival multiple
times on init to further simplify code, as these microseconds on init
are irrelevant.
This was SVN commit r21459.
Simplify that function by tracking entities using Sets instead of
Arrays, even though it costs two Set-to-Array conversions.
This was SVN commit r21457.
Those heroes were introduced in 097c19a6a0
The new convention from now on will be civ_hero_name(_type(_weapontype))
where parenthesis are optionnal.
However it would be nice to when a infantry hero is added for instance,
than the other one specify it's cavalry
Since it requires map changes, it will be up to the person introducing
it.
This was SVN commit r21449.
Eases implementation of new maps with diverse scripted attackers, refs
#5040, D11 and map difficulties, refs #4963, D1189.
Replaces hardcoded templatenames with calls to a new TriggerHelper
function to query template names, given Classes, Civ, Rank or Packed
state.
Removes the duplicated template counting logic, that was intertwined
with map specific unit classes balancing logic, refs #4805.
Use mimos garrison function from e29dfb7000 / D1146 to support
doubleclicking on garrisoned gaia heroes on Danubius, fixing the bug
described in comment:10 of #4291.
Fix wrong (Trigger) prototype reference in ce65af8dcb.
This was SVN commit r21445.
Use inheritance for both files, as they are the same. Eventually we
should have different anims for heavy skirmishers.
EOL Properties and EOF for all fix inconsistent indent.
Noticed by: elexis
Introduced by: 83680b0dee
This was SVN commit r21442.
Create a getNonGaia function
Reset counters on playerDefeat
MarkPlayersAsWon function
Rename MarkPlayerAsWon to MarkPlayerAndAlliesAsWon
Stop letting winningplayers in relic depend on PlayerID
Comments By and Discussion With: elexis
Reviewed By: temple
Differential Revision: https://code.wildfiregames.com/D972fixes#4648
This was SVN commit r21441.
Extend it to only place docks where the according body of water has a
minimum size, fixes#5065.
Compute the dock angle similar to GetDockAngle from Commands.js (as the
previous angle computation is wrong if the large body of water doesn't
lie in that direction).
This was SVN commit r21433.
Place the Ptolemian wonder as recommended by Sundiata, refs #5040.
Use StaticConstraint from 99797313fe to save some seconds when placing
soldiers.
This was SVN commit r21407.
Inline some variables and return the heightmap in the heightmap library
functions, so that one can apply multiple transformations within the
same statement.
This was SVN commit r21403.
This allows random map scripts to evaluate a set of slow constraints
once and then only access a cache of the results later,
rather than reevaluating the constraints for every randomized
coordinate.
Remove an unused comment following d35d6cc9f9.
This was SVN commit r21401.
For the record and the future I guess as much possible try to avoid
dexlaring events in props.
when nearly everything will use variants that wont be much of a
probleme.
Reported in a stzff match by elexis
This was SVN commit r21398.
Increase passage size so that elephants and siege engines can pass with
higher likelihood.
Use the ElevationBlendingPainter from c1904a725a, so that the mountain
elevation near the river is taken into account.
Smooth the passages even more using the SmoothingPainter, refs #5027.
Add missing SetProgress calls.
This was SVN commit r21384.
Composes the NASA heightmap with the NASA composite photography to
reduce the ahistorical Lake Nasser and avoid having huge lakes in the
valleys to the west of the Nile,
as the heightmap does not correlate with water distribution in this arid
climate at all.
I.e. places riverbed elevation where composite and heightmap intersect,
elsewhere uses the elevation model by NASA.
Bounding box chosen by Hannibal Barca
Geographic and biome consulting by Sundiata
This was SVN commit r21377.
This currently disabled by variants, and will be reenabled when sounds
have been chosen.
Reviewed by: Vladislav,
Comments by: Itms, elexis
Differential Revision: https://code.wildfiregames.com/1257
This was SVN commit r21359.
Further increasing the size for mods was neglected in d6c028923e / D527
and
Delenda Est had a copy of gamesetup.xml to extend the size already.
This was SVN commit r21353.
Replace the alert level with matching classes.
Women respond to bells at the civic center, farmstead, and storehouse.
Trade carts respond to the bell at the market.
Allow garrisoning in allied buildings.
Adapt the GUI to the new behavior.
Differential Revision: https://code.wildfiregames.com/D937
Reviewed by: causative
This was SVN commit r21343.
Change the angles of civic centers and convert tree actors into trees.
Differential Revision: https://code.wildfiregames.com/D1328
Reviewed by: elexis
This was SVN commit r21342.
Reported By: leper
Reviewed By: Vladislav
Alternatively one might consider mod label and description translations
contained in the mod.json.
This was SVN commit r21341.
Use correct variants in animations form UnitAI.
Patch By: wraitii
Reviewed By: temple
Differential Revision: https://code.wildfiregames.com/D1239fixes#4932
This was SVN commit r21337.
The elephantine map from 4c979d8e38 used it already, reported by Angen.
Use these berries for the desert and savanna random biomes and Sahel.
This was SVN commit r21334.
Right-click on icons of units, structures, technologies, flora, fauna,
etc. and view additional details.
Reviewed By: elexis
Fixes: #3212
Differential Revision: https://code.wildfiregames.com/D297
This was SVN commit r21310.
Remove ugly large circle patterns around the playerbase on Ambush, fixes
#4993.
To ensure passability, create ramps from the playerbase to the bluffs.
Change the circular player avoidance to a ChainPlacer generating more
heterogenous pattern.
Use vectors in rmgen2 bluffs creation and simplify equations, refs
#4992.
Don't turn inaccessible bluffs to plateaus but don't place them until it
is certain they are passable.
Increase minimum distance from the playerbase to the mapcenter by
picking different distance values per playerbase pattern in
g_PlayerbaseTypes.
Attempt to improve bluffs performance by avoiding bluffIgnore by 0
instead of bluff by 12, refs #5011.
Implement AdjacentToAreaConstraint and deleteTerrainEntity.
Delete createBoundingBox and use getBoundingBox, refs #4947, #4805.
Delete fadeToGround and nextToFeature and use conventional createArea
calls with the SmoothingPainter of 02fe3ef3e3, refs #5027.
Paint bluff cliffs slightly more accurately using the SlopeConstraint
from 24388f781e, refs #5004.
This was SVN commit r21300.
Delete areaID and just identify the Area object by the actual JS object
reference.
Delete all references from Areas in the RandomMap object,
especially the area property of the RandomMap object became invalid
after creating a new area.
This was replaced with a cache in the Area object and a contains
function.
Add getPoints getter, so that the Area property is not accessed
directly.
Deepfreeze points to prevent accidental overwrites.
Implement StayAreasConstraint and extend currently unused
AvoidAreaConstraint to accept multiple areas.
This was SVN commit r21296.
Fixes unreachable small stone mines inside large stone mines.
Fixes#4338.
Differential Revision: https://code.wildfiregames.com/D189
Credit rapidelectron for working out the two main issues (refs
63e77de94e) and providing a similar patch.
This was SVN commit r21283.
Fixes#5041 nomad units on the map border not being placed.
Make SimpleObject detect if it's an actor and place accordingly.
Rename maxFailCount to maxRetries, since its function differs
intrinsically from the failFraction of Placers.
This was SVN commit r21278.
Fix one progress bar update reverting the progress.
Reported in some benefitial svn testgames with temple, Imarok, bb,
(-_-), nani, Hannibal_Barca, PrincipalityOfZeon, ValihrAnt and Stan
This was SVN commit r21262.
Use the bag on the back for male as well for now. In the end women
should carry baskets, and not backpacks
and make can still have the one on the back.
Add XML headers
Fix Indent (Noticed by Temple)
Add EOL properties.
This was SVN commit r21236.
Picks a random area of a digital elevation model of Greece that has a
certain amount of land.
Comes with different biomes depending on height, athenian artifacts,
docks, a temple and oxybeles.
Smoothens the map iteratively until the maximum amount of cliffs is
reached.
Uses mushrooms from dccbfe0fcd.
Map-description by Hannibal Barca
This was SVN commit r21228.
Could become superseded by the C++ counterpart returning a 2D array
instead, refs #5018, #4816.
One more DiskPlacer from dc18ea1973.
This was SVN commit r21227.
Especially useful if the center position doesn't meet the constraint or
is outside of the map boundary.
Removing the preliminary boundary check from the centered placers seems
to come with a too high performance penalty, for instance when creating
forests.
This was SVN commit r21225.
Delete rmgen2 placeRadial which is equal to playerPlacementCircle from
635e608776, refs #4805.
Remove createBase calls from rmgen2 player playerbase location
functions, so that they can be called without placing the bases.
Let them return the same data that rmgen/ functions return, refs #4947.
Delete placeRandom as it remains empty.
Rename sortPlayersByLocation to groupPlayersCycle,
groupPlayersByLocations to groupPlayersByArea,
randomPlayerLocations to playerPlacementRandom and addBases to
createBasesByPattern.
This was SVN commit r21206.
Make more space for the dropdowns so longstring language doesn't
complain
Reviewed By: Imarok
Differential Revision: https://code.wildfiregames.com/D1260fixes: #5015
This was SVN commit r21204.
New idle carry anims states for persians + capes
Use the new convention discussed with wowgetoffyourcellphone
Nuke some old unused units as they have better equivalents
This was SVN commit r21197.
New idle carry anims states for mauryans + capes
Use the new convention discussed with wowgetoffyourcellphone
Nuke some old unused units as they have better equivalents
This was SVN commit r21196.
New idle carry anims states for gauls and britons + capes
Use the new convention discussed with wowgetoffyourcellphone
move them to their own folders for differentiations.
This was SVN commit r21191.
New idle carry anims states for macedonians and athenians
Use the new convention discussed with wowgetoffyourcellphone
Update Capes + nuke redundant useless units
This allow easier search, a faster way to see what type of units are
there and
the suffix defines the actors
M -> Mount
C -> Champion
A -> Advanced
E -> Elite
B -> Base
Templates will come afterwards
This was SVN commit r21190.
Delete unused variants as they were superseeded when using the new carry
idle animation by wraitii.
Add different variant anims per civ. Hele civs use mainly the same ones
This was SVN commit r21188.
Move capes to another folder so it's easier to find them.
Remove props that will be come unused in the coming commits.
Tweak the cape anims for the idle carry animations.
Add a new gladius for cav gathering animation
This was SVN commit r21187.
Primary use case, as represented on Caledonian Meadows, is creating a
path through impassable area, mountains or water, refs #4952.
Supersedes placeRandomPathToHeight from the heightmap library, refs
#3764.
The painter has the advantage that it can be applied to arbitrary areas
with arbitrary forms of smoothing (or no smoothing).
Replace the rectangularSmoothToHeight calls that only smooth an area
with a SmoothElevationPainter call.
Replace placeRandomPathToHeight which is a copy of the the
RandomPathPlacer from cbcbd19e0b, refs #4805.
This was SVN commit r21182.
Fix Island Stronghold tiny map starting islands since 875a774da9.
Fix berries inside CC on Schwarzwald since 921850cdef.
Prevent starting mines on mountains on Pompeii and other rmgen2 maps,
refs 5acd064cb9.
This was SVN commit r21177.
The only current use-case is Belgian Uplands that has to smooth the map
for 15-45 seconds to transform that noise into an acceptable map.
The general use-case of this painter is questionable.
This was SVN commit r21176.
This allows only specific regions of the map to be smoothened,
especially important on imported digital elevation models.
It uses the Inverse Distance Weighting / Shepard's method as mentioned
by Imarok and formerly implemented in the Pyrenean Sierra map by wraitii
in a796800bb1.
Supersedes the globalSmoothHeightmap function in FeXoRs heightmap
library, refs #3764.
Drop the heightmap argument to be consistent with the other painters.
If painting on arbitrary heightmaps is wished, the createArea mechanism,
all Placers, Painters, Constraints and Areas can and should support
that.
Update the HeightmapPainter from 6319647795 to not break if
TILE_CENTERED_HEIGHT_MAP is enabled (i.e. numVertices = numTiles), refs
#5018.
Use that mode on Mediterranean and Red Sea.
Drop the disabling of bicubic interpolation in the HeightmapPainter
instead of extending it to this feature.
Inevitable smoothing performance improvement for Belgian Uplands (from
45 to 15 seconds per call), even if it implies a somewhat different
outcome, refs #5011.
This was SVN commit r21175.
Replace needlessly complicated code with a call to HeightConstraint,
stayClasses and randomPlayerLocations, refs #4805.
Do texture painting and actor placement at the impassable map border
too.
Replace another occurrence of the number of impassable tiles at the map
border, refs #4034.
Delete useless clone from 7471a0db63 since setRandomHeightmap replaces
the result.
Remove unneeded setReliefmap and operate on the target heightmap
directly.
This was SVN commit r21171.
The balancing problem of too much maparea being covered by impassable
mountains is worsened by the unaltered heightmap.
Players have to fight for straggler trees now.
Can be improved with a pathplacer and the custom elevationpainter used
on Caledonian Meadows.
This was SVN commit r21164.
Visually more appealing and more authentic heightmap, better fitting
water effect, random shallows, better playerbase alignment, circular
map.
This was SVN commit r21161.
Add rubble to royal stoas, use 5x5 size for Sparta's foundation and
rubble.
Differential Revision: https://code.wildfiregames.com/D1290
Reviewed by: Stan
This was SVN commit r21154.
Cavalry needs some more variants so it will come afterwards.
Fix trader and healer blood.
Remove useless anims for heroes.
Remove gather praise for champions.
We do not use it anyway, but DE does.
This was SVN commit r21147.
Uses an unadulterated, easily exchangeable, well compressed topography
image of the NASA Blue Marble series in the public domain,
instead of a heavily tuned and not so well licensed NASA SRTM v4.1 image
encoded in JSON.
Circular intead of a square map shape.
Randomized, height- and slope-based terrain texture painting, refs
#5004.
This was SVN commit r21135.
Decrease the minimum distance between players progressively to find
suitable locations.
Assume that constraint to be constant and compute possible locations in
advance, improving performance drastically, refs #5011.
This was SVN commit r21134.
Refactors the heightmap and terrainmap copying code from 33e3e6c2ab and
the bicubic interpolation code from 64b1da0ddf / 93aefe0787 which were
unused since f5375cbcb9.
This was SVN commit r21133.
Fix typo in b5b384da48 reported by mimo.
Replace magic trigonometric equation from 17fd4fab94 with a createArea
call to the polygon placer from 906c23c54b to draw the fortress texture
on an arbitrarily rotated square.
Fix wrong treasure distance in 442c9848b8.
Remove treasure self-avoidance in 208e642089, since it can result in the
treasure not being placed.
This was SVN commit r21115.
Add a button to toggle between normal and "diplomacy" colors.
Reviewed by: elexis
Comments by: leper, ffffffff, Stan
Fixes: #4747
This was SVN commit r21107.
Implement StayTextureConstraint for the same reason.
getTexture should function on the entire square tilegrid, even on
circular maps.
This was SVN commit r21104.
Differential Revision: https://code.wildfiregames.com/D991
Based on patch by: Nescio
Refs #4770, D989
Comments By: fatherbushido, leper
This was SVN commit r21094.
Remove the "special" prefix since they are not special in any way.
Delete special_ruins.xml from 40b9fc8c1e as it is identical to
special_ruins_column_doric.xml from ff3c7b46f4.
Differential Revision: https://code.wildfiregames.com/D990
Based on patch by: Nescio
Refs #4770, D989
Comments By: fatherbushido, leper
This was SVN commit r21093.
Use the non-deprecated createObjectGroups variants, so that one doesn't
have to do 10 million placement attempts...
Mark the area (land, water, island) and only chose random locations from
these areas using createObjectGroupsByAreas.
Don't ignore the map border for siege engine patrol points, because
AvoidClassesConstraint is very slow for large radiuses.
This was SVN commit r21088.
Add NearTileClassesConstraint that is satisfied when there is a tile
marked with the given class in the given range.
Use it for the grass and mountain terrain painting on Pyrenean Sierra.
This was SVN commit r21085.
Implements the Gift-Wrapping algorithm to compute the convex hull.
Replace the latter half of the pathplacer with this new placer, refs
#892.
Improves the performance a bit, refs #5011.
Use the new placer on Kerala and Hyrcanian Shores to replace the
workaround from 903e094f62, refs #4855
(the area is not supposed to be parallel to the meandering river).
This was SVN commit r21082.
Removes the according duplication in placers and makes the loops over
these points onedimensional, refs #4805.
JSdoc for centric placers, refs #4831.
This was SVN commit r21080.
This used to build so the include of CStr.h disappeared from the include
chain at some point. PCH builds kept working because this file is
included in precompiled.h for the engine project.
Differential Revision: https://code.wildfiregames.com/D1273
Reviewed By: Imarok
This was SVN commit r21075.
Change the time to completion to a countdown and remove the tooltip on
the health bar.
Move the number of builders to the time speed-up tooltip.
Remove the build rate tooltip.
Differential Revision: https://code.wildfiregames.com/D572
Early review by: wraitii
Comments by: bb
This was SVN commit r21072.
ChainPlacer, ClumpPlacer, SimpleObject receive the vectors that are in
place everywhere already, refs #4845.
Add public setCenterPosition to CenteredPlacer and Group rather than
writing private properties of the prototypes.
ChainPlacer and ClumpPlacer simplifications, deduplication and renames,
refs #4805.
Replace placeObject global with RandomMap placeEntity members, refs
#4804.
Split to placeEntityPassable / placeEntityAnywhere, as well as
validTilePassable / validTileAnywhere to more cleanly distinguish actor
and casual entity placement.
No more does SimpleObject create Entity instances and register entityIDs
if they are never placed.
Removes the map global reference from the Entity constructor, refs
#4964.
By definition of what is passed to the engine, an Entity has an ID and
position, so keep it impossible to create Entities without IDs.
Implement randomPositionOnTile so that there aren't different
implementations thereof, including unintented ones as in
ardennes_forest.js in 2f7610160f.
On Caledonian Meadows, remove unused pathplacing code, to be superseded
by #4368.
On Schwarzwald, delete unused startLocations following b180ad3e5d.
On Latium, replace complicated duplicated hardcoded fish location
computation with a simple HeightConstraint, refs #4960.
This was SVN commit r21069.
Delete clPath there altogether because it's never written to, nor
terrain textures painted.
Replace other inclusionCount references with common avoidClasses
constraints.
Remove now unneeded undefined checks.
Make nomad units on Wild Lake avoid gaia camps.
This was SVN commit r21063.
TS_ASSERT_EQUALS_APPROX must not silently pass if epsilon wasn't given.
Sort Vector2D.rotate summands by component rather than saving one
character.
This was SVN commit r21062.
Those chinese were added at the time were terra magna could have been
part of the mod, I'm keeping a copy but they should probably be deleted.
This was SVN commit r21052.
Delete hence unneeded validClass, getTileClass, addToClass and
removeFromClass.
Use vectors for the TileClass add and remove function, refs #4992.
Use createArea call for addCivicCenterAreaToClass.
This was SVN commit r21025.
The AuraManager serialized the affects array of the aura JSON files,
while the Auras components create new affects arrays upon
deserialization.
So the AuraManager of rejoined clients failed to identify and remove the
according aura effects of units who received the aura effect before the
rejoin.
Fix it by not serializing the array but only the strings inside the
array.
It were preferable to rebuild the modification cache and remove the
serialization altogether, refs #3834.
f24523dc8f introduced the same OOS on rejoin, refs #3909, #4239, but it
wasn't noticed due to the revert in d7e51f2a4f.
Differential Revision: https://code.wildfiregames.com/D1201
Reviewed By: bb
Comments By: gameboy
Fixes#4924
This was SVN commit r21014.
Reviewed by : Stan
Add a new mastiff dog version without spikes (the collar is part of the
mesh so I can't remove it completely)
Tweak the templates to be more like the wolves, hence inheriting the
roaming stuff
This was SVN commit r21013.
Don't clone, change and overwrite the gaul stone wallstyle but create
two custom ones from scratch, refs 026dcf10eb / D204.
Move houses away from the gates following ddf868cfdc, so that gaia units
can easily move in and out.
Replace spike template name copies from ddf868cfdc with references.
Try to find a more transparent data structure, at least for the spikes.
Some whitespace changes.
This was SVN commit r21007.
The reference to the global should not be hidden behind a proxy function
and
object orientation is preferable over procedural code in general.
This was SVN commit r20996.
Simplify duplicate Caledonian Meadows and Wild Lake height-based texture
painting by using for-of loops, texture setter and vectors, refs #4845,
#4998.
Allow setTexture to write to impassable tiles as reported by FeXoR some
time ago, refs #4245.
This was SVN commit r20988.
Create the vectors sooner, so that the conditions can use them
eventually too and since the loops might be replaced with vector
getters.
Fix missing comma in Deep Forest de2f30c7b9.
No measurable performance decline was noticed.
This was SVN commit r20977.
On India,
remove another mysterious lake size area factor on India, refs #4958,
increase the lakesize on small maps and
simplify constraints.
This was SVN commit r20973.
It is ineffective because the first action of createAreas is to
overwrite the carefully chosen location with a random location.
The code was evidently copied to Island Stronghold, Polar Sea and
African Plains, refs #4805.
This was SVN commit r20972.
Support non-integer values and remove some unneeded floor / rounds.
Use more vector math in Caledonian Meadows, Oasis and Wild Lake, refs
#4845.
This was SVN commit r20971.
Every PathPlacer constructor already has the two vectors in place, refs
#4845.
The code becomes shorter (operations not copied once per dimension) and
more readable (normalize, perpendicular).
Performance can improve even.
This was SVN commit r20970.
It unintentionally used the dist variable of the inner loop, not the
dist variable reflecting the path length.
It was never noticeable since the few PathPlacers called with
Constraints either had failCount 0 or
exceeded the allowed failures by a factor of thousands.
All PathPlacer calls were intended to succeed or fail completely.
Hence set the default failFraction to 0.
This was SVN commit r20969.
Since the component initialization order is the alphabetic filename
order and
since the RangeOverlayRenderer < Player < Selectable, the new file in
that commit introduced the issue.
Similar to 36b315ca32, refs #4632.
UpdateColor function taken from temple's D754
This was SVN commit r20963.
Patch By: fpre / ffffffff
Fixes#4987, refs #4254
This allows the replay menu and lobby to focus the selected element if,
but only if it is expected by the user.
Replaces 3f5648767d which scrolled the selected player into view every
single time a new playerlist was received by the lobby server.
This was SVN commit r20958.
The commit had removed the fallback color as there is no traceable use
case.
Copy the Player color from the old to the new player entity in
ReplacePlayer before the ownership changes occur, so that it is always
initialized before read.
Refs 9329506e0d
Reported By: temple
This was SVN commit r20951.
Use the distance to the nearest point on the dropsite's obstruction
rather than the center of the dropsite.
Differential Revision: https://code.wildfiregames.com/D1160
Reviewed by: wraitii
Comments by: bb, elexis
Fixes: #4592
This was SVN commit r20950.
Nuke the more options window
Create 3 tabs containing all options from more options and map options,
giving more space for new options
Rename options => settings in gamesetup
Reviewed By: elexis
Comments By: ffffffff and gentz
Differential Revision: https://code.wildfiregames.com/D1027
This was SVN commit r20945.
Use vector algebra and remove duplication, refs #4845, #4805.
Unify the first createTerrain call with InitMap.
Move mountain constants and the information which height receives which
texture to the top.
This was SVN commit r20914.
The gamesetup will never be able to do something useful with it,
especially change it as an option, so it shouldn't be in the JSON file.
Fixes#4973.
This was SVN commit r20912.
Areas proportional to the map radius are easier to comprehend than areas
proportional to the square with the map diameter for sides.
This was SVN commit r20905.
The height is only a concern to the random map script, not the rmgen
library, nor the gamesetup, nor the simulation.
Reveals the actual initial elevation to the random map script author
without looking up the JSON file.
Group and rename all height constants of random maps below the template
names.
Rename waterHeight to heightSeaGround to prevent confusion with the
actual waterlevel.
Remove useless paintTerrainBasedOnHeight calls on African Plains and
Polar Sea.
This was SVN commit r20904.
Lets the random map script decide which baseTerrain and baseHeight it
wants to use before initializing the map,
rather than painting what is in the JSON file, then changing ones mind
and painting something else on top of it.
This cleaner heightmap initialization incidentally addresses the
uninitialized border of the heightmap in that commit (excluding the
Unknown).
This was SVN commit r20900.
Summary: Improve binary security by enabling a hardening linker flag.
Test Plan:
Patch already used on Debian.
Tested locally by @Gallaecio as well.
Reviewed By: LudovicRousseau
Trac Tickets: #4894
Differential Revision: https://code.wildfiregames.com/D1123
This was SVN commit r20896.
Use it to replace the hacky resetTerrain rmgen2 function from 6d52a71d4a
and initHeight from 280a797620.
Highlights that createArea is the primary tool of rmgen, rather than
nested for-loops over the mapsize.
Neglect that the heightmap grid is one tile larger than the tilemap grid
for now.
This was SVN commit r20894.
Since it is the only map with stronghold placement where the mines are
placed facing away from the team center, this code should be moved to a
library eventually, refs #3851.
This was SVN commit r20891.
This way random map scripts can do vector math and pass the result to
library functions that do further vector math on them and leave shorter
code, refs #4845.
Pass tilegrid coordinates rather than percent numbers to the playerbase
functions too, refs #4939.
Some more mapCenter calls, refs #4854.
This was SVN commit r20882.
This allows creation of paths that are not linear nor sine-shaped like
the PathPlacer, refs #892.
To mimic the per-tile path elevation randomization on Deep Forest, use a
SmoothElevationPainter and it's randomization argument from 77f28c5a56.
Use vector algebra and the mapCenter getter, refs #4845, #4854.
This was SVN commit r20879.
Summary:
{F316877}
Often we'll have a large group of units that we want to move to a new
location, but if we do that by having them building a dropsite, then if
the building's finished before everyone gets there, units still en route
will start gathering near their current position instead of near the new
location.
Test Plan: Agree.
Reviewers: wraitii
Reviewed By: wraitii
Subscribers: wraitii, Vulcan
Differential Revision: https://code.wildfiregames.com/D1162
This was SVN commit r20876.
Pass vectors, refs #4845.
Pass tile sizes rather than percent numbers of the map, refs #4939.
Replace some water- and land-functions with more common
createArea+RectPlacer and paintTerrainBasedOnHeight calls.
Implement getMapBounds to make references easier to read, refs #4854
(and thus less error-prone, refs db9a52b94a).
Move height constants to the top of the files.
Fix Aegean Sea, English Channel and Danubius fadeWidth off by factor of
2 in 7d0cc59136.
Fix forgotton clWater in unknown_common of c74bd3425f and move that
createUnknownObjects call to common.
This was SVN commit r20871.
Move some capes to more explicit names of their functions
Correct some inversions inside the inheritance
Fix capes for chariots and elephants, it wouldn't work because the death
variants were not specified,
and instead of keeping the order like Parent : None Child 1 : Death 1
Child1Prop : Death1 it would randomly
select the animations hereby breaking the chain, and therefore the anim.
Differential Revision: https://code.wildfiregames.com/D1213
Patch By : s0600204
Completition by : Stan
Reviewed by : Stan
This was SVN commit r20870.
The abs caused a compiler error in that environment, because wchar_t is
unsigned on armhf, subtracting signed from unsigned results in unsigned
and std::abs does not define an unsigned variant.
Differential Revision: https://code.wildfiregames.com/D1122
Patch By: Peter Michael Green
Uploaded By: Ludovic
This was SVN commit r20869.
Fine-tune random map scripts if nomad mode is enabled by omitting gaia
attackers and vast voids.
Fix nomad units on the Unknown sometimes being stuck on mountains or
tiny islands, refs #3140.
Discussed with: bb
This was SVN commit r20866.
Should resolve current concern raised with 7aae697bc5.
(Until something better is done wrt default args and/or not having them,
or whatever.)
Refs D900, 7aae697bc5, #2944
This was SVN commit r20865.
Fix collisions of mines with trees and berries on Schwarzwald.
It can't achieve anything that a createArea or createObjectGroups call
with a HeightConstraint (6278f75a1f) or HeightPlacer (49194819f6,
24f02d97eb) can't achieve too,
while it can't perform many crucial tasks like testing for arbitrary
Constraints, using custom shapes determined by a Placer or limiting the
amount of entities,
thus the unconventional code is redundant, refs #4805, #3764.
This was SVN commit r20864.
Have some workarounds to mark tileclasses get rekt by this Placer.
Fix Hyrcanian Shores clHighlands class being painted on the entire
landarea rather than only the bottom 25% following 7d0cc59136.
This was SVN commit r20863.
Use a separate tileclass for the oasis.
Use the mapCenter getter, refs #4854 and move important height and
radius constants to the top.
This was SVN commit r20859.
Use constants instead of convoluting magic numbers
Use vector algebra and distributePointsOnCircle to determine the
locations of animals in the oasis, refs #4845.
This was SVN commit r20858.
i.e. tileclasses that are never painted, thus always avoided.
Equally remove some checks for tileclasses before they are painted and
placement code that always failed on Flood.
This was SVN commit r20854.
The mechanism should work for all random map script log entries, if the
timestamps are not added to the CLogger directly, refs #4950.
This was SVN commit r20853.
Fix heroes and pikemen attacking when on elephants
They will only display the capturing and death animations
Fix various indent issues.
This was SVN commit r20850.
Also move the textures to a new folder as they are not helmets
and remove some of the duplication by creating variants.
Reviewed by: Stan
Tweaks by: Stan
Advices by: Sundiata
This was SVN commit r20849.
Adding/removing distanceLess/heardBy/omnipresent tags to/from the
actors.
Not adding missing sounds (lots of animals miss sounds), not renaming
files to something consistent, not making the files itself consistent.
Patch By: temple
Differential Revision: https://code.wildfiregames.com/D944
This was SVN commit r20842.
Slightly tweaked alpha by me,
Source files,
Update the credits.json using the files provided in the license
and the respective WikiCommons accounts of the people, for legal
issues.
Add leyto to the credits.
This was SVN commit r20840.
Was partially fixed by 2d0e996725 but never disclosed.
Fixes#2292
Move the helmet to the new helmets folder,
Update the actors using this, apparently none used the other two
variants.
This was SVN commit r20839.
Update Theatron and Stonehenge foundations making them with more props
Make Stonehenge foundation slightly bigger allowing one to select it
without having to place the cursor in the middle.
This was SVN commit r20836.
Use the hele_flag for the hele_siege_tower, as it's now used only by
macedonians
and they do not have their own.
Update the template to use the new actor
This was SVN commit r20835.
It will be easier for modders to find them and make templates for those
if they want.
Add the other textures that now exist, fix the actors, reindent them,
add svn eol properties.
This was SVN commit r20833.
Unifies 54 variants of the rmgen playerbase code, fixes#4805.
Add retry loops to prevent collisions of starting resources, fixes#4600
and
resources placed outside of the map area, fixes#4796.
Lays the foundation to test for collisions with Iberian walls, refs
#2192 and
allows to rearrange the starting resources on all random maps without
being confronted with code.
Delete remains of misc.js, leaving the rmgen files sorted by logic,
fixes#4804.
Concludes what was started in 5f1736cbd4, f98100bdaf, specifically the
82 rmgen commits starting f2550705d3, 376d8b3d1e.
Uses vector algebra, refs #4845.
Removes many Math proxy calls, refs #4933.
Removes 35 unused elevation and 24 unused cliffRadius variables,
demonstrating the copy&paste antipattern.
Reduce iberian-wall hardcoding to one line, refs #4940.
This was SVN commit r20815.
Summary: I have replaced Unicode ellipsis characters in files of the
maps/ folder of the public mod by ASCII characters (periods and commas).
Test Plan: I have successfully generated a random map on Atlas from the
Unknown map template on x86_64 Linux.
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D1210
This was SVN commit r20809.
Describe the algorithm using graph theory vocabulary.
Split code into small functions, making it easier to digest and remove
duplication, refs #4805.
Use a prototype to avoid any possible naming conflicts.
Add helper variables to reduce array lookup nesting.
Remove non-functional unneeded max-distance check, refs c438a1eb82.
Use mapCenter getter, refs #4854.
This was SVN commit r20788.
This makes it consistent (all stacked pages are dialogs) and
the player is kept aware of the game being still active in the
background for the time the page is open.
Differential Revision: https://code.wildfiregames.com/D1058
Patch By: fpre / ffffffff
This was SVN commit r20782.
Place shallows at every tributary river rather than leaving out the last
35 percent of the mapsize.
Use vector algebra to do the horizontal/vertical rotation, refs #4845.
This was SVN commit r20780.
Remove hardcoded default batch training size and GUI row count hint
(which could have become invalidated too easily).
Differential Revision: https://code.wildfiregames.com/D1199
Reviewed By: mimo
This was SVN commit r20778.
Use vector algebra to simplify it and the according maps, refs #4845.
Remove stepSize parameter as long as the non-interpolated heightmap grid
is tested.
This was SVN commit r20775.
Change the material to use parallax were possible.
Add an empty normal texture 2x2 to allow other helmets to have theirs.
Use fully inheritance, only repeating frequency and names where needed
as they
are also inherited.
This was SVN commit r20757.
Load technologies through the globalscript from D1108 / c90d72deb5
rather than querying the simulation for that.
Same can be done for auras afterwards.
This was SVN commit r20756.
Music by Omri Lahav.
Coded with oggenc -q -2 (32kbps) using aoTuV Beta6.03 from the wav in
[[SVN:19890]].
Fixes: #4677
Differential Revision: https://code.wildfiregames.com/D1097
This was SVN commit r20751.
(Instead of non-phase techs which is what it was using up to now.)
Reviewed/accepted by: mimo
Changes agreed (but not tested/formally proven) by: elexis
Differential Revision: https://code.wildfiregames.com/D1181
This was SVN commit r20749.
and fix a bug due to inheritance that would make them appear more than
they should
because the frequency tag was not correctly overrode by the files using
them as they
were before and not after the variant file.
Patch by wowgetoffyourcellphone
Discussion here
:https://wildfiregames.com/forum/index.php?/topic/21546-enhancement-macedonian-helmets/&page=3
This was SVN commit r20743.
Removes the serialization of JSON files, shrinking savegame files and
rejoin states sent across the network, refs #3834, #4239, #3909,
f24523dc8f.
Removes the AI C++ code to read JSON files from e33d4a52e9 since the AI
can now use the globalscript.
Allows the AI to read Aura templates and removal of GUIInterface code to
improve performance.
Serialization of the JSON objects in other simulation components was
removed in 9c0e37f2c0 / D1109, a6f14f5631 / D1130.
Serialization removal planned by sanderd17
AI part proofread by mimo
Simulation part proofread by bb
Discussed with Itms on irc
Differential Revision: https://code.wildfiregames.com/D1108
This was SVN commit r20737.
Use vector algebra instead of adding one equation for each dimension
everywhere, refs #4845.
Add common createPassage terrain helper function to unify
straightPassageMaker and the modified copy PassMaker, refs #4805.
On Corsica vs Sardinia:
Comfort island shaping by
not hardcoding and not hiding magic numbers behind magic equations,
not specifying areas and deriving the radius from the disk area,
but always refer to newly introduced radius globals and compute the area
using diskArea from 1a896f531a.
Don't give some players 10% more map area and place all circular island
parts at the same center location in the map corner.
Don't place trees and mines into passages.
Simplify and order numbers, increase fail fractions from 4 to 10.
Use mapCenter getter from refs #4854.
This was SVN commit r20732.
Adapt the cataphract helmet to the new heads and move its position to
the helmet prop point
Move it to the new helmet folder
This was SVN commit r20730.
It is unneeded because we won't add backwards compatibility for previous
formats and
because the engine version check from 94302a4149 is sufficient and more
accurate in testing compatibility of savegames of different releases.
The simpler code allows unifying the savegame version check with the
check used by the replay menu (to be used in multiplayer gamesetups).
Differential Revision: https://code.wildfiregames.com/D1131
Reviewed By: wraitii
Agreed with: Imarok
Discussed with: Philip
This was SVN commit r20729.
This addresses the Simulation2 warning about a gamesetup mechanism not
having decided explicitly about the RNG.
Differential Revision: https://code.wildfiregames.com/D1187
Reviewed By: mimo
Refs #4917, 7e05d7edc9 / D1178
This was SVN commit r20726.
For instance useful when working with location vectors on arrays, such
as terrain generation in random map scripts, refs #4845.
This was SVN commit r20723.
Improve some of the comments mentioned by fatherbushido in b3dbcc457b.
Rename avg to average and test it.
Inline constructor defaults.
Don't use array functions nor for...of loops here to maximize the
performance, refs c751500907.
This was SVN commit r20706.
Remove ocean duplication on Pyrenean Sierra, fix sign of the removed
lololo variable and simplify the player angle equation, refs #4805,
a796800bb1.
Use mapCenter getter from #4854 on Gulf Of Bothnia, Pyrenean Sierra and
the Unknown gulf variant.
This was SVN commit r20703.
which cannot be fixed without hacks such as models with only props and a
small triangle
Move all the modified helmets to their new folder, so it's easier to
look for them in atlas
Add a new tin texture with and without laurels to fit the new uvmap Move
the boeotian helmet
from the head prop point to the helmet prop point based on a patch
from WowGetOffYourCellPhone
Make the boeotian helmet more modular using props so variants are easier
to make for modders,
nuke the remaining models.
This was SVN commit r20702.
This avoids the caller having to duplicate the GUI tag format over and
over again (equal to 54904b1750),
detects syntax errors at compile time and
applies the separation-of-concerns pattern (callers only have to specify
the tag value agnosticly of the tag format).
Differential Revision: https://code.wildfiregames.com/D1167
Patch By: fpre / ffffffff
Comments By: bb
Refs e1b13dead9
This was SVN commit r20697.
gpuskinning was set to true in the game options. That experimental
features apparently requires that all meshes vertices be weighted
else it stretches it badly.
Add the fixed blendfile.
This was SVN commit r20696.
Add global filelisting helper.
Remove getXMLFileList and getJSONFileList from the unsorted
gui/common/functions_utility.js.
Make hidden maps prefix more transparent.
Remove hardcoded magic numbers that are string lengths.
Shorten loading screen code and separate pathnames from code.
Differential Revision: https://code.wildfiregames.com/D1107
Reviewed By: bb
This was SVN commit r20692.
Macemans and swordsman are different, and more civs than just maur might
get them (maybe in mods), so a parent template for them is good to have.
Updating the tech so it keeps affecting the same (but notice it doesn't
do anything with macemans).
Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D1036
This was SVN commit r20682.
Use correct names (e.g. cart)
Specify civs when possible, also instead of culture
Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D985
This was SVN commit r20677.
This will enable us in the future to have technologies that change
projectiles.
This is also somewhat of a refactoring.
Patch By: Mate-86
Reviewed By: wraitii
Trac Tickets: #1909
Differential Revision: https://code.wildfiregames.com/D945
This was SVN commit r20676.
Original patch from Sandarac, reworked by elexis and finalized by mimo
Discussed with elexis
Differential Revision: https://code.wildfiregames.com/D1159
This was SVN commit r20671.
Animations by AlexanderMB
Textures by myself + some fixes to the armature not to break when
exporting from the blend
Remove old texture and mesh.
This was SVN commit r20666.
Do not check for system components,
Do not inline in loops for performance
Use QueryPlayerIDInterface instead of querying the playerEnt
Patch By: temple
Differential Revision: https://code.wildfiregames.com/D1137
This was SVN commit r20652.
Save the latest page and graph in the summary screen
Implement a hotkey to open and close the summary screen for the
replaymenu and ingame.
Patch By: ffffffff
Comments By: elexis
Differential Revision: https://code.wildfiregames.com/D810
This was SVN commit r20644.
Spotted By: s0600402
Noticed in review by fatherbushido, but didn't came into patch by
Grugnas, and later forgotten to yell about again by bb when accepting.
This was SVN commit r20643.
The mod "name" may only consist of alphanumeric characters, underscore
and dash, because it should be used for mod dependency checks.
Drop two special characters from the "version" property.
Differential Revision: https://code.wildfiregames.com/D1093
Res #4427, d3ce5289b6
Reviewed By: Itms
This was SVN commit r20637.
Remove ACCEPT_DIAGONAL_GAPS as it was unused and will not be used in the
future.
Use PASSABLE macro everywhere.
Simplify considerable OnTheWay as MakeGoalReachable returns a point
goal.
This doubles as a very slight optimisation, on the order of microseconds
per call.
Reviewed By: temple
Differential Revision: https://code.wildfiregames.com/D80
This was SVN commit r20634.
Properly fix the current issues with pre-build commands, improve the
documentation of known issues and re-design the module so it is easy to
extend it into a fully-fledged CxxTest module supporting all features of
the tool.
Reviewed By: wraitii
Tested By: elexis, bb, Imarok
Differential Revision: https://code.wildfiregames.com/D1092
This was SVN commit r20633.
By refactoring unitAI slightly, we can easily improve our support for
running/walking/idle animations.
Other gatherer entities (and other entities with custom walking
animations for certain variants) will need to be updated individually at
a later point to support this feature.
Reviewed By: bb, fatherbushido (a while ago)
Differential Revision: https://code.wildfiregames.com/D311
This was SVN commit r20631.
By adding a custom function in Grid, the code gets vectorised on both
gcc and clang, resulting in much faster code and faster update times,
sometimes substantially (on giant maps or when few chunks must be
updated).
Reviewed By: mimo
Differential Revision: https://code.wildfiregames.com/D73
This was SVN commit r20630.
Removes data.playerEnt and data.cmpPlayerManager.
Patch By: temple
Differential Revision: https://code.wildfiregames.com/D1138
This was SVN commit r20629.
Move default Heal range visualization texture properties to the template
and only display Heal ranges if the template was given.
Differential Revision: https://code.wildfiregames.com/D1128
Refs #3915, #4349, D238, D432, D568
This was SVN commit r20624.
This also allows non-selectable entities like building previews to cast
range visualizations.
Patch By: Sandarac
Differential Revision: https://code.wildfiregames.com/D555
Refs #3915, #4349, ee5bb1fd61 / D238.
Comments By: Vladislav
This was SVN commit r20622.
This abstraction allows calling that code again from other simulation
components, like the RangeOverlayRenderer in D555.
Differential Revision: https://code.wildfiregames.com/D1139
Refs #3915, D555
Comments By: Vladislav, echotangoecho
This was SVN commit r20621.
fb65288463 mimicked the sprite_over button functionality which exists as
a proper property since 5cc814759f.
0e48b7df75 mimicked the sprite_disable and enabled button functionality.
The button now shows the proper highlight sprite if the button became
enabled without one of the prior mouseover events being sent.
Removes duplicate hardcoded filenames and unneeded globals, functions
and conditions.
Refs #2414, #3736
Differential Revision:
Patch By: temple
This was SVN commit r20601.
Removes the workaround copy of the resources JSON each turn in
GetSimulationState.
Refs #3934, #4868
Differential Revision: https://code.wildfiregames.com/D1119
Reviewed By: mimo
This was SVN commit r20600.
Removes the workaround and limitations of globalscripts Resources
(52f311da2b) and loadCivFiles (89055ef858), allowing them to actually
become actually global.
Rename to ListDirectoryFiles as proposed by wraitii.
Differential Revision: https://code.wildfiregames.com/D1103
Reviewed By: s0600204
Proofread by: echotangoecho
Comments by: wraitii
Relevant discussions with leper in #4868, D1062
This was SVN commit r20586.
This way globalscripts/ can use the same code in all contexts, all paths
are absolute and only one function name is needed.
Remove ReadCivJSONFile which is redundant with this function as well.
Restrict read access of rmgen/ to rmgen/ and simulation/, refs
4275a8a33c, 89055ef858.
Refs #4868
Differential Revision: https://code.wildfiregames.com/D1085
Reviewed By: wraitii
Partial agreement with leper
This was SVN commit r20576.
Such a property should be well defined, but currently it contains
arbitrary text and is redundant with the description.
Differential Revision: https://code.wildfiregames.com/D1082
Refs #4890
Discussed with: leper
Reviewed By: wraitii
This was SVN commit r20575.
Complete documentation and validation of loaded mods proposed in D1093.
Differential Revision: https://code.wildfiregames.com/D1081
Reviewed By: wraitii, Itms
This was SVN commit r20574.
Optimizing the memory footprint requires likely different functions
following the new SM versions and a lot of testing,
so having these doesn't lower the effort to achieve optimization while
confusing the reader.
Differential Revision: https://code.wildfiregames.com/D1073
Reviewed By: Yves
This was SVN commit r20572.
This makes rallypoint flags nicer and is generally more efficient for
unitAI too.
The behaviour falls back to gathering near position for any entity with
a "speed" component, which is set by GuiInterface depending on having
UnitMotion. This thus assumes entities without UnitMotion do not move.
However, Gather falls back to gather near position in case of failure,
so it ought to be fine in general.
Reviewed By: wraitii
Patch By: temple
Differential Revision: https://code.wildfiregames.com/D1014
This was SVN commit r20571.
This change ahead of D965, where fauna become silhouette casters, and
several fauna animals are transparent models.
Reviewed By: wraitii
Patch By: temple
This was SVN commit r20569.
The filter command does only filter out premake commands, and does not
act on Lua instructions like this one. Some code refactoring would be
needed in order to take advantage of the powerful filter syntax.
Refs #3439.
This was SVN commit r20563.
This change drops MBCS encoding (which was the default for premake4)
except in the Collada project which is entirely written assuming MBCS.
Tested By: wraitii
Differential Revision: https://code.wildfiregames.com/D1069
This was SVN commit r20561.
This fixes an issue where tests wouldn't build without precompiled
headers.
Tested By: leper
Differential Revision: https://code.wildfiregames.com/D1068
This was SVN commit r20560.
Refactor functions and unify sort dropdown choices.
Move colors to globals so that they are easily modifiable, even from
external files, refs fd034c9bcd / D911.
Fix broken "Dependency not met" translation and wrong equal comparison
operator description (== vs =), refs 64bfa089af.
Use localeCompare, simpler loops and array functions, JSdoc syntax,
ternaries, deepfreeze, let keyword and prefix increment operator.
Renames to increase descriptiveness and consistency.
Remove duplication, tautologic and unsatisfiable conditions, dead code,
unused variables and GUI object names, example within example,
unneeded variables, parentheses, TODOs, strict checks and keep XML
element, misleading linebreaks, pointless comments and "Mods Loaded"
string and the switch fall-through.
This was SVN commit r20552.
This throws reference errors at JS compile time when attempting to
translate strings in the simulation.
Differential Revision: https://code.wildfiregames.com/D1075
Refs D619
Reviewed By: bb
This was SVN commit r20549.
First fill all global helper variables before pushing the data to the
GUI (IPO model).
init should always be the first function declaration in a file.
Split and rename init functions.
Fill g_ScorePanelsData from init so that it becomes independent from the
file include order.
Include all files of the summary directory instead of each file
individually, as in D619.
This was SVN commit r20538.
This allows mods to add new JS files without introducing a hardly
maintainable copy of the XML file.
Differential Revision: https://code.wildfiregames.com/D619
Proofread By: bb
This was SVN commit r20535.
A check for OSX version that seemed useless broke compilation on Xcode
9.
Reviewed By: Itms
Differential Revision: https://code.wildfiregames.com/D986
This was SVN commit r20530.
Unify civ file loading from gui/common/functions_civinfo.js and
rmgen/library.js in globalscripts/Templates.js.
Delete the two forgotton headers in 4275a8a33c.
Refs #4868, #4804, D900.
Differential Revision: https://code.wildfiregames.com/D1062
Discussed with: leper
This was SVN commit r20528.
Also fix confusion of playerID and playerEntityID in that test following
c14a7a0b0b.
Differential Revision: https://code.wildfiregames.com/D1067
Reviewed By: bb, Itms
Comments By: Stan
This was SVN commit r20527.
This fixes a bug with premake5 happening when using
--with-system-mozjs38.
Tested By: temple
Differential Revision: https://code.wildfiregames.com/D1028
This was SVN commit r20523.
The bug came from inlining the copy constructor of Grid, which ended up
reading from un-initialized variables.
Discussed with leper who had a similar fix for a test failure locally.
Fixes#4859
Differential Revision: https://code.wildfiregames.com/D1048
This was SVN commit r20520.
(Don't replace the starting base code of that map to a call to
placeStronghold because the code in this variant is the only one that
doesn't have resource collisions on tiny maps currently, refs #3851.)
This was SVN commit r20516.
The code intended to group players per team on a single island (even if
more than 4 players in one team).
But since it used sortAllPlayers playerIDs instead of onIsland, the
players were not actually grouped per team.
Drop the additional, slightly redundant complexity and just place at
most 4 players per side like the other naval maps do too.
If greater groups per side are wished, it can be changed later
consistently for all maps.
This was SVN commit r20515.
It was only triggered if a civ wasn't set in Atlas.
Because civs are expected to be well-defined everywhere, alwas set the
property in Atlas too, fixing the non-GUI part of #4869.
Use the existing player defaults value then instead of hardcoding a
fallback civ string.
This was SVN commit r20512.
Revert the introduction of the exact copies of FileExists ReadJSONFile
functions in MapGenerator.cpp introduced by 871ed04521.
Include JSInterface_VFS.cpp from MapGenerator.cpp to remove that code
while gaining the other missing VFS file loading functions in rmgen/.
Split RegisterScriptFunctions of JSInterface_VFS.cpp from eb4e66aab3
into RegisterReadOnlyScriptFunctions and RegisterWriteScriptFunctions to
prevent unintentional write access.
This was SVN commit r20507.
Fix resource collisions on that island.
Incrase the radius, not the area of the island proportionally to the map
radius.
Prevent the island from becoming passable without ships.
Use the non-deprecated createObjectGroups variant.
This was SVN commit r20503.
While at it also nuking some duplicate template entries
Patch By: temple
Differential Revision: https://code.wildfiregames.com/D1038
This was SVN commit r20498.
Use it to illustrate the building placement preview rotation and
focusing of attacked units.
Split from D1037
Patch By: temple
This was SVN commit r20496.
This allows replacing the common code with a library call in only one or
two hunks each.
On Archipelago move the random resources closer to the playerbase to
make the map more enjoyable.
Use default/skirmish templates for the docks on Islands/Migration and
the market on Polar Sea while at it.
Abort map generation if the dock placement failed.
Remove clForest dummy variable on Polar Sea following the removal of
references to map defined tileclasses in the library following
822e37f70c.
This was SVN commit r20476.
Stop listening to OnTrainingFinished and OnStructureBuild messages but
use OnOwnershipChanged messages. This fixes the defeat when only
promoted/upgrades/regi-hero units remain.
Add foundations to the conquest lists and make them visible on the
minimap.
Patch By: temple
Differential Revision: https://code.wildfiregames.com/D1022
This was SVN commit r20471.
Use the rotateAround function from eb96b61954, refs #4845.
Freely randomize the river angle on Corinthian Isthmus following
4256744e26 and eb96b61954, refs #4855.
This was SVN commit r20469.
Remove the rmgen rotateCoordinates helper function from 4256744e26 and
clean the implementation of that commit, refs #4845, #4804.
Deepfreeze mapCenter vector from 5256d8497e used here to prevent
accidental overwrites with the mutating Vector2D functions, refs #4854.
This was SVN commit r20468.
In the Edge Seas variant, fix a wrong horizontal/vertical negation and
the direction of the riversize randomization.
Fix the wrong river location translation in that variant in e596ef6011,
refs #4851.
Prevent resource collisions on Unknown maps by adding back the large
territory marking (after the small territory marking prior to the
terrain generation).
Slightly improve river painting performance by not generating the
meandering of the second shoreline if that is outside of the map
boundary.
This was SVN commit r20465.
Replace complicated starting unit code with a call to
placeStartingEntities equal to df14c914e6.
Use distributePointsOnCircle to remove sin/cos/distance computations.
Add map center getter for rmgen code, refs #4854.
This was SVN commit r20463.
Rename tower techs to tower_{tech}
Remove duplication in tower templates
Create tower parent, with sentry, stone and outpost as childs
Move all outpost as child of tower
Add a sentry tower default building
refs #4849
Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D914
This was SVN commit r20459.
Change wrong civs in ptol and sele walls
Let Persian trireme units depend on there land counterparts
Make the buildtime consistent with the land counterparts by decreasing
with 3
Nuke duplication for rome infantry champ
Patch By: temple
Differential Revision: https://code.wildfiregames.com/D1033
This was SVN commit r20451.
* Move selection_panels.js helper functions into a separate file
* Move unit_action helper functions from input.js into unit_actions.js
* Rearrange some functions, to better represent the execution flow
* Make batch training use `g_NumberOfBatches` instead of
`g_BatchTrainingCount` so remember the number of batches instead of the
number of units to train (needed for finishing P60)
* Simplify the batch training code a bit
* Also cleanup the moved functions a bit
Reviewed by: bb, Commented by elexis
Differential Revision: https://code.wildfiregames.com/D753
This was SVN commit r20447.
This new hotkey, by default assigned to alt, makes it so that only one
unit receives the order.
This can be used to easily order a group of units to build different
buildings at the same time, or attack different enemies.
It's intended to make the usual "select a unit, order, select another
unit, order" micro much faster.
Reviewed By: Imarok
Differential Revision: https://code.wildfiregames.com/D308
This was SVN commit r20441.
Remove retryPlacing args helperobject by making use of the hoisting
effect.
Remove the deprecation warning in retryPlacing and equally and the
unused behaveDeprecated argument from createAreas and
createAreasInAreas, refs #4294, a639050a41, D249.
Rename randomizePlacerCoordinates to randomizeCoordinates and placer to
group in the four createObjectGroups functions following 6052716a78,
because Groups aren't Placers (as established in f6c2ea6b0e), just share
the randomizable x/z properties.
Fix randomizeCoordinates on square maps offering entity locations
outside of the passable map area that are only rejected later in the
codeflow, missed first in ca0575e422, but also d30ee0292b and
3a1c5669f8, refs #4012, #4814.
Clarify randomizeCoordinates by passing a boolean stating whether to
include the impassable map border instead of a varying halfMapSize.
Remove the unused halfMapSize argument from the
randomizePlacerCoordinatesFromAreas call in createAreasInAreas.
This was SVN commit r20439.
Completes an existing TODO. This is a large speedup in some cases for
those test functions, particularly the "sunken ship lag" issue.
Patch By: temple
Reviewed By: elexis, mimo, bb, wraitii
Accepted By: bb, wraitii
Trac Tickets: #4713
Differential Revision: https://code.wildfiregames.com/D850
This was SVN commit r20438.
Create global constants for the elevation modes and make that Placer
more versatile by adding the mode argument.
Improves the performance of these functions by not repeating the mode,
createTerrain and getTileClass lookups every tile.
Move the functions to library.js, refs #4804.
This was SVN commit r20437.
Refer to the normalized river vector instead of the river vector divided
by the length of the river.
Rename mag to magnitude.
This was SVN commit r20435.
and so making that function much more general by using MatchesClassList.
Some suggestion and checking by leper
Patch By: temple
Differential Revision: https://code.wildfiregames.com/D1020
This was SVN commit r20432.
Reverse engineer and cleanup obfuscated Rivers map code, refs
a9b963c3a5.
Use vector algebra to replace magic equations and express geometric
intend.
Fix seed typo by removing river curve duplicate.
On the Rivers map, use areAllies directly instead of copying the
diplomacies to a 2D array called isRiver.
Use modulo operator instead of an if-statement with duplication to
determine the neighbor of the last player, refs 9272153ee7.
This was SVN commit r20429.
Refactor by moving from procedural programming to functional
programming.
Fix the horrendous shoreline performance bug on "Continent" of Unknown
as in 49721cff33 by dropping the historic differences between the maps.
Remove misleading player coordinate computation when generating the
terrain on Unknown Nomad, because the players are spawned elsewhere
then.
Remove names like md, mdd1 and mdd2 with different connotations in every
landscape type.
Remove six more paintRiver copies in the "Edge Seas" variant as in
7d0cc59136.
Remove createShoreJaggedness and createExtensionsOrIslands duplication
within this triplication.
Remove heightmap initialization octuplication by adding initHeight.
Remove horizontal/vertical duplication by using logical operators.
Remove Painters redundant with the paintTerrainBasedOnHeight calls,
pointless comments and cleanup createArea calls as in 376d8b3d1e.
Remove some forest helper duplication as in ac8f4f49fc.
Remove references to Math proxies and use the prototype functions
directly.
Remove whitespace issues.
Describe remaining calls with human-readable log messages.
Always spawn enough treasures for a CC (instead of sometimes only giving
enough for a dock), refs 5dd3cbb254.
Generate "Mainland" variant with the same probability as the other
landscape types.
Generate "Central Sea" variant on Unknown Land too by forcing an Isthmus
then.
Don't split players on Unknown Nomad on the "Rivers And Lake" variation,
because the resource imbalance is too drastic.
Consistently call markPlayerArea before terrain generation on non-Nomad
maps.
Differential Revision: https://code.wildfiregames.com/D252
This was SVN commit r20420.
Doesn't change the code besides abstracting distributePointsOnCircle and
attempting to improve the documentation, refs #4831.
This was SVN commit r20416.
Remove two duplicates of the starting entity placement code in the
Fortress map of 208e642089 and placeCivDefaultEntities of 9c3e94acfd by
just making the distance an argument, refs #4805.
Equally to the starting cavalry, don't spawn special units like dogs or
worker elephants on Fortress twice, but only the women and Infantry.
Consider the weird kwargs iberWalls argument of placeCivDefaultEntities
from 9c3e94acfd deprecated and just make the orientation a regular
optional argument.
Rename createStartingPlayerEntities to placeStartingEntities.
This was SVN commit r20415.
Differential Revision: https://code.wildfiregames.com/D1004
Patch By: temple
Remove any unneeded complexity to compute the button states.
The entity state of selected gates was changed, so fix the read-only
errors following 9cb0a60d73, refs #4257.
This was SVN commit r20412.
Rename passageMaker to createShallowsPassage to avoid confusion with
straightPassageMaker aka PassMaker from Corsica & Sardinia and Pyrenean
Sierra.
Remove TILE_CENTERED_HEIGHT_MAP operations in that function from
3c6bce057e that don't do anything.
Add infinite loop protection to getTIPIADBON.
Remove unneeded parentheses, braces, redundancy, whitespace issues, use
early return and merge consecutive if-statements with a logical or in
these functions.
This was SVN commit r20410.
cleaning up the createForests function.
Remove g_numStragglerTrees and clForest references from the rmgen
library.
Compute the number of forest- and straggler trees in a new function
instead of hiding it and obstructing the placement code.
Remove unused numMultiplier argument.
Replace duplication of these three functions with calls to them, refs
#4805.
Remove duplicate random biome JSON constants of the Islands, Migration
and Snowflake Searocks map.
There is significant partial createForests duplication that should be
unified eventually.
This was SVN commit r20406.
Maps should not be required to define all these globals and use them
with the connotation implied by these utilities.
Split utilityfunctions.js to gaia_entities.js and gaia_terrain.js to
make it more transparent what files contain, refs #4804.
Document these functions #4831.
Refactor stoneMine placing and use for...of loops.
Fix Extinct Volcano call.
Forest utilities will be handled separately.
This was SVN commit r20405.
Thereby fix the distance check of the SimpleObject, refs #4338, D189 and
remove the CELL_SIZE engine constant magic number, refs #4034.
Differential Revision: https://code.wildfiregames.com/D996
Thanks a lot to rapidelectron and temple who independently discovered
this!
This was SVN commit r20396.
Keep the Catmull-Rom spline comment as ambiguous as the definitions we
found.
Differential Revision: https://code.wildfiregames.com/D1003
Reviewed By: fatherbushido
This was SVN commit r20394.
Remove PointXZ class which is essentially a subset of Vector2D, refs
#4834, #4804.
Remove Point3D which is unused and the same as Vector3D without the math
features, refs #4805.
This was SVN commit r20388.
Remove placeTerrain, and createObjectGroup from Map, because that class
should only have getters and setters, refs #4804.
Unify it with the global functions of the same name.
Let Map.createArea only construct and register the Area object with the
Map, but do the place and painter logic in the global function.
This was SVN commit r20387.
Remove initTerrain from Map, because that class should only have getters
and setters, refs #4804.
Unify it with the global initTerrain function.
Remove some redundant calls to that.
This was SVN commit r20386.
Thereby unify the chordal Catmull-Rom spline interpolation of the
ClumpPlacer (C++ bd53b14f58, JS 0e0ed94926),
the copy of that in the PathPlacer (bc805bd357, refs #892) and
the centripetal Catmull-Rom spline of the bicubicInterpolation function
from 93aefe0787, refs #4218
and don't claim the latter to be a uniform Catmull-Rom spline.
Reviewed in part by fatherbushido, discussed in 93aefe0787.
This was SVN commit r20383.
Make pyrogenesis and tests depend on Collada, fixes#404.
This commit includes custom modules for CxxTest and pkg-config support
that can be improved upon in the future. It also includes all necessary
changes to the build scripts, but the new premake5 features are not
fully exploited yet.
With this change, premake5 becomes the default, but CI scripts on Unix
will continue using premake4 for a while, in order to avoid regressions.
Includes code by zsol.
Reviewed by: wraitii, leper
Differential Revision: https://code.wildfiregames.com/D72
This was SVN commit r20381.
Remove camera centering in that function because it contradicts the
modifiability of the camera global (besides being broken and only coming
into play if there are no player entities).
This was SVN commit r20370.
The removed values were in fact arbitrary GUI numbers no map script
should confuse with engine limits.
To not make it my words, quoting FeXoR from #4034:
"I agree removing MIN_MAP_SIZE and MAX_MAP_SIZE and make the parameters
of scaleByMapSize optional with the default being 128 to 512."
This was SVN commit r20368.
Add "melee", "ranged" etc. to the template tag name,
Allow and use specific sounds for slaughter,
Rearrange the templates a bit, and so add missing sounds.
Reviewed By: fatherbushido
Differential Revision: https://code.wildfiregames.com/D757
This was SVN commit r20367.
This new script and the associated configuration files lint our source
code (JS and C++). This will be extended in the future, refs #4833.
Reviewed By: Imarok
Differential Revision: https://code.wildfiregames.com/D213
This was SVN commit r20364.
Keep now unused, yet unalteredly useful paintHeightmap JS function
(until CMapReader::LoadRandomMap can load PMP files, refs #4816),
bicubicInterpolation and randomPlayerPlacementAt.
This was SVN commit r20362.
Document the difference between the two types of classes, refs #4831.
Move RectPlacer (as of 7d0cc59136 unreferenced but possibly useful)to
placer_noncentered.js and remove three redundant checks there.
This was SVN commit r20360.
Define what an Object is, refs #4831.
Remove RandomObject duplication from c02818ceea by just calling the
SimpleObject with a random template, refs #4805.
Remove the tautologous (!fail) check and replace needless multilevel
fail-check nesting with two && operators.
Move default parameters from the function body to the function header
and rename resultObjs to entities.
Throw errors instead of printing something if min > max.
This was SVN commit r20357.
Document what a Group is, refs #4831.
Remove duplicate place function by calling the SimpleGroup from the
RandomGroup, refs #4805.
Move the default parameters from the function body to the function
header, remove duplicate CELL_SIZE division, pointless comment and use
let instead of var.
This was SVN commit r20355.
It should have been added to the painters file instead of to the map if
a copy was acceptable.
Add the only simple capability it added (an unnoticeable random
elevation difference to each vertex) to the SmoothElevationPainter to
make it universally accessible.
That painter also had a bug, because it replaced the roughness with 5 if
0 was given.
This was SVN commit r20354.
Doesn't change the result perceptibly while removing otherwise
incomprehensible magic numbers from 61387e95b2.
The equations are so similar that one might expect that the averaging
was the intended algorithm.
This was SVN commit r20353.
(The spread operator is not faster in sm45 according to my test.)
Differential Revision: https://code.wildfiregames.com/D980
Refs 6590f301c2.
Not accepted by anyone.
This was SVN commit r20351.
Document the two classes, the new function and every step of their
execution, refs #4831.
Unify SmoothElevationPainter height computation duplication, remove
pointless comments, use array functions and the prefix increment
operator.
This was SVN commit r20350.
Remove two unneeded variables and reduce the performance by some
milliseconds by using for...of loops, the destructing assignment and
inlining the unified DX/DZ array.
Fix a wrong comment in the BorderTileClassConstraint of 86d3cdf2d5.
Differential Revision: https://code.wildfiregames.com/D984
Not accepted by anyone
This was SVN commit r20349.
Move the least complex rmgen painters (TileClassPainter,
TileClassPainter, MultiPainter, TerrainPainter) to the top of the
painters file, refs #4804.
Group the TerrainPainter with the LayeredPainter which both draw a
texture on the terrain contrary to the others.
Use for-of loops and remove unneeded variables.
(Diff split for auditability.)
This was SVN commit r20347.
It didn't add a benefit, hid a bug (see 0c9205e5b8), required the
inheriting classes to use terrainObjects, added confusing indirection
and none of the other classes (painters, placers, constraints) use that
inheritance.
Define what the Terrain classes do, refs #4831.
Rename treeType to templateName.
Remove unneeded round in the validT condition.
This was SVN commit r20338.
Start unifying the euclidian distance functions instead of adding yet
another helper function to the random map script library after this
diff.
Differential Revision: https://code.wildfiregames.com/D969
Math.square accepted by mimo
Includes changes proposed by bb, fatherbushido
This was SVN commit r20328.
The island generation code was copied once for
* the small mapsize and 2 players
* the small mapsize and 3 players
* the small mapsize and 4 players
* the small mapsize and more than 4 players
* the medium mapsize and up to 4 players
* the medium mapsize and more than 4 players
* the normal mapsize and up to 5 players
* the normal mapsize and up to 7 players
* the normal mapsize and 8 players
* the large mapsize and up to 5 players
* the large mapsize and more than 5 players
Within each of these copies there were three copies of the island
createArea+placer+painters call and
about 10 unreadable island connection setter copies.
Support mapgenerations with only one player.
Cleanup createAreas calls as in 376d8b3d1e and broken indentation.
Fix missing forests due to a missing parentheses in the forest count of
that commit.
This was SVN commit r20308.
The code for the other island was copied in a varying order with only
the values changed to 1 - x.
Unite the island, subisland, creeks, beaches, main relief, first
plateau, second plateau and passagess code under a single loop to
display the logical relation
instead of scattering many paragraphs and executing unrelated (starting
base) code in between.
Cleanup affected createArea calls as in 376d8b3d1e.
This was SVN commit r20306.
Just for the record (as all of that is going to be deleted soon), add
the missing variable declarations that were hoisted from an unrelated
loop prior to 45bb3d2a43.
This was SVN commit r20302.
Inline the placer, terrainPainter, elevationPainter, group and sizes
helper variables that are used only once.
Thus do not hoist variable declarations from unrelated scopes.
Remove few dozens of painters that are overpainted by the
paintBasedOnTerrainHeight call afterwards.
Remove 334 noisy misaligned code comments (// terrains // widths //
blend radius and // some variation).
Label the createArea calls so that the reader knows what they do.
Remove unbenefitial Math.PI/8 grass min/max angle limitation.
Use height variables for the SmoothElevationPainter calls so that levels
can be modified more easily.
Use Math prototype functions instead of the unfortunate rmgen proxies.
Does not touch starting base code, Unknown maps, Snowflake Searocks and
Corsica & Sardinia which need special treatment.
This was SVN commit r20301.
Unify clCorsica, clSardinia to clIsland and the duplicate resource
placement calls using that.
Move and simplify the logic determining which texture to paint depending
on height and slope to a function getCosricaSardiniaTerrain.
Inline the createTerrain to greatly increase readability while possibly
reducing performance slightly.
Fix whitespace of createObjectGroup calls.
This was SVN commit r20296.
The new math library file will contain five more math helpers used by
random maps, refs #4804.
These functions are agnostic of random map vocabulary, so could possibly
be moved to or unified with globalscripts.
Cleanup and label obscure createArea calls in this map, unify duplicate
magic numbers, refs #4805.
Remove three useless LayeredPainter calls that are overwritten by the
paintTerrainBasedOnHeight tShore and tWater calls afterwards.
This was SVN commit r20295.
Do not return a string in getRandomDeviation when we need a floating
point number.
Simplify the equation and do not round arbitrarily.
This was SVN commit r20285.
Let validT take the responsability to account for the actually valid
region of map tiles instead of each caller.
Fixes#4814, refs #4636, #4796
This was SVN commit r20283.
Delete the function altogether and create that simple array that is only
used in addForests just there.
Delete addForests calls from Ngorngoro that don't do anything.
This was SVN commit r20280.
Rename initBiome to initForestFloor, getTeams to getTeamsArray.
Unifying duplicate coordinate computation and inlining unneeded
createArea helper variables in Lions Den.
This was SVN commit r20278.
Extend the tests of rotate in 99494251a1 to reveal the bug.
Add non-static clone functions for vectors (as the static ones were
incorrectly removed in e95f4e9744).
Math.pow performance is investigated separately, refs P85.
Checks and balances by mimo, leper, FeXoR and fatherbushido
This was SVN commit r20272.
Remove unneeded waterheight init loop (with awkward 1 tile sized bump)
that is redundant with the SmoothElevationPainter above from Corinthian
Isthmus (since introduction in 33cb23afa5).
This was SVN commit r20264.
In compareLength, use Math.sign to replace a ternary + isNaN check.
In distanceToSquared, Use Math.pow(distance, 2) to avoid repetition of
the distance, inline its value to remove the then unneeded variables.
This was SVN commit r20263.
This removes FindAllPlaceableTemplates, replaces the few uses of it by
FindAllTemplates,
and makes that ignore all templates starting with special/ in addition
to those starting
with template_.
Now modders can use entirely different template organization schemes
(more folders, different
folders, etc) without having to edit a file that was never well
documented.
In conjunction with a few of the template moving patches preceding this
rubble/ and other/catafalque
are now placeable. The former now does not decay anymore and users that
want that should use the
decay| filter, the latter will be taken care of in #4762.
Return to making FindAllTemplates return all placeable templates again
(switch to unplaceable filter).
To reiterate the main point: Only templates starting with special/ or
template_ will not show up as
placeable in Atlas (or show up to code querying for all (placeable)
templates. If you want to add more
of those use one of these naming schemes (and possibly subfolders in
special/).
Reviewed By: fatherbushido
Differential Revision: https://code.wildfiregames.com/D935
This was SVN commit r20246.
Explicitly specify that the rubble placed on death is decaying.
This breaks quite a few mods, then again the fix is a simple sed
command.
Run within your mod root directory:
sed -i 's,>rubble/,>decay|rubble/,' `find simulation/templates -name
'*.xml'`
For fields you can just edit the few templates manually and specify
decay_60 instead.
Reviewed By: fatherbushido
Differential Revision: https://code.wildfiregames.com/D938
This was SVN commit r20244.
This should help with simplifying the (un)placeable filtering again.
Reviewed By: fatherbushido
Differential Revision: https://code.wildfiregames.com/D934
This was SVN commit r20242.
This should help with simplifying the (un)placeable filtering again.
Reviewed By: fatherbushido
Differential Revision: https://code.wildfiregames.com/D933
This was SVN commit r20241.
No more loot for ptol building
Equal territory influence for small houses
Patch By: temple
Differential Revision: https://code.wildfiregames.com/D723
This was SVN commit r20227.
Use correct rubbles and foundation actors also.
Patch By: temple
Differential Revision: https://code.wildfiregames.com/D728
This was SVN commit r20218.
Using the policy to add the largest sizes of the civ-specific structures
to the default_skirmish template, to prevent overlapping.
Reviewed By: fatherbushido, temple
Differential Revision: https://code.wildfiregames.com/D919
This was SVN commit r20214.
This should make adding new damage types a little easier, however such
an
extension would still need changes to the AI, and to all templates that
have Armour, Attack, or DeathDamage.
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D866
This was SVN commit r20203.
Make sizes match the actual building
Use correct foundation and rubble
Make clean use of the parent structure
Patch By: temple
Differential Revision: https://code.wildfiregames.com/D726
This was SVN commit r20202.
This allows for amphibious units (swimming animals, tanks, etc).
The specified depth is the distance from the water surface where the
unit will start to float. Should most likely be a little less than
the height of the actor.
Reviewed By: fatherbushido
Differential Revision: https://code.wildfiregames.com/D842
This was SVN commit r20196.
Useful for f.e. required techs and attack types
Reviewed By: leper
Differential Revision: https://code.wildfiregames.com/D869
This was SVN commit r20188.
Splits unrecognizably blended magic numbers and makes them available for
map editors.
Removes copied terms of copies of conditions of copied of functions,
unused variables, overwritten values, checks that are always true, dead
code from checks that are always false and
things like 9 pairs of unneeded parentheses in a single line that was
copied several times.
Remove the useless RectPlacer terrain painting call on Guadalquivir
River.
Make danubius river borders parallel and drop thetha/seed differences.
Use planar instead of slopy water ground level for Phoenician Levant.
Copied and obscured by
a9b963c3a5 Aegan Sea, Guadalquivir River, Hyrcanian Shores, Phoenician
Levan, Nile,
0d0bc32736 Unknown,
25682da568 Unknown Land,
7f8adcf8cb Unknown Nomad,
5ef6d1f92b English Channel,
5bea1e7b87 Kerala,
026dcf10eb Danubius.
This was SVN commit r20185.
special/ should not contain placeable templates. Now we can switch to a
blacklist
approach for placeable templates in Atlas. This should make it easier
for modders
to use a different folder structure than the public mod and having their
templates
show up in Atlas without having to modifiy templates.
Non-placeable templates should exist in only a few different locations
which are
unlikely to change often, and are relatively unlikely to be added
regularly by
modders.
Reviewed By: elexis; some disagreement with FeXoR and Stan on the naming
of the trigger points
Differential Revision: https://code.wildfiregames.com/D877
This was SVN commit r20181.
If something now deals damage with a damage type for which there is no
armor specified
it will deal full damage (assuming 0 armor). This cannot happen in the
game yet, but
might at some later point.
Reviewed By: bb
Differential Revision: https://code.wildfiregames.com/D865
This was SVN commit r20178.
It prevented the user from correcting NaN easily and typing numbers in
some edge cases like floating points numbers (refs D332).
Instead, display a red background if the user typed something invalid.
Agreed with Dariost in irc on 2017-09-05.
Remove unused wrong XML sprite as reported by bb in dd7f38e370 and
distinguish 0 min/max from undefined.
This was SVN commit r20176.
Add a warning if a Trigger script (like the one on Treasure Islands,
refs #4507) tries to marks a player as won who had already won or lost.
Merge a duplicate call in the Player component.
This was SVN commit r20156.
Display biomes in the objectives dialog and gamesetup map description
panel.
Complete the mod support of 871ed04521 by leaving the code
biome-agnostic.
Fix an oversight in unknown nomad in 2c5a6052ea.
Differential Revision: https://code.wildfiregames.com/D884
Strings By: Hannibal_Barca
This was SVN commit r20139.
Thus throw errors if a simulation test tries to alternate the template
instead of silently passing tests with wrong values (as happened tests
fixed by ff90bb8490).
Remove the two clones from simulation components that were only relevant
for that test.
Add test to test the test.
Differential Revision: https://code.wildfiregames.com/D871Fixes#4759
setup.js and setup_test.js Reviewed By: leper
This was SVN commit r20134.
Proposed library and directoryname agreed with FeXoR.
Make the rmgen/ biome agnostic by moving the biome constants in
createForests to the randombiome globals.
Don't pass a non-randombiome constant in gulf of bothnia to the
createForests function that expected a randombiome constant, refs
e17dd1ac12, accepted by Grugnas.
Remove unused trivial unrecommended randomizeBiome function,
make Biomes autocompletable in the gamesetup chat, refs D852.
This was SVN commit r20127.
Delete clone globalscripts function introduced by 9f47ed536d.
Rename the better supported deepcopy function to clone.
Delete unused Vector2D and Vector3D clone prototype functions that can
just use clone if needed.
Differential Revision: https://code.wildfiregames.com/D870
Reviewed By: leper
This was SVN commit r20125.
Don't use 3D coordinates since the map is flat.
Don't loop over all targets when there are enough targets in 200m
Wolves spawned at same spawnpoint can be treated as they have the same
position
some of it proposed and reviewed by elexis
Patch By: temple
Differential Revision: https://code.wildfiregames.com/D185
This was SVN commit r20123.
This allows for differently shaped flight curves for projectiles (e.g.
mortars, magical projectiles).
Reviewed By: fatherbushido
Differential Revision: https://code.wildfiregames.com/D864
This was SVN commit r20120.
This makes it easier to change who gets the resources (refs #4314).
Reviewed By: mimo
Differential Revision: https://code.wildfiregames.com/D872
This was SVN commit r20119.
Fix random biome gamesetup option and colorize the random item as
proposed by bb.
Remove duplicate biome getter in rmgen2.
Reviewed By: Grugnas
This was SVN commit r20118.
Fix numeric biome indices in unknown_land, unknown_nomad and
island_stronghold.
Differential Revision: https://code.wildfiregames.com/D873
Patch By: Grugnas
This was SVN commit r20117.
This fixes a broken use of a function, removes an unused parameter,
fixes the incorrect property name in the gui.
Reviewed By: fatherbushido
Differential Revision: https://code.wildfiregames.com/D868
This was SVN commit r20112.
When substituting missing map- or player-assignment-data, the original
player assignments object was assigned, thus unintentionally modified
when the assignments were modified.
Reviewed By: mimo
This was SVN commit r20109.
Removes a lot of JS and XML duplication, unneeded for-loops.
Display min/max in the tooltip for number inputs.
Increase the width for dropdowns and dynamically maximize the width of
the label.
Remember the selected tab when hotloading the page.
Differential Revision: https://code.wildfiregames.com/D805
Refs #3737
Graphical design agreed with: scythetwirler, mimo, Itms, fpre, Imarok,
bb, leper, brian, feneur, implodedok
Testing By: Vladislav, mimo
This was SVN commit r20101.
This reveals unintentional modifications to these objects which would
most often imply hidden bugs.
Differential Revision: https://code.wildfiregames.com/D829Fixes#4257
Refs #3647
This was SVN commit r20100.
Note that this does not fix the warnings in AtlasObjectXML, someone
interested
in fixing those should check whether using ICU would be a nicer
solution.
Reviewed By: echotangoecho
Differential Revision: https://code.wildfiregames.com/D740
This was SVN commit r20095.
Invert the dependencies property to remove one loop.
(Keep the dependencies property because recursive parsing would increase
the complexity.)
Maximize the option label width to remove a magic number.
Use a constant for the remaining magic number, as proposed by Vladislav
in D805.
Remove an unneeded dependency boolean type check.
This was SVN commit r20092.
Patch By: Vladislav
Refs #4225, D763
Also use SDL_Keycode instead of int, remove an outdated history lookup
comment and some other unneeded comments.
This was SVN commit r20074.
Unify renderer and common callback function.
Differential Revision: https://code.wildfiregames.com/D839
Reviewed By: bb
Agreed with Vladislav
This was SVN commit r20066.
Allow XmppClient to use arbitrary property names in GUIMessages.
Remove duplication by calling CreateGUIMessage when receiving chat
messages.
Inline PushGUINotification.
Use std::string in the GUIMessage because every data source is of that
type.
Apply the wstring_from_utf8 conversion to ensure correct display of less
common UTF characters instead in the GuiPollMessage method.
Add room subject change chat message.
Differential Revision: https://code.wildfiregames.com/D835
Refs #4482
Comments by fpre, Vladislav and leper
This was SVN commit r20064.
Remove unused SGUIBaseSettings and GUI comment.
Fix indentation of a macro, refs D794.
Differential Revision: https://code.wildfiregames.com/D838
Review by: leper.
Itms came up with the same patch for the SpiderMonkey 45 update
independently.
This was SVN commit r20062.
When launching Atlas from a higher directory the help.json isn't found.
Fixed by finding the absolute path.
Patch By: vladislavbelov
This was SVN commit r20059.
Remove a TODO from 9f796068f8 (message boxes should never be closed
automatically because they require a user decision).
Differential Revision: https://code.wildfiregames.com/D830
Refs #3304
This was SVN commit r20055.
Don't clone and parse the civ requirement of every queried technology
each turn.
Saves 1ms per turn when selecting multiple buildings on my computer.
Make civ argument of GetTechnologyData mandatory, refs 6c97d8118b /
#3993.
Differential Revision: https://code.wildfiregames.com/D827
Agreed with: mimo, s0600204
This was SVN commit r20048.
Mark global consts as variable if mods can legitimately modify them.
Keep global objects const if mods should insert their modifications at a
different place, refs D829.
Mark the few consts inside function scope as let or var for consistency.
Don't touch the AI, simulation test and rmgen folder.
Change some var to let.
Remove an unused variable in the mainmenu and summary screen.
Inline few variables.
This was SVN commit r20047.
Don't write the helper variable producingEnt to the entity state when
showing the tooltip of production queue items.
Refs D829
This was SVN commit r20044.
Mark g_CivData as const and don't use optional arguments at loadCivData.
Translate the infinity symbol in the summary screen.
Refs D829
Reviewed By: s0600204
This was SVN commit r20043.
so that the object has the same content throughout the entire GUI and
can be marked read-only.
Refs D829
Reviewed by: s0600204
This was SVN commit r20042.
The affected function was imprecise, because it called a playerlist
update whenever a "chat" level message was received instead
of only updating the playerlist if it's actually influencing the
displayed playerlist.
When there is a chat message, lobby subject change or user-role change,
there is no need to update the list.
Differential Revision: https://code.wildfiregames.com/D671
Refs #3386, 8b437a0b1c
Reviewed By: fpre / ffffffff
This was SVN commit r20040.
This fixes an assertion failure in ScriptEngine that can occur when
closing
the game while in the loading screen.
Reviewed By: vladislavbelov, leper
Differential Revision: https://code.wildfiregames.com/D684
This was SVN commit r20035.
Update the string as assumed by Imarok in D715.
Differential Revision: https://code.wildfiregames.com/D788
Discussed with Vladislav in D770
This was SVN commit r20012.
Display a message box for these as proposed by scythetwirler. Add a
comment explaining the origin of messages without "from" property, so
that commits like 39fcd1d031 don't remove that check unknowingly.
Document that We intend to not support private messages between users,
refs #3865, P61.
Fixes#4688.
Document that we currently don't intend to support private messages
between users, refs #3865, P61.
This was SVN commit r20005.
Expect that future tab pages reuse these themes.
Fix the selected tab button style of the credits page.
The last line of the former ForegroundBox overwrote the previous three
lines, which made the button appear with white text on light-golden
background.
Delete now empty theme files for the time being.
Differential Revision: https://code.wildfiregames.com/D786
Approach agreed with: Vladislav, bb
This was SVN commit r20002.
Its experimental use in b2ec4e0e2a two days before the alpha 16 release
was reverted in d70abd548a following "complaints by team members" (Yves
and scythetwirler on 2014-05-10).
This was SVN commit r19993.
Unify three textPanel style copies in a new ModernTextPanel theme,
following the Credits page in bcf2c75513 and the Splash Screen in
5ce5ef9286 and the Manual in 4b06ebd52d.
Remove the unused textcolor_selected and the (because of a source/gui
bug) defacto unused font property.
Rudimentary scrolling support for the Splash Screen.
Remove now empty files for the time being.
This was SVN commit r19992.
Rename ModernTabLabelText and ModernLeftTabLabelText following
dc2b2aeff4 and 5582409973,
because these common styles are not inherently recommended to be used by
Tab pages, nor do only Tab pages use it.
Remove the unused ModernRightTabLabelText introduced by 5582409973.
This was SVN commit r19991.
Properly support capturing in the RallyPointRenderer component, even
though RallyPoints are typically deleted upon capturing.
Differential Revision: https://code.wildfiregames.com/D776
Refs D687
Reviewed By: Stan
This was SVN commit r19976.
This is so when we mark them for translation (as we will do soon) our
wonderful translators are not inundated with a couple hundred new
strings, many of which will need to be changed
in some way.
Patch by: fatherbushido
Change agreed upon by: elexis
Prep work for: D297
Refs: #3212
This was SVN commit r19960.
Fixes the 0 values for k/d, feminization and vegetarian ratio
Makes teams better displayed
Patch By: Imarok
Differential Revision: https://code.wildfiregames.com/D482
This was SVN commit r19958.
Clarify the victory / defeat reason by using a custom string for each
defeat and victory reason.
Group chat notifications instead of posting one for each player.
This also slightly improves lobby performance upon win.
Differential Revision: https://code.wildfiregames.com/D762Fixes#4382
Based on patch by: Angen
This was SVN commit r19955.
Patch by Mate-86.
Advices from leper.
Reviewed by fatherbushido.
Differential Revision: https://code.wildfiregames.com/D451
This was SVN commit r19950.
Makes it possible to reuse the more generic parts of the `structree`
codebase in other pages without including `structree`-specific logic.
This sets the stage for further reference/encyclopedia-type pages.
Reviewed By: fatherbushido, elexis
Differential Revision: https://code.wildfiregames.com/D295
This was SVN commit r19940.
Before inlining territories it was changed to be a const reference, thus
avoiding the copy.
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D741
This was SVN commit r19936.
Register the new track "Tale Of Warriors" from 11c6dec383 with the game.
Register "Calm Before the Storm" and "Tavern in the Mist", which were
not heard in the previous releases.
Play some peace tracks for all civilizations, as intended by Omri (thus
play some music for observers too, refs #4298).
Add more background tracks to the menu as agreed with WhiteTreePaladin.
Keep "Honor Bound" the first one, as proposed by Itms and leper.
Add some tracks that are played only for one civ to other civs, to
reduce the repetition.
Remove duplicate, now unused music code.
Differential Revision: https://code.wildfiregames.com/D732Fixes#4565.
This was SVN commit r19918.
Remove all hacks while keeping most optimizations in memory management.
This fixes incomplete grid updates that could cause OOS on rejoin, fixes
#4596.
Tested by: elexis, ffffffff
Reviewers: leper, wraitii
Differential Revision: https://code.wildfiregames.com/D675
This was SVN commit r19916.
Use the entire available screen height for easier chat history reading.
Use the golden ratio for the chat history frame size, so that the ratio
looks appealing with all screen size ratios.
Differential Revision: https://code.wildfiregames.com/D713
Refs #4069
Patch By: temple
This was SVN commit r19893.
Allow (not only spartan but) all women to attack (so that it's more
obvious that they can be used to destroy siege engines if no military
units are available).
(Proposed by scythetwirler in irc on 2017-03-13.)
Remove the celtic woman (3.5x!) attack bonus and their (+50%) health
bonus (they had since the introduction of the britons in 52af3369ba).
(Because woman health is most relevant in the beginning of the game and
at that stage celts already have the population bonus advantage.)
Set Spartan women to Passive instead of Standground, so that they flee.
Convert Spartan woman 2.5x siege bonus to a general +50% Attack bonus
and nerf their 80% HP bonus to +40% (i.e. 40HP instead of 25HP).
Keep Spartan woman ability to patrol and build towers for now.
Differential Revision: https://code.wildfiregames.com/D722
Patch By: borg-
Reviewed By: Grugnas
This was SVN commit r19885.
This is quite noisy with -Wexpansion-to-defined in both clang 3.9 and
gcc 7.
(Refs #3190 and #4148. Upstream might have fixed this, but somewhat
clean build logs seem worth it.)
Reviewed By: echotangoecho
Differential Revision: https://code.wildfiregames.com/D680
This was SVN commit r19884.
Allow us and modders to enable or disable the string without changing
the code.
Differential Revision: https://code.wildfiregames.com/D198
Refs: Tooltip added by 22b72a362b, friendly-fire removed in ba2bb82406,
patch discussed in D142
Reviewed By: Imarok
This was SVN commit r19883.
Buff by 5 pierce armor levels to be equal to the regular dock.
Differential Revision: https://code.wildfiregames.com/D714
Reviewed By: Grugnas, mimo
This was SVN commit r19882.
Use whitelist instead of blacklist, remove dead options and noisy
unneeded gui/common/ function.
Still allow existing players with now prohibited characters to login.
This could be enforced in ejabberd too and then the now incomplete JS
string can be replaced with a more general one.
Differential Revision: https://code.wildfiregames.com/D715
Refs #4671
Reviewed By: Imarok
This was SVN commit r19881.
This fixes#4561 and makes sound card detection work on non-Windows
platforms.
Reviewed By: echotangoecho
Tested By: Imarok, elexis
Differential Revision: https://code.wildfiregames.com/D636
This was SVN commit r19877.
Since the RangeVisualization component is deserialized before the
TechnologyManager, upgraded healers had shown a wrong range.
Differential Revision: https://code.wildfiregames.com/D698Fixes#4632
Refs D432
Patch By: Sandarac
This was SVN commit r19861.
Use the 2x2 stone rubble for now (which is definitely too big but
doesn't confuse anyone).
Use it for spikes and the celtic hut too, which had no rubble prior.
Differential Revision: https://code.wildfiregames.com/D691
Split from: D643
Refs #1166
Patch By: temple
This was SVN commit r19858.
Do not use the legit rubble_3x3 actor from 439f67b5d8 as it isn't as
appealing as rubble_stone_3x3.
Rename it to make it more obvious that the template stands out.
Split from: https://code.wildfiregames.com/D643
Refs #1166
Patch By: temple
This was SVN commit r19857.
Use regular stone rubble instead for the time being.
Don't use the hellenic dock actors in the rubble of non-hellenic docks.
Split From: https://code.wildfiregames.com/D643
Refs #1166
Patch By: temple
This was SVN commit r19855.
Use stone instead of wooden rubble for all corrals, as the models all
contain stone.
Differential Revision: https://code.wildfiregames.com/D643
Refs #1166
Patch By: temple
This was SVN commit r19854.
Remove wxWidgets patch from 4ca156e2d8 that had been merged with the new
release.
Differential Revision: https://code.wildfiregames.com/D679
Refs #4362
Based On Patch By: fabio
Discussed With: leper
Tested By: Tobbi, Itms
This was SVN commit r19848.
Display the follow-player label only if it fits entirely (i.e. >=
1280x1024), otherwise display the checkbox only.
Increase the size of the player dropdown for resolutions >= 1280x1024.
Differential Revision: https://code.wildfiregames.com/D689
Patch By: temple
Refs:
Issues introduced by #3743 and 20e7d2224a
This is affected by D692 D694
This was SVN commit r19843.
Do not send a wasteful rating request if the same player is selected
again when someone joined the lobby, when changing the sorting order or
when clicking on the same user again
by moving the player-selection change test from updatePlayerList to
onPlayerListSelection.
That test should have been done here in 8f4daa9dd0 already and fixes
#3840 well enough.
This change also fixes an unintentional behavior of the code, where the
game the currently selected player is playing in would be selected if
someone else joined the lobby, even if a different game was selected
manually.
Furthermore it allows simplification of the code of 655ce95468 by
removing selectGameFromPlayername which did almost the same as
selectGameFromPlayername.
To still select the game the current player is playing in if the
selected player didn't change, subscribe to the (new) event that is
called when clicking on an item.
Differential Revision: https://code.wildfiregames.com/D688
Reviewed By: ffffffff (fpre)
This was SVN commit r19841.
Use stronghold starting position style with 33% instead of 50%
probability.
Differential Revision: https://code.wildfiregames.com/D664
Reviewed but not accepted by: bb (everything) and fatherbushido (Heaps
permutations)
Catch: This must become more efficient if the playercount will be
greater than 8, refs #4004.
This was SVN commit r19840.
Don't return 1200 in splitRatingFromNick if the player has no rating
yet, so that it can be reused for playername construction.
Refs https://code.wildfiregames.com/D670
Reviewed By: Imarok
This was SVN commit r19827.
Use OsPath instead of CStr and CStrW where possible,
wstring_from_utf8(OsPath.string8()) to pass printable strings to the
JSAPI,
OsString when opening a filestream and
off_t instead of int for filesizes.
Fixes#4320
Differential Revision: https://code.wildfiregames.com/D518
Reviewed By: Imarok
Tested By: Imarok on Windows, wraitii on OSX
Special thanks to Philip for advice and the lib/path.h fix in
47cc447322.
This was SVN commit r19824.
thus allow proper printing of such paths.
Fixes#4647
Refs #4320 D518
Patch By: Philip
Tested By: Imarok on Windows, wraitii on OSX
This was SVN commit r19823.
Only reset it if any of the original allies changes the diplomatic
relation to one of the other original allies.
Differential Revision: https://code.wildfiregames.com/D305Fixes#4529
Patch By: Sandarac
This was SVN commit r19818.
As civil centre and colony are civil centre, the current distance test
of colonies should be versus civil centre
Reviewed By: fatherbushido
Differential Revision: https://code.wildfiregames.com/D661
This was SVN commit r19809.
Use Date.now() to get the current timestamp instead of doing arithmetic
with Date objects and avoid needless object instantiation.
Differential Revision: https://code.wildfiregames.com/D554
Eyeballed By: causative
This was SVN commit r19802.
Only historic messages were timestamped in C++ prior.
Other messages showed the timestamp when they were displayed in JS,
which is wrong in case of returning to the lobby from a game.
Differential Revision: https://code.wildfiregames.com/D514Fixes#3832.
Reverts the revert of 1f34a004e5 in 572847ddd4.
Patch By: Josh
Tested By: Itms
This was SVN commit r19801.
Let the JS GUI take care of hiding the GUI and silhouettes and remove
the according hardcoding in the engine following 89aef0b6eb.
Thereby fix some bugs (like not having hid the GUI if there was a
message box or different page shown while playing a path) and
fix these two hotkeys broken by 5d49e6c456.
Differential Revision: https://code.wildfiregames.com/D631Fixes#4633
Reviewed By: Vladislav
This was SVN commit r19797.
6aeb5c64de forgot to add a LosIsOffWorld check in ExploreTerritories
(aka UpdateTerritoriesLos) and thus marked tiles outside of the world as
explored.
f5e60157bf transformed the bug into a non-simulation desynchronization,
causing rejoined players to see a different score,
as they excluded off-world tiles when filling the cache in
ResetDerivedData upon rejoin.
4a0673e44e transformed the bug into an actual simulation OOS by
serializing that map exploration percentage based on that cache.
Also tiles at the map border in square maps are not rendered as
expected, so this commit hides refs #4267.
Differential Revision: https://code.wildfiregames.com/D630Fixes#4598
Proofread by: Itms
Tested By: Imarok
This was SVN commit r19790.
Always spawn that cavalry that can be trained at the civic center, not
the other one from the barracks.
Spawn 2 melee and 2 ranged infantry units for Seleucids just as for any
other civ.
Differential Revision: https://code.wildfiregames.com/D647
Reviewed By: Grugnas, fatherbushido
Refs D649
This was SVN commit r19788.
Should use a special filter once the AI supports it (#4611), so that
decorative rubble can be placed by maps too.
Differential Revision: https://code.wildfiregames.com/D635
Reviewed By: fatherbushido
Refs #3601#3910#3179
This was SVN commit r19782.
It held resource strings when introduced by 0f21151c4b, but those were
moved to json files in 52f311da2b. 9b041467a2 moved two trivial
functions of this file to tooltips.js.
Remove a wrong comma from the JSdoc comment.
Alwas return a string.
Differential Revision: https://code.wildfiregames.com/D618
Confirmed by Itms in a forum PM that this doesn't break string freeze.
This was SVN commit r19779.
Throw a reference error instead of silently using an untranslated string
if someone would have passed a non-existing translation context.
Throw a property undefined warning if someone passed a non-existing
resource when trying to translate it.
Both warnings had been introduced in 0f21151c4b, were removed by
52f311da2b but now occur without adding code explicitly.
Differential Revision: https://code.wildfiregames.com/D625
Reviewed By: s0600204
This was SVN commit r19771.
It was a leftover from s0600204's proposal from 52f311da2b (refs #3934)
to disable resources with a boolean property.
Differential__Revision: https://code.wildfiregames.com/D625
Reviewed By: s0600204
This was SVN commit r19770.
Still throw that error if the function exists but could not be called
with JS_CallFunction.
Differential Revision: https://code.wildfiregames.com/D620
This was SVN commit r19769.
These structures can always attack near enemies because the minimum
attack range is within the building obstruction.
Thus prevent the minimum attack distance tooltip from D267 to show
misleading numbers, refs D111.
Remove the effective minimum attack distance of the hero cavalry archer
too for consistency with all other units following 5f78bb7318.
Differential Revision: https://code.wildfiregames.com/D611
Reviewed By: fatherbushido
This was SVN commit r19747.
Increase footprint slightly for both artistic and gameplay reasons.
Differential Revision: https://code.wildfiregames.com/D562
Patch By: borg-
Refs #3786, D540
This was SVN commit r19723.
Differential Revision: https://code.wildfiregames.com/D596
Patch By: bb
3c56638e8b introduced pickRandom and its petra chat application,
08fbf223f6 used the randFloat function more often, introduced randBool
and randIntInclusive/Exclusive
to replace randInt (whose behavior and argument meaning depended
on the number of arguments) calls in the GUI and simulation,
ddfc985586 changed randInt to pickRandom for random maps,
da2b89583a introduced randBool with a probability and replaced
deprecated randInt calls for random maps,
175cded64a replaced randInt calls with randIntInclusive/Exclusive for
random maps except the Unknown,
a227a7f45b removed optional arguments of randFloat,
this commit replaces the remaining occurances in the Unknown maps,
thus fixes#4326 (old patch from refs #3102).
This was SVN commit r19721.
Hence display the originally intended useful warnings (instead of the
characterless JS "Script value conversion check failed" warning and
skipping the intended warnings).
This was SVN commit r19718.
Fix broken targetClass parsing as reported by bb on 2017-04-19.
More space between islands and the shoreline as proposed by causative.
Fix typo reported by Sandarac.
Revert the terrible decision to set attackers to violent,
which caused siege engines to change the target from the civic center to
the units that attacked it and
ships to become stuck at the shoreline more often trying to fight back
against unreachable towers.
This was SVN commit r19705.
Allows lobby players to host games without having to configure their
router.
Differential Revision: https://code.wildfiregames.com/D364Fixes#2305
Patch By: fcxSanya.
StunClient based on code by SuperTuxKart, relicensed with approval of
the according authors hilnius, hiker, Auria, deveee, Flakebi, leper,
konstin and KroArtem.
Added rfc5245 (ejabberd) support, a GUI option, refactoring and segfault
fixes by myself.
Tested By: user1, Sandarac, Sestroretsk1714, Vladislav, Grugnas,
javiergodas
Partially Reviewed By: leper, Philip, echotangoecho
This was SVN commit r19703.
Also tests the appropriate function in `globalscripts/Templates.js`.
Reviewed By: fatherbushido
Differential Revision: https://code.wildfiregames.com/D519
This was SVN commit r19686.
because that aura is an order of magnitude more useful, making that hero
a viable choice.
Nerf Cunobelin aura by 20%, since 100 units can fit easily into the aura
range and heal while fighting and moving too.
Differential Revision: https://code.wildfiregames.com/D565
Reviewed By: fatherbushido
Numbers contested by borg-, PhyZic (proposed 0.5) and Grugnas and
nigel87 (proposed 1.0)
This was SVN commit r19682.
Two of our printf calls are not compatible with python-format and will
be ignored until Dennis supports the corresponding formats. Also removed
meaningless enclosing characters that were wrongly considered HTML.
Reviewed By: leper
Differential Revision: https://code.wildfiregames.com/D214
This was SVN commit r19669.
Thus the controller doesn't have to unassign every unwanted client
immediately in order to minimize frustration for those clients.
Option to automatically assign joining buddies to playerslots as a
better approximation for frequent players.
Differential Revision: https://code.wildfiregames.com/D546
Reviewed By: fpre
This was SVN commit r19666.
Recalculate the entities on screen less often than each keyboard or GUI
tick event.
Differential Revision: https://code.wildfiregames.com/D537
Patch By: causative
This was SVN commit r19658.
On occasion Petra will request to become allies or neutral with other
players (regardless if they are an AI or not).
Patch by Sandarac
Reviewed By: mimo
Differential Revision: https://code.wildfiregames.com/D544
This was SVN commit r19654.
This allows automated testing of AIs without any GUI or sound (similar
to non-visual replays).
Differential Revision: https://code.wildfiregames.com/D379
This was SVN commit r19645.
Patch by Sandarac
Summary: As suggested in D333, Petra should prioritize capturing gaia
relics that are within its territory.
Reviewed By: mimo
Differential Revision: https://code.wildfiregames.com/D532
This was SVN commit r19644.
An empty lobby with single client scrolling with the mousewheel through
the skirmish maps for few seconds was sufficient to delay the server
updates globally for more than 15 seconds.
Based on patch by: sbirmi
Fixes#3847
This was SVN commit r19641.
Minimap updated by Sandarac in D344.
Differential Revision: https://code.wildfiregames.com/D229
Refs #4354
Map generation based on patch by: Hannibal_Barca
Calling it Reviewed By: bb
This was SVN commit r19635.
Replace dead tree actors with actual trees.
Replace shark actor with actual sharks on Necropolis (should have been
done in D511).
Remove actor fish that would still be misleading on Tuscan Acropolis (4)
(the river is too small for ships).
Differential Revision: https://code.wildfiregames.com/D525
Patch By: phormio
This was SVN commit r19632.
Accomplish this by adding a Garrisonable component that can be removed
from individual units or templates.
Differential Revision: https://code.wildfiregames.com/D104
Refs #2160
Patch By: Sandarac
This was SVN commit r19631.
Because of a floor operation, tasking another unit to a building could
actually slow the construction down.
Patch by temple.
Differential Revision: https://code.wildfiregames.com/D521
This was SVN commit r19625.
This improves our international keyboard until we completely rework the
hotkey system which seems to be quite legacy at this point.
Reviewed by Itms.
Differential Revision: https://code.wildfiregames.com/D303
This was SVN commit r19624.
Revert cbc49f43e6 because the reasons for hiding non-open games don't
apply or don't apply anymore:
* The filter doesn't actually prevent unwanted clients to join the
server.
* The host can kick or ban unwanted clients now.
* Many users are interested in joining games as observer (either for the
sake of observing or to meet up with buddies).
So for many players the first action after entering the lobby was to
uncheck this checkbox.
Differential Revision: https://code.wildfiregames.com/D218
Reviewed By: mapkoc
This was SVN commit r19619.
Increase vertical size of the player selection dropdown in the observer
menu.
Differential Revision: https://code.wildfiregames.com/D527
Proposed and reviewed by: temple
This was SVN commit r19618.
Summary:
In regicide, data.garrisonEmergency was not reset when retreating a hero
to a base when the hero couldn't find a place to garrison.
Transfer the stance info to the AI
Reviewed By: mimo
Differential Revision: https://code.wildfiregames.com/D515
This was SVN commit r19614.
We don't catch this specific exception, so no behavioural change, but we
do no longer violate the implicit noexcept for destructors in C++11.
(Fixes a GCC6 and VS2015 warning.)
Reviewed By: Itms
Differential Revision: https://code.wildfiregames.com/D416
This was SVN commit r19612.
The tooltips of the larger mapsizes and higher population capacities
(depending on the number of players) warn the controller of potential
performance issues.
Differential Revision: https://code.wildfiregames.com/D505
Reviewed By: Hannibal_Barca
This was SVN commit r19609.
following the wrong move of this clearance from updatePlayerList to
handlePlayerAssignmentMessage.
Differential Revision: https://code.wildfiregames.com/D434
Reviewed By: Imarok
This was SVN commit r19602.
Double the damage output, HP and cost.
Add armor and metal cost for consistency with the War Elephant.
Differential Revision: https://code.wildfiregames.com/D436
Reviewed By: fatherbushido
Tested By: borg-
Values agreed with: Grugnas, nigel87
This was SVN commit r19601.
Summary:
Petra will capture gaia relics on occasion. Because the AI has access to
all of the map and all entities in the game, these gaia capture events
have to be spaced out quite a bit to make things fair.
Reviewed By: mimo
Differential Revision: https://code.wildfiregames.com/D333
This was SVN commit r19596.
Some invalid cursor positions were not checked, resulting in a crash in
Debug mode. This was revealed by e1e4ef0370, refs #4401.
Reviewed By: echotangoecho, Itms
Differential Revision: https://code.wildfiregames.com/D484
This was SVN commit r19579.
This patch implements some changes needed to take restricted classes
into account for example for D450, but it does not claim to be complete.
This will have to be fully tested when these restrictions are really
used.
Tested by fatherbushido using D450
Differential Revision: https://code.wildfiregames.com/D473
This was SVN commit r19572.
Summary:
- take the healthLevel of the units into account
- take Sandarac comments on D446 into account
Differential Revision: https://code.wildfiregames.com/D468
This was SVN commit r19571.
i.e. developer cheats to control enemy units, revealing the map and
promoting units too.
Open the developer overlay only if cheats are enabled (which is always
the case in singleplayer mode and only the case in multiplayer mode if
explicitly enabled).
(This doesn't make it harder for developers to "debug", since they
previously had to remember to disable the rated game setting too. Also
every bug had to be reproduced with the replay either way)
Reverts 3cbbf31173 which reverted 6e0e607b20 (since as of c288278229,
the autostart gamesetup enables cheats too).
Differential Revision: https://code.wildfiregames.com/D455Fixes#3551
Reviewed By: echotangoecho
Agreed with Itms and Imarok in the last staff meeting.
This was SVN commit r19558.
Summary: When a structure with arrow was attacked, it was garrisoned
independently of the attacker, which was not the best answer when
atacked by a ram for example. This patch tries to adapt the garrisoning
to the attackers.
Reviewed By: Sandarac
Differential Revision: https://code.wildfiregames.com/D446
This was SVN commit r19547.
for example when someone would send a lobby chat message containing such
a character, it effectively ended the game of the recipients.
Differential Revision: https://code.wildfiregames.com/D456Fixes#4433
Reviewed By: leper
Reported and tested by: Hannibal_Barca
This was SVN commit r19540.
Differential Revision: https://code.wildfiregames.com/D340
Reviewed By: fatherbushido (and leper and sanderd17 too basically)
This was SVN commit r19536.
Also show the GUI after the cinematics stopped playing in Atlas.
Differential Revision: https://code.wildfiregames.com/D411
This was SVN commit r19533.
Actually implementing atlas support for triggers will most likely
require a different interface, so no use keeping it.
Reviewed By: vladislavbelov
Differential Revision: https://code.wildfiregames.com/D418
This was SVN commit r19531.
Remove the "Quote of the Day" titling which did not make a lot of sense.
Undocumented or misleading quotes removed, new quotes, more historical
context, and literary source for all of them.
Reviewed By: Gallaecio, Itms
Differential Revision: https://code.wildfiregames.com/D296
This was SVN commit r19529.
Summary: (Title is clumsy)
Test Plan:
Check for example auras tooltip:
structree
entity tooltip
construction panel
wall tooltip too
Reviewers: elexis
Reviewed By: elexis
Subscribers: Vulcan
Differential Revision: https://code.wildfiregames.com/D447
This was SVN commit r19526.
Summary:
- better detection (hopefully less false positive due to pathfinder
problems) of inaccessible targets
- prevent hunters from drifting too much when chasing their target
Differential Revision: https://code.wildfiregames.com/D400
This was SVN commit r19523.
Displays a chat message and a notification in the player details to
everyone if someone was muted and
hides the chat input to visitors.
Differential Revision: https://code.wildfiregames.com/D339
Reviewed By: user1
This was SVN commit r19514.
This has been disabled for nearly 10 years (44f5288a1d), so remove it.
Reviewed By: fatherbushido, vladislavbelov
Differential Revision: https://code.wildfiregames.com/D423
This was SVN commit r19511.
Make it way more accurate by excluding the SDL_Wait time and microsecond
precision.
Differential Revision: https://code.wildfiregames.com/D109
Refs #2882
Reviewed By: Vladislav
This was SVN commit r19507.
Prevent building it in player owned territory, so as to
highlight its usage as a building to dominate the enemy in his own
territory and
prevent the player from building it as a defensive structure right
besides a fortress and civic center.
Increase CapturePoints from 500 to 1500, and RegenRate to 10, so that it
doesn't convert to gaia in 14 seconds but 50.
Reduce GarrisonRegenRate from 5 to 3.
Add minimum distance between two camps.
Increase cost to 500 wood and buff crush armor from 10% to 19%.
Reduce maximum range from 80 meters to 50 meters.
Differential Revision: https://code.wildfiregames.com/D405
Reviewed By: fatherbushido
Reported by PhyZic, discussed with Grugnas.
This was SVN commit r19505.
Removes a lot of duplication and ugly GUI handling code with very
similar, yet different code paths.
Move the setting specific logic to the functions of that setting and
keep the universal logic in global atomic functions.
Make gamesetup.xml agnostic of all gamesetup settings.
Adding a new gamesetup option now only requires adding one hunk with the
titles and values and one line in g_OptionOrderGUI.
Opens up the possibility to iterate over all settings, refs #3806,
#3883.
Allow starting singleplayer games in observermode with only AIs
assigned, fixes#4078.
Autocomplete translations of all setting titles and selected title
values like playernames and victory conditions.
Transfer the AI difficulty when swapping with a player.
Move logic from onTick to the GUI handling functions.
Change some global consts to var, so that contributors become invited to
change them from a different place.
Add missing startGameButton tooltip translation.
Differential Revision: https://code.wildfiregames.com/D322
Reviewed By: wraitii
Some strings reviewed By: leper
This was SVN commit r19504.
This introduces a .arclint file used by Arcanist to run a handful of
checks on patches submitted to Phabricator. To keep it portable and
avoid annoying contributors, most of the linting will happen through
Jenkins. This commit uses built-in text linting that checks trailing
whitespace and end of files.
Reviewed By: leper
Differential Revision: https://code.wildfiregames.com/D6
This was SVN commit r19502.
Hide chat input and disable buddy toggle button upon disconnect.
Imrpove user profile fetching code readability, move and merge code from
XML.
Differential Revision: https://code.wildfiregames.com/D396
Reviewed By: Vladislav
This was SVN commit r19501.
Add a hint that multiplayer games with AI are currently not supported.
Differential Revision: https://code.wildfiregames.com/D105
Reviewed By: leper
Refs #3858
This was SVN commit r19491.
Mention how to handle const methods (be1a205f91, D75).
Note that parameters are passed as const references (1a66f510d0).
Also remove mention of jsval (which is deprecated).
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D374
This was SVN commit r19484.
Thereby remove the only hardcoded reference of options.json from
options.js.
Rename Gain to Volume, refs #4039.
Differential Revision: https://code.wildfiregames.com/D398
Reviewed By: Vladislav
This was SVN commit r19482.
Buff Athenian and Persian catafalque, fix Gaul and Spartan catafalque,
nerf Iberian catafalque.
Differential Revision: https://code.wildfiregames.com/D331
Patch By: Hannibal_Barca and translators
This was SVN commit r19477.
Double decay rate, so that the lifespan becomes 1min 23sec instead of
the original 2min 46sec.
Increase train time form 20 to 30.
Increase cost from 200 wood to 300.
Differential Revision: https://code.wildfiregames.com/D388
Numbers By: Hannibal_Barca
Reviewed By: fatherbushido
Discussed with: causative, Grugnas and scythetwirler
This was SVN commit r19476.
Summary: When delete a selected row, selection didn't appear after
10b49f9c18.
Reviewed By: mimo
Differential Revision: https://code.wildfiregames.com/D392
This was SVN commit r19471.
Summary: as the title say. In addition, with the patch, it can already
use the available market at phase 1 while before, it waited for phase 2.
Checked by Sandarac and elexis
Differential Revision: https://code.wildfiregames.com/D349
This was SVN commit r19459.
Remove the equivalent AI chat notifications.
Differential Revision: https://code.wildfiregames.com/D354
Patch By: Polakrity
Fixes#3512
This was SVN commit r19445.
Places a fortified gaia village, some gaia units performing a ritual and
some towers garrisoned on islands.
The attacker and ship count increases over time.
The attacker composition is randomized per ship and switches from
citizen soldiers to champions, heroes and siege engines.
One in three matches takes place at night.
Differential Revision: https://code.wildfiregames.com/D204
Map generation based on patch by Hannibal Barca
Reviewed By: bb, FeXoR
Refs #4354
This was SVN commit r19434.
Several ranged units had prepare times as high as their repeat time,
making them feel sluggish and animating weirdly. Melee units had none,
resulting in an odd discrepancy betwee n animation and time of damage,
and also weird animations.
Reviewed by fatherbushido.
Differential Revision: https://code.wildfiregames.com/D258
This was SVN commit r19428.
Doesn't provide a way to add/delete nodes of paths yet.
Differential Revision: https://code.wildfiregames.com/D348
Patch By: Vladislav
This was SVN commit r19427.
The remaining graphics code should be moved or removed.
Differential Revision: https://code.wildfiregames.com/D324
Patch By: Vladislav
This was SVN commit r19414.
This also refactors code so that external callers will have an easier
time getting a template value as modified by technologies.
Patch by s0600204.
Reviewed by bb and wraitii.
Differential Revision: https://code.wildfiregames.com/D154
This was SVN commit r19410.
Expose the FindAllPlaceableTemplates function to the simulation to
remove the hardcoded directory checks as suggested by fatherbushido.
Add the new special template directory from D176 / cd6c31e76e.
Move the code from XML to JS.
Differential Revision: https://code.wildfiregames.com/D277
Reviewed By: Vladislav
This was SVN commit r19399.
Rename the buttonset to panelEntities and unify related health tooltips.
Differential Revision: https://code.wildfiregames.com/D289
Reviewed By: Sandarac
Refs #3000
This was SVN commit r19398.
Add height indicator so that we can actually estimate the location of
the paths in atlas.
Differential Revision: https://code.wildfiregames.com/D306
Patch By: Vladislav
This was SVN commit r19394.
The terrain grid can be renewed without proper deallocation, which
happens at least at the start of a game when MT_TerrainChanged is sent.
Reviewers: wraitii, Itms
Differential Revision: https://code.wildfiregames.com/D247
This was SVN commit r19388.
Add early return to hide loot tooltip if there is no loot (for mods).
Differential Revision: https://code.wildfiregames.com/D292
Reviewed By: fatherbushido
Fixes#4118
This was SVN commit r19387.
The looter one didn't work at all, the armor one wasn't working as
intended and the max pop one worked but didn't use the proper type.
Order resources in the usual way.
Remove second newline at the end of XML files.
Differential Revision: https://code.wildfiregames.com/D291
Patch By: Hannibal Baraq
This was SVN commit r19384.
Move graphics code to smaller helper functions UpdateSessionVisibility,
UpdateSilhouettesVisibility and DrawPaths.
Remove the hotkey TODO code which should be implemented differently.
Mark voids as const.
Differential Revision: https://code.wildfiregames.com/D271
Patch By: Vladislav
This was SVN commit r19375.
64bit conversions (including the long ones) are not safe, because not
every number can be converted to the 2^53 JS numbers and pretending to
do so is asking for bugs.
Explicitly use the double type in the Replay menu, because std::time_t
is unspecified and some platforms like Ubuntu yakkety:i386 fail to
build, looking for long.
Double should work for the next 285 million years, becomes consistent
with SavedGame.cpp, is tested by test_ScriptConversions.cpp and doesn't
pretend to cover all 64bit numbers.
Patch By: echotangoecho
Differential Revision: https://code.wildfiregames.com/D205
Refs #3848 D84 D112
This was SVN commit r19367.
Summary:
PerformAttack uses an automatic aiming logic for ranged attacks.
Splitting it would allow to fix some issues with that function, to test
it individually, make it usable as a globalscript for other logic (or
even to disable the automatic aiming based on template).
That patch is just about the splitting, I didn't change it.
Also use only the max range and not the elevation adapted one to scale
the spread (which makes more sense and also avoid computation).
Test Plan: send a javelin?
Reviewers: O2 JS Simulation, wraitii, elexis
Reviewed By: O2 JS Simulation, wraitii, elexis
Subscribers: Vulcan, elexis, leper
Differential Revision: https://code.wildfiregames.com/D272
This was SVN commit r19366.
Rename the special wolf template that reacts to UnitAI attack orders to
fauna_wolf_snow_attack, so that the name becomes agnostic of the way how
it achieves that.
Differential Revision: https://code.wildfiregames.com/D257
Reviewed By: fatherbushido
This was SVN commit r19361.
Exponential attacker increase to prevent boring endless games.
Add a gaia hero per player at later stages of the game (if the previous
one isn't alive anymore).
Remove hardcoded template array and include gimmick templates (gaia),
most notably the fireraiser which we never saw before and the siege
tower.
Remove treasure picker female after defeat to prevent confusion with
treasure on the minimap.
Add flag to the spawnpoints, so that new players know where the enemies
actually come from, as proposed by bbleft and Hannibal Barca.
Move all balancing constants to the top of the file.
Actively chose attacker composition instead of having it relate to the
number of templates that exist.
Add debug output option, so that we can replay games and see which enemy
wave composition attacked at which time.
Add dry run, so that we can test the balancing effects from a non-visual
replay instead of having to play some game.
Remove many unused variables and some pointless tile classes from the
mapgen.
Whitespace and various code style cleanup, moving code to shorter, more
readable functions.
Reviewed By: bb
Differential Revision: https://code.wildfiregames.com/D145
This was SVN commit r19359.
New tech to increase the cost for other players to bribe your units (by
50%).
Move the spy tech and this new one to the cicil center.
Decrease the spy cost to 500 metal.
Include the patch from D173 because of conflicts.
Reviewed By: elexis, Gallaecio
Differential Revision: https://code.wildfiregames.com/D179
This was SVN commit r19357.
Add optional probability to randBool to receive true and use where
applicable.
Patch By: bb
Differential Revision: https://code.wildfiregames.com/D235
Refs #4326 D121
This was SVN commit r19355.
The dialog is resized automatically and can be opened with a new hotkey.
Patch By: s0600204
Differential Revision: https://code.wildfiregames.com/D88Fixes#4366
Refs #3934
This was SVN commit r19354.
Replace the unexplained orange and red colorization and replace it with
the greyout equal to the replay menu,
as the difference between compatibility types is explained when trying
to load the game.
Rename the ambiguous generateLabel to generateSavegameLabel.
Patch By: Vladislav
Differential Revision: https://code.wildfiregames.com/D246
This was SVN commit r19351.
Prevent Iberian players from covering their entire territory with the
attack bonus giving monument as proposed by mimo.
Indirect aura range indication with the build restrictions for the trade
bonus yielding mauryan pillar.
Disable capturing of mauryan pillar equally to the iberian one following
60a2af2988 (so that the entire territory doesn't switch ownership
quickly).
Add the missing name for the mauryan pillar, so that the aura bonus
tooltip shows up, as reported by Grugnas.
Differential Revision: https://code.wildfiregames.com/D196
Reviewed By: Grugnas
Fixes#4412
This was SVN commit r19348.
Add a test for the GetNonGaiaEntities function of the RangeManager
broken by that commit that was fixed by f3e4e619bc.
Don't call one script function from another, but directly call into the
Selection helper like the others.
Don't make a loop around that RangeManager function for all players but
call the function once for all players.
The pointless virtual keywords were removed by 8827db201a.
Differential Revision: https://code.wildfiregames.com/D166
Reviewed By: leper
This was SVN commit r19344.
Use std::set's logarithmic find instead of a linear loop.
Early return and some whitespace for getParabolicRangeForm.
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D260
This was SVN commit r19342.
Could possibly fix a compilation failure with some compilers in
36330732fa.
Patch By: Vladislav
Differential Revision: https://code.wildfiregames.com/D250
This was SVN commit r19341.
Differential Revision: https://code.wildfiregames.com/D188
Reviewed By: wraitii, Enrique
Also valuable input from Sandarac and bb
This was SVN commit r19334.
Elephant now a VisibleClass so that players know which of the heroes the
elephant one is.
Differential Revision: https://code.wildfiregames.com/D251
Reviewed By: fatherbushido
This was SVN commit r19333.
Limit them to 50 because they have no pop cost attached.
Their use was nerfed a bit too much in 13b229d503.
Patch By: Grugnas
Differential Revision: https://code.wildfiregames.com/D234
Reviewed By: fatherbushido, borg-
This was SVN commit r19331.
This was the last building with this capturing bug.
Differential Revision: https://code.wildfiregames.com/D255
Reviewed By: fatherbushido, Grugnas
This was SVN commit r19330.
Thus prevent template editors from adding that tag to female military
units and
allow modders to add a Female class for wider purposes.
Remove the FemaleCitizen training restriction category that was added
for debug purposes but forgotton to be removed in 7e21db08d5.
Differential Revision: https://code.wildfiregames.com/D244
Reviewed By: fatherbushido
Refs: #1432#4490
This was SVN commit r19329.
The originally intended approach to support move-orders independent of
the Identity classes can be discussed in an independent proposal.
Reviewed By: fatherbushido
Differential Revision: https://code.wildfiregames.com/D176
This was SVN commit r19323.
Differential Revision: https://code.wildfiregames.com/D243
Reviewed By: fatherbushido
Idea by borg-, numbers confirmed by Hannibal Barca, floating point
number format confirmed by wraitii.
This was SVN commit r19322.
Remove the support of saving the rotation of camera position nodes,
because that should be rewritten to use a custom spline.
Patch By: Vladislav
Differential Revision: https://code.wildfiregames.com/D124
Refs #3814
This was SVN commit r19317.
Use the maximum height of all cells of the current row.
Lobby games with empty servernames are not rendered weirdly anymore.
Patch By: Vladislav
Fixes#4402
This was SVN commit r19306.
Summary:
- currently a fully garrisoned small house (as gaul) decays when outside
territory while a big house (as athen) doesn't because of the
garrisoning capacity. I propose to prevent both from decaying by
decreasing by half their TerritoryDecay.DecayRate (as we may understand
that an invading influence will quickly spread through official
buildings, but not inside houses where people will follow their
traditions).
- futhermore, as all garrisoned structures, the garrisoned units inside
houses have a GarrisonRegenRate of 5, which imo is too big for houses
(specially that currently only support units can be garrisoned inside)
and could be decreased a bit, although keeping
maxGarrison*GarrisonRegenRate > TerritoryDecay.DecayRate to prevent the
decay. Going from 5 to 4 works (could also be further decreased if we
also further decrease the DecayRate).
- popBonus tech: there is currently a tech to increase the popBonus of
houses by 20% already available in village phase. But for village phase,
its price is quite high and it's better to build houses. So i propose to
switch it to town phase and to add another one at city phase so that
each phase upgrade will allow to improve this house popBonus
- finally, as we have a loom icon, better use it for the loom technology
from the houses
Reviewed By: elexis and fatherbushido
Differential Revision: https://code.wildfiregames.com/D220
This was SVN commit r19298.
Prevent these elephants from attacking structures, which can happen
incidentally if the animal is attacked by garrisoned arrows that were
meant to hit attacking players and because that is unexpected to players
and had been reported as a bug and cheating players.
Prevent them from attacking ships, because they can't reach them in most
cases.
Unifty their Attack stats that had neglible differences, besides the
missing Crush damage of the North African Elephant variant, forgotton to
make consistent in 4ca43e453e with 71108ff458.
Add the large passability class to the North African and Asian elephant,
which was forgotton by 1e79b3a8af.
This was SVN commit r19295.
Select in that order to account for players that occur in multiple
games.
Patch By: fpre (a.k.a. ffffffff)
Feature design reviewed by: scythetwirler
Differential Revision: https://code.wildfiregames.com/D208
This was SVN commit r19287.
Summary: This further improves Petra's handling of citizen-soldier
guards, so that it does not repeatedly add guards when there are few
available workers.
Patch by Sandarac, follow up of aadf9d70f6 (D165)
Differential Revision: https://code.wildfiregames.com/D202
This was SVN commit r19281.
Patch By: bb
Differential Revision: D121
Refs: #4326
Removes the Random.js simulation helper and randomFloat function of the
random map scripts library.
Adds randomIntInclusive and randomIntExclusive to make the calls more
readable and fix and prevent off-by-one mistakes.
Adds randBool and use it in an AI occurance. It will be used in many
places by the random map scripts.
Use the pickRandom function introduced in 3c56638e8b in more applicable
occurances.
Replace remaining occurances of Math.random() with the new functions to
easily test completeness.
Cleanup of the random map script functions will come in a separate
commit.
This was SVN commit r19270.
Use an array instead of string concatenation to avoid duplication and to
enforce newlines on the syntax layer.
Move closeDiplomacy and toggleDiplomacy to openDiplomacy.
Differential Revision: https://code.wildfiregames.com/D183
Reviewed By: bb
This was SVN commit r19268.
Remove duplication and use ES6 startsWith instead of substr.
Differential Revision: https://code.wildfiregames.com/D110
Reviewed By: s0600204
This was SVN commit r19265.
Start the first wave minute 5 instead of 3 so that players have more
time to invest their initial wood.
Add two missing semicolons.
Differential Revision: https://code.wildfiregames.com/D184
Reviewed By: Hannibal_Barca
This was SVN commit r19263.
Summary:
Petra will not add guards when it has a low population, and will remove
any citizen-soldier guards so they can be used for other tasks.
Petra will also use a healer queue for training healer guards, and this
is done mainly so that Petra doesn't clog the villager queue with
healers, as villages should always have a higher priority. Also this
queue could be used in the future for training healer units for other
purposes.
Patch by Sandarac
Differential Revision: https://code.wildfiregames.com/D165
This was SVN commit r19262.
use it to fix an oversight in 1022619d98 (the diplomacy dialog wasn't
updated).
Differential Revision: https://code.wildfiregames.com/D181
Reviewed By: mimo
This was SVN commit r19260.
Summary: Following d9d1f1bbeb the diplomacy window is updated on each
tick, so we can remove the old updateDiplomacy function which now only
updates the player data, and rename updateDiplomacyPanel to
updateDiplomacy for consistency with other windows.
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D172
This was SVN commit r19257.
Based on map by Hannibal Baraq.
Differential Revision: https://code.wildfiregames.com/D156
Map generation reviewed by FeXoR
Trigger Script and UnitAI change reviewed by Sandarac
Environment settings reviewed by niektb and wowgetoffyourcellphone
This was SVN commit r19254.
Displays a chat notification for all lobby clients if a client is kicked
or banned, pop up a message box for the affected one, including the kick
reason.
Clean the player- and gamelist upon disconnect and disable the control
elements.
Reviewed By: Imarok
Differential Revision: https://code.wildfiregames.com/D116
This was SVN commit r19250.
Summary:
With c2d0327af9 we can now add spying into the game: you have first to
research a tech (available in phase 3, espionage), and then you can
bribe a random unit (defined as Bribable in its template) from a chosen
player and share its vision during 15s.
There is also an option in the gamesetup to disable this feature,
analoguous to the treasure disabling option.
In the current version, only traders (land and naval ones) are
bribables.
Reviewed By: Itms, elexis
Differential Revision: https://code.wildfiregames.com/D117
This was SVN commit r19247.
Get the required information by returning it in the proper places.
Also clean up some pointless modulo operations.
This code is pulled out of the Silk Road code (refs #4314).
Reviewed By: mimo
Differential Revision: https://code.wildfiregames.com/D161
This was SVN commit r19243.
Summary: Following discussions in https://code.wildfiregames.com/D60 the
use of u8 to store each boolean has been cleanup up. Now only one u8 is
used, thus reducing the size of the struct.
Reviewed By: leper
Differential Revision: https://code.wildfiregames.com/D101
refs #3834
This was SVN commit r19242.
Summary:
Petra will assign military units as guards to the hero in the regicide
victory condition, preferring any available Champion units.
Also this diff fixes a broken loop through a Map in D140/a443bcfa65 that
was introduced when switching `criticalEnts.guards` from a Set to a Map.
Patch by Sandarac
Differential Revision: https://code.wildfiregames.com/D157
This was SVN commit r19241.
Slight cleanup while moving the affected code.
Differential Revision: https://code.wildfiregames.com/D108
Reviewed By: shookes
This was SVN commit r19238.
Add a new options panel for the chat notifications (attack, barter,
tribute), so that players and observers can disable them if they appear
too noisy.
Patch By: Sandarac
Differential Revision: https://code.wildfiregames.com/D106
This was SVN commit r19237.
The code paints far below the waterheight and the potential shallow
generation on that central river variation is done by the passageMaker
call some lines above.
Reviewed By: bb
(on #0ad-dev today)
Also add a declaration forgotton in 6036b48c1d.
This was SVN commit r19236.
We do not need iteration order, and this makes this explicit.
Reviewed By: echotangoecho
Differential Revision: https://code.wildfiregames.com/D82
This was SVN commit r19235.
Two clients chosing the same GUID is highly unlikely, yet possible.
A malicious client chosing an existing GUID would have resulted in
unassigning the player with that GUID.
This was SVN commit r19225.
The faction couldn't build it before as the wooden tower added to all
factions except Romans in f56102967f was logically a part of the
palisade which Romans couldn't build either following 3bb1c01ccc.
Differential Revision: https://code.wildfiregames.com/D129
Patch By: fatherbushido
Accepted by: LordGood, scythetwirler, wowgetoffyourcellphone
This was SVN commit r19220.
Parse paired techs correctly that appear as a tech requirement.
Don't list units with an empty production queue in the trainer panel.
Display a nice warning if a tech requires a technology that can't be
researched anywhere.
Patch By: s0600204
Differential Revision: https://code.wildfiregames.com/D113
This was SVN commit r19213.
Based on patch by: fatherbushido
Idea accepted by: scythetwirler
Differential Revision: https://code.wildfiregames.com/D128
This was SVN commit r19212.
(This is a workaround that will be removed when gloox has fixed the
issue.)
Reviewed by: elexis
Refs #3771
Differential Revision: https://code.wildfiregames.com/D87
This was SVN commit r19205.
Make catapults more affordable by reducing their stone cost from 350 to
250 per unit.
Differential Revision: https://code.wildfiregames.com/D102
Reviewed By: scythetwirler, fatherbushido
This was SVN commit r19204.
Summary:
When the heal technology is researched in a barrack, a wounded unit
garrisoned in it is not healed.
Indeed the component doesn't listen to value modification.
The patch fixes that.
Test Plan: Reproduce what is above and see that the patch fix it.
Reviewers: O2 JS Simulation, wraitii
Reviewed By: wraitii
Subscribers: wraitii, mimo, Vulcan
Differential Revision: https://code.wildfiregames.com/D63
This was SVN commit r19197.
Summary:
The documentation is imo misleading.
Projectile speed 0 is not supported anywhere in the code and doesn't
lead to a melee attack.
Test Plan: -
Reviewers: O2 JS Simulation, leper
Reviewed By: O2 JS Simulation, leper
Subscribers: leper, Vulcan
Differential Revision: https://code.wildfiregames.com/D115
This was SVN commit r19196.
Summary:
In some mods (for hero) or in the current game (for sentry tower), when
we have reach the entity limit related to a restriction category, we
can't upgrade any entity wich have that restriction category to one with
the same restriction category (for example, upgrading an hero to an hero
as the 1 max limit is yet reached).
That diff should allow that in the gui and the sim.
Code could be concatenated. So comments are welcome.
Test Plan:
For in game testing, you can for example in the Player template reduce
the DefenseTower limit to 2. Then build 2 sentry towers.
Without the patch you can't upgrade any of them. With you can upgrade
them to defense tower.
Reviewers: wraitii, O8 JS GUI, O2 JS Simulation
Reviewed By: wraitii, O8 JS GUI, O2 JS Simulation
Subscribers: leper, mimo, wraitii, Vulcan, O8 JS GUI
Differential Revision: https://code.wildfiregames.com/D81
This was SVN commit r19195.
This will allow us to use some linters that would otherwise crash on
this non-standard SpiderMonkey feature. Refs #4419.
Special thanks to elexis for thoroughly checking and testing all the
changes!
Reviewed By: leper, elexis
Differential Revision: https://code.wildfiregames.com/D40
This was SVN commit r19191.
By removing this we don't need to add NASM support to premake5, refs
#3729.
Reviewed By: leper
Differential Revision: https://code.wildfiregames.com/D97
This was SVN commit r19188.
Template-ize CallFunctionVoid.
Changes CallFunction parameter order to make template parameter
deduction with
variadic parameters work nicely.
Reviewed By: Itms, wraitii, Yves
Differential Revision: https://code.wildfiregames.com/D77
This was SVN commit r19183.
Summary:
To fix tickets like #3335, having a shared vision at the entity level is
needed. This patch implements that in CCmpRangeManager, interfaced with
a new JS component VisionSharing to manage the shared entities visions.
As an example of use case (in addition to garrisoning in allied
structure without the sharedLos tech), we can think of bribing enemy
units: there is a part about it in the patch, but this one is very wip
and not intended to be committed but rather for test purposes of the
feature.
So when garrisoning a unit in another player's building, the vision of
the garrisonHolder is shared (part intended for review). In addition,
for tests of the feature, when clicking on the new bribe icon in the
diplomacy window, a random unit of the chosen player is bribed and share
its vision during 15 s.
Test Plan: Garrison a unit in an allied structure without the sharedLos
tech, or test the wip bribe feature from the diplomacy window.
Reviewers: Itms
Reviewed By: Itms
Subscribers: Stan, leper, O11 Templates, wraitii, elexis, fatherbushido,
Itms, Vulcan, O1 C++ Simulation
Differential Revision: https://code.wildfiregames.com/D60
This was SVN commit r19175.
Summary:
The pause button displays an additional GUI element on top of the button
containing the text.
This apparently unneeded element uses a style forcing the button text to
be white, even if the element is disabled.
Test Plan:
Start a multiplayergame with all players in the same team, winning it
instantly.
The resign and pause button become disabled, but have different text
colors.
Apply the patch and notice the issue is gone and that the XML is more
consistent.
Try pausing to see that the pause button caption still updates.
Convince yourself that there are no other occurances of
`pauseButtonText`.
Reviewers: fatherbushido
Reviewed By: fatherbushido
Subscribers: Vulcan
Differential Revision: https://code.wildfiregames.com/D91
This was SVN commit r19173.
Thus remove the peculiarity to broadcast to clients that are in the
gamesetup, loading screen or ingame, but not rejoining ones.
Fix "unknown player" errors in the GUI by broadcasting player
assignments to rejoining players too. Fixes#4036.
Differential Revision: D17
Reviewed By: Imarok
This was SVN commit r19171.
Fixed mauritarian archer portrait as citizen soldier
Fixed judean slingers portrait as citizen soldier
Thanks wowgetoffyourcellphone for the portraits!
This was SVN commit r19167.
Remove the "Net" prefix from the non-networked classes.
Use variadic macros and mark the client turnmanager as NONCOPYABLE.
Differential Revision: D16
Reviewed By: leper
This was SVN commit r19165.
We were polling SDL messages from two different threads (by mistake),
and Sierra now refuses to do that.
Tested by Stan, Itms, Fatherbushido, and discussed with Philip for the
code change itself.
Fixes#4408.
Differential Revision: https://code.wildfiregames.com/D42
This was SVN commit r19160.
since they are only useful for AI debugging and counterproductive in
multiplayer mode, refs #3551.
Instead, enable AI developers to exit the game from a new AI API
command,
allowing to batch simulate matches. Refs #2755.
Differential Revision: D65
Reviewed By: leper
Consulted: mimo
This was SVN commit r19155.
Templates should be the same for all players, techs can be used to
provide
different lists of templates if that is needed.
Reviewed By: Itms
Differential Revision: https://code.wildfiregames.com/D25
This was SVN commit r19142.
fixed build animation mallet placement.
fixed iberian helmet to fit new head meshes.
fixed mauryan turbans to fit new head meshes.
fixed persian camel trader prop placement
fixed female carry meat prop placement
fixed tool prop gather grain placement
This was SVN commit r19132.
Ensure a variable is not clobbered by libpng's use of longjmp. Make code
more consistent.
Differential Revision: https://code.wildfiregames.com/D35
This was SVN commit r19111.
Differential Revision: https://code.wildfiregames.com/D10
-This line, and those below, will be ignored--
M binaries/data/mods/public/simulation/components/Fogging.js
This was SVN commit r19100.
Implemented new unit meshes with animations. (thanks
wowgetoffyourcellphone for helping out with actors)
Added Tobi95's capitoline jupiter building as roman wonder
Added Stanislas69's Stupa upgrade, terrain textures, and kausia cap
helmet.
Several updated textures from wowgetoffyourcellphone Delenda Est mod,
improved smoke and rain particles, and tech icons & portraits (some not
used yet)
Added new death screams from opengameart.org
This was SVN commit r19095.
Tweak the coverage script.
Update the clean-workspaces script to be able to avoid rebuilding
libraries.
Differential Revision: https://code.wildfiregames.com/D2
This was SVN commit r19074.
Added remaining animations of spear_shieldsmall variations
Updated seleucid champion texture adding pink painted ears
Minor tweaks to hoplite and pikemen spears
This was SVN commit r19065.
Summary: Refs #4419.
Test Plan: When running tests, make sure nothing is created.
Reviewers: leper
Reviewed By: leper
Subscribers: leper, Vulcan
Differential Revision: https://code.wildfiregames.com/D1
This was SVN commit r19062.
This patch has the extra benefit that the stack trace actually appears
on Windows now, instead of going into the void.
Tested by Vladislav, refs #4419
This was SVN commit r19045.
This is in particular useful as many observers can join in the gamesetup
phase
(since the server doesn't restrict connects then due to not knowing in
advance which client will become an assigned player.)
This was SVN commit r19007.
Unfiy delete and load button disabling (to remove a duplicate line and
support a hypothetical reload button).
Remove an unneeded selectionChanged call (which is automatically done
when changing the selection index).
This was SVN commit r18998.
The previous code worked in case new mutual allies were added, but, when
some were removed, it was suboptimal in terms of performance and it made
some units visible in the FoW.
Fixes#4266
This was SVN commit r18994.
Thus don't add a "t" to the chat input after opening it with the hotkey
on unix.
The bug still occurs on Windows due to an SDL bug reported upstream by
echotangoecho.
This was SVN commit r18990.
Use objects instead of arrays to achieve more readable code.
Use two for-of loops, a continue instead of an if-else pattern and
remove an unneeded variable dt.
This was SVN commit r18981.
Prohibit gathering of wood by removing storehouses and the worker
elephant.
Keep the roman army camp allowed for now because it isn't a dropsite.
Always spawn at least one attacker in the first wave.
This was SVN commit r18976.
Display the gatherrate tooltip in the selection details.
Remove structure tree specific gatherrate parsing code.
Receive the data directly from Templates.js and GUIInterface.js like the
other tooltips do.
Add TODO about the tooltip lying (averaging over the subtypes).
This was SVN commit r18966.
Remove all occurances of hardcoded resources in the simulation, GUI and
AI code by
specifying resources as JSON files in a new simulation subdirectory and
accessing them through a globally defined prototype.
This was SVN commit r18964.
Create target objects in a single statement where possible, to highlight
the absence of self-reference.
Separate arrays of hardcoded templates from the logic.
Use loops to remove duplicate statements.
Add scopes to the new code to show and enforce that some variables are
indeed local.
This was SVN commit r18952.
Contrary to the serializationtest, initializes the secondary simstate
only once
before progressively applying updates.
Thus reproducing actual multiplayer rejoining, enabling developers to
analyze OOS reports solely from the replay file of the rejoined and a
non-rejoined client.
This was SVN commit r18940.
foundations and construction sites, not-yet-implemented animations,
briton walls, fortress, and textures
Carthaginian buildings, destruction variants
This was SVN commit r18939.
Remove "new" keyword from Alpha 21 maps.
Remove "new pathfinder" hint from Alpha 19, as reported by fcxSanya.
Show chat timestmaps by default.
This was SVN commit r18919.
Some GUI elements use white until the first diplomacy change.
The choice black is confusing, problematic as there is a dark gray
player color and
problematic as black words in the chat have no contrast to the black
background.
Changing playercolors in running games is a questionable feature, thus
don't attempt to inform the GUI via a GUIInterface notification now.
This was SVN commit r18914.
The previous code errored as the trigger point became gaia, consequently
trying to access the undefined playerCivicCenter of gaia.
Remove two useless loops by sending the command for all entities instead
of one command for each entity.
Rename attackerEntities to attackerTemplates and attackerCount to
attackersPerTemplate.
This was SVN commit r18913.
The code kept the reference to the trigger component before
deserialization,
thus accessed the empty civic center array instead of the deserialized
one.
refering to the actual Trigger component instead of
This was SVN commit r18909.
The removed code is redundant with the AlliedVictoryCheck of the
EndGameManager which is called for all victory conditions.
The code is broken because it suggests last man standing mode while
actually not implementing it.
As of #4143, players can chose between allied victory or last man
standing mode. They should be able to chose on this map too.
This was SVN commit r18906.
Add a menu entry for atlas.
Add some translations for the product description provided by native
speaking players and contributors.
This was SVN commit r18904.
Remove many unneeded parenthesis when assigning variables.
Use min and max to avoid ternaries.
Simplify ternaries that return booleans.
Remove == true from checks.
This was SVN commit r18881.
Serialize the mapsize in the pathfinder and the reveal shoreline flag in
the range manager.
Reload the rangemanager data after other components have been
deserialized.
Use the SerializeCommon pattern in the pathfinder to avoid code
duplication.
Move the shoreline logic from the Vision component to the range manager.
Remove unused interface mocks from the rangemanager test following
b05879e151.
This was SVN commit r18879.
Use for...of loop and remove unneeded array and length variables.
Use fill and concat to remove unneeded loops.
Utilize map to create new arrays instead of reusing the same inside
fill.
Remove an unneeded non-recursive copy in the RandomGroup placer.
This was SVN commit r18876.
Remove duplicate fish placement from english channel.
Allow placing docks on neareastern badlands to gather the placed fish by
increasing the waterheight from the default 19.9 to 20.
This was SVN commit r18871.
Annotate and move the envrionment defaults to the file that contains the
methods to change them.
Remove redundant watercolor entry and add default water tint to a map
that didn't specify it.
Add a comment about the default waterheight pitfall (4391498cf4).
Add missing quotes and spaces, remove unneeded comments.
This was SVN commit r18862.
from 5 to 10 for champion buildings and persian palaces,
from 0 to 6 for embassies,
from 0 to 5 dogs for the kennel
while keeping the garrison limit of the seven other special buildings at
5.
This was SVN commit r18849.
The hotkey introduced in 5135bcb899 was likely a workaround for the
custom windows SDL (wsdl) implementation which is no longer in use.
This was SVN commit r18830.
The internal data of the component, which is serialized, should not
depend on the presence of a visual Unit.
Also remove a misleading comment about a simple initialization code.
Refs #4270
This was SVN commit r18824.
* Rewrite the Update function, add more details and information in
comments, and properly serialize everything that function needs.
* Fix the broken deserialization code by using a sane helper function.
* Fix the `SelectMovementAnimation` function.
Fixes#4270.
This was SVN commit r18823.
Also unify the garrison limit property names in GUIInterface and
Template parsing (thereby also distinguishing a garrison limit of 0 and
undefined in that equation).
This was SVN commit r18817.
Introduced by 46ead523b8, caused by serializing the aura cache which is
initialized by the tooltip calls from the GUI.
Reviewed by Itms, in combination with 09e775446efixes#4239.
This was SVN commit r18804.
Rename session chatPanel style to chatPanelOverlay and merge other
chatPanel styles in common/.
Fix a singleplayer bug where messages send by the player wouldn't be
shown in the chat overlay due to a missing guid != "local" check.
Save the user preference whether to show the history to the user config
file.
Remove /enemy /ally and /observer aliases for simplicity.
This was SVN commit r18775.
Since vision range is 80m (120m upgraded), a minimum distance of 50m
should be more than fine enough for the intended purpose.
This was SVN commit r18768.
If it is needed at some point, this map should be handled and updated
the same way as the passability map and territory map are.
Refs #4191
This was SVN commit r18760.
Let towers cost 50 wood and reduce the stone cost by 50.
The upgrade costs so much that it's cheaper to build a stone tower than
building and upgrading a wooden tower, but still cheaper than building a
wooden and stone tower.
Increase the minimum distance between wooden tower to 60, so that the
upgrade won't circumstance the minDistance of the stone tower.
Add missing newline to the entity limit tooltip of the upgrade component
(refs #2706) that was never visible before.
This was SVN commit r18754.
Increase the size of the color label by stealing some space from
neighboring fields,
so it works for all translations with the minimum resolution, fixes
#3761, refs #1580.
Right-align civ-info and reset buttons with the dropdowns for consistent
appearance, refs #3805.
Ensure column headers/buttons can't overlap by giving neighboring fields
identical left/right values.
This was SVN commit r18739.
Add missing loot entry to many new buildings that were added after
d7b31da2dc and ships.
Give civic centers and wonders a significant amount.
Food related structures contain some food.
Temples somehow yielded 500 metal loot previously.
Remove experience point loot from non-defensive buildings.
Merge loot for cavalry and hero templates.
Swordsmen and sword cavalry loot 5 metal, slingers 5 stone, other units
5 wood.
Remove some duplicate Looter, MiniMap, Selectable and
TrainingRestriction entries.
Remove pointless sentence "Special Building." from persian hall tooltip.
This was SVN commit r18738.
Don't display the projectile tooltip in the construction panel, since
that also doesn't show the attack tooltip.
(Since there is not much choice between attacking structures, the attack
information doesn't help deciding which
structure to build. Displaying the tooltips would require 3 lines.)
This was SVN commit r18737.
Increase crush armor of most siege from 1 to 5,
decrease crush armor of rams from 10 to 5.
Bolt shooters were not affected by d38adc7cd0, but nerfed too much in
8a2638a8f5.
Thus make them stronger as in that commit, but weaker than before it by
increasing their repeat rate by 25%.
Remove minimum attack distance of the macedonian siege tower and
shoot one arrow per unit garrisoned but at most 10 arrows,
rather than shooting only one arrow for 2 units garrisoned.
This was SVN commit r18735.
The AI will retreat the hero in regicide games once it reaches less than
70% health.
It will garrison it in healing structures. Elephant heroes will retreat
to the home base.
Once the hero has healed, it will be used for attacks again.
This was SVN commit r18731.
However, this can mask memory issues, so this flag will not be enabled
by default. The autobuilder will use it, so SVN playtesters and release
users can benefit from it. Windows users compiling the game themselves
will have the 2GB limitation.
Fixes#4190, refs #1619, #4191
Flag tested by Stan
This was SVN commit r18711.
Move an early return to the top of the function.
Add an early return in case an error was determined.
Remove unneeded variables ok and templatePath.
Replace includeSubdirectories boolean with a flags int to merge
duplicate vfs::ForEachFile calls.
This was SVN commit r18696.
Explain the new victory conditions and last man standing option in the
gamesetup.
Add an ingame dialog showing these explanations and all other chosen
gamesetup options,
so that players don't have to recall them and late observers don't have
to ask.
This was SVN commit r18692.
The GC API changed to have explicit start and step methods, and the
start/shrink cases now take the gc kind as a parameter. Patch by leper.
Addresses https://bugzilla.mozilla.org/show_bug.cgi?id=1099152
This was SVN commit r18682.
Update files for building SpiderMonkey.
Add a script for starting the tracelogger, as well as some instructions,
to be detailed in the wiki.
This was SVN commit r18656.
Remove m_SelectedDef, m_SelectedColumnOrder and m_HeadingHeight. Use
GetSetting and SetSetting instead. Thus
implement selecting a column / column order sprite from JS correctly.
Since the actual list sorting is done in JS, only the column header
sprites were inaccurate.
Remove "selected_def" since that is redundant with "selected_column".
Merge "selected_column" with "default_column" (and
"selected_column_order" with "default_column_order") since
all properties provided in XML pages are defaults and to remove the
copying on init.
Rename "def" to "column" and "ObjectDef" to "COListColumn".
Replace 30px header height hardcoded in the C++ with an option set by
the style.
Remove the unneeded requirement to specify a "list_name".
Thus rename "list_name" to "list_month" in the replay menu.
Remove unneeded "list_" prefix and substr(5) in column checks.
Use ranged loops.
Fix typo "Avalible".
Add an error message if the GUI style doesn't specify the selected
column order.
This was SVN commit r18652.
This is in turn used by GetEnemies and the new GetAllies and
GetMutualAllies.
Use these in a few places as those are common queries.
Fixes#4161.
Reviewed by: fatherbushido
This was SVN commit r18649.
And all uses thereof could easily be replaced.
This changes the data structure of cmpTrigger.conquestEntitiesByPlayer
to
not store the player entity at all, and since that is now gone replaces
the
object by the array that was its sole property.
Refs #4161.
Reviewed by: fatherbushido
This was SVN commit r18645.
Merge common/styles.xml (which contains only the special default style)
with common/common_styles.xml.
Rename common/common_sprites.xml to common/sprites.xml.
This was SVN commit r18637.
Move remains of common/sprite1.xml to common/common_sprites.xml.
Remove duplicates bkFillBlack and bkTranslucent.
Rename bkWhiteBorderBlack to BackgroundWhiteBorderBlack.
Move BackgroundSessionTooltip and BackgroundInformationTooltip to
session/.
Remove unused BackgroundErrorTooltip.
This was SVN commit r18636.
Move civ icon overlay entries from common/ to session/.
Move main menu entries from common/ to pregame/.
Remove unused pgButton.
This was SVN commit r18634.
Remove many unused and orphaned entries from common/,
including the entire Wheat theme from more than a decade ago and
most parts of the Stone theme.
Besides being unused, nearly all of the styles were ugly and don't fit
to the existing theme.
No entry should be reintroduced without being actually used somewhere
and if so, use a new subdirectory with the name of the theme.
This was SVN commit r18633.
Remove code that was commented out.
Remove unneeded comments.
Use JSdoc comments.
Move globals to the top of the file.
Quotes for object keys.
This was SVN commit r18629.
Move globals to the top of the file.
Proper case for globals.
Rename restartAble to restartable.
Use proper JSdoc comments.
Whitespace fixes.
Abbreviate with rgbToGuiColor.
This was SVN commit r18628.
Create a Damage system component from the Damage helper object and parts
of
the Attack component. This fixes the issue by making ranged damage
independent
of the attacking entity.
While there fix the issue of damaging all nearby entities in case the
actual
target was not hit, instead of only a single one.
This was SVN commit r18625.
displayReplayList was called once per filter initialization i.e. 8 times
too often on init.
This can save multiple seconds when opening the menu.
This was SVN commit r18602.
This also adds some validation to ensure the correct order of JS_Init,
JS_NewRuntime, JS_DestroyRuntime and JS_ShutDown calls.
Refs #3708
This was SVN commit r18584.
On maps with multiple buildings it didn't prioritize the civic center.
This part would require a findLastIndexOf array function to avoid the
loop.
This was SVN commit r18572.
Thus fix lineendings in files that were missed in bcbf25bfbd, as
reported by Imarok.
(SVN throws an error when trying to set the native filending property on
a file with mixed fileendings. However when recursing it hides this
error).
This was SVN commit r18561.
Increase minimum distance between forests so as to carve more space for
player buildings. Reported by sentado, based on patch by _kali.
Adapt metal and stone mine numbers to keep the same probability.
This was SVN commit r18555.
Move some code from selectViewPlayer to updateTopPanel.
Inline variable civName.
Move one check out of an if-statement in selectViewPlayer.
Merge duplicate call Engine.GetGUIObjectByName("civIcon") for
consistency with other code.
This was SVN commit r18551.
Sometimes players didn't have any wood close by while usually all
players have practically limitless wood around. Reported by sentado.
Thus enforce greater distance between big forests and add some tiny
forests in between them.
Keep a big distance between all forests as it is supposed to be a
desert.
This was SVN commit r18550.
Spawn a random hero at gamestart and defeat the player if the hero dies.
Consider nomad maps where units spawn without buildings or start on a
ship.
Correct a comment for TriggerHelper.SpawnUnits.
Make shuffleArray available to GUI and simulation and use it to
randomize heroes.
This was SVN commit r18544.
Includes team numbers, online/offline- and won/defeated state, AI type
and difficulty for running games and
only the playernames with observer-player distinction in the gamesetup.
Use JSON format inside the XML stanza and minimize traffic by packing
teams.
Use the observer distinction to correctly apply the "full games" trigger
in the lobby, fixes#3143.
XPartaMupp patch applied by scythetwirler.
unescapeText function by sanderd17, refs #3409.
This was SVN commit r18534.
Shows (only) the stats of the current player in the summary screen while
playing.
Also shows those of mutual allies too if the shared vision tech is
researched.
Display the resources and population counts of allies in the tooltips of
the top panel.
Use a sprintf for the pop / limit ratio and remove hardcoded resource
strings in the XML, refs #3934.
This was SVN commit r18533.
Furthermore add two TODOs about other known placement bugs and
don't enforce close player placement if the team consists of only two
players,
since controlling much territory is more important than having a
neighboring allied CC close by.
This was SVN commit r18530.
Garrison up to 10 men in rams and 12 in persian ones, in order to
have a greater chance of attacking enemies with many melee champs
defending,
since the new balancing in alpha 21 requires siege engines to destroy
buildings, see d38adc7cd0 and 27c46a0a68.
Remove undocumented garrisoned healrate of rams introduced in
d1ed264c9b.
That commit introduced it in many places, which were removed in later
commits.
Leave the positive garrisoned healrate of ships and special buildings
for now,
assuming that there are supplies on ships (but not in rams).
Add garrisoned healrate tooltips in the following commit.
This was SVN commit r18528.
Includes a water and skyset fix by niektb. Partially reviewed by FeXoR.
Like last time, commits can be found at
https://github.com/0ADMods/maps_random_by_kali
This was SVN commit r18523.
While at it, remove the revert of the
civbonus_hellenic_architecture.json in the hellenic house templates
(1091 Health * 1,1 = 1200 Health),
since the templates should be independent from the number of the json
file (thus restore the missing 10% bonus for hellenic houses).
Construct big houses in 50 (respectively 55) seconds instead of 60
seconds for the same reason (and using a number that is more round than
53 without increasing the buildtime).
This was SVN commit r18517.
This is still a bug in XPartaMupp as that should in theory avoid
obviously invalid reports
(defeating players twice in the 'simulation' of the lobby bot).
This was SVN commit r18512.
Allow deleting of miraged foundations.
Add component method to set units undeletable. Based on patch by bb,
refs #3102.
If the control-all-units cheat is active, delete sheep, mostly captured
buildings and undeletable units.
Merge duplicate delete checks in the GUI. Thereby take into account the
control-all-units cheat and undeletability in all places.
Disable the delete button if the entity can't be deleted.
Add a tooltip for undeletability.
Don't colorize whitespace.
Remove unneeded comments.
This was SVN commit r18487.
Add comments to document that GetEntityState and GetTemplateDataHelper
need to use the same object structure.
Remove four unneeded conditionals that are always true from
GetTemplateDataHelper.
Inline 3 splash damage variables in the attack component.
This was SVN commit r18485.
The order change to GetAttackTypes in a09c59e044 revealed that it was
only the GUI not triggering the buggy code.
Eliminate for-each of UnitAI calling that function.
This was SVN commit r18481.
Cache the viewed profile directly.
Remove the rating check since it is always true ("-2" used if the rating
doesn't exist).
This was SVN commit r18474.
Use the cheat multiplier for upgrading and un/packing.
Remove if-statements that are always true.
Remove unused undefined "time" item from array in the selection panel.
Pass that object directly instead of copying each property explicitly.
Various indentation fixes in the selection panel code.
This was SVN commit r18472.
This new components allows giving the upgrade a cost, required
technologies, and a required time.
Implement gates using this generic component.
Fixes#2706
This was SVN commit r18467.
Use .filter(), .every() and .some() to simplify, Math.max/min instead of
if-statements, inline functions, add newlines and allow attack orders
while flying.
This was SVN commit r18465.
Also clean up the Health component.
Rename healer to heal (as that is the actual component name).
Remove the structure tree code to replace a proper Templates.js
implementation.
This was SVN commit r18464.
Show how many units can be garrisoned, the number of arrows shot by
default, per unit and limit, fixes#3816.
Thus remove a lot of hardcoded numbers in the translated strings and
correct a wrong number for the mauryan ship, fixes#3904.
This was SVN commit r18455.
Also contains a patch by fatherbushido for attackRateDetails and
getAttackTooltip to
not show something broken for buildingAI units that can capture, fixes
#4061 (see #4000).
Make tooltip functions uniform.
Pass template everywhere
instead of template.armour in getArmorTooltip
rate in getRepairRateTooltip and getBuildRateTooltip and
entState in attackRateDetails.
Add an early return for every tooltip function.
Use empty string instead of "Armor: (None)" for trees etc..
Don't prefix tooltip return values with "\n", but let the user of that
function add them.
Thus make tooltip concatenation much nicer (f.e. draw.js).
Use a loop instead of duplicating per damage type in damageTypesToText.
Add font functions to avoid duplicating tag code.
Merge sprintf's and inline variables.
Add few TODOs.
Fix some strings:
Use "%(specificName)s %(fontStart)s(%(genericName)s)%(fontEnd)s")
instead of "(" + foo + ")" ...
Use existing "%(percentage)s%%" instead of foo + "%" in
armorLevelToPercentageString.
Remove
duplication by calling/introducing shared functions (getEntityTooltip,
getHealthTooltip, getGatherTooltip, getVisibleEntityClassesFormatted),
unused function damageTypeDetails which was also a duplicate of
damageTypesToText,
unused function damageValues,
some warns that are equivalent to errors they attempt to cover up
(getAttackTypeLabel, getCostComponentDisplayIcon, getEntityNames,
getEntityNamesFormatted),
some unused variables,
"???" and translate("???").
Don't fix translate("Foo:") strings to avoid a lot of translation work.
This was SVN commit r18454.
It might be unexpected in the first place to let them gather.
(However that is not really weirder than having cavalry hunt sheep.)
This was SVN commit r18453.
Add a new simulation message and chat notification for players who won.
Avoid duplicate playerstate messages in the sim and GUI by triggering
changes with a function instead of a message.
Reveal the map on defeat/win exclusively in the player component
(instead of having a silly GUI proxy and doing it also in the
EndGameManager sometimes).
Remove the skipAlliedVictory argument from the player component, since
that shouldn't contain references to the EndGameManager, refs #3970.
Show a proper message box on win/loss and add the hint for hosts
disconnecting other players.
Do defeat/win procedure in the GUI when such a message arrives, instead
of checking onTick for playerstate changes.
Thus don't show that confirmation again on every rejoin.
Don't show a pointless message box if IsAtlasRunning.
Explain that the session.js variable is needed to avoid an
order-of-execution bug.
Select "observer" item when rejoining as a defeated player.
Remove an unneeded call to updateTopPanel.
This was SVN commit r18441.
Savegame / replay menu selected game information:
Show players who won the game (not only defeat).
Show translated civs instead of the civ code.
Use a translation for "%(team)s:\n%(playerDescriptions)s".
Merge nearly duplicate objects passed to formatPlayerInfo.
Merge deleteGame and deleteGameWithoutConfirmation.
Summary screen:
Construct the summary screen title in place, not in the session, nor
replay menu.
Remove g_Players from the replay metadata since all relevant
information is contained in the sim data.
Split g_GameData into gui and sim.
Access g_GameData instead of data for consistency.
Move code from XML to JS.
Don't use victory music when observers enter the summary screen (just
keep the current track like when exiting the game as a player).
Rename updateObjectPlayerPosition to initPlayerBoxPositions.
This was SVN commit r18440.
Translate the map "random" in the lobby.
Fix a warning in getMapDisplayName reported by echotangoecho when
hosting a lobby game and selecting the random map.
Use the right translation of that "random" map in b84b9a374a (since it's
not the maptype).
Notice mapInfoName still shouldn't be colored.
This was SVN commit r18428.
Features include new graphs to compare runtime of functions and runtimes
across reports, as well as new profiling functions that only profile
spikes.
This was SVN commit r18423.
Move duplicate reallyDeleteGame to shared file.
Inline getPlayerInfoText since it is used only once, refs #1090.
Merge deleteGame and deleteGameWithoutConfirmation.
Use let instead of var.
This was SVN commit r18422.
Point out missing functionality and unused properties in the
implementation of checkboxes.
Don't specify a useless font tag for checkboxes in the templates.
This was SVN commit r18419.
Remove tons of trailing whitespace.
Format JSdoc comments properly.
Use alphabetical sorting in array.
let instead of var.
Eliminate deprecated for-each.
This was SVN commit r18412.
The mauryan empire is not known to have the strongest fleet, so reduce
their ships hitpoints to the average for that model.
Redue bireme metal cost to make it an actual alternative to the trireme,
considering population cost and hitpoints.
Remove a hardoded linenumber in a comment.
This was SVN commit r18402.
Move chat window and developer overlay to a custom file.
Use String(foo) instead of ""+foo.
Remove a pointless loop and GetGUIObjectByName call in autoCompleteNick.
Remove noisy line-comments.
This was SVN commit r18399.
Remove unused, seemingly unusable wonder duration multiplier, refs
#3234.
Replace wonderDuration of the EndGameManager with gameTypeSettings,
since the component should be agnostic about victory condition logic.
Remove an unused cmpEndGameManager.
Inline a variable, few newlines, let intsead of var.
This was SVN commit r18398.
Use arrow functions.
Inline exchangeResources which was defined in the wrong file.
Remove unused selectRequiredGoods. Related code should be removed likely
too.
Add missing translate.
This was SVN commit r18389.
Remove toggleChatWindow which duped openChat and closeChat.
Toggling the chat window with hotkeys is pointless due to the focus.
Inline setTeamChat.
Add some newlines, 2 missing semicolons and remove unneeded comments.
This was SVN commit r18384.
Use QueryPlayerIDInterface to remove duplication as suggested by leper.
Remove its duplicate GetPlayerComponent.
Add IsOwnedByHelper and IsOwnedByEntityHelper to remove duplicated ally
check functions.
Remove unused function GetPlayerFilter from 17c473f2f3.
Remove unused variables and access to undefined ones identified using
jshint.
Rename cmpPlayerMan.
This was SVN commit r18382.
Merge some if statements.
Fix whitespace.
Remove unneeded comments and braces.
Remove one duplicated statement out of an if-statement.
This was SVN commit r18381.
Remove duplicate assignments in updateGameSelection.
Add function senderFont to remove duplication.
Add newlines to reduce line length and have properties of different
objects start on the same level of indentation.
Use logical OR instead of ternary in two occurances (mapTypeIdx).
This was SVN commit r18377.
Cleanup:
Move all code to hide elements to switchSetupPage.
Remove nasty second argument from switchSetupPage by just hiding every
page.
To avoid another state variable, immediately set g_IsConnecting to true
by calling startConnectionStatus when trying to host.
Use .some instead of a loop.
This was SVN commit r18371.
Remove the player assignments altogether (506350d6fa) as the C++ part
already saves the playerID.
Grab the playerID directly from the game instead of passing it around
needlessly.
This was SVN commit r18357.
Don't save the player assignments to savegames as
the GUIDs are outdated and the GUI data only applies to the player that
saved the game.
Remove unneeded argument from getPlayerData.
Remove invalid (ready should be status) and unneeded playerAssignment
data when selecting a map in singleplayer mode.
Show filenames of saved games in the debug log.
This was SVN commit r18355.
For consistency remove grayout from unit action commands (unload all,
delete, ...) as suggested by sanderd17 some time ago.
Remove unneeded grayout from unittype specific ungarrison buttons (as
the grayout is added automatically in this case).
Allow focusing on rallypoints for observers (should be added to the
allied commands too).
Add newlines and inline some variables.
This was SVN commit r18347.
Also fix a simulation bug (check for allied victory on game start).
The mode is not a victory condition as it applies to all victoriy
conditions.
This was SVN commit r18342.
Access the server from the client only, not from the GUI (except for
autostarted games).
Thereby lay the foundation for clients to setup the game (refs #3806)
and dedicated hosting (refs #3556).
Doesn't transfer nor remove the SetTurnLength showcase from 0ebe3486b6.
This was SVN commit r18322.
Rename "hosts" following 903803ceec in session and join dialog.
Move join/leave code to new functions OnClientJoin and OnClientLeave.
This was SVN commit r18315.
Use 8b30273a50 to remove hardcoding of the available panels.
Access the summary panels by name instead of numerical index.
Move nested function to global scope.
Add newlines.
Remove unneeded comments.
Use join(" ") to construct the size property.
This was SVN commit r18314.
Split logic to onClientJoin onClientLeave.
Remove duplicate, yet slightly different ready button caption.
Rename hosts to newAssignments in the GUI message sent by the NetClient.
This was SVN commit r18299.
Call updateGameAttributes instead of copying the function contents.
Inline numPlayers and remove ternary that returns the same value in both
cases.
Add newlines, change some comments.
This was SVN commit r18298.
Early return instead of a big if-statement.
Inline r, targetX, targetZ, towerX and towerZ.
Rename s to spacing.
Remove unneeded else keywords.
Eliminate deprecated for-each.
Use let instead of var.
Quote object keys.
++i instead of i++.
Some newlines.
This was SVN commit r18288.
Default to the viewed player in the GUIInterface to avoid passing that
separately in some places, refs #3168.
Thus GetEntityState will be called for the viewed player instead of
observer playerID, therefore
fixes a fog-of-war selection relict when changing the perspective, refs
#3850.
Also remove some unused player arguments.
This was SVN commit r18283.
Removes duplicate theatron templates and use a parent template instead.
Removes unused Theban theatron.
Fixes a buildtime inconsistency.
Also improve the tooltip string as suggested by leper.
This was SVN commit r18269.
Increase the armor of buildings following 27c46a0a68.
Triple the research time for the population tech, as it is the most
powerful tech in the game.
Mention that unique building auras stack.
Fix a bad tooltip in pop_wonder.json.
This was SVN commit r18255.
Double the metal cost of elite spartan citizen soldiers, as they have
stats near those of champions.
Use a more reasonable cost for age 2 champions.
Differentiate the armored swordsmen from the other sword champions by
actually increasing it's armor.
This was SVN commit r18249.
Owning multiple libraries and theatrons increases the aura bonus
proportionally, so as to incentivize capturing.
Make the library aura more appealing by giving a 10% research time
bonus.
Improve a tooltip.
This was SVN commit r18248.
Let ptolemians produce it in a captured siege workshop.
Remove bolt shooter technology from seleucids, as they don't have that
weapon.
This was SVN commit r18243.
Add linebreaks.
Eliminate unneeded variables mapName and gameDescription.
Remove a check as g_GameAttributes.map is always defined.
Sort the two one-line statements above the helper variable declarations
to make it more more obvious that the statements don't use them.
This was SVN commit r18227.
Eliminate deprecated for-each.
Merge if-conditions.
Add linebreaks to objects, so that each property is declared on a
separate line, refs #252.
For consistency, use returns in negative instead of positive cases.
Make three functions global, one of which had been defined thrice.
Remove comments stating the same as the code.
This was SVN commit r18224.
Send the "client has rejoined" message after the synchronization
finished instead of right after the loading screen.
Patch by echotangoecho, refs #1949, #1950.
This was SVN commit r18203.
Save the viewed player in the CGame class.
Add the const keyword back to the SimContext to help find mistakes at
compiletime.
This was SVN commit r18201.
Don't create an empty oos_logs directory when starting the game.
Rename getDateIndexSubdirectory to createDateIndexSubdirectory.
Add a comment for the breakpoint argument of CreateDirectories.
This was SVN commit r18183.
Differentiate between SP and MP name and allow editing it in the
settings.
Defaults to the OS username.
Makes sharing singleplayer replays more effective.
Also fixes a troublesome colorization of "You" in a translated sentence,
refs #3501.
This was SVN commit r18180.
Remove pointless "mode" argument from messageBox and add newlines to its
calls.
Remove unused variable codes, trailing whitespace and useless comments.
Remove redundant button init code by using a loop (forEach to avoid a
closure).
Inline many unneeded variables.
Add missing translate to gamesetup_mp.js.
Quote object keys and capitalize globals correctly.
This was SVN commit r18178.
Rename GUI objects to numPlayers, mapFilter and mapType for consistency.
Thus use loops to remove code duplication for hiding controls.
This was SVN commit r18169.
A commit against colored spaces.
Use helper function to shorten code while keeping the space apparent.
Inline username variable.
Rename playerIndex to playerID.
This was SVN commit r18162.
Simplify the error message for savegames with different mods enabled.
Remove deprecated for-each with map and for-of.
Simplify code that used conditional operator by replacing it with
logical operators.
Add linebreaks.
Quote object keys.
Early return.
Prefix global with g_.
Remove unneeded sprintf in error messages.
Capitalize comments.
This was SVN commit r18160.
Shows the information for all selected units and for all units of a
given type.
Rename g_CostDisplayNames to g_CostDisplayIcons.
This was SVN commit r18154.
Remove a pointless conditional operator (which had been introduced with
the other format-message functions that distinguish more strings).
Remove unneeded parenthesis and try once more to align this if-statement
properly.
This was SVN commit r18147.
Don't compare for "127.0.0.1" to identify the host, but check for a new
boolean flag that is set by the client, refs #2854.
Remove an unneeded IP address conversion from u32 to string, refs #3241.
This was SVN commit r18140.
Only send the network-warnings to clients that successfully joined the
gamesetup or game.
Thus save a bit performance and
prevents a rare, harmless FSM update error (like in refs #3199) in case
a client received the message while authenticating.
Reported by fatherbushido, refs #3264.
This was SVN commit r18117.
Remove some useless check and a useless reverse loop, and add a flag to
prevent redundant checks.
Patch by fsincos, refs #3588
This was SVN commit r18011.
Remove some useless settings using the default values.
Remove the obsolete <Replacement> tag.
Update some documentation in the code, fix whitespace and unify line
endings.
Patch by otero, fixes#3268
This was SVN commit r17976.
attacknotificationmessage=true ; Show attack notification messages
camerajump.threshold=40 ; How close do we have to be to the actual location in order to jump back to the previous one?
timeelapsedcounter=false ; Show the game duration in the top right corner
ceasefirecounter=false ; Show the remaining ceasefire time in the top right corner
batchtrainingsize=5 ; Number of units to be trained per batch by default (when pressing the hotkey)
scrollbatchratio=1 ; Number of times you have to scroll to increase/decrease the batchsize by 1
woundedunithotkeythreshold=33 ; The wounded unit hotkey considers the selected units as wounded if their health percentage falls below this number
attackrange=true ; Display attack range overlays of selected defensive structures
aurasrange=true ; Display aura range overlays of selected units and structures
healrange=true ; Display heal range overlays of selected units
rankabovestatusbar=true ; Show rank icons above status bars
respoptooltipsort=0 ; Sorting players in the resources and population tooltip by value (0 - no sort, -1 - ascending, 1 - descending)
[gui.session.minimap]
blinkduration=1.7 ; The blink duration while pinging
pingduration=50.0 ; The duration for which an entity will be pinged after an attack notification
[gui.session.notifications]
attack=true ; Show a chat notification if you are attacked by another player
tribute=true ; Show a chat notification if an ally tributes resources to another team member if teams are locked, and all tributes in observer mode
barter=true ; Show a chat notification to observers when a player bartered resources
phase=completed ; Show a chat notification if you or an ally have started, aborted or completed a new phase, and phases of all players in observer mode. Possible values: none, completed, all.
[gui.splashscreen]
enable=true ; Enable/disable the splashscreen
version=0 ; Splashscreen version (date of last modification). By default, 0 to force splashscreen to appear at first launch
[gui.session.diplomacycolors]
self="21 55 149" ; Color of your units when diplomacy colors are enabled
ally="86 180 31" ; Color of allies when diplomacy colors are enabled
neutral="231 200 5" ; Color of neutral players when diplomacy colors are enabled
enemy="150 20 20" ; Color of enemies when diplomacy colors are enabled
timestamp=true ; Show at which time chat messages have been sent
[chat.session]
extended=true ; Whether to display the chat history
[lobby]
chattimestamp=false ; Show time chat message was posted
history=0 ; Number of past messages to display on join
room="arena20" ; Default MUC room to join
room="arena23" ; Default MUC room to join
server="lobby.wildfiregames.com" ; Address of lobby server
xpartamupp="wfgbot20" ; Name of the server-side xmpp client that manage games
xpartamupp="wfgbot23" ; Name of the server-side XMPP-account that manage games
echelon="echelon23" ; Name of the server-side XMPP-account that manages ratings
buddies="," ; Comma separated list of playernames that the current user has marked as buddies
rememberpassword=true ; Whether to store the encrypted password in the user config
secureauth=true ; Secure Lobby Authentication: This prevents the impersonation of other players. The lobby server confirms the identity of the player before they join.
[lobby.columns]
gamerating=false ; Show the average rating of the participating players in a column of the gamelist
[lobby.stun]
enabled=true ; The STUN protocol allows hosting games without configuring the firewall and router.
; If STUN is disabled, the game relies on direct connection, UPnP and port forwarding.
server="lobby.wildfiregames.com" ; Address of the STUN server.
port=3478 ; Port of the STUN server.
delay=200 ; Duration in milliseconds that is waited between STUN messages.
; Smaller numbers speed up joins but also become less stable.
[mod]
enabledmods="mod public"
[modio]
public_key="RWQBhIRg+dOifTWlwgYHe8RfD8bqoDh1cCvygboAl3GOUKiCo0NlF4fw" ; Public key corresponding to the private key valid mods are signed with
[modio.v1]
baseurl="https://api.mod.io/v1"
api_key="23df258a71711ea6e4b50893acc1ba55"
name_id="0ad"
[network]
duplicateplayernames=false ; Rename joining player to "User (2)" if "User" is already connected, otherwise prohibit join.
lateobserverjoins=false ; Allow observers to join the game after it started
observerlimit=6 ; Prevent further observer joins in running games if this limit is reached
lateobservers=everyone ; Allow observers to join the game after it started. Possible values: everyone, buddies, disabled.
observerlimit=8 ; Prevent further observer joins in running games if this limit is reached
[overlay]
fps="false" ; Show frames per second in top right corner
@@ -363,7 +453,6 @@ netwarnings = "true" ; Show warnings if the network connection is b
[profiler2]
autoenable=false ; Enable HTTP server output at startup (default off for security/performance)
script.enable=false ; Enable Javascript profiling. Needs to be set before startup and can't be changed later. (default off for performance)
gpu.arb.enable=true ; Allow GL_ARB_timer_query timing mode when available
gpu.ext.enable=true ; Allow GL_EXT_timer_query timing mode when available
gpu.intel.enable=true ; Allow GL_INTEL_performance_queries timing mode when available
@@ -375,6 +464,9 @@ ambientgain = 0.6
actiongain=0.7
uigain=0.7
[sound.notify]
nick=true ; Play a sound when someone mentions your name in the lobby or game
[tinygettext]
debug=false ; Print error messages each time a translation for an English string is not found.
0 A.D. is designed to be easily modded. Mods are distributed in the form of .pyromod files, which can be opened like .zip files.
In order to install a mod, just open the file with 0 A.D. (either double-click on the file and choose to open it with the game, or run "pyrogenesis file.pyromod" in a terminal). The mod will then be available in the mod selector. You can enable it and disable it at will. You can delete the mod manually using your file browser if needed (see https://trac.wildfiregames.com/wiki/GameDataPaths).
For more information about modding the game, see the Modding Guide online (click the Modding Guide button below).
The mod.io service is developed by DBolical, the company behind IndieDB and ModDB. Those websites have spread the word about 0 A.D. and other indie projects for a long time! Today, mod.io allows us to list and download all the mods that were verified by the team. Click "Download Mods" to try it out and install some!
translate("You are about to connect to the mod.io online service. This provides easy access to community-made mods, but is not under the control of Wildfire Games.\n\nWhile we have taken care to make this secure, we cannot guarantee with absolute certainty that this is not a security risk.\n\nDo you really want to connect?"),
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.