1
0
forked from mirrors/0ad

Compare commits

...

1758 Commits

Author SHA1 Message Date
Itms 18b470a5ea Correctly choose DarwinSSL TLS backend on macOS for libcurl.
According to https://curl.haxx.se/docs/install.html, explicitly
disabling OpenSSL/BoringSSL/libressl with the confusing `--without-ssl`
flag is necessary.

Also disable a few more unneeded dependencies explicitly.

Patch By: Stan
Accepted By: trompetin17
Differential Revision: https://code.wildfiregames.com/D1687
This was SVN commit r21945.
2018-12-08 21:09:27 +00:00
Itms d0dd3ccbc8 New mod signing key for A23b.
Fix indentation in previous commit (3e2c7f88e0).

Differential Revision: https://code.wildfiregames.com/D1686
This was SVN commit r21944.
2018-12-08 20:49:59 +00:00
user1 3e2c7f88e0 Update client\'s default.cfg for the new muc room arena23b
This was SVN commit r21943.
2018-12-06 13:36:28 +00:00
Itms 7115e4f9c7 Target 10.9 as minimal OSX version in all scripts, in order to match the libraries build script.
Differential Revision: https://code.wildfiregames.com/D1685
Tested By: trompetin17
This was SVN commit r21942.
2018-12-03 11:07:00 +00:00
Itms fa1c281e79 Import part of commit https://github.com/premake/premake-core/commit/5f57b5d62a4518f391cf66e1cfb70e4a92353178 to our copy of premake5 alpha10.
After the re-release of A23, premake5 will be updated to the latest
alpha version, which includes this change.

This allows to build premake on macOS Mojave. See
https://github.com/premake/premake-core/issues/1154.

Differential Revision: https://code.wildfiregames.com/D1669
Based on patch by: trompetin17
This was SVN commit r21941.
2018-12-02 20:58:19 +00:00
Itms 01cdd24fea Build gloox with GnuTLS on macOS, refs #4705.
This includes GMP and nettle, that are dependencies of GnuTLS.
On versions of OSX/macOS up to 10.11, TLS handshakes can still fail and
crash, so users of those older versions should disable TLS on the lobby
in the options screen, and will still be able to use it.

Differential Revision: https://code.wildfiregames.com/D1654
Tested By: Tobbi, trompetin17, and testers of their bundles.
This was SVN commit r21940.
2018-12-02 20:52:40 +00:00
Itms a896f670f0 Minor change to the libcurl macOS compilation.
nghttp2 can sometimes be detected on the system by configure, whereas we
do not provide nor use it.

Differential Revision: https://code.wildfiregames.com/D1487
Tested By: trompetin17
This was SVN commit r21939.
2018-12-02 20:41:55 +00:00
Itms badd8cc137 Credit translators for A23b.
This was SVN commit r21938.
2018-12-02 17:56:19 +00:00
elexis e76b7d1e02 Remove obsolete DisplayMessageBox function from 00e18e4ea8, unused since 835609df20.
C++ should not hardcode JS implementation details or strings.
SendEventToAll or CallFunctionVoid are more common and versatile
alternatives.

This was SVN commit r21935.
2018-11-29 12:33:45 +00:00
elexis 1bd9f4393b Allow users to disable TLS encryption entirely in the GUI to ease use of the lobby if gloox/GnuTLS crashes upon TLS handshake, refs #5349, #4705.
Differential Revision: https://code.wildfiregames.com/D1679
Based on patch by: Itms
Tested on Fedora: Itms, bb and myself

This was SVN commit r21932.
2018-11-27 14:41:44 +00:00
Itms 2b847a520a Small changes to the macOS build scripts.
Patch By: smiley, Tobbi and trompetin17.
Differential Revision: https://code.wildfiregames.com/D1609
This was SVN commit r21931.
2018-11-13 16:09:35 +00:00
elexis dd57ba436d Prevent segfault when receiving a STUN connection request while not hosting, refs 61261d14fc / D364.
This was SVN commit r21928.
2018-11-07 22:56:05 +00:00
elexis 039637cf13 The files in this path were not marked as moved in 5dce2f1fb1...
This was SVN commit r21927.
2018-11-07 17:32:21 +00:00
elexis 5dce2f1fb1 Split XpartaMuPP and EcheLOn into separate directories and rename parent folder to "lobbybots" following 5e643ba6be.
Yields a more transparent directory structure, in particular when adding
the third bot or systemd service files.

Refs: #3022, D1659, D1661.
Comments by: user1, Dunedan
This was SVN commit r21926.
2018-11-07 17:23:56 +00:00
elexis 214d6caf43 Complete the lobby server readme and provide a sample ejabberd configuration file.
Describe Wildfire Games undocumented, but relevant or even required
configuration settings.
Add chapter on ejabberd connectivity: TLS encryption (1beb96cb20, refs
#4705), STUN (61261d14fc / D364), IPv6.
Elaborate use policy configuration, add nickname restrictions from
23d8bc11a5.
Brief Terms and Conditions notification (81883806ec, 54e5ad2ae9).
Recommend to run bots without administrative access (but explain the
alternative too for fans of the setting).
Explain how to configure and test 0 A.D. with new lobbies and how to
distribute the settings.

Differential Revision: https://code.wildfiregames.com/D1659
Fixes #4671
Reviewed By: user1
Comments By: Dunedan
This was SVN commit r21925.
2018-11-07 15:59:28 +00:00
elexis ccef625280 Support connecting the lobby bots without TLS errors if the server does not devlier a valid, non-selfsigned certificate.
From https://code.wildfiregames.com/D1659
Reviewed By: user1
Refs #4705

This was SVN commit r21924.
2018-11-07 11:31:01 +00:00
user1 31929d916f Some terms rephrasing and IP policy update
Summary:
* ValihrAnt pointed out a typo and that the "obtains" sentence is
ambiguous.
* It is proposed to save IPs for 3 years.
* stierkampf mentioned that one should refer to the contact url to
exercise the rights.

Test Plan:
Compare legitimate interest assessments by user1 and me to try to value
the retention period.
Judge how much time is left to translate, how efficient the translators
are and weigh against the benefit of the fix.

Reviewers: user1

Reviewed By: user1
Subscribers: user1, smiley, Stan, Vulcan

Differential Revision: https://code.wildfiregames.com/D1658
This was SVN commit r21922.
2018-11-05 20:56:17 +00:00
elexis 237c706dff Allow the user to print and save the text of the terms and conditions before the conclusion of the contract and use the word "Clickwrap agreement".
See EU Court of Justice decision C-322/14, refs #5257.
Adds one string.

Differential Revision: https://code.wildfiregames.com/D1657
This was SVN commit r21919.
2018-10-25 12:32:28 +00:00
elexis 404f2c48b3 Use a banmask for multiplayer matches that have lobby-authentication enabled.
This prevents a lobby player banned by the host from rejoining after
getting a new IP address and changing the rating part of the nickname,
refs #5320, #3241 / 32da740f14, #3549 / 0fd8aa2a77 / D897.

Differential Revision: https://code.wildfiregames.com/D1655
Reproduced By: Hannibal_Barca
This was SVN commit r21918.
2018-10-25 11:58:26 +00:00
elexis 9459825159 Remove two unused dangling gui xml references.
Revert the unintentional revert of 31e412b94e during the rebase of
ac7b5ce861.
Remove unintentionally copy-pasted onscreenToolTip reference from the
termsdialog following 74fbb4b823.

This was SVN commit r21917.
2018-10-24 12:04:11 +00:00
elexis 04ba9d1db4 Gracefully handle empty lobby chat messages.
One case was reproducible with PMs sent via psi-plus that contained only
whitespace, which is trimmed to the empty string clientside.

This was SVN commit r21916.
2018-10-21 14:19:36 +00:00
elexis 9df2fcf43e Delete Siwa Oasis (2) Skirmish map from 4dd90a1ef3 as the source topography map cannot be identified anymore and since it is not unlikely to come from a source that isn't public domain.
Differential Revision: https://code.wildfiregames.com/D1646
Comments By: wowgetoffyourcellphone, smiley, Stan, asterix
This was SVN commit r21915.
2018-10-19 21:06:07 +00:00
elexis ba8b23f28d Use static linking for macOS libsodium build, forgotton in dfa2048dc5.
Patch By: Itms
Refs https://github.com/na-Itms/0ad/tree/osx-fix

This was SVN commit r21914.
2018-10-19 16:29:48 +00:00
elexis c5cb9f6d11 Update macOS libcurl --without-libidn flag to --without-libidn2 following https://github.com/curl/curl/commit/9c91ec778104ae3b744b39444d544e82d5ee9ece
Fixes #5231.
Refs: 8ceb7142fa, 8817050e3a.
Differential Revision: https://code.wildfiregames.com/D1610
Patch By: Tobbi and viky / Victor Adascalitei
Comments By: Itms, andy5995
This was SVN commit r21913.
2018-10-19 16:14:12 +00:00
Itms c3d2ef2dbb Allow the translation scripts to pull the new resource (5a95ee0406).
This was SVN commit r21911.
2018-10-17 21:15:57 +00:00
elexis 9f68d092a7 Increase minimum password length on the lobby from 1 to 8, refs #5257.
This was SVN commit r21909.
2018-10-16 15:57:32 +00:00
elexis 54e5ad2ae9 Lobby Privacy Policy.
Restricts the previous Terms of Service clauses that asked for a
universal grant for personal data processing without explicitly
mentioning chatlogs or IP address logs (possibly in violation of the
Data Protection Directive).
Hopefully establishes GDPR compliance for the lobby by mentioning all
data procsessed, purposes and new user rights, fixes #5257.
Explain why the service is not directed to children < 13 and a COPPA
compliance note.
Add severability clause.
Add licensing note for terms.

Differential Revision: https://code.wildfiregames.com/D1590
Accepted By: Itms
refs https://wildfiregames.com/forum/index.php?/topic/24325-gdpr/

This was SVN commit r21908.
2018-10-16 13:46:18 +00:00
elexis bbf6fc47de Add liability and third party software exclusion to the Lobby and UserReporter terms.
Shorten Lobby Terms of Service by inlining definitions.
No personal data changes in this commit, refs #5257, D1590.

This was SVN commit r21906.
2018-10-13 13:34:28 +00:00
elexis 5a95ee0406 Create UserReporter translation resource for 209bab0255 / D1598.
Differential Revision: https://code.wildfiregames.com/D1647
Reviewed By: Itms
This was SVN commit r21905.
2018-10-13 00:06:52 +00:00
elexis c69cf5076f Add COPPA compliance note to UserReporter and mod.io terms.
Outlaw cheating on the lobby as proposed by user1.
Phrasing improvement of b3631d7bd5 by Hannibal Barca.

This was SVN commit r21904.
2018-10-13 00:01:35 +00:00
elexis b3631d7bd5 Update Lobby Terms Of Use.
Refs #5257, D1590, https://github.com/elexis1/0ad/pull/1
Comments By: Itms, user1, Hannibal_Barca, KeyCollector
This was SVN commit r21903.
2018-10-11 22:56:13 +00:00
elexis 0e2adda813 Display lobby TLS certificate verification errors from gloox, refs #4705.
Update to the most reason why TLS certificate verification fails.
Don't use translation yet..

Differential Revision: https://code.wildfiregames.com/D1620
Upstream bugreport: https://bugs.camaya.net/ticket/?id=280

This was SVN commit r21901.
2018-10-09 17:50:08 +00:00
elexis d7ff9722c6 Don't delay the pyrogenesis shutdown for 5 minutes but at most 10 seconds if the server is not responding, refs #968;
in particular Philips server not responding to SSL which became a
requirement by the client following 209bab0255 or following GDPR 32.1.a,
refs #5257 while the new backend is not ready yet.

Mark file emptied in 209bab0255 as deleted.
Add scrolling to the UserReporter window, so that the timeout error
strings that became visible following the bugfixes in b496168d0a and
c898c19735 and don't overlap with the buttons.

This was SVN commit r21900.
2018-10-09 16:27:42 +00:00
elexis 209bab0255 New UserReporter Terms and Conditions, hopefully GDPR compliant, refs #5257.
Require SSL for the UserReporter clientside.

Differential Revision: https://code.wildfiregames.com/D1598
Includes contributions by bb and Itms

This was SVN commit r21898.
2018-10-05 22:19:28 +00:00
elexis c898c19735 Fix UserReporter curl error message being cut off after the first colon following 0da7e822ff, refs 41395ffe5d, b496168d0a.
Informs maintainers of the UserReporter backend why it's currently
broken.

This was SVN commit r21897.
2018-10-04 22:24:13 +00:00
elexis 82740d9278 Mod.io Disclaimer.
Have the user accept explicitly that he is subject to the Terms and
Conditions and Privacy Policy by the DBolical Pty Ltd company when using
their service with our client.

Rely on luck that this is sufficient to count as educating the users
about the personal data processed, the purposes and legal grounds of
personal data processing and the GDPR user right to access, rectify,
erase, restrict and complain, refs #5257, GDPR 13.
The Mod.IO DMCA report possibility should be added eventually.
Remove FileExists hack from da49aa1541 / D1602.
Refs D1601, https://github.com/elexis1/0ad/tree/terms

This was SVN commit r21896.
2018-10-02 15:52:48 +00:00
elexis a098f59a6b New strings for the Terms and Conditions dialog, refs #5257.
Button captions and instruction strings by bb from D1602.
For the UserReporter replace "anonymous feedback" with "feedback"
because it was never anonymized on Philips backend and won't be
anonymous on the new backend either, certainly until the logfile is
rotated and possibly arguably afterwards too.

This was SVN commit r21895.
2018-09-30 14:49:02 +00:00
elexis 74fbb4b823 Language selection dropdown in the terms dialog.
Allows the user to either read the english Terms and Conditions written
by Wildfire Games or the version translated into the current locale by
transifex users.
The underlying problem that Wildfire Games cannot verify the accuracy or
completeness of the translations while providing the services to a
global audience remains.

Refs #5257
Differential Revision: https://code.wildfiregames.com/D1643
Comments By: bb on irc, smiley, asterix
This was SVN commit r21894.
2018-09-29 21:25:04 +00:00
elexis b496168d0a Fix UserReporter passing uninitialized data through the JS Interface and displaying it in the UI following 0da7e822ff if the curl connection failed.
Display a generic error message using curl_easy_strerror if the detailed
error description is unavailable.

Differential Revision: https://code.wildfiregames.com/D1625
This was SVN commit r21892.
2018-09-23 00:20:17 +00:00
elexis d19e32b2ea Fix mod.io curl error handling, following 833c9f108c / D1029 / https://gitlab.com/na-Itms/0ad/commit/cdc324f7f57bf3098c196c59a92718b1ab4d1e87.
Displays if the server is down instead of a misleading unrelated later
error message.

Differential Revision: https://code.wildfiregames.com/D1608
This was SVN commit r21891.
2018-09-23 00:06:25 +00:00
elexis 27c107a448 Inform users that they are subject to the mod.io Terms and Conditions and Privacy Policy and provide links following 833c9f108c / D1029. Refs GDPR #5257.
Add link to feedback.wildfiregames.com, which demonstrates users how
their data is going to be used.

Add link buttons to the Terms dialog (refs #4583), so that users are
informed of the terms prior to becoming subject to them.
Don't link the DMCA / copyright terms of mod.io now since I found no UI
with support for 3 buttons that doesn't appear unsatisfyingly ugly.
Adds 3 button captions and 1 tooltip string.

Differential Revision: https://code.wildfiregames.com/D1627
A Comment and a relatable patch in D1601 by smiley / (-_-).

This was SVN commit r21890.
2018-09-22 16:27:49 +00:00
elexis 82a89c4eb1 Move openURL function and two strings from public/ to mod/.
Use it for the mod author website now.
Use it for the terms links next, refs #5257, D1627.

This was SVN commit r21889.
2018-09-22 16:23:43 +00:00
elexis 6a1d8e7515 This file should have been moved, not copied in the previous commit da49aa1541, noticed by Emperior.
This was SVN commit r21888.
2018-09-14 20:17:24 +00:00
elexis da49aa1541 Refactor lobby terms and conditions UI from 80dbd1f2a3 / D1568 to a new terms dialog UI and reuse that for mod.io and the UserReporter, refs #5257, #5218.
Reuse all existing strings, use a FileExists hack for mod.io until the
new strings are committed.
Rename prelobby/common/terms/terms.js to termslobby.js for easier
distinction from common/terms.js.

Based on patch by: bb
Differential Revision: https://code.wildfiregames.com/D1602
refs https://code.wildfiregames.com/D1601
refs https://github.com/bb-bb/0ad/tree/terms
refs https://github.com/elexis1/0ad/tree/terms

This was SVN commit r21887.
2018-09-14 15:14:48 +00:00
elexis 41395ffe5d Split UserReporter JS and XML from mainmenu code and refactor it.
XML button duplication removal by bb in
https://github.com/bb-bb/0ad/commit/62acfd74cb3efdb517db537bd4e62fa0ba6c304d
Write formatUserReportStatus in object-oriented style, refs irc
discussion with Vladislav on 2018-08-10.
Add the two missing cases "proxy" and "waiting" from UserReport.cpp and
reuse the "connecting to server" string.
No messages.json changes needed for the new directory, no string
changes.

This was SVN commit r21886.
2018-09-13 12:46:08 +00:00
Stan ef8582a7fd Update docs.
Patch by: The person asked not to be credited.
Refs: #5160
Differential Revision: ​https://code.wildfiregames.com/D1505
This was SVN commit r21885.
2018-09-11 16:33:22 +00:00
Stan 8311d9f899 Fix two bugs noticed by fatherbushido.
Fixes #5174

This was SVN commit r21884.
2018-09-11 09:12:36 +00:00
Stan 8569f188b0 Fix a texture bug reported by Hidan
Here :
https://wildfiregames.com/forum/index.php?/topic/24633-persian-temple-textures-missing/
Based on a tweak by wowgetoffyourcellphone mixed with a personal one.
- Move Old Pers struct to the old public as it shouldn't be used
anymore.
- Use Normal and specular textures where available.
- Make sure the pers png is used from now on.

This was SVN commit r21883.
2018-09-11 08:47:25 +00:00
elexis 4b4d3f71f5 Gamesetup cleanup.
Move civInfo press event handling from XML to the JS GUI object data
from b4e5858f6d / D322.
Equally move civInfo tooltip from init (which should remain agnostic of
content) following 760a47335d / D846, refs #4970.

This was SVN commit r21882.
2018-09-10 15:34:48 +00:00
elexis d910f4f164 Remove two dead strings from gamesetup.xml following 8cfd494b88 / D505 and 6a10797355 / D1066.
This was SVN commit r21881.
2018-09-09 17:07:39 +00:00
elexis 936d32414a Remove unused type argument and sanity check following 100be98215, f4749a8e2c.
This was SVN commit r21880.
2018-09-05 10:49:57 +00:00
Stan b574f7f45f Fix Persian chariots making walking sound, as it becomes annoying when too many of them are moving.
Reported by and discussed with Imarok.

This was SVN commit r21878.
2018-09-01 17:24:02 +00:00
elexis 78d7702262 Always require lobby authentication for lobby matches, refs #3549 / 0fd8aa2a77 / D897.
This is due to too many oversteppings of the lobby Terms of Use
following JS mods that implemented an UI for players to join lobby games
with arbitrary nicknames or 'replace' / impersonate other players in
lobby games.

Agreed with: user1, Dunedan
Code proofread by: Vladislav
Minor discussions with: Imarok, Hannibal_Barca, smiley, fpre, bb, nani
refs
https://wildfiregames.com/forum/index.php?/topic/24722-improving-mod-security/

This was SVN commit r21877.
2018-08-25 14:34:30 +00:00
elexis 1beb96cb20 Lobby to optionally require TLS certificate and certificate verification, refs #4737, #5257.
These are config options because developers should be able to test a
local lobby server quickly without going through the hassle to create a
valid or invalid certificate or modify and compile the client.
To protect from malicious JS mods reducing these security config
options, these options as well as the hostname would have to be
protected from JS access.
The user might still connect to other lobbies through a hypothetical UI
if there were a non-modifiable GUI confirmation dialog prior to the
connection.

Proofreading and feature design discussion by Vladislav and Dunedan on
irc on 2018-08-19 and 2018-08-23.

This was SVN commit r21875.
2018-08-24 11:29:38 +00:00
elexis 86db66cac1 Allow players to instantly reset the readystate by rightclicking on the ready button, refs #4369, D49 / 5f8f7bae20.
This was SVN commit r21873.
2018-08-23 17:57:43 +00:00
elexis 81dfd63610 Fix missing alias in 468d963e78 / D1575, refs #5218, taken from D1590.
This was SVN commit r21872.
2018-08-23 17:26:31 +00:00
elexis e07ef3fafb Fix uppercase following Hexify function for lobby password encryption in ecce63628c / D1591, fixes #5289.
This was SVN commit r21871.
2018-08-23 17:13:22 +00:00
elexis 7f4950cb17 Use https in hyperlinks for sites that support it, refs #5257.
This was SVN commit r21870.
2018-08-23 09:23:06 +00:00
elexis dd008af2f8 Write UserReport data to local logfiles, so that users can review the personal data impact without exposing the data to JS/mods, refs #5257, b3438cabd2.
Write the logfiles even if the UserReporter is disabled, so that the
assessment can be done prior to use.

This was SVN commit r21868.
2018-08-22 22:17:42 +00:00
elexis b3438cabd2 Hide userreporter ID from mods and logfiles, since it shall be used as an authentication token for GDPR personal data requests, refs #5257, f51f78c999 / D1563.
Comments by: Vladislav in irc on 2018-08-13
This was SVN commit r21867.
2018-08-22 16:02:05 +00:00
elexis 9e712fa0c5 Move UserReporter C++/JS functions from JSInterface_Debug.cpp to JSInterface_UserReport.cpp, refs #4772.
This way it stands out more as a separate feature that can be more
easily exchanged, extended, maintained or conditionally removed from the
build and leaves more transparent includes, refs #5257.

Add missing string includes following 7c2e9027c2 and d6cb9c845b.
Remove unused Profile include following 38d6f81d71 and d6cb9c845b.
Remove unused CLogger include, add missing debug include following
d6cb9c845b.
Remove unused CConsole include following 9f0484e5ce / D1073.
Remove unused ProfilerViewer include following 2af94c5898.

This was SVN commit r21866.
2018-08-22 12:48:27 +00:00
s0600204 22791af91f Use pkg-config instead of sdl2-config
Resolves build issue on Arch Linux (and Arch-derivatives)

(Also forms part of a fix for Slackware-current builds)


Accepted By: echotangoecho (Arch)
Confirmed as functional by: Imarok (Ubuntu 16.04, gcc5.4), wes-fole-dog
(Parabola)
Refs: #5157
Fixes: #5152
Differential Revision: https://code.wildfiregames.com/D1582
This was SVN commit r21865.
2018-08-17 19:47:19 +00:00
elexis ecce63628c Unify duplicate u8* to hex string functions in a new Hexify function variant, similar to bb1f86f515, used by Tests, CacheLoader, Terms and Conditions, Lobby and mod.io.
Removes the call to the sprintf_s function from test_MD5.h in 17718981cf
and JSInterface_Main.cpp in 468d963e78.
As reported by Vladislav that function might not null-terminate strings
on untested/newer platforms, but the caller requires it here.
The sprintf_s calls in other places have the same problem.

Differential Revision: https://code.wildfiregames.com/D1591
Accepted By: Vladislav
This was SVN commit r21863.
2018-08-08 12:59:05 +00:00
elexis 1e59db453a Prioritize civ names over mapnames for gamesetup chat autocompletion (Persians > Persian Highlands).
This was SVN commit r21862.
2018-08-06 10:46:33 +00:00
elexis f11b59f117 Add back incorrectly removed clause from f7783fb4bb that was needed for the lobby, refs #4962 / D1583.
This was SVN commit r21861.
2018-08-06 09:45:33 +00:00
elexis f7783fb4bb Fix biome-specific mappreviews in 7f602037ba for zipped mods, refs #4962.
Add TextureExists to avoid needless redundant hardcoding of the
filenames.
Remove mapBiome.Preview from gamedescription.js, obsolete following
8cde469501.

Differential Revision: https://code.wildfiregames.com/D1583
Accepted By: Vladislav
This was SVN commit r21859.
2018-08-05 21:50:00 +00:00
elexis 2af94c5898 Remove disabled remains of the performance data (= profiler data + text input) upload feature from the UserReporter from 0da7e822ff.
User-submitted text upload was removed in 2779512c6e in preference of
the bugtracker.
Remove leftover mainmenu.js function that this commit should have
removed.

Profiler data upload was disabled in b9e46f386b because the data amount
was too large and because the two timing snapshots are inconclusive
without further data.
The hereby removed exposed JS functions could have been exploited by JS
mods to upload 0ad userdata to arbitrary places.

The performance data upload feature can be redesigned, implemented
without JS exposure, with a more transparent privacy policy (refs
#5257).

Differential Revision: https://code.wildfiregames.com/D1597
Performance upload feature removal accepted by: Vladislav
This was SVN commit r21858.
2018-08-05 15:18:00 +00:00
elexis bdc68f85c9 Add missing XmppClient destruction if maploading failed in bffe917914.
Differential Revision: https://code.wildfiregames.com/D1596
Patch By: smiley aka (-_-)
This was SVN commit r21856.
2018-07-21 12:17:13 +00:00
elexis d6caaaa54c Add missing XmppClient destruction in 4b09d6f167 needed for the case of leaving the lobby to change the mods but then not changing the mods and entering the lobby again.
This was SVN commit r21855.
2018-07-21 12:05:06 +00:00
elexis 9fa1a230cb Prevent hosts that didn't modify C++ code from starting the game without all assigned online players being ready (launchGame(); cheat), refs #4463.
This works in autostartmode because that sets every client to an
observer and still relies on enabled cheats to have players assign
themselves.

This was SVN commit r21854.
2018-07-21 11:58:35 +00:00
elexis aec7509004 Remove 256 character limit from escapeText.
escapeText was added for the gamesetup and session chat in 9ee44bd9b8,
but the character limit is counterproductive for chatting with more than
2 sentences per line, when displaying a file path or other arbitrary
escaped text,
not really an effective measure against lobby spam, nor was that option
considered in any of the later calls except d7d0a7f869 and
thus more likely to cause unintended than intended code behavior and
should instead be implemented with max_length for input fields and
linebreaks and smaller GUI object sizes for displaying, refs #5266.

Remove early returns that are redundant code and require more
performance in the average case (non-empty string).

From Differential-Revision: https://code.wildfiregames.com/D720

This was SVN commit r21853.
2018-07-21 09:25:04 +00:00
elexis 81d1e7a111 Fix conversion in previous 468d963e78 / D1575.
This was SVN commit r21851.
2018-06-21 16:52:52 +00:00
elexis 468d963e78 Persist the lobby Terms Of Use and Terms Of Service checkbox if the logged in user and the accepted versions of the pages didn't change since last login, refs #5218.
This way the user is only forced to read the Terms again that changed or
if the user logged in from a different machine.
Use md5sum since it is sufficiently resistant against collisions and
doesn't freeze the window for 2 seconds like EncryptPassword / SHA256
does, refs #4399.
Use 0 instead of empty string in default.cfg, refs #3990.

Differential Revision: https://code.wildfiregames.com/D1575
Partial review by: Vladislav
This was SVN commit r21850.
2018-06-21 16:38:08 +00:00
elexis fe41404ba8 Fix XML syntax error in 80dbd1f2a3 reported by gameboy.
The error was hidden by Xeromyces loading the syntactically correct XMB
file that is still written for syntactically wrong XML files, refs
#5222, D1574.

This was SVN commit r21849.
2018-06-12 09:18:50 +00:00
elexis 88eb3527b7 Remove leftover debug line from previous.
This was SVN commit r21848.
2018-06-11 16:08:49 +00:00
elexis 80dbd1f2a3 Rewrite the prelobby pages and add the Terms of Service, Terms of Use and the agreement checkbox to the login page.
Ensure lobby players cannot join without acceptance of the terms in case
they change, fixes #5218, as agreed in last staff meeting.

Separate lobby entrance, lobby login and lobby register GUI page.
Since bffe917914 they were squashed into a single GUI page;
 Adding lots of hardcode to set the visibility of GUI objects;
 Reinventing a GUI page manager in JS;
 Unintentionally persisting data between pages;
 Requiring lots of errorprone case distinctions which are unneeded once
relevant GUI objects and code is loaded exclusively.

Add the remember-password checkbox from b6b547d5f8 / D822 to the
registration page too.

Revert the revert of ccb534259d in 9f9db45a03 and continue to prefer
objects with separate functions per C++ GUI message type,
reducing the nesting of conditionals per function and reveal codeflow by
making input and output variables explicit.

Fix oversight in 0940db3fc0 by moving the registrationrate string from
0e2d2610c9 from the "disconnect" to the "error" case.

Differential Revision: https://code.wildfiregames.com/D1568
Few comments by: Vladislav, Imarok, gallaecio
This was SVN commit r21847.
2018-06-11 15:59:22 +00:00
elexis de1a73ba65 Lobby register/login dialog cleanup.
Move JS code from XML files to JS files.
Move all terms data to one JS object.
Unify duplicate Terms dialog opening code.
Update the checkbox enabled property only upon dialog close, not onTick.

This was SVN commit r21846.
2018-06-08 13:39:52 +00:00
elexis f51f78c999 Don't print lobby buddies to mainlog.html, refs D209 / dcf12abe8c.
Differential Revision: https://code.wildfiregames.com/D1563
Comments By: Vladislav
This was SVN commit r21844.
2018-06-06 22:37:20 +00:00
elexis ce64c57b8c Prevent calling the JS gamestart function twice when doubleclicking on the "Start Game" button.
It triggered an OOS on rejoin prior to ee9cf54149, refs #5199 and
resulted in the playernames of the current match persisting into new
gamesetups, fixes #5206.

Differential Revision: https://code.wildfiregames.com/D1558
Comments By: wraitii
This was SVN commit r21843.
2018-06-06 22:25:15 +00:00
elexis eda236522c Prevent players from disconnecting during the loading screen by increasing the timeout tolerance to 60 seconds for that period, fixes #5163.
The NetClient runs in the main thread, so any part of the loading screen
consuming several seconds makes that client timeout.
This is a workaround because threading the NetClient would have prevent
these timeouts, refs #3700.
Coutnerintuitively, since enet timeout tolerance is proportional to the
latency, the better the connection of the player, the more likely it was
to drop on gamestart.

This problem became very frequent in Alpha 23, at least due to the Aura
bugfix 583b6ec625, AIInterface being particularly slow and that not
having been disabled yet in the loading screen resulting in additional
10 second freezes during the loading screen, even on empty maps, refs
#5200, 8e168f85e6.

Differential Revision: https://code.wildfiregames.com/D1513
Based on patch by: causative
This was SVN commit r21842.
2018-06-06 22:09:38 +00:00
elexis 2588682c09 In preparation of D1513, allow the NetClientSession to find out if it's the "Local Client", refs #5163.
For good practice, mention all members in the affected member
initializer list:
Add booelan m_IsLocalClient and u32 m_HostID to the member initializer
list (to not have them undefined, even though they are not read from
until they are set).
Add the strings m_GUID and m_UserName for completeness (even though the
default constructor is already called for strings).
Use nullptr instead of NULL for pointers.

Comments By: Vladislav
This was SVN commit r21841.
2018-06-06 21:17:01 +00:00
elexis 8ae179aaae Support parsing config values as u32 in preparation of D1513, refs #5163.
Differential Revision: https://code.wildfiregames.com/D1566
Reviewed By: Vladislav
This was SVN commit r21840.
2018-06-06 17:55:08 +00:00
temple 8e168f85e6 Disable AIInterface earlier to remove unnecessary lag on gamestart
Differential Revision: https://code.wildfiregames.com/D1559
Reviewed by: wraitii
Comments by: elexis, Itms, Stan
Refs: #5200

This was SVN commit r21838.
2018-06-05 23:23:37 +00:00
elexis 43730f15f3 Fix network FSM errors when a client closes the game during the loading screen or rejoin synchronization stage, fixes #4594, refs 3199.
Fix comments claiming to ensure reliability when in reality there is
only a small likelihood of the message being received.

Broken by fa85527baf / refs #2420 which was a preparation for a3e1c68b9a
/ refs #2373, which hence didn't actually work and was circumvented by
9b136a45fc without clarification.
Might have caused #3643.
Differential Revision: https://code.wildfiregames.com/D1557
Reviewed By: Imarok
This was SVN commit r21837.
2018-06-05 14:52:41 +00:00
elexis ee9cf54149 Fix an OOS on rejoin after doubleclicking on the StartGame button, fixes #5199, refs #5162.
Prevents changes to the gamesettings after the game was started, so as
to use the correct map seed when generating the random map terrain for
rejoiners.
D1558 will prevent the UI bug #5206 and FSM error from doubleclicking on
StartGame.

Differential Revision: https://code.wildfiregames.com/D1562
Tested and accepted by: temple
This was SVN commit r21836.
2018-06-05 12:24:30 +00:00
temple 48e794e97d Always call SetPassabilityCircular -- Fix OOS after rejoin on square maps
Differential Revision: https://code.wildfiregames.com/D1555
Reviewed by: elexis
Fixes: #5186

This was SVN commit r21835.
2018-06-03 16:40:44 +00:00
elexis 1608202d4f Fix an OOS on rejoin on Danubius following 3d65bfe555, refs #4855, fixes #5198.
Vectors are still deserialized as objects without their prototype
functions, so doing math on these obejcts fails upon rejoin, refs #4698.
This patch doesn't add any version incompatibilities and players with
the patched version can successfully rejoin unpatched games.

Differential Revision: https://code.wildfiregames.com/D1548
Reviewed By: temple
This was SVN commit r21834.
2018-06-03 11:49:55 +00:00
elexis 06e2e77349 Report network timeouts and lag warnings to clients that finished the loading screen but are waiting for other clients to finish it.
This allows the host to distinguish clients that are just slower than
everyone else with the loading screen from clients who have most likely
disconnected or crashed already and may be considered to be kicked.
This is especially important for D1513, because that increases the
timeout tolerance to a minute or longer.

Fixes #5193
Differential Revision: https://code.wildfiregames.com/D1546
Reviewed By: causative
This was SVN commit r21832.
2018-06-01 17:35:00 +00:00
elexis 4fbe399e07 Save oos_dump.dat too when saving oos_dump.txt.
Saves time to reproduce the binary simstate or provides data that may be
otherwise irreproducible, refs #5162.

Differential Revision: https://code.wildfiregames.com/D1544
Reviewed By: temple
This was SVN commit r21830.
2018-05-29 02:50:33 +00:00
elexis 333766ef1b Test all full hashes in non-visual replaymode by default and keep skipping quick-hash by default.
The previous code only tested quick hashes every 100 turns and could not
be used to confirm replay hashes matching.
The option can become used for visual replays too.

Differential Revision: https://code.wildfiregames.com/D1538
Refs #5162
Reviewed By: temple
This was SVN commit r21829.
2018-05-29 02:14:38 +00:00
Stan 572b72fa7f Fix non-visual replay hash mismatch caused by CCmpSound condition in CCmpVisualActor
Differential Revision: ​https://code.wildfiregames.com/D1519
Reviewed by: temple, elexis, wraitii
refs: af2abb8cbf

This was SVN commit r21828.
2018-05-28 19:06:09 +00:00
elexis 4cefb286f4 Prevent the lobby gamelist from breaking entirely if a gamestanza contains an empty or invalid mod version JSON string (refs eca956a513).
Catch all JSON SyntaxError exceptions in JS (refs d7d0a7f869).
The C++ ParseJSON function already catches exceptions and the resulting
errors can't trigger a denial of service.

Differential Revision: https://code.wildfiregames.com/D1479
Based on patch by: Imarok
Reviewed by: Imarok
Comments By: Itms
This was SVN commit r21827.
2018-05-27 13:47:18 +00:00
Gallaecio 788ca1f69d Revert 51afc72886, it violates current freezes
This was SVN commit r21826.
2018-05-26 18:26:31 +00:00
Gallaecio 51afc72886 reaffect → reassign
Reported by GunChleoc on Transifex.

This was SVN commit r21825.
2018-05-26 18:22:12 +00:00
elexis 44ec2e324e Alpha 23 "lobby lag" release fix.
Caches the loaded mod versions, so that GetEngineInfo doesn't read the
zip and json files everytime and returns about 1000 times faster.
Adds two missing includes.

The lobby froze multiple times every few seconds on updateGameList().
The gamesetup page was slowed down with every stanza sent and the
load savegame selection page was slowed down per savegame selection,
proportional to the number of installed zipped mods.

Introduced by: d5807cd59f and eca956a513
Differential Revision: https://code.wildfiregames.com/D1518
Reviewed By: wraitii
Comments By: Imarok (in D1512, P121), leper (in the lobby)
This was SVN commit r21823.
2018-05-24 18:08:56 +00:00
wraitii 83d228fe7e Fix hosting games in the lobby.
Fixes #5164.

Reported by: HMS-Surprise
Reviewed By: Stan
Trac Tickets: #5164

Differential Revision: https://code.wildfiregames.com/D1498
This was SVN commit r21822.
2018-05-21 16:52:50 +00:00
elexis a5d1e0068b Fix OSX not starting matches following 8fbc095a88.
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.
2018-05-08 10:03:46 +00:00
elexis 27da92e55f Main.cpp cleanup.
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.
2018-05-08 09:45:54 +00:00
elexis 4c73614955 In preparation of renaming and grouping main.cpp shutdown variables:
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.
2018-05-08 09:24:16 +00:00
elexis 16fbe90342 Fix 204b04f2d4 compatibility with zipped mods, refs #5018.
Differential Revision: https://code.wildfiregames.com/D1480
Reviewed By: Itms
This was SVN commit r21814.
2018-05-01 21:15:55 +00:00
elexis b0ca04b555 Revert a bit of the nerf from 5cbe187438.
Commit permitted by Itms.

This was SVN commit r21813.
2018-05-01 21:12:43 +00:00
Itms a89bcf837b Fix the window icon that cannot be loaded in release packages, refs 27d99765bb.
Discussed with Imarok and elexis.

This was SVN commit r21812.
2018-05-01 20:29:36 +00:00
Itms c647dcd330 Exclude a few files from the win32 installer.
This was SVN commit r21811.
2018-04-30 20:09:20 +00:00
elexis 0de26377a8 Fish should not block foundation construction.
Regression introduced by 8ace8034a2.
Tested by mimo, commit permitted by Itms.

This was SVN commit r21810.
2018-04-30 16:29:55 +00:00
Itms 54d2b13658 Update AppData, fixes #5006, refs #3734.
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D683
This was SVN commit r21809.
2018-04-29 20:49:52 +00:00
Itms 32686c2840 Build fixes for macOS and premake4.
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.
2018-04-29 15:44:48 +00:00
Itms 2b564e7311 Enlarge elements of the AI configuration message box in order to display correctly the majority of strings for the bundled languages. Fixes #3084 at the same time.
This was SVN commit r21807.
2018-04-29 15:34:31 +00:00
Itms dae5a7f488 Update translator credits.
This was SVN commit r21806.
2018-04-29 14:58:18 +00:00
Itms 056affbfab Update the list of languages for the Windows installer.
This was SVN commit r21805.
2018-04-29 14:37:35 +00:00
Itms e84e712801 Enlarge some GUI elements in order to display correctly the majority of strings for the bundled languages.
This was SVN commit r21804.
2018-04-29 14:34:10 +00:00
elexis 54e0f9ec28 Add engine and mod version test before loading the persist-matchsettings file.
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.
2018-04-29 13:18:05 +00:00
Itms 15bbd3b62b Update list of included languages in A23.
This was SVN commit r21801.
2018-04-29 13:05:45 +00:00
mimo ac149374fc few templates fixes
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D1477
This was SVN commit r21800.
2018-04-29 08:56:59 +00:00
elexis fce54167fd Place palisade walls around Napata when chosing the "easy" difficulty.
This was SVN commit r21798.
2018-04-28 20:34:31 +00:00
elexis 5cbe187438 30% less attackers on Jebel Barkal and leave more time between attacker waves in later stages of the game.
This was SVN commit r21797.
2018-04-28 16:22:27 +00:00
mimo f4f13f17b2 fix kush walls SelectionGroupname
This was SVN commit r21796.
2018-04-28 09:36:55 +00:00
mimo 28aa3d186f Ptol catapults should unpack to ptol catapults, not mace catapults
Patch by causative

Reviewed By: mimo
Differential Revision: https://code.wildfiregames.com/D1474
This was SVN commit r21795.
2018-04-28 09:30:53 +00:00
temple f90c4488ee Add missing kush formations
This was SVN commit r21793.
2018-04-27 23:55:07 +00:00
mimo 04fc83a231 fixes a few templates
This was SVN commit r21792.
2018-04-27 21:54:38 +00:00
vladislavbelov 661af35eb8 Fixes translations license year.
Reviewed By: Itms
Differential Revision: https://code.wildfiregames.com/D1471
This was SVN commit r21791.
2018-04-27 19:34:00 +00:00
temple 677165e205 Increase min range of catapults and bolt shooters
Differential Revision: https://code.wildfiregames.com/D1452
Reviewed by: elexis
This was SVN commit r21790.
2018-04-27 18:47:48 +00:00
elexis 13e1702777 Add missing ScriptInterface includes to
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.
2018-04-27 16:48:44 +00:00
elexis 7ecd1d2c34 Clean some forward declarations.
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.
2018-04-27 16:06:42 +00:00
mimo 440012961a really fix packing problems reported in 5acfa9921e
Differential Revision: https://code.wildfiregames.com/D1458
This was SVN commit r21786.
2018-04-26 16:49:18 +00:00
temple 583b6ec625 Stop some auras from being applied extra times, don't apply player auras to templates, and fix some linting errors
Differential Revision: https://code.wildfiregames.com/D1430
Comments by: fatherbushido, elexis
This was SVN commit r21785.
2018-04-26 00:35:24 +00:00
temple f7c2785400 Fix a couple of packing problems from 5acfa9921e
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.
2018-04-25 23:47:24 +00:00
elexis ae06687b80 Revert sinkrate change from 35b0715c3a which was too drastic (15x).
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.
2018-04-25 12:54:32 +00:00
elexis fa01a67d42 Fix gaia becoming defeated due to yet another missing IsInWorld check.
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.
2018-04-25 12:26:34 +00:00
elexis ec8d95abe1 Update auras of entities of other players that affected the defeated player after 2651caa885 removed this case handling unintentionally.
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.
2018-04-24 17:28:24 +00:00
elexis 86fcf0de8c Move ModIo JS interface functions to a separate namespace, refs 833c9f108c.
Differential Revision: https://code.wildfiregames.com/D1466
Reviewed By: Itms
This was SVN commit r21778.
2018-04-24 13:12:08 +00:00
elexis 76d648349d Fix gaia units ignoring players without CCs.
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.
2018-04-24 12:46:59 +00:00
elexis 067bbb38d6 Fix whitespace in JSInterface_Sound.*
This was SVN commit r21776.
2018-04-24 11:44:26 +00:00
elexis 5a34c9e570 Add missing distance from nomad units to soldiers garrisoned on walls by the trigger script, noticed by temple.
Delay city patrols in nomad mode.
More trees on roads.

This was SVN commit r21775.
2018-04-24 11:21:11 +00:00
mimo 0933f24891 petra: small tweak for civs without field
This was SVN commit r21773.
2018-04-23 20:30:22 +00:00
elexis 25099f2898 Remove aggressive gaia soldiers on nomad random maps.
Differential Revision: https://code.wildfiregames.com/D1465
Reviewed By: (-_-) aka smiley
This was SVN commit r21772.
2018-04-23 18:13:39 +00:00
bb e3bc85388f Hide the settingsPanel for non-controllers
Patch By: ffffffff
Comments By: elexis
Differential Revision: https://code.wildfiregames.com/D1243
This was SVN commit r21771.
2018-04-23 15:29:35 +00:00
bb 15a16beed3 Tidy up gamesetup initGUIObjects
Suggested By: elexis
This was SVN commit r21770.
2018-04-23 15:09:21 +00:00
bb 2ff1d993be Split the sliding logic from the moving logic for the settingsPanel in gamesetup
Preparation for D1243

This was SVN commit r21769.
2018-04-23 14:51:09 +00:00
bb 3d4abb5f62 Use esc to close the tabs in gamesetup
string should come after release

Patch By: ffffffff
Differential Revision: https://code.wildfiregames.com/D1242
This was SVN commit r21768.
2018-04-23 14:08:26 +00:00
elexis c4342d6291 Fix gaia attackers on the left riverside of Danubius trying to attack units on the right riverside if they happened to be closer, fixes #4622.
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.
2018-04-23 11:32:22 +00:00
elexis 2bc068aa41 Add some missing IsInWorld checks to Danubius for cases where all targets are garrisoned, promoted, upgraded, transformed, becoming packed or undergoing any special treatment by some mod, refs D1449.
This was SVN commit r21766.
2018-04-23 11:22:46 +00:00
elexis 096500d99a Toggle the visibility of the session GUI instantly, rather than waiting possibly indefinitely for the next simulation turn.
Differential Revision: https://code.wildfiregames.com/D1464
Reviewed By: bb
This was SVN commit r21765.
2018-04-23 09:33:03 +00:00
Itms 56d93afceb Adjust code comments to match a breaking change in the mod.io API.
See
https://github.com/DBolical/modioAPIDOCS/commit/317358c5d0d51059832d157f698d899ec18779f0.

This was SVN commit r21764.
2018-04-23 09:09:45 +00:00
elexis 4b09d6f167 Ask the lobby player to open the mod selection page if the mods don't match the ones from the lobby host, as decided in the staff meeting.
This was SVN commit r21761.
2018-04-22 23:46:06 +00:00
elexis c23045dcc0 Two hurtful string changes in preparation of string freeze, refs #4936, decided in the staff meeting.
This was SVN commit r21760.
2018-04-22 23:37:39 +00:00
Itms 833c9f108c mod.io support.
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.
2018-04-22 18:14:45 +00:00
mimo fe177fb5bf petra: make some use of mobile dropsites
This was SVN commit r21758.
2018-04-22 17:00:32 +00:00
mimo d5978468d5 petra: support upgrade from one garrisonable structure to one non-garrisonable
This was SVN commit r21757.
2018-04-22 16:52:34 +00:00
elexis 79ca3218fa Deforest the Dodecanese.
The deficit in buildspace required the players to solely gather trees
for dozens of minutes to progress.

This was SVN commit r21756.
2018-04-22 14:21:07 +00:00
Itms 364eaa34c6 Move some utility functions from the public mod to the mod mod in preparation for upcoming commit.
Small fixes and improvement while I'm at it, by temple and elexis.

This was SVN commit r21754.
2018-04-22 12:03:51 +00:00
mimo 81e21ea53d petra: improve mod support by allowing civs to build corrals when they can't build fields, even if the field template exists
This was SVN commit r21753.
2018-04-21 22:16:07 +00:00
mimo 8f2eb1ea87 remove debug printout forgotten in 50f702aa9e
This was SVN commit r21752.
2018-04-21 12:07:48 +00:00
mimo 50f702aa9e petra: allow the ai to use ranges for mod who support them, and add Archery class to ranges to allow differentiating them from barracks
This was SVN commit r21751.
2018-04-21 11:55:34 +00:00
Imarok 27f5d854bb Reload batch size when changed in options
Differential Revision: https://code.wildfiregames.com/D1459
This was SVN commit r21750.
2018-04-20 19:55:54 +00:00
mimo 18d8d2b29d petra cleanup
This was SVN commit r21749.
2018-04-20 15:36:14 +00:00
mimo aed19f65ae petra: fix for civs which do not have support worker units (as xiongnu in TerraMagna)
This was SVN commit r21748.
2018-04-20 15:00:49 +00:00
mimo 8d35042dec further increase the training and building time of AI by 10% in easier levels (based on a stat of 1 beginner! more feedback needed)
This was SVN commit r21746.
2018-04-19 17:16:56 +00:00
mimo 43e242dab5 petra: improve sorting of resources according to the needs.
This was SVN commit r21745.
2018-04-19 15:30:01 +00:00
mimo a37c2240c3 Attacks resulting from a gathering order on an animal should be considered forced or not consistently with the original gather order.
Reviewed By: temple
Fixes #4863

Differential Revision: https://code.wildfiregames.com/D1457
This was SVN commit r21744.
2018-04-19 14:20:53 +00:00
elexis 3033a56f39 Improve mine and passage placement on Jebel Barkal.
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.
2018-04-19 11:00:08 +00:00
elexis 341a714c21 Allow lobby players to watch the replay of the game just played without disconnecting them from the lobby,
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.
2018-04-18 14:43:11 +00:00
Imarok f2cda85310 Fix compilation of ModInstaller without pch
Reviewed by: elexis
Differential Revision: https://code.wildfiregames.com/D1456
This was SVN commit r21739.
2018-04-17 22:02:10 +00:00
Imarok 724b25bac6 Style adjustments to 936c16050b
This was SVN commit r21738.
2018-04-17 17:31:11 +00:00
elexis da2f1e9c89 Add some random roads leading to/away from the city Napata.
This was SVN commit r21737.
2018-04-17 00:52:50 +00:00
Imarok d171156e99 Don't pick a civ that shouldn't be selectable in gamesetup when civ random was choosen
Discovered by Undying Nephalim.
Investigated by s0600204
Reviewed by: s0600204
Differential Revision: https://code.wildfiregames.com/D1455
This was SVN commit r21736.
2018-04-16 19:50:02 +00:00
elexis 077538d06c Impose a population limit for gaia units on Jebel Barkal to prevent lag of doom.
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.
2018-04-16 12:51:41 +00:00
elexis a00b4b6e77 Remove a warning about missing markets when the player has issued a barter command just before losing the market, fixes #3645.
This was SVN commit r21733.
2018-04-16 01:04:53 +00:00
Stan 35b0715c3a Reduce decay time for units to avoid lag when too many units are dead.
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.
2018-04-15 22:22:45 +00:00
Stan d654ae18d2 New greek quiver by Alexandermb
Thread:
https://wildfiregames.com/forum/index.php?/topic/23925-task-weapons-and-armory/&page=3

This was SVN commit r21731.
2018-04-15 21:52:52 +00:00
elexis a74352b100 Spawn proportionately less gaia attackers when players become defeated.
This also reduces the attackercount slightly, because gaia is now
excluded when counting players.
PlayerManager.GetActivePlayers helper function.

This was SVN commit r21730.
2018-04-15 16:47:51 +00:00
elexis f5d8b509ff Place the other half of the bridge on Dodecanese.
Differential Revision: https://code.wildfiregames.com/D1448
Patch By: smiley / (-_-)
This was SVN commit r21729.
2018-04-15 15:51:24 +00:00
elexis d87057b1c0 Fix playerbase animal template on Hellas not being defined for the highlands biome.
The error was hidden by the default chicken value.

Reported by: nani
This was SVN commit r21728.
2018-04-15 15:19:49 +00:00
Itms 404e1a9a4a Add a mod installer, fixes #4027.
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.
2018-04-15 01:46:28 +00:00
Itms 3eaaddf3ef Implement a "modern" style progressbar.
Patch By: s0600204
This was SVN commit r21725.
2018-04-15 01:25:58 +00:00
Itms 5aaa8af3c0 Do not compute mipmaps for GUI textures in the mod mod.
This was SVN commit r21724.
2018-04-15 01:16:53 +00:00
Itms 943a61e4ea Define and associate .pyromod filetype with pyrogenesis on Linux and Windows.
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.
2018-04-15 00:25:52 +00:00
Imarok 5094c05c6a Add images arcanist didn't manage to add in 7e23a43249
This was SVN commit r21722.
2018-04-14 20:23:12 +00:00
Imarok 936c16050b Make modmod looking nicer
Reviewed by: Itms
Differential Revision: https://code.wildfiregames.com/D1412
This was SVN commit r21721.
2018-04-14 20:04:17 +00:00
Itms ee4beef8e8 Update mod_ipstamp for current ejabberd versions and update lobby setup instructions.
Patch By: Dunedan
Differential Revision: https://code.wildfiregames.com/D1208
This was SVN commit r21720.
2018-04-14 12:54:50 +00:00
Itms e6106afc05 Send rating related requests directly to EcheLOn.
Patch By: Dunedan
Differential Revision: https://code.wildfiregames.com/D1177
This was SVN commit r21719.
2018-04-14 12:50:54 +00:00
Itms 1d158a25ea Lobby Bot Optimizations and Upgrade to recent SleekXMPP/ejabberd versions.
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.
2018-04-14 12:44:47 +00:00
mimo d5f2ea9e78 Fix stats of peak percentage of map controlled
Reviewed By: bb
Differential Revision: https://code.wildfiregames.com/D1294
This was SVN commit r21717.
2018-04-14 09:43:14 +00:00
mimo 34aa3bcb37 petra: fix case of messed up accessibility in dock placement when too nearby islands
This was SVN commit r21716.
2018-04-14 09:38:54 +00:00
temple 25ba39bbaf Fix a string from 9174b427b2
This was SVN commit r21715.
2018-04-14 00:10:28 +00:00
temple 9174b427b2 Adjust some hero auras
Taken from: https://code.wildfiregames.com/D1400
Patch by: Hannibal_Barca
This was SVN commit r21714.
2018-04-13 17:57:54 +00:00
elexis aa5ddc3884 Don't apply team bonuses to defeated players, counterpart to 6d318d0869 / D12.
From Differential_Revision: ​https://code.wildfiregames.com/D1426
Reviewed By: temple
Comments By: fatherbushido
This was SVN commit r21713.
2018-04-13 16:16:22 +00:00
elexis 65c8b51cd4 Don't send MT_PlayerDefeated and MT_PlayerWon to components of entities who subscribed locally but aren't the playerentity of the affected player, equal to D733.
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.
2018-04-13 15:52:41 +00:00
elexis 2651caa885 Don't recompute auras of each and every entity globally upon playerdefeat, but only all player auras (for simplicity, and the affected units, structures upon OwnershipChange), refs 6d318d0869 / D12.
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.
2018-04-13 15:30:46 +00:00
elexis 91d85ea1b1 Use a fixed amount of reeds per passage, because the number of passages can vary heavily depending on nomad mode and playercount.
This was SVN commit r21708.
2018-04-12 17:31:08 +00:00
mimo 345ca1264c continuation of fdba663e1d
This was SVN commit r21707.
2018-04-12 17:19:20 +00:00
mimo fdba663e1d petra: internal renaming to follow the GameType -> VictoryConditions change in simu
This was SVN commit r21706.
2018-04-12 17:18:24 +00:00
mimo 4a5f5c58e6 petra: fix an error when an attacker was killed and moved outOfWorld
This was SVN commit r21705.
2018-04-12 16:31:36 +00:00
temple 2549602589 Make the objectives panel taller
Differential Revision: https://code.wildfiregames.com/D1446
Reviewed by: elexis
This was SVN commit r21704.
2018-04-12 01:55:51 +00:00
temple e39f11c2d0 Group teams together on maps where players are placed on two separate arcs
Differential Revision: https://code.wildfiregames.com/D1399
Reviewed by: elexis
This was SVN commit r21703.
2018-04-12 01:45:24 +00:00
temple 83c0df5a51 Make structures not block construction
Differential Revision: https://code.wildfiregames.com/D1445
Reviewed by: elexis
Refs: #5118

This was SVN commit r21702.
2018-04-12 01:29:38 +00:00
temple 3071d82a33 Remove formation minimum range and stop formation when in member state
Differential Revision: https://code.wildfiregames.com/D1423
Reviewed by: elexis
This was SVN commit r21701.
2018-04-12 00:27:03 +00:00
temple 61ec28dd3f Formation debug update
Differential Revision: https://code.wildfiregames.com/D1447
Reviewed by: elexis
This was SVN commit r21700.
2018-04-12 00:21:40 +00:00
elexis d3997552ff Fix passages in c16c5b4926 (the smoothing size was as large as the width of the passage).
This was SVN commit r21699.
2018-04-11 22:53:33 +00:00
mimo ec651cf671 fix an oversight in 57a227e76a
This was SVN commit r21698.
2018-04-11 20:34:30 +00:00
mimo 57a227e76a petra: cancel guard assignation when relic lost
This was SVN commit r21697.
2018-04-11 20:31:24 +00:00
elexis c16c5b4926 Make passages on Jebel Barkal much more noticeable by placing many reeds there.
Replace the createPassage call with a generic createArea call.

This was SVN commit r21696.
2018-04-11 18:18:24 +00:00
mimo f009e07e32 petra: fix some defensive tweaks not applied in easier levels
This was SVN commit r21695.
2018-04-11 17:56:40 +00:00
elexis 4fbd5e40d5 Ease comparison of two replay profile graphs by typing the filename in the browser instead of renaming the data.json files, refs #5116.
This was SVN commit r21694.
2018-04-11 16:07:38 +00:00
elexis e7f353468a Fix a JS warning when switching the perspective to gaia in autostarted games on a map without keywords following 147ef2b892 by
always displaying the follow-player option for gaia.

Differential Revision: https://code.wildfiregames.com/D1443
Reviewed By: bb
This was SVN commit r21693.
2018-04-11 13:42:25 +00:00
elexis 2d60fe092b Sort components in templates alphabetically using the templatessorter.
This was SVN commit r21692.
2018-04-11 13:08:55 +00:00
elexis 8f99ddea13 Fix lineendings in source/, simulation/, maps/, gui/, globalscripts/.
This was SVN commit r21691.
2018-04-11 12:55:32 +00:00
s0600204 5e39b717aa Fix compilation with ICU 61
Initial patch by: elexis
Reviewed By: mapkoc, elexis
Fixes: #5114
Differential Revision: https://code.wildfiregames.com/D1436
This was SVN commit r21688.
2018-04-10 18:13:32 +00:00
temple d1b5e3c080 Disable ship formations
Differential Revision: https://code.wildfiregames.com/D1405
This was SVN commit r21686.
2018-04-09 19:29:38 +00:00
mimo 51b2b25152 Give capturePoints of defeated Players to gaia
Reviewed By: bb
Track ticket: #4384

Differential Revision: https://code.wildfiregames.com/D1444
This was SVN commit r21685.
2018-04-09 17:04:27 +00:00
s0600204 62a8d34778 Update in-game manual text with altered shortcut
Reminded by: Imarok
Refs: 23b23a6ece

This was SVN commit r21684.
2018-04-09 16:57:10 +00:00
Itms 8817050e3a Update libcurl to 7.59.0 on Windows and enable SSL support on Windows and macOS.
Refs #3004, #4362.

This was SVN commit r21683.
2018-04-09 16:40:36 +00:00
mimo ee13d36616 Fix Fsm error message when a guard ent is killed
Reviewed By: temple
Differential Revision: https://code.wildfiregames.com/D1441
This was SVN commit r21682.
2018-04-09 16:36:41 +00:00
s0600204 23b23a6ece Change key shortcut for Structure Tree.
So it doesn't collide with silhouette toggling.

Ok'd by: fpre
Refs: #4970, D846, 760a47335d, 760a47335d

This was SVN commit r21681.
2018-04-09 15:18:44 +00:00
elexis df23c95d7d Add two cataracts and more mines to Fields Of Meroë.
Differential Revision: https://code.wildfiregames.com/D1416
Patch By: (-_-) aka smiley
This was SVN commit r21680.
2018-04-09 12:14:48 +00:00
elexis 7f602037ba Biome specific map previews for Mainland, which for some reason is still the favorite map of many lobby players, refs #4962.
This was SVN commit r21679.
2018-04-09 11:38:26 +00:00
temple 4e3dbeeada Set relative hitpoints for completed foundations
Differential Revision: https://code.wildfiregames.com/D1434
Reviewed by: mimo
Comments by: elexis
This was SVN commit r21676.
2018-04-09 03:02:48 +00:00
Itms 593a6a228e Properly handle map resizes in Atlas, fixes #4800.
Reviewed By: vladislavbelov
Differential Revision: https://code.wildfiregames.com/D946
This was SVN commit r21675.
2018-04-08 21:49:47 +00:00
Itms dfa2048dc5 Use libsodium for cryptography.
Tested By: Stan, Imarok
Differential Revision: https://code.wildfiregames.com/D1428
This was SVN commit r21674.
2018-04-08 21:41:31 +00:00
mimo 8d9405db8f petra cleanup
This was SVN commit r21673.
2018-04-08 20:11:28 +00:00
elexis e12bfd26ef Add some small bushes near the straggler trees on Lower Nubia to try to improve the imbalance between players starting on the left vs players starting on the right side of the map.
This was SVN commit r21672.
2018-04-08 16:28:02 +00:00
elexis 6b0b5a4396 Allow capturing of pyraminds on Jebel Barkal as asked for by Cesar.
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.
2018-04-08 14:28:23 +00:00
elexis 168a086fb1 Fix a nub constraint on corsica reported by (-_-) aka smiley aka facepalm.
This was SVN commit r21670.
2018-04-08 14:19:11 +00:00
Stan 5635afd125 Add More anims to the actor viewer
Differential: https://code.wildfiregames.com/D1431
Reviewed by Vladislav

This was SVN commit r21669.
2018-04-07 18:46:09 +00:00
temple 4177ebc568 Avoid creating a null formation
Differential Revision: https://code.wildfiregames.com/D1306
Reviewed by: elexis
This was SVN commit r21668.
2018-04-07 17:25:41 +00:00
temple 0ed00dca6f Add an IsInWorld check to Formation
Differential Revision: https://code.wildfiregames.com/D1435
Reviewed by: elexis
This was SVN commit r21667.
2018-04-07 17:18:16 +00:00
elexis 83ad0e28c1 Reduce the attackercount by 33% per difficulty on this map, because "easy" wasn't easy and "medium" was rather hard.
Don't miss out on elephants on "easy" however.
Don't place walls on tiny maps.

This was SVN commit r21665.
2018-04-05 16:01:10 +00:00
elexis 8c068ca258 Fix undefined warning when pressing the massbarter hotkey after building a market before selecting the market for the first time following b48d192ee9.
Reported By: nani, (-_-)
This was SVN commit r21664.
2018-04-05 11:57:43 +00:00
elexis 68e8b34d39 Add some missing hill avoidance for nomad placement.
Patch By: (-_-) aka smiley
Differential Revision: https://code.wildfiregames.com/D1417
This was SVN commit r21663.
2018-04-05 11:08:01 +00:00
mimo 787345a8db fix error when using salad-bowl on gaia, fixes #4603
This was SVN commit r21661.
2018-04-04 19:27:19 +00:00
elexis d0a771c712 Use the loading screen for autostart singleplayer/bot matches and replays too (not only for autostarted multiplayer matches), refs #4822.
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.
2018-04-04 18:46:36 +00:00
elexis 966b1608da Disable some session buttons while in Atlas rather than spamming JS error stacks onTick.
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.
2018-04-04 17:35:25 +00:00
elexis b48d192ee9 Simplify JS GUI session init.
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.
2018-04-04 16:53:31 +00:00
mimo 8f9ec9ebe3 fix b0d14419ac for turrets directly garrisoned from OutWorld
This was SVN commit r21656.
2018-04-04 16:23:17 +00:00
temple 539a709890 Formation members shouldn't use IsWalkingAndFighting
Differential Revision: https://code.wildfiregames.com/D1425
Comments by: mimo, bb
Fixes: #5108

This was SVN commit r21655.
2018-04-04 15:05:59 +00:00
Itms f46d721630 Use the 0 A.D. logo as window icon for the standalone pyrogenesis mod selector, fixes a warning.
Differential Revision: https://code.wildfiregames.com/D1427
Tested By: elexis
This was SVN commit r21654.
2018-04-04 14:12:29 +00:00
Stan bd730ae8c8 New horse animations by AlexanderMB
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.
2018-04-04 13:51:27 +00:00
elexis f4749a8e2c Simplify GUI g_IsController variable init, equivalent to 100be98215.
Just test if a NetServer is present rather than passing a state boolean
from GUI page to GUI page.

This was SVN commit r21651.
2018-04-04 12:43:25 +00:00
elexis 100be98215 Simplify GUI g_IsNetworked variable init.
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.
2018-04-04 12:20:34 +00:00
Stan 4a9f15930f New textures for the zebu, by Alexandermb
Thread:
https://wildfiregames.com/forum/index.php?/topic/22832-minifaction-nomads-xiongnu/&page=21

This was SVN commit r21648.
2018-04-03 21:23:45 +00:00
Stan a978b8254c Fix incorrect file naming noticed by Alexandermb
This was SVN commit r21647.
2018-04-03 20:30:38 +00:00
mimo b0d14419ac Fix rotation of promoted turrets and allow fixing the turret angle in the GarrisonHolder schema.
Reviewed By: temple
Differential Revision: https://code.wildfiregames.com/D1420
This was SVN commit r21645.
2018-04-03 17:13:24 +00:00
elexis 0b9460a089 Improve Jebel Barkal balancing for smaller maps when there are very few or no elephant stables.
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.
2018-04-03 13:42:07 +00:00
elexis f059a8dd16 Increase distance from gaia soldiers to nomad players.
This was SVN commit r21643.
2018-04-03 13:23:38 +00:00
elexis d22b8853b4 Remove unused property from d64b95b28c (which is misleading because the summary page has a variable of the same name).
This was SVN commit r21642.
2018-04-03 13:21:25 +00:00
mimo 21d3520936 Fix cheatTimeMultiplier broken by 5b314fc0ac
Reviewed By: temple
Differential Revision: https://code.wildfiregames.com/D1429
This was SVN commit r21641.
2018-04-02 20:30:32 +00:00
mimo e1562cceeb don't do some actions every turn when this is not needed + some cleanup
This was SVN commit r21637.
2018-04-02 15:39:31 +00:00
Stan 59a614f443 Fix 32b142fd19
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.
2018-04-01 11:07:55 +00:00
elexis c61927fb8e Small random map cleanup.
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.
2018-03-31 12:27:00 +00:00
temple 8559c3a7f1 Include the last endpoint in distributePointsOnCircularSegment
Differential Revision: https://code.wildfiregames.com/D1422
Reviewed by: elexis
This was SVN commit r21634.
2018-03-31 01:31:13 +00:00
temple 44081fbd13 Add Patrol check to IsWalkingAndFighting
Differential Revision: https://code.wildfiregames.com/D1419
Reviewed by: mimo
Comments by: elexis
This was SVN commit r21633.
2018-03-31 00:21:34 +00:00
temple dda3346e99 Jebel Barkal wall fix
Differential Revision: https://code.wildfiregames.com/D1421
Reviewed by: elexis
This was SVN commit r21632.
2018-03-30 18:16:58 +00:00
elexis 2a59a41702 Let the difficulty setting of Jebel Barkal proportionally influence the number of attackers spawned, refs #4963.
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.
2018-03-28 16:53:53 +00:00
mimo 5acfa9921e Fix UnitAI behaviour inconsistent with its stance for packed units and set default stance to standground for packed units.
Reviewed By: temple
Trac Tickets: #5091

Differential Revision: https://code.wildfiregames.com/D1413
This was SVN commit r21630.
2018-03-27 17:56:32 +00:00
LordGood 32b142fd19 Final barrack split assets for Rome, Greece, and Gaul.
This was SVN commit r21629.
2018-03-27 10:15:14 +00:00
temple b34e6f1fbb Set isGarrisoned when unit is autogarrisoned, remove autogarrison state
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.
2018-03-26 23:20:34 +00:00
elexis 1168bc40a3 Slightly nerf elephant count from recently.
This was SVN commit r21626.
2018-03-26 16:50:41 +00:00
elexis 8ace8034a2 Fix mirages (and any other entity that blocks something but not BlockConstruction) blocking foundation construction following 29492badb7 / D21.
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.
2018-03-26 15:18:53 +00:00
elexis d31d38015b Remove an ancient unused placeholder template.
This was SVN commit r21623.
2018-03-26 14:50:14 +00:00
elexis 558d2e3b1f Remove an invalid parent template that was never used since its introduction in c44efe6c8c.
This was SVN commit r21622.
2018-03-26 14:37:49 +00:00
elexis e472e539e2 Remove test templates that became unused with fd93e4ae74, refs #2951.
This was SVN commit r21621.
2018-03-26 14:34:35 +00:00
elexis 9cc7865ef7 Replace createPassage call on Snowflake Searocks with a createArea call, as a proof of concept showing that createPassage is an unneeded function.
This was SVN commit r21620.
2018-03-26 13:10:24 +00:00
mimo ba0ad25e8a petra: fix field placement broken in 2ead236afe because of overflows, and improve the way to take these overflows into account in the common api to avoid such problems
This was SVN commit r21619.
2018-03-25 19:48:38 +00:00
mimo 275040fcbc no need to transfer the full entity to the ai when destroyed
This was SVN commit r21618.
2018-03-25 19:17:01 +00:00
elexis 7ccf0cd7bf Don't break the entire JS simulation if someone starts this map with treasures disabled.
They are deleted before InitGame, resulting in the ownershipChange
handler wanting to read from the entity ID arrays which weren't
initialized yet.

Reported By: mapkoc
Refs
https://wildfiregames.com/forum/index.php?/topic/24153-is-this-fixed/

This was SVN commit r21615.
2018-03-24 15:08:34 +00:00
mimo 870a0b54d0 petra: use standground stance for packable units as default
This was SVN commit r21614.
2018-03-24 14:01:11 +00:00
elexis c1d7feffb4 Don't have the difficulty of Jebel Barkal differ by the factor 10 depending on the mapsize and playercount.
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.
2018-03-24 13:20:44 +00:00
vladislavbelov cb048b4738 A little cleanup of the PatchRData.cpp.
This was SVN commit r21612.
2018-03-24 11:20:57 +00:00
elexis c626b08d2d Reduce pathfinding lag on Jebel Barkal a bit by using actor palms in the city (preventing units in formation from becoming locked in at the spawn point).
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.
2018-03-23 17:31:54 +00:00
elexis 53c8bc3c45 Prevent nomad errors on Jebel Barkal by possibly placing players in the desert.
Add a small elevation below the kushite statue.

This was SVN commit r21610.
2018-03-23 16:03:06 +00:00
elexis 0b0fb8838a Delay the first Napata attack on nomad mode by 4 minutes.
This was SVN commit r21609.
2018-03-23 15:12:35 +00:00
elexis 7d249181de Update simulation replay profiling comments and remove unused, nonexisting reference.
This was SVN commit r21608.
2018-03-23 14:31:00 +00:00
Stan 64f610e853 Add a new icon for vercingetorix I made using wowgetoffyourcellphone psd template.
Fix #5087

This was SVN commit r21606.
2018-03-22 22:30:48 +00:00
elexis 9f6a76e671 Adapt Napata elephants to player housewalls.
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.
2018-03-22 18:36:06 +00:00
elexis 500b468bbc Place decorative bushes near the paths in the city of Napata.
This was SVN commit r21604.
2018-03-22 16:56:16 +00:00
Imarok d6ae354158 Fix mod check of non-visual replays and allow conversion of a vector of vectors of strings via ScriptConversions
Reviewed by: elexis
Fixes #5044
Differential Revision: https://code.wildfiregames.com/D1316
This was SVN commit r21603.
2018-03-22 15:26:27 +00:00
elexis ee9e677084 Simulation replay profiling graph overhaul.
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.
2018-03-22 13:53:04 +00:00
Stan fcceffb3dd Add new death anims for elephant drivers it was looking weird before.
Variant files made by me.

This was SVN commit r21601.
2018-03-21 20:15:12 +00:00
Stan 0abaded069 Remove some backfaces to improve performance.
Reported by: elexis
This was SVN commit r21600.
2018-03-21 18:20:39 +00:00
mimo c387ce54f4 petra: remove a useless leftover test
This was SVN commit r21599.
2018-03-21 18:06:18 +00:00
elexis 29492badb7 Delete sheep corpses when starting to build a foundation,
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/D21
Fixes #4268
Based On Patch By: wraitii
Reviewed By: temple
Previously Reviewed By: Itms
This was SVN commit r21597.
2018-03-21 01:44:15 +00:00
elexis adfd2cfae1 Add missing map-bounds check to the wall builder constraints missing in 8b2a7f26e0.
Reported By: Imarok
This was SVN commit r21596.
2018-03-21 01:04:42 +00:00
Imarok a3faf5f71d Fix paired tech after 33340265c8
Reviewed by: temple
Differential Revision: https://code.wildfiregames.com/D1409
This was SVN commit r21595.
2018-03-20 22:56:00 +00:00
mimo ed86efa57a Fix infinite UnitAI loop when units are moved out of world (after promotion)
Reviewed By: temple
Trac Tickets: #5079

Differential Revision: https://code.wildfiregames.com/D1406
This was SVN commit r21594.
2018-03-20 18:20:10 +00:00
temple e3dc84692d Reduce defense wall gate health
Differential Revision: https://code.wildfiregames.com/D1390
Patch by: Angen
Comments by: mimo
This was SVN commit r21593.
2018-03-20 01:13:50 +00:00
temple c58440abda Fanatic and sword champ armor adjustment
Differential Revision: https://code.wildfiregames.com/D1404
Suggested by: Feldfeld
Reviewed by: Hannibal_Barca
This was SVN commit r21592.
2018-03-20 01:08:00 +00:00
temple 8527f8f240 Update the salad bowl cheat
Differential Revision: https://code.wildfiregames.com/D1407
Reviewed by: elexis
This was SVN commit r21591.
2018-03-20 01:05:38 +00:00
Stan 1bcc48455a New icon for Leonidas using the new background scheme, by wowgetoffyourcellphone
This was SVN commit r21590.
2018-03-20 00:08:20 +00:00
elexis 5eaea653d4 Add lion, ram statues and palms around the healer circle and a kushite statue in its center of Jebel Barkal.
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.
2018-03-19 20:58:14 +00:00
Stan 8c939da8d2 Fix reverse spear hold position. It was way higher than it should have.
Noticed by: wowgetoffyourcellphone
This was SVN commit r21588.
2018-03-19 18:29:33 +00:00
elexis 101edaa167 Reworked environment settings on Elephantine, based on patch by wowgetoffyourcellphone,
specifically less ambient color saturation.
Simplify the triggerscript.

This was SVN commit r21587.
2018-03-19 15:16:55 +00:00
elexis 41a1967b6b Rename g_Callbacks to g_CloseCallbacks in the options page, so that one has better variable names in case of adding more callback types.
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.
2018-03-19 14:36:04 +00:00
temple 3be63d9865 Add ceasefirecounter to default.cfg, rename watershadows to shadowsonwater
Differential Revision: https://code.wildfiregames.com/D1379
Reviewed by: bb
This was SVN commit r21585.
2018-03-18 19:02:18 +00:00
temple b36363a53e Don't exceed vision range in hold ground and stand ground query ranges
Differential Revision: https://code.wildfiregames.com/D1394
Reviewed by: bb
Comments by: elexis
Refs: #4725

This was SVN commit r21584.
2018-03-18 18:49:06 +00:00
fabio 182103c143 Update some OS X libraries with security fixes and hopefully low regression risks. Refs #4362.
This was SVN commit r21583.
2018-03-18 17:21:29 +00:00
Stan 160dcdd477 Fix a few sync issues with horse variants and armors.
This was SVN commit r21582.
2018-03-18 13:33:21 +00:00
Stan d9f29d755a Use variant for some elephants.
This was SVN commit r21581.
2018-03-18 13:04:24 +00:00
mimo 349bcc1d1a petra: cache some computations which are done quite often on a few turns and created peaks in the execution time
This was SVN commit r21580.
2018-03-18 12:05:28 +00:00
elexis 38ae0d7314 Add some animated healers near the wonder on Jebel Barkal, similar to the ritual place on Danubius.
This was SVN commit r21579.
2018-03-17 23:57:50 +00:00
bb 69f8297bec Give all entities a looter component so building arrows bring in loot too
Briefly Discussed With: elexis

This was SVN commit r21578.
2018-03-17 21:46:28 +00:00
elexis 29b8de7411 Cavalry not attacking soldiers on Jebel Barkal wasn't a successful idea.
This was SVN commit r21577.
2018-03-17 19:26:16 +00:00
Stan d6ca86df62 Reenable some textures for Ptol pikemen, use the correct model for advanced units.
This was SVN commit r21576.
2018-03-17 15:38:34 +00:00
Stan d3bdb66fe6 New Kushite icons by wowgetoffyourcellphone.
This was SVN commit r21575.
2018-03-17 13:25:17 +00:00
temple 3c9439ce27 Use primeSortAllPlayers in Latium
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.
2018-03-16 23:42:17 +00:00
temple a49f0909f7 Use Shanakdakheto name for kush catafalque
Noticed by: Hannibal_Barca
This was SVN commit r21573.
2018-03-16 23:26:59 +00:00
temple 081eb31341 Use correct promotion template for kush merc jav cav
Noticed by: Hannibal_Barca
This was SVN commit r21572.
2018-03-16 23:04:22 +00:00
s0600204 262a0f7c68 Show correct cost for trainable gaia animals in structree and viewer
Reported by: causative
Refs: D297

This was SVN commit r21571.
2018-03-16 21:39:06 +00:00
mimo b870bf7139 petra: decrease the need for transport ships in naval maps by canceling transport requests which are not anymore useful
This was SVN commit r21570.
2018-03-16 19:26:27 +00:00
mimo 0c3e080779 petra: do not impose anymore a specific base for fields/corrals
This was SVN commit r21569.
2018-03-16 19:01:32 +00:00
elexis 2d10c4374f primeSortPlayers should not return a playerID twice, refs 59ce8b3081.
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.
2018-03-16 18:44:21 +00:00
elexis ded01c904d Rename "Egypt (4)" to "Egypt (3v3)" for correctness and consistency.
This was SVN commit r21567.
2018-03-16 16:10:37 +00:00
elexis b065af86dd Fix player-owned animals on Egypt.
Differential Revision: https://code.wildfiregames.com/D1388
Patch By: (-_-) / smiley
This was SVN commit r21566.
2018-03-16 16:06:50 +00:00
elexis cffac99d17 Add a difficulty setting for Jebel Barkal, refs #4963.
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.
2018-03-16 15:56:55 +00:00
elexis dc0da7c430 Allow TriggerHelper SpawnGarrisonedUnits to spawn units on visible garrison points / walls, refs D1146 / e29dfb7000.
This was SVN commit r21564.
2018-03-16 15:49:08 +00:00
elexis d881634ba1 Display the map difficulty in the gamedescription (gamesetup and objectives window), refs #4963 / D1189 / 9daa7520ef.
Differential Revision: https://code.wildfiregames.com/D1391
Reviewed By: bb
This was SVN commit r21563.
2018-03-16 14:18:09 +00:00
bb 7127186b70 Add a ceasire autostart option, silences a javascript warning on autostart games
fixes #4606

This was SVN commit r21561.
2018-03-16 00:12:58 +00:00
bb 648cd44576 Set a relicCount from autostart, so the triggerscripts actually will spawn relics
Should fix the concern in 6d54ab4c1f
Reported By: mimo
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D1393
This was SVN commit r21560.
2018-03-15 23:46:29 +00:00
bb c5d9ea7c06 reflect the 6b88ca6a11 changes in the readme.txt
Noticed By: elexis
This was SVN commit r21559.
2018-03-15 23:34:38 +00:00
Stan 8f77e88b15 Fix a segfault, due to an infinite loop in an actor.
The kush gate door would make the kush gate struct pop, which in turn
would
call the door and etc.
Reported by: Dunedan
This was SVN commit r21558.
2018-03-15 21:58:47 +00:00
Stan 6d93be0f58 Fix the display of light broken by cc67d54aeb
Reviewed by: Elexis, vladislav
Differential Revisions : https://code.wildfiregames.com/D1389
Refs: https://code.wildfiregames.com/D1262
https://code.wildfiregames.com/D1372

This was SVN commit r21557.
2018-03-15 18:19:12 +00:00
elexis 7e207e1f4c Implement walls on Jebel Barkal, beautify the map, improve the trigger script and add stables/cavalry attckers, refs #5040.
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.
2018-03-15 03:52:45 +00:00
elexis 04679a8e2b Implement an EntitiesObstructionPlacer that allows random maps to avoid exactly the obstruction area of given entities (rather than avoiding a guesstimated disk area).
This was SVN commit r21555.
2018-03-15 01:47:26 +00:00
elexis 8b2a7f26e0 Simple support for Constraints in the Wall Builder random map library, so that one can place walls while avoiding collisions, refs #5003.
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.
2018-03-15 01:42:47 +00:00
Stan 3d02ea73bd Improved Ptol textures by wackyserious.
This was SVN commit r21553.
2018-03-14 23:17:54 +00:00
temple edac66788a Fix a bug in Latium and Ardennes Forest
Differential Revision: https://code.wildfiregames.com/D1387
Reviewed by: elexis
Refs: #4960

This was SVN commit r21552.
2018-03-14 23:05:06 +00:00
temple ee7bc3dfa0 Add a nonbuilder filter template, use on survival of the fittest
Differential Revision: https://code.wildfiregames.com/D1385
Reviewed by: elexis
Comments by: ffffffff, smiley
This was SVN commit r21551.
2018-03-14 22:40:46 +00:00
elexis fd3193bd7d Fix some resource collisions on random maps.
Remove water settings on Alpine Valley, which had water in cab65bb932
but was removed in 992a8ee0b8 otherwise.

This was SVN commit r21550.
2018-03-14 22:25:40 +00:00
mimo 1446edd771 petra: add a missing check on exhausted resource
This was SVN commit r21549.
2018-03-14 19:13:17 +00:00
elexis 5dac54b900 Don't exclude gaia soldiers and structures the killed entities statistics, but only animals.
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.
2018-03-14 10:46:46 +00:00
s0600204 afd69a58b3 Stop new-line characters making lines longer than they should be.
Reviewed By: Imarok
Fixes: #3351
Differential Revision: https://code.wildfiregames.com/D1299
This was SVN commit r21546.
2018-03-13 23:06:21 +00:00
Stan 0f86ff6e48 Add a bigger beja shield for everyunit but the pikemen
https://github.com/0ADMods/kushites/issues/69

This was SVN commit r21545.
2018-03-13 22:21:14 +00:00
s0600204 d17e3b5560 Finally fix typo reported in db1ec0f7f7/b4d6353a08 (3rd time lucky)
Refs: db1ec0f7f7, b4d6353a08, aa1bb01110
Concerned: temple, Angen

This was SVN commit r21544.
2018-03-13 22:14:39 +00:00
Stan 7d143cfd36 Add the new tower to ptol elephants as well.
This was SVN commit r21543.
2018-03-13 22:03:31 +00:00
bb 33340265c8 Improve the massbarter onPress scripts, by inlining stuff used only once and uninlining mapped arrays used twice
refs #5055

This was SVN commit r21542.
2018-03-13 21:02:13 +00:00
vladislavbelov 2bbdd145ab Little cleanup for the 9f202500ea
This was SVN commit r21541.
2018-03-13 20:26:30 +00:00
vladislavbelov 9f202500ea Adds maps paths and a tutorial maps tab in Atlas
Original Patch By: Phormio
Comments By: elexis
Reviewed By: s0600204
Differential Revision: https://code.wildfiregames.com/D614
This was SVN commit r21540.
2018-03-13 20:20:45 +00:00
s0600204 aa1bb01110 Remedy the other typo in db1ec0f7f7 identified by temple
Refs: db1ec0f7f7, b4d6353a08
Concerned: temple

This was SVN commit r21539.
2018-03-13 19:50:44 +00:00
mimo 059ca55040 petra: some fixes when deciding if an enemy army is a threat or not
This was SVN commit r21538.
2018-03-13 19:20:45 +00:00
s0600204 b4d6353a08 Remedy typo in db1ec0f7f7 identified by temple
Refs: db1ec0f7f7
Concerned: temple

This was SVN commit r21537.
2018-03-13 18:54:21 +00:00
bb 1b2d23ac50 Make the conquest dropdown uncheck the conquest_structures/units checkboxes, instead of trying to access a variable with 3 different names...
Notced By Imarok

This was SVN commit r21536.
2018-03-13 15:33:58 +00:00
bb 2746514175 Order the victory checkboxes the same way as the descriptions are noticed by elexis
This was SVN commit r21535.
2018-03-13 15:25:26 +00:00
Imarok 0c522edef3 Fixed swapped names in 0fd8aa2a77
Noticed by elexis

This was SVN commit r21534.
2018-03-13 14:55:55 +00:00
mimo df79180fa6 petra fixes to reduce cases of traffic jams on naval maps
This was SVN commit r21533.
2018-03-12 21:50:47 +00:00
Stan f590c6ab40 New textures, towers, and cushions for carthaginians elephants.
Commit Authorization by: Itms
Reviewed by: Lordgood, me, the community
This was SVN commit r21532.
2018-03-12 21:16:10 +00:00
elexis b8ca5b2033 Remove some duplication in the Jebel Barkal template loading.
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.
2018-03-12 14:10:00 +00:00
elexis 630341cd17 Sudd map description, refs #5040, inspired by Sundiatas explanations.
(Preparation for string freeze while the map lies on FeXoRs currently
inaccessible harddrive.)

This was SVN commit r21529.
2018-03-12 05:24:19 +00:00
elexis ae25564bdd Fix some wrong templates in Jebel Barkal.
Patch By: temple
This was SVN commit r21528.
2018-03-12 04:51:58 +00:00
elexis eee8217b45 Implement basic color editing in the options page and use it for the diplomacy colors, refs #4747, 7819ea434e.
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.
2018-03-12 04:48:38 +00:00
elexis 9955a2f3ef Map description for Egypt by mimesot, more bushes and some but not all fixed entity owners.
This was SVN commit r21526.
2018-03-12 04:25:37 +00:00
elexis 1d313e7121 Map description for Jebel Barkal, based on description by Sundiata, refs #5040.
Don't try to spawn units when there are no more spawn points.
Missing rename in 2765283b55.

This was SVN commit r21525.
2018-03-12 03:13:49 +00:00
elexis 2765283b55 Rename Aethiopia to Fields Of Meroë as proposed by Sundiata and agreed with (-_-) aka smiley, refs #5040, D1359.
New map description by Sundiata.

This was SVN commit r21524.
2018-03-12 02:30:14 +00:00
elexis 8adc6d8e93 Display map biome specific preview in the replay menu and loading screen too, refs #4962.
This was SVN commit r21523.
2018-03-12 01:39:41 +00:00
bb 6d35fe5d2b Display all gamesetup setting is gamedescription
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D1369
fixes: #5049

This was SVN commit r21521.
2018-03-12 00:28:41 +00:00
Imarok 0fd8aa2a77 Secure lobby authentication - prevent joins as a different player
Reviewed by: Dunedan, elexis, Itms
Fixes #3549
Differential Revision: https://code.wildfiregames.com/D897
This was SVN commit r21520.
2018-03-12 00:23:40 +00:00
Stan 520f70ab2c Fix elephant archers having no animations.
Reported by: Temple
This was SVN commit r21519.
2018-03-11 23:25:02 +00:00
temple fdc7bdb3e1 Reveal map on Napata Reconstruction
This was SVN commit r21518.
2018-03-11 23:14:45 +00:00
Stan 47e42199d0 Make use of the huge number of variants we have for the advanced ptol pikeman.
They are already being used in Delenda Est and were made by
wackyserious, and committed by Enrique

This was SVN commit r21517.
2018-03-11 23:00:22 +00:00
Stan 2595530658 New saddles, peytrals, and horse armors by Alexandermb, based on work by Enrique
New kushites metal plates

Thread :
https://wildfiregames.com/forum/index.php?/topic/23910-task-horse-winged-peytrals-and-new-saddles-by-enrique/

This was SVN commit r21516.
2018-03-11 22:45:24 +00:00
mimo 14c2ecbd5b petra: destroy unprotected docks about to be captured
This was SVN commit r21515.
2018-03-11 22:25:04 +00:00
mimo 5063d74f81 petra: take docks into account when positionning storehouses
This was SVN commit r21514.
2018-03-11 22:21:35 +00:00
Stan 779a58f3eb Remove historically innacurate unused kushite units.
Discussed with: Sundiata

This was SVN commit r21513.
2018-03-11 21:48:13 +00:00
elexis 3d410929a2 Allow biome JSON files to contain null values, refs #4954.
Needed by the dry biome on Aethiopia, refs 78e34ea143 / D1359.
Reported By: Angen
This was SVN commit r21512.
2018-03-11 21:45:59 +00:00
Stan d78b6bad8e Small tweaks to the nuba camp suggested by wowgetoffyourcellphone
This was SVN commit r21511.
2018-03-11 21:13:53 +00:00
Stan 6bd45c0c1d New nuba camp kush building set is now complete.
https://github.com/0ADMods/kushites/issues/64
Discussed with Sundiata and Wowgetoffyourcellphone
Sketchfab soon

This was SVN commit r21510.
2018-03-11 20:17:39 +00:00
Imarok b30db627e8 Add a loading screen tip featuring the freehand positioning feature
Patch by OptimusShepard
Image approved by Stan
Differential Revision: https://code.wildfiregames.com/D1368
This was SVN commit r21509.
2018-03-11 19:19:01 +00:00
Imarok 3e964b813a Address concerns of 5f0a0fbbef
Patch by: Dunedan
Differential Revision: https://code.wildfiregames.com/D1378
This was SVN commit r21508.
2018-03-11 18:32:17 +00:00
elexis 32e3faae76 Missing new files in 8cde469501.
This was SVN commit r21507.
2018-03-11 18:13:26 +00:00
elexis 8cde469501 Biome specific mappreview support and previews for Aethiopia and Gulf Of Bothnia, fixes #4962, refs #4954.
This was SVN commit r21506.
2018-03-11 18:11:56 +00:00
temple 6c3f93a33d Adjust resourceCarryingText position and small cleanup
Differential Revision: https://code.wildfiregames.com/D1376
This was SVN commit r21505.
2018-03-11 17:27:07 +00:00
elexis 78e34ea143 Add a second biome (rainy season) to the Aethiopia map.
Patch By: smiley aka (-_-)
Differential Revision: https://code.wildfiregames.com/D1359
Refs #5040

This was SVN commit r21504.
2018-03-11 17:09:10 +00:00
Itms 7d077ad71b Do not rely on undefined behavior in an unsupported part of the glooxwrapper, and make the code consistent with other unsupported parts.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D422
This was SVN commit r21503.
2018-03-11 17:07:13 +00:00
temple dad45b60cd Have gather information take precedence over repair
Differential Revision: https://code.wildfiregames.com/D1374
Reviewed by: mimo
This was SVN commit r21502.
2018-03-11 17:07:12 +00:00
Itms 8124a6c76b Update libcurl for OSX, in order to fix the build. Use the opportunity to update libxml2 which had vulnerabilities.
Refs #4362

This was SVN commit r21501.
2018-03-11 16:44:15 +00:00
Stan d7220c3ebb Remove debug lines
This was SVN commit r21499.
2018-03-10 22:45:31 +00:00
Stan c9fe940401 Fix an oversight in cc67d54aeb
Reviewed by: Itms,
Tested by: Angen,
Differential: https://code.wildfiregames.com/D1372

This was SVN commit r21498.
2018-03-10 22:42:01 +00:00
Imarok fede6cccf1 Wheel-adjustable batch size
Reviewed by: bb
Fixes #4767
Differential Revision: https://code.wildfiregames.com/D1034
This was SVN commit r21497.
2018-03-10 20:15:51 +00:00
bb 88f16e5d52 properly indent json data in Multiplayer_demo
refs 3450538ce1

This was SVN commit r21496.
2018-03-10 19:40:18 +00:00
mimo ddd1689df5 petra: use null stance from 23bb82f930 for ship transports
This was SVN commit r21495.
2018-03-10 19:19:56 +00:00
mimo 23bb82f930 Add a null stance in UnitAI to be used by the AI or trigger scripts
Reviewed By: bb
Differential Revision: https://code.wildfiregames.com/D1367
This was SVN commit r21494.
2018-03-10 19:12:23 +00:00
elexis 391c49ab63 Fix player placement and hero rush on Jebel Barkal.
This was SVN commit r21493.
2018-03-10 18:46:24 +00:00
bb 3450538ce1 fix some maps missing VictoryConditions
refs 2f763f1d87

This was SVN commit r21492.
2018-03-10 18:10:56 +00:00
elexis c0ec4adb6f Missing file in c936824255, reported by temple, refs #5040.
This was SVN commit r21491.
2018-03-10 18:01:39 +00:00
elexis 108cb4b344 Fix filename -.-
This was SVN commit r21490.
2018-03-10 17:43:04 +00:00
temple e86e8d7ae9 Remove ResourceGatherer and trample tooltips for chariots
Differential Revision: https://code.wildfiregames.com/D1371
Reviewed by: elexis
This was SVN commit r21489.
2018-03-10 17:32:30 +00:00
elexis c936824255 Jebel Barkal random map, fixes #5040.
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.
2018-03-10 17:29:51 +00:00
temple f41452392d Cleanup skirmish replacements
Differential Revision: https://code.wildfiregames.com/D1370
Reviewed by: bb
Comments by: elexis
This was SVN commit r21487.
2018-03-10 17:29:02 +00:00
temple e68d99272f Fix maps after kush temple rename
Differential Revision: https://code.wildfiregames.com/D1373
Reviewed by: elexis
Comments by: bb, mimo
This was SVN commit r21486.
2018-03-10 17:24:58 +00:00
elexis 2ae5da09a0 CityPainter for random map scripts that fills the given area randomly with the given templates, fixes #5061, refs #5040.
This was SVN commit r21485.
2018-03-10 17:24:03 +00:00
elexis a3e5e0fef8 Common TriggerHelper functions to set formations on units, get the mapsize and current time, refs #5040.
This was SVN commit r21484.
2018-03-10 17:16:39 +00:00
Stan 8b0fd2bd0a Add new head for kush hero
This was SVN commit r21483.
2018-03-10 11:51:08 +00:00
Stan 2ef1c40870 Make horse crown a bit more like bronze
This was SVN commit r21482.
2018-03-10 11:15:24 +00:00
Stan 2d74bc4ff5 New crowns for Kushite Heroes.
Remove a duplicate texture.

This was SVN commit r21481.
2018-03-10 11:06:16 +00:00
Itms cc67d54aeb Fix compiler warnings on VS 2015, refs #3439, refs #5069.
Patch By: Stan
Reviewed By: Itms, vladislavbelov
Differential Revision: https://code.wildfiregames.com/D1262
This was SVN commit r21480.
2018-03-10 09:58:53 +00:00
temple 62c29bd809 Fix OOS on rejoin by cloning in Mirage
Differential Revision: https://code.wildfiregames.com/D1325
Reviewed by: elexis, bb
Fixes: #5048

This was SVN commit r21478.
2018-03-10 00:44:32 +00:00
temple a86b7b491d Kushite tweaks and balancing
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.
2018-03-10 00:35:26 +00:00
vladislavbelov 0e710d716d Fixes the Alt + Tab crash in the fullscreen mode. Refs #4181.
Patch By: Angen
Comments By: echotangoecho, Imarok, Stan
Reviewed By: vladislavbelov
Trac Tickets: #4181
Differential Revision: https://code.wildfiregames.com/D1212
This was SVN commit r21476.
2018-03-09 22:23:03 +00:00
bb 2f763f1d87 Transfrom in all skirmisch and scenario maps the "GameType" string into a "VictoryConditions" array, so they are compatible with the combine victory commit
The same change should be done in all maps in mods

refs #4014
refs D1240

This was SVN commit r21475.
2018-03-09 21:56:51 +00:00
bb 6d54ab4c1f Implement combine victory conditions
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/D1240
fixes: #4014

This was SVN commit r21474.
2018-03-09 21:51:18 +00:00
temple b9a53529b9 Remove war dog slaughter attack
Differential Revision: https://code.wildfiregames.com/D1363
Reviewed by: elexis
Comments by: bb
This was SVN commit r21473.
2018-03-09 19:51:11 +00:00
elexis edf91718b5 Refactor distributePointsOnCircle into distributePointsOnCircularSegment, refs #5061.
This was SVN commit r21472.
2018-03-09 09:39:53 +00:00
Imarok 595edeaa2f Sound and Target Marker for freehand positioning of units
Patch by OptimusShepard
Refs #5060
Differential Revision: https://code.wildfiregames.com/D1352
This was SVN commit r21471.
2018-03-08 23:17:47 +00:00
mimo 48e861724d petra: be less restrictive for building a cc in islands with a dock
This was SVN commit r21470.
2018-03-08 21:17:39 +00:00
mimo 20a0df4ae2 petra: fixes in choice of best defenders when several islands + some cleanups
This was SVN commit r21469.
2018-03-08 21:09:31 +00:00
temple 56b8fe31fd Disable speed bonus for formations
Differential Revision: https://code.wildfiregames.com/D1360
Patch by: Angen
This was SVN commit r21468.
2018-03-08 19:36:32 +00:00
temple 12633bdaa8 Adjust melee and slaughter max range to better match animations
Differential Revision: https://code.wildfiregames.com/D988
Patch by: Grugnas
This was SVN commit r21467.
2018-03-08 19:11:34 +00:00
elexis 8ae6c448ee Fix the two incorrect replacements in b5c43fc5f9, refs #4950.
This was SVN commit r21466.
2018-03-08 19:00:04 +00:00
elexis 734ca44533 On Danubius, send soldier attack commands last, so that observers follow these units rather than the ships after the ungarrisoning.
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.
2018-03-08 14:15:03 +00:00
elexis 147ef2b892 Allow observers to follow gaia commands on triggerscript maps.
This was SVN commit r21464.
2018-03-08 14:10:45 +00:00
elexis adb84c50fb Fix oversight in 14da2f841f.
This was SVN commit r21463.
2018-03-08 14:06:41 +00:00
Imarok a14b351e87 Add a more detailed tooltip to the mainmenu lobby button
Reviewed by: elexis
Differential Revision: https://code.wildfiregames.com/D1358
This was SVN commit r21462.
2018-03-07 19:16:14 +00:00
mimo 212b74f7e5 petra: make the ai able to build docks in islands in which it has no cc, and use them for trade.
This was SVN commit r21461.
2018-03-07 18:45:16 +00:00
mimo 061371da92 more petra cleanup following eslint
This was SVN commit r21460.
2018-03-07 18:41:39 +00:00
elexis 14da2f841f TriggerHelper functions to retrieve entities by player and by class.
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.
2018-03-07 13:54:58 +00:00
elexis 3f7ea11059 TriggerHelper SetUnitStance helper function for a very frequent triggerscript order.
This was SVN commit r21458.
2018-03-07 12:36:45 +00:00
elexis 2a1929d378 Fix a typo (ritualIdx / heroIdx) in the Danubius OwnershipChange in 026dcf10eb / D204.
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.
2018-03-07 12:21:09 +00:00
temple d49f684139 Enable the Kushite mercenary camps
Differential Revision: https://code.wildfiregames.com/D1356
Reviewed by: mimo
This was SVN commit r21456.
2018-03-07 01:24:39 +00:00
Stan a787471f56 Move unused celt building prop meshes to the old public
Found by checkref.pl

This was SVN commit r21455.
2018-03-06 21:59:38 +00:00
Stan f83a56287c Move some old trees to old public. Found with checkrefs.pl
They are too low poly to be used sadly.

This was SVN commit r21454.
2018-03-06 21:19:25 +00:00
Stan 408a8d55c4 Remove unused/old meshes found by checkref.pl
This was SVN commit r21453.
2018-03-06 21:08:17 +00:00
mimo 0ffb130744 petra: cleanup following eslint continuation
This was SVN commit r21452.
2018-03-06 19:39:13 +00:00
mimo 307e395012 petra: more cleanups following eslint
This was SVN commit r21451.
2018-03-06 19:15:31 +00:00
Stan 46dadfb386 Rename missing hero in 6fd60ff14a
Refs: 097c19a6a0

This was SVN commit r21450.
2018-03-06 18:59:46 +00:00
Stan 6fd60ff14a Rename some heroes using the common scheme.
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.
2018-03-06 18:50:44 +00:00
mimo 06c64bd8da petra (partial) cleanup following eslint
This was SVN commit r21448.
2018-03-06 18:47:33 +00:00
mimo 4ded9cbec2 ai: cleanup of common-api following eslint
This was SVN commit r21447.
2018-03-06 18:34:33 +00:00
elexis d3fd524f88 Remove _unpacked from rome_mechanical_siege_onager since it doesn't have a Pack component, refs 9fd718186d.
Fix lineendings.

This was SVN commit r21446.
2018-03-06 13:58:07 +00:00
elexis 6113edd746 Refactor and move random template composition triggerscript code used for gaia attacker waves from Danubius (026dcf10eb / D204) and Survival Of The Fittest (18e7d8a518 / D145) to the TriggerHelper.
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.
2018-03-06 13:31:34 +00:00
elexis d8b5439956 Small map cleanup and performance improvements.
This was SVN commit r21444.
2018-03-06 11:44:20 +00:00
Stan b5ad56a83d Unify variants a bit, boost healer idle speed.
Add a third variant for male healers.

This was SVN commit r21443.
2018-03-05 21:03:48 +00:00
Stan 460dc0b2f2 Fix uterly slow animation for skirmishers.
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.
2018-03-05 20:48:41 +00:00
bb d86148defc Create winning teams for relic and wonder victory instead of letting all allies of a player win.
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/D972
fixes #4648

This was SVN commit r21441.
2018-03-05 18:02:27 +00:00
elexis 9886a4fc15 Fix trees on hills on Survival Of The Fittest following f7a2c3d02c / D145.
Use the StaticConstraint to reduce map generation time by 50%, refs
#5011.

This was SVN commit r21440.
2018-03-05 14:38:00 +00:00
elexis 1b6407ac7e Rename some constraint arguments to constraints to reflect that one can pass an array too.
This was SVN commit r21439.
2018-03-05 14:35:46 +00:00
elexis ae4bc2c7b1 Add a PassableMapAreaConstraint so that createArea calls can be constrained in advance when the result is going to be used for entity placement.
Simplification in the Area prototype.

This was SVN commit r21436.
2018-03-04 22:34:30 +00:00
mimo 4bbb5cc8ef petra: refactor the base management to allow further extensions
This was SVN commit r21435.
2018-03-04 22:32:32 +00:00
elexis b5c43fc5f9 Remove some redundant random map logger ellipses.
This was SVN commit r21434.
2018-03-04 21:09:16 +00:00
elexis cabc9b4a69 Unify the two copies of the custom dock placement logic on Hellas and Pompeii, refs #4805.
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.
2018-03-04 20:06:15 +00:00
temple b167c5f6ae Center starting entities
Differential Revision: https://code.wildfiregames.com/D1353
Reviewed by: elexis
This was SVN commit r21432.
2018-03-04 17:43:04 +00:00
mimo 55645b8bda petra: fix computation of accessibility for cart super_dock
This was SVN commit r21431.
2018-03-04 13:42:07 +00:00
mimo 0e8d47cdf7 petra: fix some (rare) cases where the ai would not build a market
This was SVN commit r21430.
2018-03-04 13:26:46 +00:00
vladislavbelov a1c4c23ce4 Adds axes to the CChart and the summary screen.
Comments By: elexis, Imarok
Reviewed By: s0600204
Trac Tickets: #4892
Differential Revision: https://code.wildfiregames.com/D474
This was SVN commit r21429.
2018-03-04 12:42:35 +00:00
mimo 5f92726fe7 petra: fix land attacks targeting ships
This was SVN commit r21428.
2018-03-03 18:46:06 +00:00
mimo fc66a2dec1 update the petra description following 5b314fc0ac, as suggested by imarok
This was SVN commit r21427.
2018-03-03 18:36:54 +00:00
elexis 6eb8a814ce Improve random map script performance by using squared distance where possible, refs #5011.
RandomPathPlacer.js diff proposed and reviewed by FeXoR

This was SVN commit r21425.
2018-03-03 13:46:57 +00:00
mimo 4392d73c5c petra: fasten late game by not waiting to have a huge army before attacking nearly defeated enemies
This was SVN commit r21424.
2018-03-03 10:37:54 +00:00
mimo 5b314fc0ac Add a time multiplier for AI levels
Differential Revision: https://code.wildfiregames.com/D1350
This was SVN commit r21423.
2018-03-03 10:05:04 +00:00
bb a8a29271ce Add a wrong indentation to avoid "unchanged" lines in D1240, #4014
Suggested By: elexis
This was SVN commit r21421.
2018-03-02 21:14:43 +00:00
elexis 148dbc2837 Egypt skirmish map by mimesot, refs #5032.
Forum thread:
https://wildfiregames.com/forum/index.php?/topic/23987-skirmish-map-egypt-condensed/
Still needs a map description.

This was SVN commit r21420.
2018-03-02 19:36:38 +00:00
elexis 1b743ee36f Always use the StaticConstraint for createPassage nomad player placement to improve the performance on some random maps slightly, refs #5011.
This was SVN commit r21419.
2018-03-02 18:53:53 +00:00
elexis e3f531384e Performance improvement for the StaticConstraint by not initializing the cache upon construction but filling it just-in-time, refs #5011.
This was SVN commit r21418.
2018-03-02 18:13:07 +00:00
temple f72e7bd626 Increase MaxSpawnDistance for ships
Differential Revision: https://code.wildfiregames.com/D1345
Reviewed by: elexis
This was SVN commit r21417.
2018-03-02 18:10:54 +00:00
elexis ce65af8dcb Move Danubius triggerscript function to compose random templates and garrison all entities of a given identity class to TriggerHelper.
Delete the copy thereof in Elephantine, refs #4805, #5040.
Use absolute paths for template names.

This was SVN commit r21416.
2018-03-02 16:32:10 +00:00
elexis 0ff518148e Forgotton file in previous commit 85a3a889e7 and change pathheight on danubius to be less than landheight.
This was SVN commit r21415.
2018-03-02 16:26:55 +00:00
elexis 85a3a889e7 Add "has" helper function to TileClass, so that one can find out if the given tile is marked with that class or not without having to fallback to Constraints.
Performance improvement for Ambush, refs #5011.

This was SVN commit r21414.
2018-03-02 16:16:45 +00:00
elexis e9fb0f62ed Add the avoidance of other Objects within the same Groups from 833ab874a9 to RandomObjects too, refs D189, #4338.
This was SVN commit r21413.
2018-03-02 15:58:02 +00:00
s0600204 9f47cc2403 Account for upgrade options of parent when determining base template for Template Viewer
Reported by: wowgetoffyourcellphone
Report:
https://wildfiregames.com/forum/index.php?/topic/24027-viewer/&do=findComment&comment=349110

Refs: D297, c8fda40b02

This was SVN commit r21410.
2018-03-01 23:50:27 +00:00
vladislavbelov 5352c0f84e Disables load/delete buttons for an empty savegames list. Fixes #5057.
Patch By: ztamas
Reviewed By: vladislavbelov
Trac Tickets: #5057
Differential Revision: https://code.wildfiregames.com/D1347
This was SVN commit r21409.
2018-03-01 20:50:41 +00:00
elexis ba1a03f3f8 Beat 24 LayeredPainters with identical neighboring layers for not doing anything but wasting performance and confusing developers, refs #4805.
Remove an unneeded else after break.

This was SVN commit r21408.
2018-03-01 19:50:09 +00:00
elexis 50dcddc0eb On Elephantine, use c214bbd1ec, c6af8b4e76 to place a path from the temple to the pyramid and replace the city patch workaround.
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.
2018-03-01 19:40:00 +00:00
elexis c214bbd1ec Return the placed Groups (containing the Objects (containing Entities)) from the createObjectGroups (plural) functions, refs c6af8b4e76.
This way maps can further modify the terrain or place entities at the
resulting position.
Generalizes retryPlacing.

This was SVN commit r21406.
2018-03-01 18:34:48 +00:00
elexis c6af8b4e76 Fix createObjectGroup (singular) and SimpleGroup.prototype.place not returning an array of entities but an array of undefined following the SimpleGroup change in 78ce731fc5.
The bug was never noticeable because the return result was never read
from yet.

This was SVN commit r21405.
2018-03-01 17:48:13 +00:00
elexis 38aee6698d New mappreview images for Ambush and Stronghold, since the ugly circle patterns were removed in 774a626bb9, refs #4993.
Fix missing word in a map description, reported by Sundiata.

This was SVN commit r21404.
2018-03-01 16:26:26 +00:00
elexis 9bd9d16420 Add translateHeightmap function which allows repositioning of an imported heightmap before copying it to the map, refs #3764, #5018, #4816.
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.
2018-03-01 14:39:17 +00:00
elexis c486ce7efe Aethiopia random map by (-_-) aka smiley.
Map description by Hannibal Barca.

Differential Revision: https://code.wildfiregames.com/D1336
Refs #5040

This was SVN commit r21402.
2018-03-01 13:07:30 +00:00
elexis 99797313fe Implement StaticConstraint, refs #5011.
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.
2018-03-01 12:48:13 +00:00
elexis 2be4293dff Complain if an RMS tries to revert the loading progress.
Also increase estimated mapgen time, refs 942a45372c, 0e0ed94926.

Differential Revision: https://code.wildfiregames.com/D1341
Proposed By: Vladislav in D1340
This was SVN commit r21400.
2018-03-01 12:06:55 +00:00
Stan 5ea7458671 Fixes #5056
Remove the offending props. Add EOL properties.
Reported and fix suggested by s0600204

This was SVN commit r21399.
2018-03-01 07:40:31 +00:00
Stan df246b3f5b Disable trader sounds that were only enabled because their szddles had an event tzg.
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.
2018-03-01 07:18:39 +00:00
mimo 58f7f47554 petra: additional fixes for accessibility checks during attacks
This was SVN commit r21397.
2018-02-28 19:20:28 +00:00
mimo 12be2af34c Fix inconsistent behaviour when deleting a saved game from the load or save panels
Patch by ztamas

Reviewed By: mimo
Trac Tickets: #4862

Differential Revision: https://code.wildfiregames.com/D1344
This was SVN commit r21396.
2018-02-28 19:16:27 +00:00
elexis 7dd14f4512 Fix missing double negation in a1ddf6114a / D1021.
This was SVN commit r21394.
2018-02-27 19:51:53 +00:00
Stan 5db56fce33 New pers quiver by alexandermb
Thread:
https://wildfiregames.com/forum/index.php?/topic/23925-task-weapons-and-armory/&page=2

This was SVN commit r21393.
2018-02-27 19:06:42 +00:00
mimo 91299ce79a petra: fixes/cleanups in navalManager
This was SVN commit r21392.
2018-02-27 16:46:49 +00:00
mimo b50589f66e petra: fixes/cleanups in attacks
This was SVN commit r21391.
2018-02-27 16:31:23 +00:00
elexis c166357146 Fix JS type label in the heightmap library, refs #3764.
Remove an unused variable following 3eac3856c6.

This was SVN commit r21390.
2018-02-27 13:09:48 +00:00
Itms 387200f745 Enable multi-processor compilation on Windows with premake5. Patch by Stan, fixes #5035.
Differential Revision: https://code.wildfiregames.com/D1335
This was SVN commit r21389.
2018-02-26 21:49:49 +00:00
temple 2e8ba0ca2c Fix some map load progress numbers
Differential Revision: https://code.wildfiregames.com/D1340
Reviewed by: elexis
This was SVN commit r21388.
2018-02-26 21:36:37 +00:00
Stan 354408439a Add back texture for the centurio
This was SVN commit r21387.
2018-02-26 21:35:33 +00:00
Stan 12e5910088 Clean up death anims a bit.
Fishermen are excluded.
Use a delenda est variant for hoplites.

This was SVN commit r21386.
2018-02-26 20:59:03 +00:00
Stan 861411ac29 New variants for elephants.
Remove duplication, simplify files
Allow for faster updates

This was SVN commit r21385.
2018-02-26 20:26:23 +00:00
elexis fc218bb12e Rework passage creation on Lower Nubia and add map description by Sundiata, refs #5040.
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.
2018-02-26 19:48:28 +00:00
bb 56a17c788d Missing double negate throws error from a1ddf6114a
Spotted By: temple
refs D1021, #4791

This was SVN commit r21383.
2018-02-26 17:40:50 +00:00
elexis 99b69098db Pay missing file in the previous commit 9d681ff3e3 with a large pyramid, refs #5040.
This was SVN commit r21380.
2018-02-25 22:35:10 +00:00
bb 3698c134b5 Make sure dropdowns fit in the screen by allowing the list to be above when there is not enough space
Reviewed By: Vladislav
Differential Revision: D1061
fixes #4857

This was SVN commit r21379.
2018-02-25 22:26:31 +00:00
bb a1ddf6114a Allow units to be positioned with freehand placement
Patch By: OptimusShepard
Comments By and Agreed With: elexis
Comments By: Imarok
Differential Revision: D1021
fixes #4791

This was SVN commit r21378.
2018-02-25 22:17:19 +00:00
elexis 9d681ff3e3 Lower Nubia random map, refs #5040.
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.
2018-02-25 22:08:26 +00:00
elexis 3d54e697e7 Allow using createPassage with out of bounds coordinates when TILE_CENTERED_HEIGHT_MAP mode is enabled.
Update credits.

This was SVN commit r21376.
2018-02-25 21:39:06 +00:00
Stan a4bdd943c1 Check for m_Unit before using it as it is done below.
That would break autostart beacause m_Unit is not set.
Noticed by: Mimo
Fix af2abb8cbf

This was SVN commit r21375.
2018-02-25 14:58:31 +00:00
Stan f75a67e8c6 Fix cavalry animations. Use inheritance where possible to reduce the amount of maintenance work needed.
This was SVN commit r21374.
2018-02-25 14:40:00 +00:00
Stan 2ab3436dab Move some unused textures to the art repo
This was SVN commit r21373.
2018-02-25 13:03:18 +00:00
mimo f687c8f61d petra: Always use an helper function to get the accessibility of an entity instead of direct use of the accessibility map, in order to be able to cope with entity specificities (docks for example).
This was SVN commit r21372.
2018-02-25 10:10:14 +00:00
Stan 23db9cac91 Use the correct texture for the mauryan hero head.
This was SVN commit r21370.
2018-02-25 02:28:46 +00:00
Stan 2b45ac5ddf Fix Mauryan Hero
This was SVN commit r21369.
2018-02-25 02:27:04 +00:00
Stan cd1be35976 Move files found by a modified checkref.pl to the old_public
Use some previously unused anims for ponies,
Remove unanimated capes, as the current models are the same but rigged.

This was SVN commit r21368.
2018-02-25 02:08:55 +00:00
Stan e912160467 Use an old anim committed by Pureon
This has no visual effect.
Reported by checkrefs.pl

This was SVN commit r21367.
2018-02-25 00:38:34 +00:00
Stan d89abdef44 Move unused and old anims to the old_public folder
Reorganize the new into folders so it's easier to find
and will be easier to reimplement if we need them.

This was SVN commit r21366.
2018-02-25 00:30:46 +00:00
elexis 8bad02bd64 Donate button.
Differential Revision: https://code.wildfiregames.com/D1317
Agreed with: Itms
String improvement by: Stan
Tested by: Imarok
This was SVN commit r21365.
2018-02-24 23:18:42 +00:00
elexis 8615acb2fc Napata demo map by Skhorn, based on research by Sundiata, refs #5040.
Displays a historic reconstruction of the ancient Nubian / Kushite city.

This was SVN commit r21364.
2018-02-24 23:13:11 +00:00
Stan 3e0482b85b Use Inheritance for quadrapeds, to reduce work needed when wanting to update anims
This was SVN commit r21363.
2018-02-24 22:37:33 +00:00
Stan d5c48e851e Disable cavalry sounds.
This was SVN commit r21362.
2018-02-24 21:07:30 +00:00
Stan 679dc0ebba Fix broken tests,
Noticed by bb:
fixes af2abb8cbf

This was SVN commit r21361.
2018-02-24 20:37:50 +00:00
bb d470995bcb Fix nomad checbox scrolling wrongly, fixes 70172519b7
This was SVN commit r21360.
2018-02-24 20:19:59 +00:00
Stan af2abb8cbf Fix units not being able to play sounds when walking and running
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.
2018-02-24 18:13:03 +00:00
mimo 976ab3d395 petra fixes/improvments of b11ff0df68
This was SVN commit r21358.
2018-02-24 17:06:04 +00:00
elexis 29bd1216cd Place treasure on Elephantine island to incentivize players invading the fortified island.
Discussed with: temple, (-_-) aka smiley
Also add missing Unknown diff in previous commit d35d6cc9f9

This was SVN commit r21357.
2018-02-24 16:25:47 +00:00
elexis d35d6cc9f9 Change createPassage function from cfdd37f6d9 to optionally consume a Constraint argument instead of an optional maxHeight argument.
This allows constraining the passage using tileclasses for instance.

This was SVN commit r21356.
2018-02-24 16:01:20 +00:00
temple 79090bfa63 Double negate state.garrisonHolder
Differential Revision: https://code.wildfiregames.com/D1326
Reviewed by: mimo
This was SVN commit r21355.
2018-02-24 14:13:27 +00:00
elexis 7541291621 Elephantine map description by Sundiata, refs #5040.
Place bushes on the shoreline.
Fix berries.
Remove unused tileclass.
Less watercolor saturation.
Fix lineendings.

This was SVN commit r21354.
2018-02-24 12:56:35 +00:00
elexis db07c11216 Maximize civ selection dropdown size in the gamesetup, i.e increase the size by 3 more civs.
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.
2018-02-24 12:19:47 +00:00
Stan 665695bed1 Add a snow particles for mapmakers
Discussed with: bb_, elexis

This was SVN commit r21352.
2018-02-24 11:50:03 +00:00
Stan abb6026816 Fix Iber champ not using fire javelins anymore
Patch by: (-_-)
Reviewed by: Stan
Thanks.

This was SVN commit r21351.
2018-02-24 11:02:58 +00:00
Stan 158b5963c4 Fix Ptol, Cart, and Pers traders not having animations.
This was SVN commit r21350.
2018-02-24 11:00:36 +00:00
mimo 1b525c1917 Small floating debris should not block ship movement.
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D1329
This was SVN commit r21349.
2018-02-24 10:52:04 +00:00
mimo 3b26e8fac3 Decrease a bit the clearance of fishing ships (from 4 to 3).
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D1330
This was SVN commit r21348.
2018-02-24 10:48:48 +00:00
Stan db080f7f22 Fix some templates errors introduced by the recent camel renaming.
This was SVN commit r21347.
2018-02-24 10:48:46 +00:00
mimo b11ff0df68 petra: fix oversight in 5a2b3d3d5d
This was SVN commit r21346.
2018-02-24 10:41:59 +00:00
elexis 7c7d74cf2e Fix missing right-alignment of lobby icon in the summary screen following 228399f913, refs #4106.
This was SVN commit r21345.
2018-02-24 10:26:44 +00:00
temple 4eb9582e63 Town bell - use matching classes, add a market alert
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.
2018-02-24 04:35:26 +00:00
temple ee23f7adb1 Tweaks to Via Augusta
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.
2018-02-24 02:06:17 +00:00
elexis c69b5688bc Revert 8684e06ce0 / D1083 since the translated strings are only accessible while the public mod is enabled.
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.
2018-02-24 00:33:30 +00:00
s0600204 1d0700c3cb Reduce duplication in code compiling template lists in Reference Suite
Also supports having initial start entity templates not in the usual
`simulation/templates/{structures|units}` folders

This was SVN commit r21340.
2018-02-23 22:04:45 +00:00
s0600204 760a47335d Add buttons for changing between, and hotkeys for opening, the civinfo and structree
Patch by: fpre
Reviewed By: s0600204
Fixes: #4970
Differential Revision: https://code.wildfiregames.com/D846
This was SVN commit r21339.
2018-02-23 20:54:28 +00:00
bb 70172519b7 Use a macro for creating checkboxes in the Atlas map panel (other panels code checkboxes in a different way)
Agreed With: elexis

This was SVN commit r21338.
2018-02-23 20:47:46 +00:00
bb 0ace1b44b2 Learn males chopped wood is not a weapon to fight with.
Use correct variants in animations form UnitAI.

Patch By: wraitii
Reviewed By: temple
Differential Revision: https://code.wildfiregames.com/D1239
fixes #4932

This was SVN commit r21337.
2018-02-23 20:20:57 +00:00
Imarok c894eeb856 Fix debug mode after d5807cd59f
Reviewed by: temple
Differential Revision: https://code.wildfiregames.com/D1315
This was SVN commit r21336.
2018-02-23 20:17:47 +00:00
bb c0349931c0 Update the animation immediately after a varaint is changed, so we don't have sliding issues when we do so.
Differential Revision: https://code.wildfiregames.com/D1322
Reviewed By: temple
This was SVN commit r21335.
2018-02-23 20:11:16 +00:00
elexis 7908045272 Add desert bush variant which was used in cc3d9de386 but became unused by 4d40c8dc7d.
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.
2018-02-23 15:02:05 +00:00
elexis 51194c2eca Fix bloom on Persian Highlands following a6e4c5142a, refs #4766, #4954.
This was SVN commit r21333.
2018-02-23 14:55:15 +00:00
elexis e1d2d3e723 Update credits.
This was SVN commit r21332.
2018-02-23 13:19:57 +00:00
elexis 4c979d8e38 Elephantine random map script, refs #5040.
Uses OpenStreetMap polygons for the shape of the water, refs #5018.

Proposed by: Sundiata, wowgetoffyourcellphone
This was SVN commit r21330.
2018-02-23 05:41:35 +00:00
elexis dca8a68559 Change the RandomObject prototype to pick a different template upon each placement, making it much more useful.
This was SVN commit r21329.
2018-02-23 01:43:49 +00:00
Stan 07419b5ab1 Fix typo, that didn't break the game for some reason.
This was SVN commit r21328.
2018-02-22 21:04:45 +00:00
bb b2c923800f Fix linting issues in 9571c56d7e and ac7b5ce861 noticed by Imarok
This was SVN commit r21327.
2018-02-22 20:50:15 +00:00
Stan 1e42ab5548 New camels
Models, Anims and textures by Alexandermb and Wackyserious
Thread:
https://wildfiregames.com/forum/index.php?/topic/23596-task-update-camel-units/&page=7

This was SVN commit r21326.
2018-02-22 20:41:50 +00:00
s0600204 46114e00c8 Pass appropriate techcode to Template Viewer when clicking on one of a tech-pair in the session gui
(Instead of the content of the tech-pair's pairing tech)

Reported by: wowgetoffyourcellphone
Report: https://wildfiregames.com/forum/index.php?/topic/24027-viewer/

Refs: https://code.wildfiregames.com/D297

This was SVN commit r21325.
2018-02-22 20:22:45 +00:00
mimo fd14419bc0 petra: fix an index access + some cleanup
This was SVN commit r21324.
2018-02-22 18:42:45 +00:00
Stan b38cf55ff5 Cleanup materials, remove comments, and tweak requires.
Reviewed By: Vladislav
Differential Revision: ​https://code.wildfiregames.com/D94
This was SVN commit r21323.
2018-02-22 18:26:04 +00:00
mimo 6111f0b6cd cleanup temple_mars tooltip
This was SVN commit r21322.
2018-02-22 18:19:26 +00:00
mimo 187ad553f2 Increase vision range of fishing boats from 24 to 30
Reviewed By: elexis, Stan
Differential Revision: https://code.wildfiregames.com/D1320
This was SVN commit r21321.
2018-02-22 18:14:12 +00:00
temple 47750d788b Don't use "all" in ranged aura strings
Differential Revision: https://code.wildfiregames.com/D1321
Reviewed by: elexis
This was SVN commit r21320.
2018-02-22 17:57:56 +00:00
temple 3b3d86fe71 Add a diplomacy colors button to the diplomacy window
Differential Revision: https://code.wildfiregames.com/D1318
Reviewed by: elexis
This was SVN commit r21319.
2018-02-22 17:30:46 +00:00
mimo 7d872eaebb petra tweaks for temples
This was SVN commit r21318.
2018-02-22 17:09:48 +00:00
temple de9427a291 Bump year
This was SVN commit r21316.
2018-02-21 23:42:18 +00:00
Stan 8f99a77c77 Tweak Kushites as asked there for AI compatibility c71b521dad
Transform the camps in embassies
Remove special class
Rename the mercs
Remove the more explicit camelry name

This was SVN commit r21315.
2018-02-21 23:36:26 +00:00
Stan b573bbc63c Remove animal props from the camp not to confuse players.
This was SVN commit r21314.
2018-02-21 23:02:07 +00:00
Imarok 02ed411e6f Fix comments and year in d5807cd59f and 01f581e813
Reviewed by: elexis
Differential Revision: https://code.wildfiregames.com/D1314
This was SVN commit r21313.
2018-02-21 22:53:01 +00:00
temple 4fc87ced78 Grid bounds and SinkRate debug version fixes
Differential Revision: https://code.wildfiregames.com/D1209
Patch by: Angen
Reviewed by: wraitii
Comments by: Itms, Stan
This was SVN commit r21312.
2018-02-21 22:30:54 +00:00
vladislavbelov b6b547d5f8 Adds remember password checkbox
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D822
This was SVN commit r21311.
2018-02-21 22:01:03 +00:00
s0600204 c8fda40b02 Implement an in-game Template Details Viewer
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.
2018-02-21 21:39:00 +00:00
s0600204 b94aff0955 Remove a couple of empty/nonsense History strings that have crept in
Refs: D297, #3212, b80a255a0a

This was SVN commit r21309.
2018-02-21 21:26:36 +00:00
temple 18149d9033 Adjust some footprints and obstructions to better handle spawning
Differential Revision: https://code.wildfiregames.com/D1302
Reviewed by: bb
This was SVN commit r21308.
2018-02-21 20:05:41 +00:00
temple 6ea532298e Add a countdown timer to the research progress panel
Suggested by: fpre/ffffffff
Reviewed by: elexis, ffffffff
Comments by: vladislavbelov
This was SVN commit r21307.
2018-02-21 19:56:37 +00:00
temple f397f7236c Remove phalanx formation from templates of units that don't use it
Differential Revision: https://code.wildfiregames.com/D1313
Reviewed by: Stan
This was SVN commit r21306.
2018-02-21 19:40:27 +00:00
elexis e497672a9c Bump copyright header year numbers.
This was SVN commit r21305.
2018-02-21 18:44:52 +00:00
elexis 9691d8da1c Fix missing rmgen-common import in Schwarzwald, fixes #5043.
This was SVN commit r21304.
2018-02-21 18:12:21 +00:00
mimo 1ceb612041 Allows the AI to go backToWork instead of restarting a new trade route each time
Differential Revision: https://code.wildfiregames.com/D1312
This was SVN commit r21303.
2018-02-21 17:37:52 +00:00
mimo 5b55a7d3f1 petra tuning of barter
This was SVN commit r21302.
2018-02-21 17:31:52 +00:00
Imarok eca956a513 Check lobby games for incompatible mods
Reviewed by: elexis
Fixes #3370
Differential Revision: https://code.wildfiregames.com/D931
This was SVN commit r21301.
2018-02-21 17:27:33 +00:00
elexis 774a626bb9 Ambush bluffs rework.
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.
2018-02-21 16:49:05 +00:00
mimo 5a2b3d3d5d petra: reduce the traffic jams of ships
This was SVN commit r21299.
2018-02-21 15:47:28 +00:00
mimo 995ad12ead petra: add missing protection
This was SVN commit r21298.
2018-02-21 15:39:20 +00:00
elexis 1d99a5e2aa Print number of terrain entities and textures after generating the random map.
Remove two unused variables and simplify SmoothElevationPainter
following previous commit.

This was SVN commit r21297.
2018-02-21 11:10:42 +00:00
elexis 3eac3856c6 Cleanup random map Area prototype following b4503bb61e.
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.
2018-02-21 10:49:35 +00:00
Stan 7adc1afc2f Make Thureophoroi use hoplite animations.
They should be able to use Phalanx as said here
https://trac.wildfiregames.com/wiki/Civ%3A_Ptolemies
https://trac.wildfiregames.com/wiki/Civ%3A_Seleucids

Other are not affected as they are javelinists. This should be
considered when #252
is implemented. Discussed with : Temple

This was SVN commit r21293.
2018-02-20 22:57:00 +00:00
elexis 729f5303f0 Fix options tab button style not update upon attempted save of invalid settings following 9ae7c4d810 / D1175 reported by Vladislav.
This was SVN commit r21292.
2018-02-20 22:47:54 +00:00
vladislavbelov b8c488b63a Added multiples UVs to animated model
Reviewed By: wraitii, Stan
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D448
This was SVN commit r21291.
2018-02-20 21:33:02 +00:00
elexis a92a4f6415 Use CamelCase for random map files containing the prototype of the same name, refs #5042, #4804.
This was SVN commit r21290.
2018-02-20 19:50:04 +00:00
elexis e5349abdcd Separate object-oriented random map generation core library "rmgen" from miscellaneous helper procedures which are moved to a new library "rmgen-common", refs #4804, #5042.
This way mods can use the placement and painting prototypes while
excluding any common 0ad code.

This was SVN commit r21289.
2018-02-20 19:39:04 +00:00
elexis d5b7905c6e Split random map generation Painter prototypes into one file per prototype, refs #5042, #4804.
This was SVN commit r21288.
2018-02-20 18:51:26 +00:00
elexis 8c5b7e6f13 Split the random map generation Placer prototypes into one file per prototype, refs #5042, #4804.
The flags should preserve revision history.

This was SVN commit r21287.
2018-02-20 18:39:26 +00:00
elexis 553069dbb7 Fix missing comma in 833ab874a9 reported by minohaka.
Increase retry counter to account for higher likelihood of failed mines.

This was SVN commit r21286.
2018-02-20 06:12:57 +00:00
temple 5420d34633 Increase cavalry train time and decrease champion train time
Discussed at D1279 with Grugnas, Hannibal_Barca, mimo, elexis.

This was SVN commit r21285.
2018-02-20 03:55:49 +00:00
temple 7e4a018d6b Give spear cavalry an anti-cav bonus
Discussed at D1279 with Grugnas, Hannibal_Barca, mimo, elexis.

This was SVN commit r21284.
2018-02-20 03:52:08 +00:00
elexis 833ab874a9 Let SimpleObject also avoid other SimpleObjects within the same SimpleGroup following 0e0ed94926, refs #6.
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.
2018-02-20 03:44:17 +00:00
temple 40b42650c2 Nerf skirmishers
Discussed at D1279 with Grugnas, Hannibal_Barca, mimo, elexis.
Refs: #4941

This was SVN commit r21282.
2018-02-20 03:37:10 +00:00
temple 9396f0d336 Adjust some unit stats
Discussed at D1279 with Grugnas, Hannibal_Barca, mimo, elexis.

This was SVN commit r21281.
2018-02-20 03:22:14 +00:00
temple 5ade932854 Adjust some structure stats
Discussed at D1279 with Grugnas, Hannibal_Barca, mimo, elexis.

This was SVN commit r21280.
2018-02-20 03:14:34 +00:00
elexis 44a10af284 Via Augusta is a new map.
This was SVN commit r21279.
2018-02-20 02:24:04 +00:00
elexis 47be7d4a9d Fix SimpleObject assuming positions on the impassable map border to be passable while the SimpleGroup using that Object rejecting that position following 78ce731fc5.
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.
2018-02-19 23:59:06 +00:00
elexis eaf46962b4 Fix metal mines and nomad units on Dodecanese, refs D1277.
Improve bridges.

This was SVN commit r21276.
2018-02-19 23:30:30 +00:00
Stan c71b521dad New Blemmye camp for Kushites
Issue: https://github.com/0ADMods/kushites/issues/63

This was SVN commit r21275.
2018-02-19 22:35:18 +00:00
elexis 75c24843b2 Add Nomad checkbox for Atlas, refs #4824, #3591.
Differential Revision: https://code.wildfiregames.com/D1310
This was SVN commit r21274.
2018-02-19 22:30:09 +00:00
elexis d31255d73d Play the new track "The Governor" from 668da1b0d1 as a peacetime track for Romans, as intended by Omri.
This was SVN commit r21273.
2018-02-19 22:09:47 +00:00
temple 6285244c1c Adjust spread multiplier in technologies
Differential Revision: https://code.wildfiregames.com/D834
Comments by: fatherbushido
This was SVN commit r21272.
2018-02-19 21:11:56 +00:00
temple 2634606f3e Increased loot for promoted units
Differential Revision: https://code.wildfiregames.com/D995
Patch by: Grugnas
This was SVN commit r21271.
2018-02-19 20:59:50 +00:00
Stan 2f89e38ba4 Some architectural tweaks to kush buildings asked by Sundiata.
This was SVN commit r21270.
2018-02-19 20:56:34 +00:00
temple c39e9661b4 Hero aura adjustments
Discussed with and ideas by: Grugnas, Hannibal_Barca
This was SVN commit r21269.
2018-02-19 20:30:23 +00:00
temple 2b9419a838 Only apply Roman team bonus to citizen-soldiers
Differential Revision: https://code.wildfiregames.com/D859
Patch by: Grugnas
This was SVN commit r21268.
2018-02-19 20:05:40 +00:00
temple bbd24685fd Only test spawn against entities that block movement
Differential Revision: https://code.wildfiregames.com/D1308
Reviewed by: elexis
This was SVN commit r21267.
2018-02-19 18:34:06 +00:00
temple 8811029791 Add an IsInWorld check to FindNearestDropsite
Differential Revision: https://code.wildfiregames.com/D1309
Reviewed by: elexis
This was SVN commit r21266.
2018-02-19 18:17:00 +00:00
mimo 511ea02d9c Revisit petra transport, and fix bug where transport of large armies would be split in multiple transports of one unit each.
This was SVN commit r21265.
2018-02-19 16:31:16 +00:00
elexis 8fbc095a88 Stop the random map generation upon quit request (Alt+F4), refs #4822.
Differential Revision: https://code.wildfiregames.com/D1304
Discussed with: Yves

This was SVN commit r21264.
2018-02-19 15:46:25 +00:00
elexis 228399f913 Add the lobby button to the summary screen.
Patch By: fpre / ffffffff
Differential Revision: https://code.wildfiregames.com/D1272
Refs #4106

This was SVN commit r21263.
2018-02-19 14:51:20 +00:00
elexis 328d9f059e Increase resource counts on Hellas, refs #4695.
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.
2018-02-19 14:38:36 +00:00
Stan 7cd212ce6f New Kushites Statues by AlexanderMB
Thread:
https://wildfiregames.com/forum/index.php?/topic/23926-kushites-architecture-revision/&page=3&tab=comments#comment-348760
Normal map fix: Stan
Those will be used by the dock and some of the temples.

This was SVN commit r21260.
2018-02-19 00:49:03 +00:00
Stan 4bd7682e87 New animation for fishermen by Alexandermb
Thread:
https://wildfiregames.com/forum/index.php?/topic/23638-task-new-animations-for-fishermen/&page=2

This was SVN commit r21258.
2018-02-18 21:04:32 +00:00
mimo 41e64bf7d3 petra: ease a bit the easier difficulty levels as quite often asked for (the patch was in fact involontary committed in 54c2447379)
This was SVN commit r21257.
2018-02-18 18:22:58 +00:00
mimo 54c2447379 petra: complete 8f4db16139 for the change in dock positionning in random maps
This was SVN commit r21256.
2018-02-18 18:17:33 +00:00
Stan ab057e0bf5 Change the event tag of the bows. Noticed by Alexandermb
Thread:
https://wildfiregames.com/forum/index.php?/topic/23578-rome-legionary/&page=3&tab=comments#comment-348741

This was SVN commit r21255.
2018-02-18 17:27:04 +00:00
elexis 99994faf12 Fix options validation upon saving following 3312a83f82.
Only the GUI controls of the current category are accessible, but the
save button validates all of them.

This was SVN commit r21254.
2018-02-18 16:19:18 +00:00
Imarok 84c4249fd1 Fix the test added in 59e7320a49
This was SVN commit r21253.
2018-02-18 15:47:44 +00:00
mimo a447c3fc1b petra fixes for fishing
This was SVN commit r21252.
2018-02-18 11:54:12 +00:00
mimo 93f41918f4 petra: various fixes preventing units to be blocked
This was SVN commit r21251.
2018-02-18 11:52:02 +00:00
Imarok 59e7320a49 Small StatisticsTracker test
Reviewed by: elexis
Differential Revision: https://code.wildfiregames.com/D1305
This was SVN commit r21250.
2018-02-18 10:50:06 +00:00
elexis 240af1de6d Dodecanese random map, based on patch by Hannibal Barca.
Bridge code and Volcano mine.

Differential Revision: https://code.wildfiregames.com/D1277
This was SVN commit r21248.
2018-02-18 02:37:18 +00:00
Stan f545b718d7 Fix the Skiritai unit having no animations when gathering, carrying...
Reported by elexis

This was SVN commit r21247.
2018-02-18 01:33:53 +00:00
elexis 4fb105a68f Fix non-existing rubble.
This was SVN commit r21246.
2018-02-17 23:32:35 +00:00
LordGood 7d09e0c962 Seleucid main menu foreground update
This was SVN commit r21244.
2018-02-17 20:25:29 +00:00
temple a68d38f5d5 Remove lastFormationTemplate from UnitAI
Differential Revision: https://code.wildfiregames.com/D1255
Reviewed by: bb
This was SVN commit r21243.
2018-02-17 17:54:24 +00:00
Imarok 01f581e813 Move GetEngineInfo to Mod.[h|cpp]
Suggested by: elexis
refs d5807cd59f

This was SVN commit r21242.
2018-02-17 17:36:43 +00:00
temple 7c8c4ac2f7 Fix selection rings while garrisoning
Differential Revision: https://code.wildfiregames.com/D1158
Reviewed by: elexis, Itms
Refs: #2627

This was SVN commit r21241.
2018-02-17 16:56:12 +00:00
OmriLahav 668da1b0d1 This was SVN commit r21240. 2018-02-17 16:54:09 +00:00
Imarok d5807cd59f Check for and save mod version for savegames and replays
Reviewed by: elexis
Fixes: #4887
Differential Revision: https://code.wildfiregames.com/D955
This was SVN commit r21239.
2018-02-17 16:53:14 +00:00
elexis 246d57a81d Pompeii heightmap missing in 5acd064cb9, reported by Imarok.
This was SVN commit r21238.
2018-02-17 15:05:40 +00:00
Stan fa4c4efa9d Fix carry idle animation gliding when women flee. That was due to them not having a running animation.
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.
2018-02-17 12:46:02 +00:00
Stan 2406445821 Delete a duplicate basket introduced by 83680b0dee. Noticed by elexis.
This was SVN commit r21235.
2018-02-17 12:40:20 +00:00
temple 470d3eb129 Replace a territory texture hack
Differential Revision: https://code.wildfiregames.com/D1293
This was SVN commit r21233.
2018-02-17 01:37:52 +00:00
elexis 866cf15751 Fix nomad units in e637e68ff6.
This was SVN commit r21232.
2018-02-16 22:11:01 +00:00
temple facc8fe15b Avoid NaN in Foundation and Repairable
Differential Revision: https://code.wildfiregames.com/D1296
Reviewed by: elexis
Comments by: bb, mimo
Fixes: #5030
Refs: #1879

This was SVN commit r21231.
2018-02-16 21:56:35 +00:00
elexis fd7eb809f4 Remove civ hardcoding of the population space of houses on the Fortress map,
thereby fixing the granted population space for Mauryans and Ptolemians
following 6822e33c65, 08f431fa0d.

Patch By: (-_-) aka smiley
Differential Revision: https://code.wildfiregames.com/D1286
This was SVN commit r21230.
2018-02-16 21:52:33 +00:00
bb fd8e2fbf1b vertically align gamesetup checkboxes, disalignment introduced in ac7b5ce861
Reviewed By: elexis
This was SVN commit r21229.
2018-02-16 20:52:19 +00:00
elexis e637e68ff6 Hellas random map script.
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.
2018-02-16 20:26:42 +00:00
elexis d29b1a1044 convertHeightmap1Dto2D helper function which allows extracting a subset of a heightmap image.
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.
2018-02-16 19:02:51 +00:00
elexis c9c1af355f Danubius is a naval map.
This was SVN commit r21226.
2018-02-16 18:52:14 +00:00
elexis dc18ea1973 Implement a DiskPlacer to enable random map scripts chosing all points inside a circle without using a special case of the other placers.
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.
2018-02-16 18:49:54 +00:00
elexis a30ab829f4 Area getClosestPointTo helper function that allows dock placement on random maps without preknowledge about the water location.
This was SVN commit r21224.
2018-02-16 18:17:30 +00:00
elexis c91fd9c2c3 Atlas should only list map JSON files as maps.
Differential Revision: https://code.wildfiregames.com/D1301
This was SVN commit r21223.
2018-02-16 16:42:46 +00:00
Stan 9dba939808 Fixes d408262d3d
Use the same speed for walk and run as it looked weird other wise
Use the correct anim for wood.

This was SVN commit r21220.
2018-02-16 06:17:13 +00:00
Stan d408262d3d Add running animations for carrying units so that they do not glide.
Add XML headers.

This was SVN commit r21219.
2018-02-15 22:39:48 +00:00
Stan ffe07d5cd9 Differential Revision: ​https://code.wildfiregames.com/D1121
Reviewed by: elexis
Comments by: wowgetoffyourcellphone
Fixes #4832

This was SVN commit r21218.
2018-02-15 19:42:18 +00:00
temple bebf68f8f5 Change hotkey.diplomacycolors to hotkey.session.diplomacycolors
This was SVN commit r21217.
2018-02-15 19:10:23 +00:00
temple b28b50ef63 Fix a typo and use better variable names in Footprint
Differential Revision: https://code.wildfiregames.com/D1287
Reviewed by: bb
Comments by: elexis, Stan
This was SVN commit r21216.
2018-02-15 18:40:18 +00:00
s0600204 72fa750a0c Fix margin/padding issue in tooltips
Reviewed By: bb
Refs: D836, d01cb88ac4
Differential Revision: https://code.wildfiregames.com/D1298
This was SVN commit r21215.
2018-02-15 18:16:45 +00:00
mimo 98791a86a1 petra: fixes some unit assignments
This was SVN commit r21214.
2018-02-14 18:58:51 +00:00
mimo 8f4db16139 petra adaptation to changes in dock positioning in random maps
This was SVN commit r21213.
2018-02-14 18:52:41 +00:00
Stan be255ac8ac Placeholder hero so the civ is complete, basically all that needs to be changed is the turret the rest is fine.
This was SVN commit r21211.
2018-02-13 22:39:29 +00:00
Stan ee7ca1b86c rever the change in 03f064f0a1 as
it will cause some issues and the behaviour hasn't been well defined.

This was SVN commit r21210.
2018-02-13 21:19:11 +00:00
Stan 81b8fab010 Add a new hero (harsiotef father of nastasen) that should replace nastasen eventually as noted by sundiata.
This was SVN commit r21209.
2018-02-13 21:09:44 +00:00
Stan a87a655801 Add new textures by Sundiata and wackyserious for kushites + some specs and normal maps.
Thread :
https://wildfiregames.com/forum/index.php?/topic/22765-kushites-units-unit-textures-and-unit-props/&page=20
Commits  in the branch :
https://github.com/0ADMods/kushites/commit/d13c7c2d7965dc9d782405282740906d56df5dd0
https://github.com/0ADMods/kushites/commit/2fbaf4b4047a80939fc5caf82b040781b933af3a

This was SVN commit r21208.
2018-02-13 21:08:16 +00:00
mimo c6aaeb7034 various petra fixes
This was SVN commit r21207.
2018-02-13 20:06:09 +00:00
elexis 07ac1051dc Move the randomPlayerLocations rmgen2/ function to rmgen/, so that one can use it without importing rmgen2, refs #4947, Belgian Uplands 5ca6217796, Islets D1277.
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.
2018-02-13 19:44:43 +00:00
elexis 4f36fda38f Allow passing non-integer radius-queue values to the ChainPlacer, which was assumed by the Island Stronghold change in 45a9714865.
Beautify Ratumacos tributary rivers.

This was SVN commit r21205.
2018-02-13 19:42:50 +00:00
bb 45e5b2f0f8 Make the 'g' in 'last man standing' visible in gamesetup
Make more space for the dropdowns so longstring language doesn't
complain

Reviewed By: Imarok
Differential Revision: https://code.wildfiregames.com/D1260
fixes: #5015

This was SVN commit r21204.
2018-02-13 19:24:13 +00:00
Stan 8cc7865c16 Fix decal and rubble size.
Based on patch here:
https://github.com/0ADMods/kushites/commit/51b1279b649e506075a26c0d2558daf6e0b186ea

This was SVN commit r21203.
2018-02-13 18:09:03 +00:00
Stan 03f064f0a1 Update the templates to match the new unit names.
Rename ptol cavalry to camelry to better reflect what they are.
Update the maps accordingly.

This was SVN commit r21202.
2018-02-13 01:00:21 +00:00
Stan 95b700d73c Cleanup of the units PART XIV
New idle carry anims states for spartans + capes
Use the new convention discussed with wowgetoffyourcellphone

This was SVN commit r21201.
2018-02-13 00:58:28 +00:00
Stan ee6616e5cc Cleanup of the units PART XIII
New idle carry anims states for seleucids + capes
Use the new convention discussed with wowgetoffyourcellphone

This was SVN commit r21200.
2018-02-13 00:57:57 +00:00
Stan 17380785f7 Cleanup of the units PART XII
New idle carry anims states for romans + capes
Use the new convention discussed with wowgetoffyourcellphone

This was SVN commit r21199.
2018-02-13 00:57:12 +00:00
Stan f6e6295e92 Cleanup of the units PART XI
New idle carry anims states for ptolemies + capes
Use the new convention discussed with wowgetoffyourcellphone

This was SVN commit r21198.
2018-02-13 00:56:47 +00:00
Stan 5590f56603 Cleanup of the units PART X
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.
2018-02-13 00:56:17 +00:00
Stan 91e81a024d Cleanup of the units PART IX
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.
2018-02-13 00:54:27 +00:00
Stan 6ee1cd7f5f Cleanup of the units PART VII
New idle carry anims states for kushites + capes
Use the new convention discussed with wowgetoffyourcellphone

This was SVN commit r21195.
2018-02-13 00:53:44 +00:00
Stan 97fbfc3b20 Cleanup of the units PART VI
New idle carry anims states for iberians + capes
Use the new convention discussed with wowgetoffyourcellphone

This was SVN commit r21194.
2018-02-13 00:53:29 +00:00
Stan 28268ab5c2 Cleanup of the units PART V
New idle carry anims states for carthaginians + capes
Use the new convention discussed with wowgetoffyourcellphone

This was SVN commit r21193.
2018-02-13 00:53:00 +00:00
Stan 91c91263fc Clean up global units
This was SVN commit r21192.
2018-02-13 00:52:20 +00:00
Stan 4a8a610fab Cleanup of the units PART IV
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.
2018-02-13 00:51:28 +00:00
Stan 26c3dd38aa Cleanup of the units PART III
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.
2018-02-13 00:50:06 +00:00
Stan 00f0bd561d Remove a useless old ship
This was SVN commit r21189.
2018-02-13 00:46:37 +00:00
Stan ccb831cf84 Cleanup of the units PART II
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.
2018-02-13 00:45:45 +00:00
Stan 9147b1d691 Cleanup of the units PART I
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.
2018-02-13 00:43:53 +00:00
mimo d4381dbbc0 petra cleanups
This was SVN commit r21186.
2018-02-12 20:05:29 +00:00
bb eba2d9dfcf Cleanup updateBandbox function with using vector functions
Patch By: OptimusShepard
Differential Revision: https://code.wildfiregames.com/D1295
This was SVN commit r21185.
2018-02-12 11:41:39 +00:00
bb d3f213a865 Create an In-Game tab in the options menu, add periods in all option tooltips
Patch By: ffffffff
Comments By: elexis
Differential Revision: https://code.wildfiregames.com/D797
This was SVN commit r21184.
2018-02-12 11:01:26 +00:00
elexis c1904a725a Implement ElevationBlendingPainter which interpolates the height of the given area with the desired height.
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.
2018-02-12 01:22:10 +00:00
Stan c9a7817752 Move some old animation to the old public folder. Found with checkrefs.pl
This was SVN commit r21181.
2018-02-12 01:00:14 +00:00
Stan ff5ca5ff9b Fix broken pyramid revealed by unit test demo.
You cannot use variants like this.

This was SVN commit r21180.
2018-02-12 00:13:32 +00:00
elexis 95e68d4896 Add roman docks and dock rubble to Pompeii, compensating the disadvantage of players spawned near the sea.
Use another lava texture.

This was SVN commit r21179.
2018-02-11 17:44:48 +00:00
mimo 0de78fde81 petra: changes to improve startup on small islands
This was SVN commit r21178.
2018-02-11 17:44:20 +00:00
elexis 45a9714865 Fix wrong argument order in Island Stronghold in 02fe3ef3e3.
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.
2018-02-11 16:02:51 +00:00
elexis 7f9652d6ff Migrate setRandomHeightmap from the heightmap library to a Painter that can be applied to arbitrary Areas, refs #3764.
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.
2018-02-11 15:22:27 +00:00
elexis 02fe3ef3e3 Implement SmoothingPainter for random maps, fixes #5027.
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.
2018-02-11 14:56:55 +00:00
s0600204 9501292661 Merge the structree's loadUnit and loadStructure functions
The resultant function should be able to handle any (selectable) entity
template.

This was SVN commit r21174.
2018-02-11 04:09:28 +00:00
temple f0b26e95ef Add a hotkey to toggle diplomacy colors
Differential Revision: https://code.wildfiregames.com/D1292
Reviewed by: elexis
This was SVN commit r21173.
2018-02-10 22:45:36 +00:00
Stan 42534b3d03 Move mushrooms out of the flora folder as they are not technically flora.
Discussed with elexis.

This was SVN commit r21172.
2018-02-10 16:39:26 +00:00
elexis 5ca6217796 Make Belgian Uplands a circular map and clean it's code, refs 21e284f8eb.
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.
2018-02-10 14:13:17 +00:00
elexis f150617b2c Revert unintentionally overwritten red sea heightmap in 5acd064cb9.
This was SVN commit r21170.
2018-02-10 12:40:10 +00:00
mimo fd8f19a4b5 petra: cancel naval transport of builders when their target foundation has been destroyed before they are on board
This was SVN commit r21169.
2018-02-10 10:26:29 +00:00
s0600204 c13bc83aed Load and Initialise PlayerData in Atlas' ActorViewer
Reviewed By: elexis
Fixes: #4900
Differential Revision: https://code.wildfiregames.com/D1276
This was SVN commit r21167.
2018-02-09 21:49:46 +00:00
s0600204 262b27d770 Remove unnecessary argument from CSimulation2::InitGame
Reviewed By: Itms
Differential Revision: https://code.wildfiregames.com/D1289
This was SVN commit r21166.
2018-02-09 19:50:01 +00:00
elexis 29950c2d90 Ngorongoro replicate of _kali's map in a68881dd0f.
This was SVN commit r21165.
2018-02-09 16:34:13 +00:00
elexis 5acd064cb9 Pompeii random map script, largely based on _kalis map in c70975b116.
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.
2018-02-09 15:35:49 +00:00
elexis 64de3ce7ac Bahrain random map, replicate of _kalis map in a68881dd0f.
This was SVN commit r21163.
2018-02-09 13:50:55 +00:00
elexis 06531ec645 Marmara replica of _kalis version in a68881dd0f.
This was SVN commit r21162.
2018-02-09 11:31:29 +00:00
elexis c1cd12787f Ratumacos / Rouen replica of _kalis map in a68881dd0f.
Visually more appealing and more authentic heightmap, better fitting
water effect, random shallows, better playerbase alignment, circular
map.

This was SVN commit r21161.
2018-02-09 10:17:06 +00:00
Stan 8fad0ea8ca New range icon by Lion.Kanzen
Thread:
https://wildfiregames.com/forum/index.php?/topic/22982-committed-archery-icon/

This was SVN commit r21159.
2018-02-08 23:16:36 +00:00
Imarok bc9e2b476e Some drag code cleanup in input.js (primary point -> vector)
Patch by OptimusShepard
Differential Revision: https://code.wildfiregames.com/D1288
This was SVN commit r21158.
2018-02-08 23:11:13 +00:00
elexis c45c305941 Mediterranean random map replica of _kali's map in 33e3e6c2ab, refs #5018, D957.
This was SVN commit r21157.
2018-02-08 22:49:08 +00:00
elexis 48fd687254 Allow using the rmgen2 random playerbase location function to only compute locations without actually placing the bases.
Fix wrong border distance computation there in 8216bf9511.
Fix nomad units on Red Sea.

This was SVN commit r21156.
2018-02-08 22:39:12 +00:00
elexis d613350012 Add small metal mines to biome files.
This was SVN commit r21155.
2018-02-08 21:59:04 +00:00
temple e4039ea5a8 Add rubble to stoas
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.
2018-02-08 20:42:11 +00:00
mimo e92a736e79 petra: fix cases where gatherers were assigned to a resource type, even if none available
This was SVN commit r21153.
2018-02-08 19:48:35 +00:00
Stan ba6151f4e7 Fix capes disappearing when dying for athenians.
This is due to the root prop point being overriden by the blood prop.

This was SVN commit r21152.
2018-02-08 18:56:35 +00:00
mimo 75333019ef petra: fix cases where an attack would stop by not finding targets
This was SVN commit r21151.
2018-02-08 18:54:03 +00:00
Stan 2b0f232770 Change pyramids class on mimo's request.
This was SVN commit r21150.
2018-02-08 18:51:52 +00:00
mimo 56308ec1ad remove a useless (and bothering) intrusion of the gui
This was SVN commit r21149.
2018-02-08 18:50:18 +00:00
Stan 1c66c69aa8 Idle carry animations for athenians infantry.
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.
2018-02-07 23:29:05 +00:00
Stan c2c593d9fd Make the aura description of the catafalque more descriptive
This was SVN commit r21146.
2018-02-07 22:32:19 +00:00
Stan a97800ab0e Fix Kushites blood display, move the blood to the variant, and add the variant to the units missing it.
This was SVN commit r21145.
2018-02-07 22:13:28 +00:00
temple 8babdeba04 Spawn units in rally point direction
Differential Revision: https://code.wildfiregames.com/D1041
Reviewed by: bb
Comments by: elexis, wraitii
Fixes: #4735

This was SVN commit r21144.
2018-02-07 20:58:07 +00:00
Stan 268c340c00 Fix incorrect line in art.json
Found by: Leper
fixes d30643a6c9

This was SVN commit r21143.
2018-02-07 20:50:16 +00:00
s0600204 d01cb88ac4 Calculate and return correct width in CGUI::GenerateText
Reviewed By: bb
Differential Revision: https://code.wildfiregames.com/D836
This was SVN commit r21142.
2018-02-07 20:47:10 +00:00
elexis cacbdf7b1a Pass Infinity to the ChainPlacer if failed tiles should be ignored, rather than different numbers above 1 that have the same effect, refs #4805.
This was SVN commit r21141.
2018-02-07 16:39:36 +00:00
elexis 70bec0ac90 Pass Infinity as the fail fraction to the ClumpPlacer if failed tiles should be ignored, rather than sometimes passing 100%, 400%, 1000% or 10000%, refs #4805.
This was SVN commit r21140.
2018-02-07 16:31:41 +00:00
mimo 5efff8941a make kush demo map consistent with others
This was SVN commit r21139.
2018-02-07 14:28:23 +00:00
mimo 365edbce8c petra update for kush
This was SVN commit r21138.
2018-02-07 14:26:45 +00:00
elexis 2e8e394521 Red Sea random map replica, based on the original map by _kali created in 33e3e6c2ab deleted in f5375cbcb9, refs #4816, #5018, D957.
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.
2018-02-07 03:18:21 +00:00
elexis 8216bf9511 Arbitrarily constrain the random playerbase location function.
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.
2018-02-07 02:12:19 +00:00
elexis 6319647795 Implement JS random map library counterpart to 2180862d40 and 204b04f2d4, refs #4816, #5018.
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.
2018-02-07 02:08:20 +00:00
elexis c0b493bdc4 Abstract the vertex locations on a tile in rmgen, refs #4805.
This was SVN commit r21132.
2018-02-06 23:30:29 +00:00
elexis 2180862d40 Implement random map script backend to read terrain PMP files created with Atlas, fixes #4816.
Allows developers to set elevation and terrain textures in the map
editor and use that for a random map.

This was SVN commit r21131.
2018-02-06 23:05:58 +00:00
Stan 66c48c34c1 Change seleucid spearman name to pikeman, to better reflect their function.
This was SVN commit r21130.
2018-02-06 22:52:56 +00:00
elexis f63cc9a1d2 Static Vector2D min and max.
This was SVN commit r21129.
2018-02-06 22:52:53 +00:00
Stan d30643a6c9 Artwork by: LordGood, wowgetoffyourcellphone, Stan, wackyserious, Lion.Kanzen, Sundiata, Alexandermb
Templates: wowgetoffyourcellphone, Hannibal_Barca, elexis, mimo,
Sundiata
Maps: wowgetoffyourcellphone
History Research: Sundiata
Tested By: FeldFeld, (-_-), Grugnas, mapkoc, Dizaka, Cesar, Liberty,
Sundiata
Discussed With: Itms, niektb, WhiteTreePaladin, feneur, fabio, leper,
Pureon

This was SVN commit r21128.
2018-02-06 22:32:04 +00:00
Stan e6f4561341 Remove another broken variant
This was SVN commit r21127.
2018-02-06 21:43:41 +00:00
Stan 86b698b7b8 Remove another broken variant
This was SVN commit r21126.
2018-02-06 21:41:48 +00:00
Stan 38193e29c6 Remove broken variant as Enrique didn't commit the files in 83680b0dee
This was SVN commit r21125.
2018-02-06 21:26:41 +00:00
Stan ebfa9a7495 Remove unused variant since it's missing props and is used only by Terra Magna.
This was SVN commit r21124.
2018-02-06 21:23:16 +00:00
Stan fa34b043cd Slightly tweak rain to be more visible, add an angled version.
Discussed with bb_, Itms at FOSDEM,
Thanks for the maths :)

This was SVN commit r21123.
2018-02-06 20:54:24 +00:00
bb 6b88ca6a11 Fix the autostart victoryDuration support, which was broken by 63ca7ad672
Reviewed By: mimo
Differential Revision: https://code.wildfiregames.com/D1285
This was SVN commit r21122.
2018-02-06 19:44:05 +00:00
temple e43ed4016c Add a repair time tooltip
Differential Revision: https://code.wildfiregames.com/D573
Reviewed by: bb
This was SVN commit r21121.
2018-02-06 19:31:51 +00:00
Stan ab395a6b29 Add a new stonequary actor using unused dae files by merging them and cleaning.
Add this merged dae.
Move the old daes to the old_public folder.
Add an ao texture

This was SVN commit r21120.
2018-02-06 19:30:02 +00:00
s0600204 a9f701a475 Unify structree build queue loading duplication.
In similar vein to c53adeaaa6

This was SVN commit r21118.
2018-02-06 01:14:17 +00:00
Stan 68798a485f Fix stonemine file contents.
This was SVN commit r21117.
2018-02-05 21:54:53 +00:00
Stan abbe786e02 Clean up one of the mine template, and add missing textures for high end graphics.
This was SVN commit r21116.
2018-02-05 20:22:25 +00:00
elexis b41a069854 Fortress random map bugfixes and cleanup.
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.
2018-02-05 19:44:28 +00:00
mimo 232d1d9503 petra: fixes/cleanup for regicide
This was SVN commit r21114.
2018-02-05 17:59:00 +00:00
elexis 204b04f2d4 Allow random map scripts to load heightmap image files, fixes #5018.
Move the atlas heightmap import code to MapIO.cpp and reuse it.
Implements what 33e3e6c2ab and 69b7f39bf1 wanted to be.

This was SVN commit r21113.
2018-02-05 16:02:00 +00:00
elexis c95901515e Stop claiming that JPEG files are supported for heightmap import following c9cecab0be, refs #2828.
This was SVN commit r21112.
2018-02-05 14:22:16 +00:00
elexis 98ebb3bb77 When importing a heightmap image in atlas, don't omit the last vertex of each side of the heightmap! Fixes #5021, refs c9abf6f68c.
(Since there are 4 vertices per tile, there is one more vertex per side
than there are tiles / pixels per side.)

This was SVN commit r21111.
2018-02-05 14:08:46 +00:00
mimo 22903b09a6 Set victory conditions for autostart games.
Reviewed By: elexis
Trac Tickets: #5016

Differential Revision: https://code.wildfiregames.com/D1278
This was SVN commit r21108.
2018-02-03 19:39:33 +00:00
temple 7819ea434e Diplomacy Colors
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.
2018-02-03 14:17:31 +00:00
elexis 23820c5713 Static equality test for vectors.
This was SVN commit r21106.
2018-02-02 20:13:31 +00:00
mimo 47ba6b9a84 petra: some fixes for relic game mode
This was SVN commit r21105.
2018-02-02 18:37:29 +00:00
elexis f92405aa25 Simplify unused and bad-practice, but potentially useful AvoidTextureConstraint.
Implement StayTextureConstraint for the same reason.
getTexture should function on the entire square tilegrid, even on
circular maps.

This was SVN commit r21104.
2018-02-02 17:44:53 +00:00
s0600204 db1ec0f7f7 Add a couple of string manipulation functions to globalscripts.
(And use them where appropriate.)

This was SVN commit r21101.
2018-02-02 01:37:39 +00:00
Stan 36e42fedbf Remove dae file from actor folder.
This was SVN commit r21100.
2018-02-02 00:57:50 +00:00
Stan dccbfe0fcd New mushrooms for maps;
Discussed with : elexis, Imarok, fpre
Request by : FeXoR

This was SVN commit r21099.
2018-02-01 23:48:03 +00:00
elexis fe424f03ca Fix wrong biome JS function name following 626d89a726, refs #4954.
Based on patch by: (-_-)
This was SVN commit r21098.
2018-02-01 22:41:09 +00:00
Itms 4fe59c141d Fix crash at start in snd_detect(), fixes #4786.
Reviewed By: s0600204, echotangoecho
Differential Revision: https://code.wildfiregames.com/D1254
This was SVN commit r21097.
2018-02-01 18:12:53 +00:00
elexis b695945c59 Move other/special_treasure_* to gaia/treasure/.
Differential Revision: https://code.wildfiregames.com/D992
Refs #4770, D989
Patch By: Nescio
Comments By: fatherbushido, leper
This was SVN commit r21096.
2018-01-31 23:42:43 +00:00
elexis 7d451f1611 Move gaia/special_treasure_* to gaia/treasure/.
Rename metal_persian_bigl to metal_persian_big.

Differential Revision: https://code.wildfiregames.com/D989
Refs #4770
Patch By: Nescio
Comments By: fatherbushido, leper
This was SVN commit r21095.
2018-01-31 23:23:51 +00:00
elexis 2739c41c70 Move ruins templates from other/ to gaia/ruins/.
Differential Revision: https://code.wildfiregames.com/D991
Based on patch by: Nescio
Refs #4770, D989
Comments By: fatherbushido, leper
This was SVN commit r21094.
2018-01-31 22:04:17 +00:00
elexis efc50e9046 Move ruins templates to a new gaia/ruins/ subfolder.
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.
2018-01-31 21:50:50 +00:00
elexis 9a2bf1ebfb Performance improvement on Kerala, refs #5011.
This was SVN commit r21092.
2018-01-31 20:46:43 +00:00
elexis f1b6aaeabc Don't place trees inside civic centers on tiny Corsica vs Sardinia.
This was SVN commit r21091.
2018-01-31 19:54:40 +00:00
elexis a6e4c5142a On Persian Highlands, allow players to chose the summer or spring variant in the gamesetup, refs #4954.
Add Hannibal_Barca's biome descriptions on Gulf Of Bothnia and Persian
Highlands.

This was SVN commit r21090.
2018-01-31 19:51:23 +00:00
elexis 7723256248 Fix obligatorily broken translation of the new map-specific biome directory structure in 626d89a726, refs #4954.
This was SVN commit r21089.
2018-01-31 19:47:45 +00:00
elexis 399e40d8d9 Accelerate Danubius map generation performance, from 90 seconds to 15 seconds, refs #5011.
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.
2018-01-31 18:31:11 +00:00
mimo 5f8148e1dd petra: improve capture of gaia relics
This was SVN commit r21087.
2018-01-31 18:22:59 +00:00
elexis d7d9539f2d Allow passing no painters to createArea and MultiPainter, similar to 495f83663e for Constraints.
This was SVN commit r21086.
2018-01-31 18:20:40 +00:00
elexis 24388f781e Implement rmgen SlopeConstraint which is met if the elevation difference is within the given range, fixes #5004.
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.
2018-01-31 16:42:19 +00:00
elexis 906c23c54b Implement a ConvexPolygonPlacer that returns all points in the convex hull of some given points.
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.
2018-01-31 04:20:32 +00:00
elexis bb5fe743ec Rename some variables of the pathplacer and use JSdoc, refs #892, #4831.
This was SVN commit r21081.
2018-01-31 04:02:59 +00:00
elexis 57f8e04e58 Implement getBoundingBox and getPointsInBoundingBox rmgen helper.
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.
2018-01-31 03:58:33 +00:00
elexis 2059117ed9 Scythian Rivulet random map script by Hannibal Barca, fixes #4956.
Differential Revision: https://code.wildfiregames.com/D1233
This was SVN commit r21079.
2018-01-30 23:16:21 +00:00
elexis 7cc3091c65 On DeepForest and Schwarzwald, don't abuse the RectPlacer (nor formally ClumpPlacer) to just paint on a single tile, refs 83422923aa, 49194819f6.
This was SVN commit r21078.
2018-01-30 22:12:54 +00:00
mimo 9be3fd2bf4 petra: fix target choice in some attacks
This was SVN commit r21077.
2018-01-30 18:07:53 +00:00
Imarok 776899c254 Show rank icon above status bars
Reviewed by: bb
Fixes: #5005
Differential Revision: https://code.wildfiregames.com/D717
This was SVN commit r21076.
2018-01-30 15:10:20 +00:00
Itms 2bfb580415 Fix non-PCH build by adding an explicit include.
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.
2018-01-30 07:20:49 +00:00
temple 37d317e01a Remove the alert status on units
Differential Revision: https://code.wildfiregames.com/D681
Reviewed by: causative
Fixes: #4185, #4656

This was SVN commit r21074.
2018-01-30 01:47:12 +00:00
elexis b5b384da48 Implement rmgen JS logger that measures the time for each procedure and prints logmessages to stdout, fixes #4950.
Allows to identify performance bottlenecks quickly and provides a better
sense of progress when viewing stdout.

This was SVN commit r21073.
2018-01-30 00:11:11 +00:00
temple 1ba1e86c5e Use a countdown rather than a tooltip for displaying construction progress
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.
2018-01-30 00:02:10 +00:00
bb 7e14a33411 Make the resource/pop tooltips sortable
Patch By: ffffffff
Differential Revision: https://code.wildfiregames.com/D1113
This was SVN commit r21071.
2018-01-29 23:12:12 +00:00
mimo 99dc7c8f1c petra cleanup
This was SVN commit r21070.
2018-01-29 18:36:06 +00:00
elexis 78ce731fc5 rmgen random placement and Entity instantiation refactoring, fixes #4992.
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.
2018-01-29 16:20:14 +00:00
Stan f3d1d3120c Fix sounds path broken in previous commit
This was SVN commit r21068.
2018-01-29 13:23:09 +00:00
Stan edbaec24a1 Delete camel sound file that is not death and is unused.
Move goat death sounds to the death folder, and use every one of them.

This was SVN commit r21067.
2018-01-29 12:54:55 +00:00
Stan 3da24fbb89 Remove some progress bar duplication
This was SVN commit r21066.
2018-01-29 12:38:49 +00:00
Stan b55096853e Use the icon for the 300 version of Leonidas.
This was SVN commit r21065.
2018-01-29 12:24:55 +00:00
elexis e185820e10 Implement TS_ASSERT_NUMBER as a future precaution of the integer epsilon slip in 30fe33bb0b.
Add another vector rotation test.

This was SVN commit r21064.
2018-01-29 11:55:43 +00:00
elexis 65c62c0862 Fix inclusionCount reference in the heightmap library / Wild Lake map following 2ac7d4fd32.
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.
2018-01-29 10:47:23 +00:00
elexis 30fe33bb0b Add another Vector2D rotation test (illustrating the most common rmgen rotation transformation).
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.
2018-01-29 09:51:20 +00:00
Stan 2fa34e129d New celt hero icon by wowgetoffyourcellphone
Reviewed by : Stan.

This was SVN commit r21059.
2018-01-29 03:20:50 +00:00
Stan eb9b7e21e6 Move some unused icons as they are only used in DE, or will be used for part II;
This was SVN commit r21058.
2018-01-29 03:17:13 +00:00
Stan 68e66681be Move an ancient placeholder siege tower to the public old folder.
This was SVN commit r21057.
2018-01-29 02:52:59 +00:00
Stan 05167fc24c Remove placeholder roof.
This was SVN commit r21056.
2018-01-29 02:43:22 +00:00
elexis e50cd13643 Fix camouflaged paintRiver sign error of doom in e596ef6011 that resulted in rivers always being parallel and Danubius placing "left" patrol trigger points on both riversides.
Add missing map rotation for Danubius shoreline triggerpoints in
3d65bfe555.

This was SVN commit r21055.
2018-01-29 00:58:00 +00:00
Stan 605bdb0480 Move unused buildings referenced by the script checkref.pl to a new folder where all the old stuff will be put.
Delete some of them as they are close copies of the existing ones.
Rename barracks to blacksmith, as it is in fact one.

This was SVN commit r21054.
2018-01-29 00:46:52 +00:00
Stan 767bb873f2 Delete a bunch of cubes that served as a blacksmith placeholder, and are now unused.
This was SVN commit r21053.
2018-01-29 00:26:02 +00:00
Stan ac6d775536 Move unused buildings referenced by the script checkref.pl to a new folder where all the old stuff will be put.
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.
2018-01-29 00:22:43 +00:00
Stan 1b9e19f12c Move unused buildings referenced by the script checkref.pl to a new folder where all the old stuff will be put.
This was SVN commit r21051.
2018-01-29 00:01:11 +00:00
Stan 3d004a379e Move unused buildings referenced by the script checkref.pl to a new folder where all the old stuff will be put.
This might become a mod and serve as a resource for modders. This will
also allow to reduce the public.zip file.

This was SVN commit r21050.
2018-01-28 23:12:27 +00:00
mimo f5fe19d2a2 petra: do not try to attack an invulnerable capturable target
This was SVN commit r21049.
2018-01-28 19:56:57 +00:00
mimo b611a2f4bf Make the ai aware of invulnerable entities
Commented by elexis

Differential Revision: https://code.wildfiregames.com/D1267
This was SVN commit r21048.
2018-01-28 19:53:29 +00:00
elexis 751edb43fc Fix wrong type in 8aaff7fc62 / D1232.
Differential Revision: https://code.wildfiregames.com/D1266
Patch By: Angen
This was SVN commit r21047.
2018-01-28 17:37:55 +00:00
Stan bd5fa08e73 Fix spear smoothing groups, they are now less shiny as a consequence though.
This was SVN commit r21046.
2018-01-28 13:55:02 +00:00
mimo 2fa7d05dc6 another fix of fe3668aebe
This was SVN commit r21045.
2018-01-28 13:45:17 +00:00
mimo 01587376d4 petra: add missing iterator from fe3668aebe
This was SVN commit r21044.
2018-01-28 09:49:16 +00:00
Gallaecio 17e0ee4a27 Fix bad plural reported by safaalfulaij at Transifex
This was SVN commit r21043.
2018-01-28 05:31:44 +00:00
temple ac3c02b4d4 Disable attack as formation
Differential Revision: https://code.wildfiregames.com/D1220
Reviewed by: wraitii
Refs: #4951

This was SVN commit r21042.
2018-01-28 01:32:26 +00:00
Stan effb1363c0 Fix an incorrect animation reference, and add the native keyword, noticed by checkref.pl refs #2524
This was SVN commit r21041.
2018-01-28 01:22:18 +00:00
Stan 0fb42ff234 Fix an incorrect prop reference. Noticed by checkrefs.pl, which should be fixed by the way.
This was SVN commit r21040.
2018-01-28 01:16:25 +00:00
Stan e413e54910 New completion sounds for archery range by Lion.Kanzen
Reviewed by : Omri, Stan
Thread:
https://wildfiregames.com/forum/index.php?/topic/23726-tasksound-archery-range-provisional-sound/&page=2&tab=comments#comment-347558

This was SVN commit r21039.
2018-01-28 01:15:19 +00:00
Stan 8967b82ca1 New Chamfrons for seleucid elite horses by Alexandermb
Thread :
https://wildfiregames.com/forum/index.php?/topic/21396-task-seleucid-units-textures/&page=4
Reviewed by : Stan
Feedback by : Sundiata

This was SVN commit r21038.
2018-01-28 00:52:09 +00:00
Stan ca09c07f32 Fix the golden fleece and remove now unused textures.
This was SVN commit r21037.
2018-01-27 23:15:24 +00:00
bb 2d57478781 Create a saveSettingAndWriteToUserConfig() function to absorb some duplication in the gui
Patch By: ffffffff
Comments By: leper, mimo
Differential Revision: https://code.wildfiregames.com/D1211
This was SVN commit r21036.
2018-01-27 20:59:19 +00:00
Stan cb8a7e48a0 New spears by Alexandermb
Thread:
https://wildfiregames.com/forum/index.php?/topic/23907-task-spears-remesh/
Completeness by : Stan
Review by Stan

This was SVN commit r21035.
2018-01-27 15:47:03 +00:00
Gallaecio 1a1f6ba048 build (human units) → train, build (siege weapons) → construct
This was SVN commit r21034.
2018-01-27 13:54:12 +00:00
Gallaecio 4e42459c79 Rephrase Druids aura description
This was SVN commit r21032.
2018-01-27 12:06:46 +00:00
Itms b79b783a36 Fix the translation updates by removing a typo in e50beaedc0.
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D1259
This was SVN commit r21031.
2018-01-27 11:52:23 +00:00
mimo 259a4e8e57 fix typo in fe3668aebe
This was SVN commit r21030.
2018-01-27 11:06:18 +00:00
mimo d9809f464e lock teams in some scenarios which would otherwise be unbalanced, fixes #4817
This was SVN commit r21029.
2018-01-27 10:56:09 +00:00
mimo 1976f367a3 ai: additional cleanup following fe3668aebe
This was SVN commit r21028.
2018-01-27 10:46:03 +00:00
mimo fe3668aebe petra adaptation to multiple victory conditions, in preparation of D1240
This was SVN commit r21027.
2018-01-27 10:10:55 +00:00
elexis 8585040f27 Cleanup TileClass prototype and use vector arguments for countInRadius, countMembersInRadius, countNonMembersInRadius, refs #4992.
This was SVN commit r21026.
2018-01-27 04:37:00 +00:00
elexis 2ac7d4fd32 Stop identifying TileClasses by a customly defined TileClassID, but just identify the prototype instance directly, refs #4804, 0e0ed94926.
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.
2018-01-27 04:04:02 +00:00
elexis de3c50adf0 Floor operation on vectors.
Useful to get the coordinates of a tile of an entity position for
instance.

This was SVN commit r21024.
2018-01-27 01:38:23 +00:00
elexis 95179c5e46 Don't trigger a NetServerTurnManager debug breakpoint if a modified or unmodified client sends a non-sequential turnnumber.
Disconnect that client.

Refs #3643
Differential Revision: https://code.wildfiregames.com/D1256
Reviewed By: echotangoecho
This was SVN commit r21023.
2018-01-26 23:02:13 +00:00
elexis c53adeaaa6 Unify structree production queue loading duplication.
Differential Revision: https://code.wildfiregames.com/D1192
Reviewed By: s0600204
This was SVN commit r21022.
2018-01-26 22:18:35 +00:00
elexis 2f7610160f Change placeObject, placeStartingWalls, wall builder library and wall demo to use vectors, refs #4845, #4992.
This was SVN commit r21021.
2018-01-26 20:53:37 +00:00
elexis 2156171994 Fix hardcoded biome references following the new directory in 626d89a726, refs #4954.
Sorry for the noise.

This was SVN commit r21020.
2018-01-26 20:12:17 +00:00
mimo bfd6cb6e41 The gui shouldn't load again needed templates on each turn
Reviewed By: echotangoecho
Differential Revision: https://code.wildfiregames.com/D1258
This was SVN commit r21019.
2018-01-26 19:09:48 +00:00
mimo 61d62207a8 petra: renamed entities were not properly taken into account when they were guarding a critical entity (i.e. hero in regicide mode)
This was SVN commit r21018.
2018-01-26 18:22:27 +00:00
elexis 3f4c476476 Fix getHeight call in Latium in c02db59c96 and the setBiome call on Celedonian Meadows following 626d89a726.
This was SVN commit r21017.
2018-01-26 17:42:23 +00:00
mimo 97aea21626 petra: fix undefined property reported in D1240 when several victory conditions
This was SVN commit r21016.
2018-01-26 17:17:56 +00:00
Imarok 3d6444a999 Fix the positions of the top panel bottom
Patch by OptimusShepard
Differential Revision: https://code.wildfiregames.com/D1238
This was SVN commit r21015.
2018-01-25 21:34:14 +00:00
elexis 193eff6d5b Fix AuraManager OOS on rejoin following c90d72deb5 / D1108.
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.
2018-01-25 16:45:58 +00:00
Stan 5f159ea20c Some new icons for the dogs by wowgetoffyourcellphone
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.
2018-01-25 13:00:08 +00:00
Stan 5d93cbcccd Some new icons by wowgetoffyourcellphone
Reviewed by : Stan.

This was SVN commit r21012.
2018-01-25 12:57:06 +00:00
elexis 626d89a726 Extend random biome systme to support map specific biomes, fixes #4954, refs D852 / f2550705d3.
This was SVN commit r21010.
2018-01-25 04:44:26 +00:00
elexis 8cd117d489 Fix berries on Danubius following 921850cdef and remove unused translation entry following following 74bfe5fd55.
This was SVN commit r21009.
2018-01-25 04:42:12 +00:00
elexis e047844101 Add uncapturable special filter and use it on Danubius to prevent the palisade walls from being captured right at the gamestart following d5db047c9a.
Arbitrary special filter AI compatibility was added by 8f05358b5e.

XML file accepted by: bb on irc
This was SVN commit r21008.
2018-01-25 00:37:25 +00:00
elexis 293342f04d Danubius village / fortress cleanup.
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.
2018-01-25 00:09:03 +00:00
temple 680ad76249 Fix formation auras
Differential Revision: https://code.wildfiregames.com/D756
Reviewed by: mimo
Comments by: bb
This was SVN commit r21006.
2018-01-24 19:17:04 +00:00
temple b0b24a472b Move minimap color deserialization fix out of the gui
Differential Revision: https://code.wildfiregames.com/D1250
Reviewed by: elexis
This was SVN commit r21005.
2018-01-24 19:12:19 +00:00
elexis 3b2273ea55 Fix typo in f27743348e reported by mimo (in 8599a20353).
This was SVN commit r21004.
2018-01-24 18:14:22 +00:00
Imarok 7752219cef Unify Gamesetup/Lobby Chat Design
Patch by fpre/ffffff
Fixes: #4986
Differential Revision: https://code.wildfiregames.com/D1051
This was SVN commit r21003.
2018-01-24 14:54:47 +00:00
elexis 8599a20353 Complete f27743348e.
This was SVN commit r21002.
2018-01-24 05:41:27 +00:00
elexis f27743348e Delete good old paintClass and unPaintClass proxies and create the painters directly, like we do with the other painters too.
This was SVN commit r21001.
2018-01-24 05:11:52 +00:00
elexis 2177a2dca7 Delete createTileClass proxy, refs #4964.
Even though it prolongs the code, OOP should be prefered.

This was SVN commit r21000.
2018-01-24 05:02:49 +00:00
elexis 1b7b7fd3ec Move rmgen playerdata getters to the other player-related code, refs #4804.
This was SVN commit r20999.
2018-01-24 04:48:29 +00:00
elexis eb22552c40 Move isCircularMap to RandomMap object and actually use it rather than refering to g_MapSettings, refs #4964.
Delete leftover from d662ab5a0f and add missing semicolons.

This was SVN commit r20998.
2018-01-24 04:36:27 +00:00
elexis d662ab5a0f Move getMapSize to the RandomMap object, refs #4964.
This was SVN commit r20997.
2018-01-24 04:28:30 +00:00
elexis 1242356f95 Move getMapCenter and getMapBounds to the RandomMap object, refs #4964.
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.
2018-01-24 04:21:22 +00:00
elexis b11563ddff Delete InitMap and ExportMap proxies and let the random map define the RandomMap object, refs #4804.
Eventually there should be no direct reference to g_Map in the library,
refs #4964.

This was SVN commit r20995.
2018-01-24 04:10:00 +00:00
elexis a97279b4df Use vectors for cornerHeight, getExactHeight, validH and rename the latter to to validHeight, refs #4992.
Use the height getter and setter rather than directly operating on the
prototype member, which also simplifies the code.

This was SVN commit r20994.
2018-01-24 04:04:33 +00:00
elexis b4820b3995 Use vectors for validT and rename it to validTile, refs #4992.
This was SVN commit r20993.
2018-01-24 01:34:47 +00:00
elexis 13bd540c45 Fix x/z typo in Schwarzwald in cbcbd19e0b and wrong forest density in Deep Forest in 2ac3d3119d.
This was SVN commit r20992.
2018-01-24 01:16:57 +00:00
elexis 19c9a2489a Sacrifice celtic ritual hack, refs 026dcf10eb / D204.
This was SVN commit r20991.
2018-01-24 00:24:08 +00:00
elexis 0f52c011d7 Add missing rmgen2 adaptation to Placers returning vectors in 2ac3d3119d. Reported by Grugnas.
This was SVN commit r20990.
2018-01-23 22:30:37 +00:00
elexis 5245e9983b Rename expectException from 1cdc8f1356 to TS_ASSERT_EXCEPTION.
Move it from the test of the testsetup to the setup of the tests, so it
can be reused by tests, refs #4759, D871.

This was SVN commit r20989.
2018-01-23 20:00:52 +00:00
elexis b3fa0aaf0f Use vectors for setTexture, refs #4992.
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.
2018-01-23 19:42:13 +00:00
mimo e7c9a2be50 remove a leftover comment in 4c2269135b
This was SVN commit r20987.
2018-01-23 18:57:51 +00:00
temple c4c7b08758 Reset bounding box overlay
Differential Revision: https://code.wildfiregames.com/D712
Comments by: bb
This was SVN commit r20986.
2018-01-23 18:48:13 +00:00
mimo 4c2269135b petra: improve a08606a9d9 so that it also works in naval maps
This was SVN commit r20985.
2018-01-23 18:46:53 +00:00
elexis 366db189e8 Fix consistent-return linting issue reported by mimo in 442c9848b8.
This was SVN commit r20984.
2018-01-23 17:59:59 +00:00
elexis c02db59c96 Use vectors for getHeight and remove the global proxy, refs #4992.
This was SVN commit r20983.
2018-01-23 17:54:30 +00:00
mimo 5025bcb1c5 fix loot warning from d8ed8b1462 reported by temple
This was SVN commit r20982.
2018-01-23 17:53:42 +00:00
elexis e9394e2f75 Fix missing change in Ardennes Forest in 2ac3d3119d and create the explorable Area correctly following 9272153ee7.
This was SVN commit r20981.
2018-01-23 17:49:04 +00:00
elexis a5de00b9c4 Use vectors in the Terrain prototype, refs #4992.
This was SVN commit r20980.
2018-01-23 16:52:01 +00:00
elexis 55a0d194b5 Use vectors for inMapBounds, refs #4992.
This was SVN commit r20979.
2018-01-23 15:52:58 +00:00
elexis 1b786af5ad Use vectors in Constraints, refs #4992.
This was SVN commit r20978.
2018-01-23 15:31:25 +00:00
elexis 2ac3d3119d Return vectors instead of objects with x and z property for all Placers and Painters, refs #4992, #4845.
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.
2018-01-23 14:49:31 +00:00
elexis 5447a20318 Delete checkIfInClass proxy from 59ce8b3081.
This was SVN commit r20975.
2018-01-23 04:43:08 +00:00
elexis 6550d3a71c Pass vectors to the ChainPlacer instead of the components individually, refs #4992, #4845.
Support non-integer numbers.

This was SVN commit r20974.
2018-01-23 03:40:39 +00:00
elexis 23e0a6c888 Pass a vector to createStoneMineFormation, refs #4992.
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.
2018-01-23 03:16:28 +00:00
elexis 948c0b1026 Revert ineffective Alpine Lakes code from a2477f9d40.
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.
2018-01-23 02:50:55 +00:00
elexis de2f30c7b9 Pass a vector to the ClumpPlacer instead of the vector components individually, refs #4992.
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.
2018-01-23 00:25:39 +00:00
elexis 4dde7a4df5 Pass position vectors to the PathPlacer rather than each component individually, refs #4992.
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.
2018-01-22 23:01:34 +00:00
elexis 7fa7e0b596 Fix wrong PathPlacer failfraction computation in bc805bd357, refs #892.
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.
2018-01-22 22:34:41 +00:00
bb ef459a7a0e Fix a tab button crash since the buttons are not initialized before the first tick in gamesetup
Reviewed By: elexis
Spotted By: ffffffff
Differential Revision: https://code.wildfiregames.com/D1244
This was SVN commit r20968.
2018-01-22 21:43:41 +00:00
bb 9571c56d7e Add civ settings in lobby for the selected game
Patch By: ffffffff
Differential Revision: https://code.wildfiregames.com/D1235
This was SVN commit r20967.
2018-01-22 20:37:49 +00:00
mimo a08606a9d9 petra: fix cases when the ai would stop an attack although the enemy had still some units, and some cleanup
This was SVN commit r20966.
2018-01-22 18:42:03 +00:00
mimo d8ed8b1462 Cleaning of GetEntityState part 2
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D1227
This was SVN commit r20965.
2018-01-22 18:02:38 +00:00
Imarok dd12d3b8e1 Move Replays from Tools & Options submenu to the main menu
Reviewed by: elexis
Differential Revision: https://code.wildfiregames.com/D820
This was SVN commit r20964.
2018-01-22 15:26:13 +00:00
elexis 034124e8d8 Fix range overlay color after deserialization following 5fbb224dc0 / D555, refs #3915.
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.
2018-01-22 06:50:35 +00:00
elexis 36fba76a74 Revert unintentional function rename in 40cc3aaa09.
Don't troll OOS-debugging developers with aura ranges rendered in an
invisible color, refs 5fbb224dc0 / D555.

This was SVN commit r20961.
2018-01-22 06:02:52 +00:00
elexis a43c654a98 Only initially focus the chat input in multiplayer gamesetup, so that the Tab hotkeys new in D1027 / D1176 are immediately available in singleplayer.
Also focus the chat after having clicked the Send button.

This was SVN commit r20960.
2018-01-22 05:15:51 +00:00
elexis 36821e0937 Use Tab and Shift+Tab as the default hotkey to switch tabs.
Patch By: fpre / ffffffff
Comments By: bb
Differential Revision: https://code.wildfiregames.com/D1176
Refs #4982

This was SVN commit r20959.
2018-01-22 05:06:52 +00:00
elexis 8aaff7fc62 Implement an auto-scroll setting for GUI lists.
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.
2018-01-22 04:45:27 +00:00
elexis 3d65bfe555 Randomize the river angle on Danubius, refs #4855.
This was SVN commit r20957.
2018-01-22 04:29:30 +00:00
temple 2b501c9fa6 Fix formation animation warning
Differential Revision: https://code.wildfiregames.com/D998
Reviewed by: wraitii
Fixes: #3239

This was SVN commit r20956.
2018-01-22 03:00:41 +00:00
temple 7214cfc991 Add a visibility check to FindNearbyResource and FindNearestDropsite
Differential Revision: https://code.wildfiregames.com/D1161
Reviewed by: s0600204
Comments by: bb
This was SVN commit r20955.
2018-01-22 02:49:57 +00:00
temple 340cda5d57 Use obstruction rather than footprint in dock placement
Differential Revision: https://code.wildfiregames.com/D1163
Reviewed by: wraitii
Comments by: mimo, s0600204
Fixes: #4843

This was SVN commit r20954.
2018-01-22 02:34:46 +00:00
elexis d5af005a00 Expose INVALID_PLAYER to the JS simulation and use it instead of -1 for consistency with the C++ counterpart.
This was SVN commit r20953.
2018-01-22 01:02:29 +00:00
elexis 1315d9beb6 Move domestic animal Cost to the trainable templates new in aec1ff5493 / D1071.
Fix lineendings of recent templates.

Discussed with: bb on irc

This was SVN commit r20952.
2018-01-21 23:40:59 +00:00
elexis 83d3e4f7a4 Fix undefined player color errorspam in Atlas after placing an entity, changing the civ and starting the simulation following 343ec21e75 / D623, refs #4643.
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.
2018-01-21 23:30:38 +00:00
temple dde855f7d5 Use correct distance for determining nearest dropsite
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.
2018-01-21 21:21:21 +00:00
temple 70290e8a22 Add a tile owner check in territory decay
Differential Revision: https://code.wildfiregames.com/D1225
Reviewed By: mimo
Comment By: elexis
Fixes: #4787
Refs: #4681, #4749

This was SVN commit r20949.
2018-01-21 20:01:12 +00:00
Stan 6458b04f1d Add missing template in a7d20b184e
This was SVN commit r20948.
2018-01-21 19:06:36 +00:00
Stan a7d20b184e Make the zebu trainable in the mauryan corral, as what was asked initally in #1992
Discussed with: Mimo, elexis
Funny Image: Itms

This was SVN commit r20947.
2018-01-21 18:39:38 +00:00
elexis d97542e9c6 Fix missing update to options.json in be06299e28 / D1128.
This was SVN commit r20946.
2018-01-21 17:09:07 +00:00
bb ac7b5ce861 New UI for gamesetup settings
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.
2018-01-21 12:35:47 +00:00
Stan 7c338b5755 Add missing icons, and update boudica's
Noticed by: mimo.
This was SVN commit r20944.
2018-01-20 20:03:12 +00:00
elexis df3a64c269 Unify Corsica & Sardinia and Pyrennean Sierra slope and smoothened height computation, refs #4805, 9016b8d866, a796800bb1.
Receive vectors as arguments, refs #4992 and don't introduce a RandomMap
object proxy.

This was SVN commit r20943.
2018-01-20 19:25:00 +00:00
Stan bae4156c3a Fix chamfron for champion ptol cavalry.
Noticed by: Wackyserious
This was SVN commit r20942.
2018-01-20 17:19:29 +00:00
Stan 3725f69e11 New peytrals textures by wackyserious
Reviewed by: Stan
Thread:
https://wildfiregames.com/forum/index.php?/topic/23863-task-improved-horse-and-elephant-peytrals/&tab=comments#comment-346412

This was SVN commit r20941.
2018-01-20 16:45:40 +00:00
elexis 5eead1d77a Fix typo in c5b7ecefa1 reported by Imarok.
This was SVN commit r20940.
2018-01-20 16:40:21 +00:00
mimo 2214f206b7 Garrisoned units are lost after an upgrade towards a non garrison holder
Differential Revision: https://code.wildfiregames.com/D1228
This was SVN commit r20939.
2018-01-20 15:22:02 +00:00
mimo 1bcc70a1cc fix miraged properties in GuiInterface changes from 30f0e80dae
Differential Revision: https://code.wildfiregames.com/D1230
This was SVN commit r20938.
2018-01-20 15:09:42 +00:00
mimo cfda5f8a02 petra: fix builder counters when one builder is created and destroyed in the same ai-turn, fixes #4991
This was SVN commit r20937.
2018-01-20 13:03:33 +00:00
elexis 8cfd8cd845 Use vectors for positions in setHeight in random map scripts.
This was SVN commit r20936.
2018-01-20 05:29:35 +00:00
elexis 899041f107 Pass vectors from paintRiver to the map script, refs #4992.
This was SVN commit r20935.
2018-01-20 04:50:23 +00:00
elexis 46dee69668 Randomize map angle on Guadalquivir River and Latium (refs 903e094f62), fixes #4855, refs
This was SVN commit r20934.
2018-01-20 04:16:48 +00:00
elexis 903e094f62 Randomize map angle on random maps with linear playerposition pattern, refs #4855, #4845.
This was SVN commit r20933.
2018-01-20 02:21:22 +00:00
elexis 5519742e7f Move ExportMap code from global helper to RandomMap object, refs #4804.
Delete WATER_LEVEL_CHANGED global, refs #4964.

This was SVN commit r20932.
2018-01-20 00:41:25 +00:00
Stan 664821a5e0 Add back the capture anim i previously removed from the actor in 097c19a6a0 thanks elexis for making me notice.
This was SVN commit r20931.
2018-01-20 00:20:38 +00:00
Stan 487e29c2ae New pouch for macedonians slingers
Reviewed by : Wowgetoffyourcellphone, Wackyserious
Discussion
:https://wildfiregames.com/forum/index.php?/topic/22184-task-hellenic-unit-textures/

This was SVN commit r20930.
2018-01-20 00:06:47 +00:00
Stan 097c19a6a0 Add templates for some heroes who already have actors
Discussion here:
https://wildfiregames.com/forum/index.php?/topic/23825-creating-templates-for-heroes/

This was SVN commit r20929.
2018-01-19 23:51:33 +00:00
elexis 28a0b0068d Cleanup smoothing on Pyrenean Sierra, refs a796800bb1.
Remove unnoticeable randomization near the shore and specific texturing
of parts of the passages.

This was SVN commit r20928.
2018-01-19 23:17:21 +00:00
Stan e05135d5e0 New cavalry icons by Wowgetoffyourcellphone for iberians, last was carthaginians.
Reviewed by : Stan

This was SVN commit r20927.
2018-01-19 23:02:58 +00:00
Stan e17ca101ab New cavalry icons by Wowgetoffyourcellphone for Iberians
Reviewed by : Stan

This was SVN commit r20926.
2018-01-19 23:00:49 +00:00
Stan ca4a3d55a4 New cavalry icons by Wowgetoffyourcellphone for gauls
Reviewed by : Stan

This was SVN commit r20925.
2018-01-19 22:49:14 +00:00
Stan 5576d5c78b New cavalry icons by Wowgetoffyourcellphone for brits
Reviewed by : Stan

This was SVN commit r20924.
2018-01-19 22:37:36 +00:00
Stan fd7100ddd1 New cavalry icons by Wowgetoffyourcellphone for spartiates
Reviewed by : Stan

This was SVN commit r20923.
2018-01-19 22:33:32 +00:00
Stan e5aa7285a0 Move unused icons files to the art source
This was SVN commit r20922.
2018-01-19 22:29:33 +00:00
Stan abb8aaed16 New cavalry icons by Wowgetoffyourcellphone for seleucids
Reviewed by : Stan

This was SVN commit r20921.
2018-01-19 22:17:00 +00:00
Stan 49dcd1c886 New cavalry icons by Wowgetoffyourcellphone for ptolemies
Reviewed by : Stan

This was SVN commit r20920.
2018-01-19 22:02:07 +00:00
Stan 5786bc03f4 New cavalry icons by Wowgetoffyourcellphone for persians
Reviewed by : Stan

This was SVN commit r20919.
2018-01-19 21:54:06 +00:00
Stan 5323baaa50 New cavalry icons by Wowgetoffyourcellphone for mauryans
Reviewed by : Stan

This was SVN commit r20918.
2018-01-19 21:52:36 +00:00
Stan 39fa3f5ecd New cavalry icons by Wowgetoffyourcellphone for macedonians
Reviewed by : Stan

This was SVN commit r20917.
2018-01-19 21:47:19 +00:00
Stan 616f33d34c New cavalry icons by Wowgetoffyourcellphone for romans
Reviewed by : Stan

This was SVN commit r20916.
2018-01-19 21:42:42 +00:00
elexis 4cd1161c2d Allow calling fractionToTiles and scaleByMapSize before RandomMap initialization, used by e084885ce9 already.
This was SVN commit r20915.
2018-01-19 21:24:04 +00:00
elexis e084885ce9 Pyrenean Sierra sigmoid-based Mountainrange cleanup, refs a796800bb1.
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.
2018-01-19 20:24:36 +00:00
elexis 3361ff0997 Fix variable naming in Botswanan Haven in c5b7ecefa1 reported by mimo.
This was SVN commit r20913.
2018-01-19 19:11:53 +00:00
elexis cb82a9a84f Move BaseTerrain from the random map JSON files to all other terrain names used by the script.
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.
2018-01-19 02:21:32 +00:00
elexis 5764ab9021 Cleanup volcano sizes, refs #4939.
This was SVN commit r20911.
2018-01-19 01:23:18 +00:00
elexis 78c2988e88 Randomize map orientation on most river maps, Gulf Of Bothnia and Migration to remove hardcoded magic numbers and add more variation for the player.
Refs #4855, #4845.

This was SVN commit r20910.
2018-01-19 01:09:36 +00:00
elexis 7656cc2eb7 Fix lobby registration of AIBehavior missed in 9c180f660f and 3319c69d97. Fixes #4959.
This was SVN commit r20909.
2018-01-18 21:22:34 +00:00
Stan c56a2381a1 Fix incorrect horse variant noticed by Alexandermb.
This was SVN commit r20908.
2018-01-18 19:24:48 +00:00
elexis e4d5e781d7 Fix fish on mountains on Harbor in a68881dd0f and a wrong negation in c5b7ecefa1. Fixes #4575.
This was SVN commit r20907.
2018-01-18 18:16:06 +00:00
elexis 32210bc6cb Fix pigs and chicken inside the CC and mines on Deep Forest by not using the terrain-painting based approach of placing entities which is free of any collision checks.
Fixes #4830.

This was SVN commit r20906.
2018-01-18 17:59:07 +00:00
elexis bd7ce79966 Delete getMapArea, fractionToSize, sizeToFraction.
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.
2018-01-18 17:10:57 +00:00
elexis c5b7ecefa1 Delete BaseHeight property from random map JSON files and rmgen library, refs #6, #4973, 9ee44bd9b8, 0e0ed94926.
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.
2018-01-18 13:57:11 +00:00
elexis d40616c68e Fix Wild Lake in 442c9848b8.
This was SVN commit r20903.
2018-01-18 13:36:59 +00:00
elexis 6462653351 Delete placeTerrain which is just a proxy of createTerrain.
This was SVN commit r20902.
2018-01-17 23:51:28 +00:00
elexis a6c7b4de98 Simplify and inline createSimpleTerrain.
This was SVN commit r20901.
2018-01-17 23:36:11 +00:00
elexis 1ad10e5999 Merge InitMap, initTerrain and resetTerrain successors from 6d33c2eab7.
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.
2018-01-17 23:27:06 +00:00
mimo 583873103f petra: add a protection for mods without the expected metadata
This was SVN commit r20899.
2018-01-17 22:06:27 +00:00
elexis dfa618903b Rename random map Map to RandomMap, so that it doesn't overwrite the native JS Map object, fixes #4961.
This was SVN commit r20898.
2018-01-17 19:19:21 +00:00
elexis c21ca495f8 Fix a forgotton line in e9e983c2d4 and mess with a 1-tile workaround.
This was SVN commit r20897.
2018-01-17 19:12:22 +00:00
Gallaecio 4e96980d5a Build with the "read-only relocation" hardening linker flag
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.
2018-01-17 18:01:58 +00:00
elexis d9f5b2a40e Remove mysterious lake area factor "lSize" from random map scripts in a9b963c3a5 and copies. Fixes #4958.
Just use diskArea of a ratio of the map diameter everywhere, so numbers
remain proportional and directly comparable.

This was SVN commit r20895.
2018-01-17 17:18:43 +00:00
elexis 6d33c2eab7 Implement MapBoundsPlacer that returns all points on the tilemap.
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.
2018-01-17 03:34:09 +00:00
elexis 46564c6a8e Remove remaining unneeded null constraints that could have been noticed in 376d8b3d1e.
This was SVN commit r20893.
2018-01-17 03:09:23 +00:00
elexis 4263fae6c2 Don't call it centerOfMap, center, mid, centerX, centerZ, fractionToTiles(0.5), Math.round(fractionToTiles(0.5)), mapSize / 2, mapSize * 0.5, but just mapCenter everywhere and get it from the library.
Fixes #4854, refs #4845.

This was SVN commit r20892.
2018-01-17 01:55:45 +00:00
elexis 1f7913a93f Cleanup Island Stronghold starting resources code using vector algebra, mapcenter getter, distributePointsOnCircle, refs #4845, #4854.
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.
2018-01-17 00:51:25 +00:00
Stan cf79693860 Fix incorrect variants showing up as death and run shouldn't have any frequency.
Noticed by Alexandermb

This was SVN commit r20890.
2018-01-17 00:25:58 +00:00
elexis 448a560350 Move map specific biome constants to the scope setting that biome in that map, refs #4954.
Only Gulf of Bothnia didn't have it grouped yet.

This was SVN commit r20889.
2018-01-16 20:55:00 +00:00
elexis 713d816855 Use paintRiver on Latium, refs #4805, 7d0cc59136.
This was SVN commit r20888.
2018-01-16 17:38:03 +00:00
elexis 31e412b94e Remove redundant no-map-preview sprite found in D817.
This was SVN commit r20887.
2018-01-16 15:18:15 +00:00
elexis 960f2d7c31 Enable players to open the lobby as a dialog in the gamesetup, running games and the summary screen.
Differential Revision: https://code.wildfiregames.com/D817
Patch By: fpre / ffffffff
Fixes #4106

This was SVN commit r20886.
2018-01-16 15:05:16 +00:00
mimo 2d04f3d1e9 fix 30f0e80dae
This was SVN commit r20885.
2018-01-16 08:29:10 +00:00
elexis 28ff1c053e Via Augusta skirmish map by Bigtiger, fixes #4934.
This was SVN commit r20883.
2018-01-16 05:36:05 +00:00
elexis 442c9848b8 Merge all playerX and playerZ arrays into one array of Vector2D items.
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.
2018-01-16 04:39:31 +00:00
elexis f8eae16390 Fix two wrong tileclasses c74bd3425f and adapt Fortress floor area to D900.
This was SVN commit r20881.
2018-01-16 04:29:06 +00:00
elexis 463f7f1ee3 Remove unused function following f5375cbcb9. Implement it using vectors if used again (#4845).
This was SVN commit r20880.
2018-01-16 04:17:06 +00:00
elexis cbcbd19e0b Extract a RandomPathPlacer prototype from Deep Forest (83422923aa) and Schwarzwald (49194819f6) duplication, refs #4805, #4804.
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.
2018-01-16 04:12:23 +00:00
temple 7d172a9b1d Consider that the point could be inside the goal area in some PathGoal functions
Reviewed By: wraitii
Comments By: mimo
Differential Revision: https://code.wildfiregames.com/D1089
This was SVN commit r20878.
2018-01-16 02:15:04 +00:00
temple 033489480a Stop formation when ordered to stop
Differential Revision: https://code.wildfiregames.com/D999
Reviewed By: wraitii
Fixes #3565

This was SVN commit r20877.
2018-01-16 00:55:58 +00:00
temple 1ef2e709fe Gather near dropsite rather than current position after finishing construction
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.
2018-01-16 00:13:31 +00:00
mimo 30f0e80dae Cleanup of GetEntityState
Reviewed By: elexis
Trac Tickets: #4322

Differential Revision: https://code.wildfiregames.com/D1223
This was SVN commit r20875.
2018-01-15 21:27:30 +00:00
elexis 36400458bf Add randomAngle helper function to abbreviate calls.
This was SVN commit r20874.
2018-01-15 14:20:57 +00:00
elexis 5c605cf218 Allow the JS GUI to find out if the lobby client is currently disconnected.
Differential Revision: https://code.wildfiregames.com/D1224
Patch By: fpre / ffffffff
Refs #4106, D817

This was SVN commit r20872.
2018-01-15 04:30:33 +00:00
elexis e9e983c2d4 paintRiver cleanup.
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.
2018-01-15 04:02:00 +00:00
Stan 31284bac83 Make every cape of the game behave.
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.
2018-01-14 22:51:07 +00:00
elexis b982e7f510 Fix build on armhf with gcc 7.
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.
2018-01-14 21:18:37 +00:00
elexis 8ede017904 Don't crash while in the lobby when receiving an error IQ stanza without an error payload, refs d7121f4f55.
Differential Revision: https://code.wildfiregames.com/D1222
Patch By: Dunedan
This was SVN commit r20868.
2018-01-14 17:48:24 +00:00
Stan e132c26a0f Fix a typo I made in the neckguard.
This was SVN commit r20867.
2018-01-14 11:15:58 +00:00
elexis c74bd3425f Nomad mode on all random map scripts (except Survival of the Fittest), fixes #3591.
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.
2018-01-14 00:59:06 +00:00
s0600204 7dfa4bda24 Pass an orientation angle on Fortress random map when placing fortresses
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.
2018-01-13 23:26:13 +00:00
elexis b180ad3e5d Remove distributeEntitiesByHeight / derivateEntitiesByHeight from 7471a0db63 / 49194819f6.
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.
2018-01-13 22:42:14 +00:00
elexis d2e1af5270 Make the RectPlacer more permissive by not returning early if a coordinate is out of bounds.
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.
2018-01-13 22:24:29 +00:00
elexis 6278f75a1f Add rmgen HeightConstraint to allow placing entities in a given height range.
This was SVN commit r20862.
2018-01-13 22:13:03 +00:00
elexis 495f83663e Extend the rmgen AndConstraint to be more permissive and receive falsy values or a Constraint to remove some Constraint conversion duplication, refs #4805.
This was SVN commit r20861.
2018-01-13 22:11:06 +00:00
elexis e8dea23cc4 Cleanup createArea calls on Deep Forest as in 376d8b3d1e.
This was SVN commit r20860.
2018-01-13 22:06:01 +00:00
elexis 55cdc8f639 Cleanup createArea calls on Neareastern Badlands as in 376d8b3d1e.
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.
2018-01-13 22:01:59 +00:00
elexis d015b68f18 Fix unreachable trees on Oasis, fixes #4937.
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.
2018-01-13 21:50:25 +00:00
elexis e58e60f75a Simplify island generation on Islands.
This was SVN commit r20857.
2018-01-13 21:42:46 +00:00
elexis 36afe80b27 Use vector algebra for the unconventional playerbase resources on Belgian Uplands, refs #4845.
Add an extra scope since that block will become conditional on nomad
maps, refs #3591.

This was SVN commit r20856.
2018-01-13 21:31:20 +00:00
elexis f8cc18589d Simplify the water-tileclass marking on Cycladic Archipelago and Corsica vs Sardinia using paintTileClassBasedOnHeight.
This was SVN commit r20855.
2018-01-13 21:26:59 +00:00
elexis eb46e4ec6a Remove dead tileclasses from random map scripts,
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.
2018-01-13 21:23:28 +00:00
elexis 8829610a1b Remove random map script log entries that measured the time.
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.
2018-01-13 21:19:07 +00:00
elexis b838e57770 Clean some random map script comments.
This was SVN commit r20852.
2018-01-13 21:16:27 +00:00
elexis 851490e3bf Fix typo in 08f561c02d.
This was SVN commit r20851.
2018-01-13 21:12:22 +00:00
Stan 7a4325f49a Fix capes for elephants, and make them behave.
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.
2018-01-13 15:11:57 +00:00
Stan 23b791285a New peytral textures for horses by wackyserious.
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.
2018-01-13 14:01:20 +00:00
mimo d05655ebda fix leftover in 5df1f4ec4c
This was SVN commit r20848.
2018-01-13 09:39:43 +00:00
Stan 1c7dd52b66 Fix an incorrect icon for ptol healers.
Thread :
https://wildfiregames.com/forum/index.php?/topic/21136-egyptian-priest-icon/

This was SVN commit r20846.
2018-01-12 21:44:47 +00:00
bb 5729b49610 Don't early return but update the active query when having no position or when outOfWorld
Based on Patch By: fatherbushido
Patch By: temple
Differential Revision: https://code.wildfiregames.com/D1219
Differential Revision: https://code.wildfiregames.com/D704
fixes #4658

This was SVN commit r20845.
2018-01-12 21:01:17 +00:00
Stan fbc5877d67 Update the credits with Leyto's real name.
This was SVN commit r20844.
2018-01-12 19:12:45 +00:00
Stan f17813a9eb Add missing icon in 1df50d9a07
Refs: #1992
Icon by wowgetoffyourcellphone

This was SVN commit r20843.
2018-01-12 18:07:15 +00:00
bb 6342112a5b Fix the currently wrong entity order/select/attack/trained sounds.
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.
2018-01-12 17:43:04 +00:00
LordGood 51a92c27a1 Ptolemies stable,range,workshop,e-stable & Roman stable
This was SVN commit r20841.
2018-01-12 17:40:39 +00:00
Stan 1db8f9a815 New Muskox texture by Leyto
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.
2018-01-12 11:42:13 +00:00
Stan c2ddae3264 Thracian cap.
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.
2018-01-12 10:52:06 +00:00
mimo ddb6fbd55d petra: remove some unneeded temporary variables
This was SVN commit r20838.
2018-01-11 21:31:12 +00:00
mimo 99e38f1731 Improve petra behavior in death-match: allow more builders when plenty of resources and replace tests on current population by tests on current + in-training-queue population (that allows faster phasing up).
Fixes #4168

This was SVN commit r20837.
2018-01-11 21:29:19 +00:00
Stan 4c348b6aaa Fixes #4634
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.
2018-01-11 20:31:28 +00:00
Stan 3a5b07109a Add a different siege tower for ptolemies to make use of their own garrison flag.
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.
2018-01-11 16:10:35 +00:00
Stan 2688e06533 Fix garrison flag for the persian siege ram
Patch by Angen
Reviewed By: Stan
Differential Revision: ​https://code.wildfiregames.com/D1215
This was SVN commit r20834.
2018-01-11 14:35:08 +00:00
Stan fa9078876e Move two old celt models to their correct directory and rename them accordingly.
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.
2018-01-11 13:21:56 +00:00
Stan efa6bdf2c2 Remove the last occurence of multiply_color in the repo.
Fixes #2422

This was SVN commit r20832.
2018-01-11 12:44:43 +00:00
Stan 24f37eabb6 Use inheritance for animations for the remaining horses
This was SVN commit r20831.
2018-01-11 10:31:06 +00:00
Stan 4ea135838e Add missing unit in iberian commit
This was SVN commit r20830.
2018-01-11 10:22:55 +00:00
Stan b685951885 Use death and run variants for spartan horses.
Add eol properties

This was SVN commit r20829.
2018-01-11 10:00:44 +00:00
Stan 58a9d9fab7 Use death and run variants for seleucid horses.
Add eol properties

This was SVN commit r20828.
2018-01-11 09:59:59 +00:00
Stan 5428f569a3 Use death and run variants for roman horses.
Add eol properties

This was SVN commit r20827.
2018-01-11 09:59:41 +00:00
Stan e75a71cc94 Use death and run variants for ptolemy horses.
Add eol properties

This was SVN commit r20826.
2018-01-11 09:59:19 +00:00
Stan e004b1070b Use death and run variants for persian horses.
Add eol properties

This was SVN commit r20825.
2018-01-11 09:58:39 +00:00
Stan 028b7f3542 Use death and run variants for mauryans horses.
Add eol properties

This was SVN commit r20824.
2018-01-11 09:58:03 +00:00
Stan d8542d4264 Use death and run variants for macedonians horses.
Add eol properties

This was SVN commit r20823.
2018-01-11 09:57:18 +00:00
Stan 6abd53a36a Use death and run variants for macedonian horses.
Add eol properties

This was SVN commit r20822.
2018-01-11 09:56:42 +00:00
Stan 09ff2819f9 Use death and run variants for hellenes horses.
Add eol properties

This was SVN commit r20821.
2018-01-11 09:55:50 +00:00
Stan 5652d66894 Use death and run variants for celts horses.
Add eol properties

This was SVN commit r20820.
2018-01-11 09:54:32 +00:00
Stan 418eeb8098 Use death and run variants for carthaginian horses.
Add eol properties
Fix indent bug
Fix missing line end

This was SVN commit r20819.
2018-01-11 09:53:52 +00:00
Stan 4e925919b6 Use death and run variants for athenians horses.
Add eol properties

This was SVN commit r20818.
2018-01-11 09:51:55 +00:00
Stan d93af8042e Add an variant file for death and run variants of horses.
Add svn eol properties.
Fix the zebra and pegasus

This was SVN commit r20817.
2018-01-11 09:50:59 +00:00
elexis 08f561c02d Remove Math.sin, cos and PI proxy functions from rmgen. Fixes #4933.
This was SVN commit r20816.
2018-01-11 03:16:31 +00:00
elexis 921850cdef Implement random map script playerbase function.
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.
2018-01-11 00:35:01 +00:00
Stan 8d01af48ad Fix Shiny Ptolemies horses and some errors/warnings with helmets
This was SVN commit r20813.
2018-01-10 01:08:28 +00:00
Stan d651ece301 New bubble icons
refs : D817
Reviewed by elexis, fpre, Imarok

This was SVN commit r20812.
2018-01-09 23:06:13 +00:00
elexis 2d187ba735 Fix unintented newline in 435081f916.
Display the tech filename in the structure tree warning rather than the
english label to ease mod debugging.

This was SVN commit r20811.
2018-01-09 21:38:17 +00:00
mimo 9fd718186d fix leftover in 29f2b19727
This was SVN commit r20810.
2018-01-09 21:22:19 +00:00
Gallaecio 435081f916 Remove Unicode ellipsis from map files
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.
2018-01-09 18:18:19 +00:00
elexis 531f548b4a Fix summary screen not printing "You have been defeated..." following 8da8d28102 since GetPlayerID returns -1 after EndGame.
This was SVN commit r20808.
2018-01-09 14:06:43 +00:00
Stan 7166d28268 Change slightly the catafalque to adapt to new horses meshes.
Reported by bb_ on IRC

This was SVN commit r20807.
2018-01-08 22:47:15 +00:00
elexis af698a16f0 Use createPassage from 0c70fb3036 to connect islands on Snowflake Searocks to remove weird math, just like ae2e045df5 and fc733d0b22, refs #4805.
Use vector algebra to simplify and mapCenter getter, refs #4845, #4854.

This was SVN commit r20806.
2018-01-08 21:33:27 +00:00
mimo e300fc6c53 petra: complete 67b76e6705 for the cc distance reduction when defensive and various cleanup
This was SVN commit r20805.
2018-01-08 18:40:24 +00:00
mimo 29f2b19727 Move Pack Time to parent template
Patch by Angen

Reviewed By: mimo
Differential Revision: https://code.wildfiregames.com/D1204
This was SVN commit r20804.
2018-01-08 18:04:29 +00:00
elexis 01bf52d70b Add missing Math.sqrt in 0aa875b3f2 and apply some trivial rmgen cleanup.
This was SVN commit r20803.
2018-01-08 17:08:21 +00:00
elexis 5368271d70 Fix a resource collision in 6d52a71d4a in the Lions Den and in 7f8adcf8cb/25682da568/0d0bc32736 in the Unknown maps, refs #4902.
This was SVN commit r20802.
2018-01-08 17:01:10 +00:00
elexis d448d9313b Fix missing coordinate conversion in e596ef6011 (and rearrange if-statement to be more readable).
This was SVN commit r20801.
2018-01-08 16:55:08 +00:00
elexis 2414e4946e Replace TWO_PI with 2 * Math.PI, refs #4933.
This was SVN commit r20798.
2018-01-07 20:32:43 +00:00
bb 891870a554 Stop serializing minimap playercolors
Patch By: temple
Comments By: elexis
Differential Revision: https://code.wildfiregames.com/D1124
This was SVN commit r20797.
2018-01-07 20:23:04 +00:00
elexis 4bc8dc9ed4 Remove rmgen Math.round proxy, refs #4933.
This was SVN commit r20796.
2018-01-07 20:18:31 +00:00
elexis a554a7c1ed Remove rmgen Math.abs proxy, refs #4933.
This was SVN commit r20795.
2018-01-07 19:57:30 +00:00
elexis 92fe7445e4 Remove rmgen Math.floor proxy, refs #4933.
This was SVN commit r20794.
2018-01-07 19:45:48 +00:00
elexis 0aa875b3f2 Remove rmgen sqrt proxy, refs #4933.
This was SVN commit r20793.
2018-01-07 18:42:22 +00:00
elexis ab1bfb83f7 Remove unneeded rmgen min and max proxies, refs #4933.
This was SVN commit r20792.
2018-01-07 18:26:04 +00:00
mimo 67b76e6705 petra: reduce a bit the distance between ccs for defensive ai + some cleanup
This was SVN commit r20791.
2018-01-07 17:44:01 +00:00
mimo e50beaedc0 Fix trigger difficulty level (9daa7520ef) for translation
Discussed with elexis

Trac Tickets: #4931

Differential Revision: https://code.wildfiregames.com/D1207
This was SVN commit r20790.
2018-01-07 17:37:17 +00:00
elexis a2e93de942 Remove rmgen Math.ceil proxy and unused lerp function from 0e0ed94926.
This was SVN commit r20789.
2018-01-07 16:19:24 +00:00
elexis 6b6c6ef8d3 Refactor Alpine Valley mountainrange code, refs 992a8ee0b8, 70e67af87f.
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.
2018-01-07 16:02:37 +00:00
elexis 0b1b7d19cf Return an array of Vector2D instead of an array of X coordinates and an array of Z coordinates from distributePointsOnCircle, so that one can iterate over the result, refs #4845.
Use map center getter for Rivers and the Unknown maps, refs #4854.

This was SVN commit r20787.
2018-01-07 15:25:53 +00:00
elexis 2d5196cd19 Fix wrong mapSize comparison in efd9b3e212.
This was SVN commit r20786.
2018-01-07 14:41:40 +00:00
bb 917056f4e3 Fix few style issues in 8ae67ed15f/9ae7c4d810
Spotted By: elexis
This was SVN commit r20785.
2018-01-07 13:44:50 +00:00
vladislavbelov a49a1f3746 Escapes slashes in the report help
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D976
This was SVN commit r20784.
2018-01-07 10:56:15 +00:00
elexis e1a5a50bdf Display the summary screen as a dialog if it was opened during a running game or replay.
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.
2018-01-07 01:12:27 +00:00
Gallaecio 11bcc7c0e7 Solve some issues reported on Transifex, and update translation files
This was SVN commit r20781.
2018-01-07 00:10:14 +00:00
elexis ae2e045df5 Delete createShallowsPassage / passageMaker from bc805bd357 and use the unified createPassage function from 0c70fb3036 (9016b8d866, a796800bb1) to achieve the same shallows generation, refs #4805.
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.
2018-01-06 22:59:56 +00:00
Gallaecio d9d76d450b Fix the Tributes entry in the Value drop-down of the Charts tab of the game summary
Trac Tickets: #4613

Differential Revision: https://code.wildfiregames.com/D1203
This was SVN commit r20779.
2018-01-06 21:42:20 +00:00
elexis de4e51c447 Replace the hardcoded keynames of the Introductory Tutorial strings with the sprintf solution from 4055c564e9 / D1184.
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.
2018-01-06 16:25:45 +00:00
elexis 0350bee2e6 Remove workaround from 4055c564e9 / D1184 and display hotkey strings too if the hotkey is unassigned.
Differential Revision: https://code.wildfiregames.com/D1200
Reviewed By: mimo
This was SVN commit r20777.
2018-01-06 16:20:59 +00:00
elexis f352d20e17 Support both DateTime formats of XEP-0082 in the lobby, refs #3156, f2c76cc75d, 6141c5c4fa, f27efac053.
Patch By: Dunedan
Fixes #4920.
Differential Revision: https://code.wildfiregames.com/D1197
This was SVN commit r20776.
2018-01-06 16:09:10 +00:00
elexis 015aa4adee Rename getTIPIADBON (The Intended Point In A Direction Based On Height) from 1fd00b5e3f to findLocationInDirectionBasedOnHeight.
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.
2018-01-06 15:48:38 +00:00
mimo 4925b8d21a fix 4842b2158b
This was SVN commit r20774.
2018-01-05 17:34:21 +00:00
elexis a8e63c72a8 Fix gamesetup when compiled --without-lobby following 61261d14fc / D364.
Differential Revision: https://code.wildfiregames.com/D1196
Patch By: nwtour
This was SVN commit r20773.
2018-01-05 16:47:05 +00:00
Stan 2661020b29 Fix a bug with horses variants found by wowgetoffyourcellphone
Thread:
https://wildfiregames.com/forum/index.php?/topic/23012-committed-horse-animations-actors-update/&page=12
Rotate by 180 degrees every horse that would have otherwise his head
through the roof.

This was SVN commit r20772.
2018-01-05 14:57:24 +00:00
Stan 73b1c96ed1 New officer helmets, update the current ones.
Thread here :
https://wildfiregames.com/forum/index.php?/topic/23049-help-needed-the-next-big-thing-helmets/
Accepted by Lordgood
Fixes #2288

This was SVN commit r20770.
2018-01-05 04:14:13 +00:00
Stan fef0b8b8c4 New hoplites helmets
Thread here :
https://wildfiregames.com/forum/index.php?/topic/23049-help-needed-the-next-big-thing-helmets/
Accepted by Lordgood

This was SVN commit r20769.
2018-01-05 04:13:26 +00:00
Stan aabd578a43 New Agema helmet
Thread here :
https://wildfiregames.com/forum/index.php?/topic/23049-help-needed-the-next-big-thing-helmets/
Accepted by Lordgood, Enrique, Wowgetoffyourcellphone
Fixes #2293

This was SVN commit r20768.
2018-01-05 04:11:42 +00:00
Stan 1a8d8cb84e New Phrygian cap and mask.
Thread here :
https://wildfiregames.com/forum/index.php?/topic/23049-help-needed-the-next-big-thing-helmets/
Accepted by Lordgood

This was SVN commit r20767.
2018-01-05 04:05:00 +00:00
Stan 0d6afda873 Fix a bug with incorrect geometry.
This was SVN commit r20766.
2018-01-05 03:03:55 +00:00
Stan 91fe20f8ee New highcrest version for chalcidean helmet,
Lower the brow.
Thread
https://wildfiregames.com/forum/index.php?/topic/23049-help-needed-the-next-big-thing-helmets/&page=4

This was SVN commit r20765.
2018-01-03 16:54:53 +00:00
Stan 815b3766ae New Seleucus Nikator (Victor) helmet
Discussion here :
https://wildfiregames.com/forum/index.php?/topic/23049-help-needed-the-next-big-thing-helmets/&page=4
Accepted by Lordgood

This was SVN commit r20764.
2018-01-03 16:24:30 +00:00
mimo 2dc41277df cleanup 9daa7520ef following bb's comments
This was SVN commit r20763.
2018-01-03 15:27:02 +00:00
Stan 549c0ee1b4 Rename some helmets to better reflect what they are.
Move them  to the new folder.
Update the actors accordingly.

This was SVN commit r20762.
2018-01-03 15:12:23 +00:00
elexis fc733d0b22 Delete createRamp which is the same as createPassage, refs #4805, f3823847b0, 9016b8d866, a796800bb1.
Use vector algebra to compute the ramp position, refs #4845.

This was SVN commit r20761.
2018-01-03 11:46:09 +00:00
mimo 9daa7520ef Allows trigger script with different difficulty levels
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D1189
This was SVN commit r20760.
2018-01-03 11:21:37 +00:00
elexis cdd96d8ae2 Simplify rmgen distanceOfPointFromLine and checkIfIntersect a lot by using vector algebra, refs #4845, #4805, 53074c7715, 70e67af87f, e596ef6011.
First createRamp cleanup, f3823847b0.

This was SVN commit r20758.
2018-01-03 03:27:09 +00:00
Stan 0f2f5aef77 Use variants for boeotian helmets to remove duplication everywhere,
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.
2018-01-03 00:04:20 +00:00
elexis bc2c9c1939 JS GUI session cleanup.
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.
2018-01-02 21:50:41 +00:00
Stan 56f4e13c9d Fix previous commit (Whiteline in XML)
Move headband to the new folder, and fix its position on the head
to better fit new heads.

This was SVN commit r20755.
2018-01-02 18:26:44 +00:00
Stan 4b0ee4dd86 New variant for the kausia cap:
Discussion here :
https://wildfiregames.com/forum/index.php?/topic/21084-committed-kausia-cap/
Discussion about other units that should get it here :
https://wildfiregames.com/forum/index.php?/topic/23634-task-new-persian-equipment/&tab=comments#comment-345401
Remove a cape frome a unit.

This was SVN commit r20754.
2018-01-02 18:16:19 +00:00
elexis c0dd4795ca Fix oversight in 83ee8cd62e / D827.
This was SVN commit r20753.
2018-01-02 17:49:20 +00:00
elexis efabf76364 Small JS GUI settings simplification using 58b2e2baf4 / D1107, refs D1189.
This was SVN commit r20752.
2018-01-02 17:10:04 +00:00
fabio 75eb8a8004 Add 8-bit easteregg music track.
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.
2018-01-02 15:27:06 +00:00
s0600204 f6b5488a24 Move unravelPhases function from structree to globalscripts for use in AI init.
Reviewed By: mimo
Differential Revision: https://code.wildfiregames.com/D1183
This was SVN commit r20750.
2018-01-02 06:38:09 +00:00
s0600204 00b05fd9f7 Use phase techs to determine phase order in structure tree.
(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.
2018-01-02 06:23:33 +00:00
s0600204 f4bbf9be5f Fix sound inheritance from template_unit_hero.xml
Patch by: Grugnas
Reviewed by: s0600204
Discussed with: Stan, fatherbushido

Differential Revision: https://code.wildfiregames.com/D747
Refs: #4678

This was SVN commit r20748.
2018-01-02 05:43:46 +00:00
Stan 95e48e64aa New illyrian helmet and textures.
Discussion here:
​​https://wildfiregames.com/forum/index.php?/topic/21546-enhancement-macedonian-helmets/&page=2
Reviewed by LordGood?
Helmet 03/12
Remove now unused meshes as new ones are basically higher resolution
versions.
Update actors accordingly to make use of them.

This was SVN commit r20747.
2018-01-01 18:33:10 +00:00
bb c9295a0f59 Nuke missleading non-existing spearman/sword(s)man classname references.
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D1173
This was SVN commit r20746.
2018-01-01 15:06:52 +00:00
bb 938a95b060 Fix a missed icon move in c67bd74008
Spotted By: Lion Kanzen
Patch By: Nescio
This was SVN commit r20745.
2018-01-01 14:59:55 +00:00
Stan 8866cd3f99 Improved texture for hele archers
Discussion here:
https://wildfiregames.com/forum/index.php?/topic/21546-enhancement-macedonian-helmets/&page=2
Approved by Enrique before he left

This was SVN commit r20744.
2018-01-01 12:11:25 +00:00
Stan 48b574c459 Change frequency of the variant files to allow a more uniform distribution of helmets,
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.
2018-01-01 11:25:25 +00:00
Gallaecio 4842b2158b [i18n] Normalized female citizen references, updated POT and PO files.
This was SVN commit r20742.
2017-12-31 21:30:27 +00:00
Stan e18ac19e58 New chalcidean helmet and textures.
Discussion here:
​https://wildfiregames.com/forum/index.php?/topic/21546-enhancement-macedonian-helmets/&page=2
Reviewed by LordGood
Helmet 03/12

Remove now unused meshes as new ones are basically higher resolution
versions.
Update actors accordingly to make use of them.

This was SVN commit r20741.
2017-12-31 17:44:37 +00:00
Stan 6f5abb3821 Use Lordgood's texture as a variant for the cataphract's mask.
This was SVN commit r20740.
2017-12-31 17:14:52 +00:00
elexis 15eedd2461 Use a helper variable and fix some whitespace in shaders as recommended by Vladislav in 2c8b78ddaa.
Differential Revision: https://code.wildfiregames.com/D1144
Comments By: wraitii
This was SVN commit r20738.
2017-12-31 01:34:22 +00:00
elexis c90d72deb5 Replace DataTemplateManager simulation component with a globalscript, refs #4868.
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.
2017-12-31 01:02:21 +00:00
elexis 1162eefdc2 Non-military unit selection filter.
Differential Revision: https://code.wildfiregames.com/D1056
Patch By: fpre / ffffffff
Reviewed By: temple
This was SVN commit r20736.
2017-12-30 18:20:43 +00:00
elexis d18374bffe Fix ugly font rendering using GL linear interpolation if the UI scale was changed.
Patch By: Dariost
Refs D332

This was SVN commit r20735.
2017-12-30 17:56:07 +00:00
elexis a62690c65a Add cheat code to play arbitrary music playlists, by default the 8-bit retro easteregg track from [[SVN:19890]] (yet to be committed to the public mod).
Fixes #4677.
Differential Revision: https://code.wildfiregames.com/D1097
Patch By: PingvinBetyar
This was SVN commit r20734.
2017-12-30 17:42:43 +00:00
elexis 669db62c5f Allow cheats to pass negative numeric arguments and default parameters for cheat arguments that are strings, refs D1097.
This was SVN commit r20733.
2017-12-30 17:38:01 +00:00
elexis 0c70fb3036 Deobfuscate, deduplicate and fix Corsica vs. Sardinia and Pyrenean Sierra, refs 9016b8d866, a796800bb1.
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.
2017-12-30 16:17:54 +00:00
Stan 279cad48e7 Use helmet prop points for helmets
Use the new head mesh for the new units
Found using : props/units/heads/(?!new/).*" attachpoint="head"

This was SVN commit r20731.
2017-12-30 15:58:53 +00:00
Stan 615403594b Following the inclusion of new horses units now use smaller heads.
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.
2017-12-30 15:31:55 +00:00
elexis 5500a96751 Delete Savegame format version, refs 7064565ff6.
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.
2017-12-30 14:54:13 +00:00
Stan 23ece1d627 New pilos helmet and textures.
Discussion here:
https://wildfiregames.com/forum/index.php?/topic/21546-enhancement-macedonian-helmets/&page=2

Move the affected helmets files to the new subdirectory, update all
concerned actors,
Create variant files for the pilos helmet, as a Poc for future commits
and also for the game.
Create a variant folder for the helmets files

This was SVN commit r20728.
2017-12-30 14:24:51 +00:00
Stan 512e8a269c Update the rnc file and compile it with trang to allow variant inheritance. This already worked, without the game even complaining, but the validator.pl would complained (as it should have).
This will be useful to avoid helmet code duplication, see next commit.

This was SVN commit r20727.
2017-12-30 14:21:28 +00:00
elexis b8216a9164 Let Atlas provide a default AI seed.
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.
2017-12-30 14:02:09 +00:00
mimo 4055c564e9 add a hotkey to toggle tutorial panel + add hotkey parameters to tutorial messages
Discussed with elexis

Differential Revision: https://code.wildfiregames.com/D1184
This was SVN commit r20725.
2017-12-30 13:31:14 +00:00
Stan d0fc111e54 Remove a useless actor now that new horses are committed
Add two dogs as fauna, in case people want to use them for scenarios

This was SVN commit r20724.
2017-12-29 16:36:01 +00:00
elexis fd08061ab6 Allow Vectors to be rounded.
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.
2017-12-29 15:37:16 +00:00
mimo 05f0fadd16 petra: remove a useless break
This was SVN commit r20722.
2017-12-29 14:37:53 +00:00
Stan 094d408fa4 Set some units to the relax stance so they don't look weird,
Use the new spear for greeks

This was SVN commit r20720.
2017-12-29 06:22:33 +00:00
Stan 0b3c1f9e83 Add a missing '/' fixes the previous commits
This was SVN commit r20719.
2017-12-29 06:02:58 +00:00
Stan 8f38f163e0 Fix a missing variant to Leonidas
This was SVN commit r20718.
2017-12-29 02:02:52 +00:00
Stan cacd13879b New horses commit part 08
Big cleanup, remove all the now unused files and some more.
https://wildfiregames.com/forum/index.php?/topic/23012-horse-animations-actors-update/&page=10&tab=comments&failedReply=1

This was SVN commit r20717.
2017-12-29 02:02:17 +00:00
Stan 881798caf1 New horses commit part 07
Add elephant files
https://wildfiregames.com/forum/index.php?/topic/23012-horse-animations-actors-update/&page=10&tab=comments&failedReply=1

This was SVN commit r20716.
2017-12-29 02:00:39 +00:00
Stan 9c51b8a337 New horses commit part 06
Add new horses and update the actors accordingly.
https://wildfiregames.com/forum/index.php?/topic/23012-horse-animations-actors-update/&page=10&tab=comments&failedReply=1

This was SVN commit r20715.
2017-12-29 01:58:56 +00:00
Stan 9fa5b52218 New horses commit part 05
Missing pony file
And new capes
https://wildfiregames.com/forum/index.php?/topic/23012-horse-animations-actors-update/&page=10&tab=comments&failedReply=1

This was SVN commit r20714.
2017-12-29 01:39:06 +00:00
Stan 216ac6632b New horses commit part 03
Move the animations of the camel cavalry to a variant file for
easier edition if/when they are replaced
https://wildfiregames.com/forum/index.php?/topic/23012-horse-animations-actors-update/&page=10&tab=comments&failedReply=1

This was SVN commit r20712.
2017-12-29 01:34:27 +00:00
Stan 808ff546d8 New horses commit part 02
New pony meshes by AlexanderMb
Discussion here
https://wildfiregames.com/forum/index.php?/topic/23012-horse-animations-actors-update/&page=10&tab=comments&failedReply=1

This was SVN commit r20711.
2017-12-29 01:31:19 +00:00
Stan ea1a4b5d7d New horses commit part 01
New seleucid chariot, using the new horses
Accepted by Enrique
Discussed here
https://wildfiregames.com/forum/index.php?/topic/21393-task-seleucid-champion-chariot/&page=2&tab=comments#comment-343097

This was SVN commit r20710.
2017-12-29 01:24:35 +00:00
elexis 1b641789b3 Add painter definition in Ardennes Forest missing in 9272153ee7.
This was SVN commit r20709.
2017-12-28 20:39:00 +00:00
bb e2fdad61e0 Let scrolling up go a tab up instead of down, fixes 8ae67ed15f/9ae7c4d810
Reported By: elexis
This was SVN commit r20708.
2017-12-28 11:40:43 +00:00
elexis 774a049cdd Vector cleanup.
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.
2017-12-28 01:54:56 +00:00
elexis 5e19b88f89 Display AI behavior, difficulty and name in the tooltip in the diplomacy and summary screen.
Unify the string parsing in D746 / D1159.

Differential Revision: https://code.wildfiregames.com/D1145
This was SVN commit r20705.
2017-12-28 01:31:48 +00:00
elexis ce1cac92f6 Pyrenean Sierra terrain painting cleanup, refs a796800bb1.
Remove redundant heightchecking conditions, unify place calls and use
ternaries, equal to 6273d111fe, refs #4805.

This was SVN commit r20704.
2017-12-28 01:21:33 +00:00
elexis 6c34e27334 Add rmgen playerPlacementCustomAngle helper function for random maps that are gulfs or place players on a circle with a non-uniform distribution.
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.
2017-12-28 00:39:54 +00:00
Stan 5f455e50b1 Use the boeotian helmet consistently everywhere. This revealed some huge duplication in files,
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.
2017-12-27 17:34:01 +00:00
elexis 263c2c8c3c Fix my fail in 3cfb8730a8.
Reviewed By: rosievers
This was SVN commit r20701.
2017-12-27 16:53:29 +00:00
elexis 7e05d7edc9 Initialize the AIManager AISeed immediately in C++ rather than too late and in JS.
Fixes #4907
Differential Revision: https://code.wildfiregames.com/D1178
Reviewed By: mimo
Refs D1159, f88ee2766e

This was SVN commit r20700.
2017-12-27 16:51:25 +00:00
elexis a89918c952 Move player templates from special/ to special/player/.
Differential Revision: https://code.wildfiregames.com/D1179
Reviewed By: bb
This was SVN commit r20699.
2017-12-27 16:11:22 +00:00
mimo 2fff03525e petra: assign more builders to structures blocking a phase up + cleanup of the corresponding functions
This was SVN commit r20698.
2017-12-27 15:49:55 +00:00
elexis 3cfb8730a8 Add helper function to apply arbitrary GUI tags (such as font and color).
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.
2017-12-27 13:36:28 +00:00
Stan e4cc4da1d2 Fix a bug with the gastaphrete mesh that will only show up when
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.
2017-12-27 13:00:18 +00:00
elexis b9c879c85f Remove duplication on Sahel Watering Holes using the modulo operator, refs #4805.
Use mapCenter getter from 5256d8497e / #4854 and
distributePointsOnCircle from 6fb6a65fc5 to shorten.

This was SVN commit r20693.
2017-12-27 00:51:11 +00:00
elexis 58b2e2baf4 JS file listing cleanup, refs #4868.
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.
2017-12-26 22:44:37 +00:00
elexis fb444d4165 Add GetGaiaAndNonGaiaEntities helper function in the RangeManager and use it in Extinct Volcano (D229).
Differential Revision: https://code.wildfiregames.com/D477
Reviewed By: bb
Proposed By: bb
Discussed with: fatherbushido

This was SVN commit r20691.
2017-12-26 22:03:25 +00:00
Stan 9106e66d98 Add gastaphretes as an atlas only unit for now
Accepted by Lordgood:
Thread :
https://wildfiregames.com/forum/index.php?/topic/22959-gastraphetes/&page=2&tab=comments#comment-343080

This was SVN commit r20690.
2017-12-26 21:48:29 +00:00
Stan 67d9bb6e36 New boeotian helmet for gastaphretes
Accepted by Lordgood
Discussion here :
https://wildfiregames.com/forum/index.php?/topic/21546-enhancement-macedonian-helmets/&page=2
and there
https://wildfiregames.com/forum/index.php?/topic/23049-help-needed-the-next-big-thing-helmets/

This was SVN commit r20689.
2017-12-26 21:41:08 +00:00
bb 5f9834ac8e Rename wolf_snow to arctic_wolf
Patch By: Phormio
Differential Revision: https://code.wildfiregames.com/D533
This was SVN commit r20688.
2017-12-26 21:16:26 +00:00
bb 7f4edf1926 Add support for diplomacy changes for wonder victory, make notifications more correct, add behaviour string to the gamedescription panel and on the fly cleanup
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D881
This was SVN commit r20687.
2017-12-26 12:59:27 +00:00
mimo dedc368519 allows Healers to be ejectedOnDestroy from ships
Reviewed By: bb
Differential Revision: https://code.wildfiregames.com/D1147
This was SVN commit r20686.
2017-12-26 10:39:28 +00:00
bb 868b389141 Make the steel_working tech really affect macemen, by adding a crush change refs D552 and D1036
Reviewed By: temple
Differential Revision: https://code.wildfiregames.com/D1174
This was SVN commit r20685.
2017-12-25 16:25:57 +00:00
bb 9ae7c4d810 Merge the two occurences of vertical tab in js and xml code
Agreed with and Comments by: elexis
Differential Revision: https://code.wildfiregames.com/D1175
This was SVN commit r20684.
2017-12-25 16:11:41 +00:00
bb 350c4580f8 Create a parent template for the maceman and add a maceman identity class.
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.
2017-12-24 16:04:10 +00:00
bb a39af19c89 Let the embassy depend on military template instead of special, since that is what the name suggests and an embassy can be used for any civ.
Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D1006
This was SVN commit r20681.
2017-12-24 15:19:08 +00:00
mimo 31b1d8a996 petra: fix an inverted sign, plus some cleanup
This was SVN commit r20680.
2017-12-24 11:29:03 +00:00
bb 84dd34639d Remove duplicate check in the canAttack query between unitAI and attack, also remove the forceRespond relic, which allows units to attack neutral players.
Patch By: temple
Differential Revision: https://code.wildfiregames.com/D1099
This was SVN commit r20678.
2017-12-23 15:53:00 +00:00
bb c67bd74008 Make unit icon naming consistent
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.
2017-12-23 14:11:05 +00:00
wraitii 95c03dcc64 Let the template define the actor used for the projectile. Also let projectiles have an impact animation (such as an explosion).
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.
2017-12-23 09:27:19 +00:00
bb 7d7a4a6b14 Use an object in splitRatingFromNick instead of an array and some cleanups
Patch By: ffffffff
Differential Revision: https://code.wildfiregames.com/D1087
This was SVN commit r20675.
2017-12-22 19:20:03 +00:00
mimo e0bd348bce some petra cleanup
This was SVN commit r20673.
2017-12-21 19:01:55 +00:00
mimo 3319c69d97 Choose AI behavior in gamesetup
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.
2017-12-20 22:02:15 +00:00
mimo c0c046c273 petra: fix an inverted ternary (and tune a bit the values used)
This was SVN commit r20670.
2017-12-20 17:59:43 +00:00
Imarok 2c243b701e Reorder some summary entries and set default charts to economy & total score.
Reviewed by: Imarok
Differential Revision: https://code.wildfiregames.com/D1110
This was SVN commit r20669.
2017-12-20 11:05:48 +00:00
Stan 749ce0c894 Move a sheep texture to the correct folder and make use of it.
Only trainable sheep have the player colored collar.

This was SVN commit r20667.
2017-12-19 23:19:33 +00:00
Stan 13bfcb150a New rabbit.
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.
2017-12-19 22:48:58 +00:00
mimo 5df1f4ec4c add allowCapture argument to moveAttack (and patrol) commands
Discussed with elexis

Differential Revision: https://code.wildfiregames.com/D1150
This was SVN commit r20665.
2017-12-19 19:24:48 +00:00
Stan d2238ece6d Update Chariot anims to be compatible with blender and add a source file if modification is ever needed
Add a death anim.

This was SVN commit r20664.
2017-12-18 23:44:51 +00:00
Stan 1df50d9a07 New Zebu anims and armature. I made Idle, Walk, and used Alexandermb's work to make death variants.
Skeleton was generated using the python script I wrote some time ago.

This was SVN commit r20663.
2017-12-18 23:37:58 +00:00
Stan ccb7f6684f Update the barrel model with more polygons.
This was SVN commit r20662.
2017-12-18 23:31:58 +00:00
mimo ef0b774321 cleanup VisionSharing tests
This was SVN commit r20661.
2017-12-18 17:55:25 +00:00
mimo e29dfb7000 Provide a TriggerHelper function to spawn garrisoned entities
Differential Revision: https://code.wildfiregames.com/D1146
This was SVN commit r20659.
2017-12-17 17:17:00 +00:00
mimo a5a1909bd3 petra: check not only the generic resource type but also the specific one when assigning a gatherer (useful for some mods)
This was SVN commit r20658.
2017-12-16 16:51:58 +00:00
mimo 93b777b9fe Use Array.from intead of the spread operator (that's more readable and more performant)
Patch by elexis

Reviewed and extended by mimo

Differential Revision: https://code.wildfiregames.com/D1135
This was SVN commit r20657.
2017-12-16 16:39:28 +00:00
elexis adc2bb872d Fix three wrongly chosen variables in 71121b8a89 / D1093, a wrong case-insensitive implementation and extend the tests to catch that.
Differential Revision: https://code.wildfiregames.com/D1151
Reviewed By: mimo
This was SVN commit r20656.
2017-12-15 23:37:43 +00:00
elexis 571562d7d7 Revert 9c180f660f until there is someone maintaining AI behaviors, refs D746.
This was SVN commit r20654.
2017-12-14 13:31:00 +00:00
elexis 198c702e6a Fix missing conversion in 8f4363f146.
This was SVN commit r20653.
2017-12-14 13:25:49 +00:00
bb dfa66fbc12 Cleanup getNumPlayers() calls
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.
2017-12-13 20:41:41 +00:00
Stan 02613bc142 Add Alexandermb's crocodile swim animation. (Unused for now) It will be used when when implement amphibious units.
Reviewed by : Stan, Wowgetoffyourcellphone, Sundiata.

This was SVN commit r20651.
2017-12-13 15:59:47 +00:00
bb e534f59e01 Cleanup endGameManager win/defeat messages code
Patch By: temple
Differential Revision: https://code.wildfiregames.com/D1115
This was SVN commit r20650.
2017-12-12 22:30:20 +00:00
bb 5a5dcd2126 Make the kennel depend on military structures instead of special as stables have the same inheritance structure
Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D1035
This was SVN commit r20649.
2017-12-12 21:03:17 +00:00
vladislavbelov c5deda556c Adds a skip for invalid files in the validator
Reviewed By: Itms
Differential Revision: https://code.wildfiregames.com/D1140
This was SVN commit r20648.
2017-12-12 20:23:26 +00:00
elexis 9c180f660f AI behavior gamesetup setting.
Based On Patch By: Sandarac
Differential Revision: https://code.wildfiregames.com/D746
Refs #812, #2550

This was SVN commit r20646.
2017-12-12 16:45:09 +00:00
elexis 16dab5a587 Hide the cancel button in the modmod of the mod mod and the quit button when called from the public mod.
Differential Revision: https://code.wildfiregames.com/D1141
Reviewed By: Grugnas
Refs #4890

This was SVN commit r20645.
2017-12-12 16:06:52 +00:00
bb 8ae67ed15f Implement hotkeys and mousescroll to change tabs in tabbed pages (credits, summary and options).
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.
2017-12-11 22:16:01 +00:00
bb 3eef53b124 Fix missing i's in 1ca585ccf2
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.
2017-12-11 15:23:34 +00:00
Imarok 60631b3949 Hotkey to select wounded units
Reviewed by: temple
Differential Revision: https://code.wildfiregames.com/D729
This was SVN commit r20642.
2017-12-11 12:47:56 +00:00
Stan e5ce142cba Some tweaks to the gaul stable to make it adapt to the terrain better.
This was SVN commit r20640.
2017-12-10 19:17:51 +00:00
elexis 89e339dd16 Remove VFS cache, because it is less effective and less efficient than the OS cache (and partially redundant with higher level application caches).
Patch By: Sandarac
Discussed with: Philip, echotangoecho, Bezerra
Fixes #4072.
Differential Revision: https://code.wildfiregames.com/D587
This was SVN commit r20639.
2017-12-10 17:33:03 +00:00
Stan 3bfe10f63f Cleopatra anims cleanup.
Use the other prop point for the bow so animation is correct
Fix the broken quiver uncommited.
Remove one set of earings

This was SVN commit r20638.
2017-12-10 16:58:51 +00:00
elexis 71121b8a89 Define, document, validate and test validation of the format of mod.json files.
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.
2017-12-10 16:13:18 +00:00
Itms a82175b580 Use premake5 during automated testing, after a few weeks of use in production.
Refs #4846.

This was SVN commit r20635.
2017-12-10 14:26:53 +00:00
wraitii 38d11a6fce Long range pathfinder cleanup
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.
2017-12-10 14:23:16 +00:00
Itms 18b2906a9c Refactor the cxxtest premake module.
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.
2017-12-10 11:17:43 +00:00
wraitii b4a19bc44e Fix 8446b92f1b, where I missed adding a new file and accidentally invalidated Hero_cleopatra.
Reported by Imarok on IRC.

This was SVN commit r20632.
2017-12-10 11:15:22 +00:00
wraitii 8446b92f1b Update all female_citizen actors so that idle animations properly show carried resources.
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.
2017-12-10 10:06:08 +00:00
wraitii f7aa7ac79e Optimise HierarchicalPathfinder::Update by speeding up the chunk dirtiness check.
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.
2017-12-10 08:59:43 +00:00
elexis 1933461009 Slight cleanup of Commands.js.
Removes data.playerEnt and data.cmpPlayerManager.

Patch By: temple
Differential Revision: https://code.wildfiregames.com/D1138
This was SVN commit r20629.
2017-12-10 04:05:43 +00:00
elexis ad2e48da1e Fix broken infinity kill/death ratio summary screen translation comment in b5ea27904d.
Patch By: temple
Differential Revision: https://code.wildfiregames.com/D1133
This was SVN commit r20628.
2017-12-10 03:32:17 +00:00
elexis 40cc3aaa09 Rename RangeVisualization component from ee5bb1fd61 / D238 to RangeOverlayManager for consistency with the RangeOverlayRenderer from 5fbb224dc0 / D555.
Refs #4899, #3915

This was SVN commit r20627.
2017-12-10 03:28:38 +00:00
s0600204 ddf868cfdc Update random maps that use rmgen wall-placement.
Reviewed By: FeXoR
Commented On By: elexis
Refs: #2944, D900

This was SVN commit r20626.
2017-12-10 03:14:00 +00:00
s0600204 7aae697bc5 Remove civ-specific hardcoding in rmgen wall-placement script.
Original Patch By: FeXoR
Reviewed By: FeXoR
Commented On By: elexis
Refs #2944
Differential Revision: https://code.wildfiregames.com/D900
This was SVN commit r20625.
2017-12-10 03:12:54 +00:00
elexis be06299e28 Use only one getter for range overlays instead of three to four in the Heal and Auras component.
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.
2017-12-10 03:08:05 +00:00
elexis 5b6ac6deda Display attack range in building previews.
Patch By: Sandarac
Taken from D555
Refs #3915

This was SVN commit r20623.
2017-12-10 02:48:29 +00:00
elexis 5fbb224dc0 Render the range visualization of auras, heal and attack component in a separate RangeOverlayRenderer component instead of abusing Selectable for that.
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.
2017-12-10 02:41:08 +00:00
elexis 13ad114dd6 Move selection ring OverlayTexture code from CCmpSelectable::UpdateTexturedLineOverlay to the SOverlayTexturedLine struct in graphics/Overlay.cpp and SimRender in simulation2/helpers/Render.cpp.
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.
2017-12-10 00:19:51 +00:00
bb 470e9fc8f1 Make houses conquestcritical, since the can train female
Patch By: temple
Differential Revision: https://code.wildfiregames.com/D1018
This was SVN commit r20620.
2017-12-09 20:28:59 +00:00
elexis 84e88edd36 Remove pairwise annihilating array constructor and spread operator in e4a5d5b4dd.
Differential Revision: https://code.wildfiregames.com/D1134
Reviewed By: bb
This was SVN commit r20619.
2017-12-09 20:25:23 +00:00
elexis 53c9e89591 Move EOverlayType and SOverlayDescriptor from the Selectable component to Overlay.h.
Refs #3915, D568
Patch By: Sandarac
Taken from D555
Reviewed By: Vladislav
This was SVN commit r20618.
2017-12-09 19:49:56 +00:00
Stan 53186fbf3a Differential Revision: ​https://code.wildfiregames.com/D403
Reviewed By: elexis, temple,
Comments: fatherbushido

This was SVN commit r20617.
2017-12-09 16:12:04 +00:00
elexis 2fd163a08a Remove TechnologyManager relict of 99d04e93bb following c1e86161b5.
This was SVN commit r20616.
2017-12-08 23:11:00 +00:00
vladislavbelov ae343e8e9d Adds the basic actor/material validator
Reviewed By: Itms
Differential Revision: https://code.wildfiregames.com/D1016
This was SVN commit r20615.
2017-12-08 21:40:29 +00:00
elexis 8684e06ce0 Support translation of mod labels and description.
Differential Revision: https://code.wildfiregames.com/D1083
Reviewed By: Vladislav
This was SVN commit r20614.
2017-12-08 20:51:36 +00:00
elexis 3b3f0eb2d6 PlayerManager GetAllPlayers helper function to remove some duplication.
Differential Revision: https://code.wildfiregames.com/D1050
Patch By: temple
This was SVN commit r20613.
2017-12-08 20:39:40 +00:00
elexis 5667de04c8 Use Map instead of Object in researchQueued of the TechnologyManager for code symmetry with the two previous commits, a6f14f5631 and dc72833040.
Comments in https://code.wildfiregames.com/D1130

This was SVN commit r20612.
2017-12-08 19:29:10 +00:00
elexis dc72833040 Use Set instead of an Object with unused values in TechnologyManager.researchStarted.
Differential Revision: https://code.wildfiregames.com/D1129
Reviewed By: mimo
This was SVN commit r20611.
2017-12-08 18:47:07 +00:00
elexis a6f14f5631 Remove unused serialized cache of technology templates in TechnologyManager.researchedTechs.
Refs #3834, #3909, #4239, #4868, D1108
Differential Revision: https://code.wildfiregames.com/D1130
Reviewed By: mimo
This was SVN commit r20610.
2017-12-08 18:35:04 +00:00
elexis 5f10ae7551 Move viewed player dropdown update to a separate function in preparation of D754.
Differential Revision: https://code.wildfiregames.com/D1126
Patch By: temple
Refs #4747

This was SVN commit r20609.
2017-12-08 18:24:51 +00:00
elexis ad1ab0c3d3 Attack Range Visualization.
Fixes #3915
Differential Revision: https://code.wildfiregames.com/D568
Based on patch by: Sandarac
This was SVN commit r20608.
2017-12-08 13:40:41 +00:00
elexis 9c0e37f2c0 Don't serialize the templates of autoresearched technologies.
Refs #3834, #4239
Differential Revision: https://code.wildfiregames.com/D1109
Reviewed By: temple
Comments By: Itms
Proposed By: sanderd17
This was SVN commit r20606.
2017-12-07 23:26:29 +00:00
mimo 02cb770c1d adapt petra to 2a6fcafbae
This was SVN commit r20605.
2017-12-07 22:06:58 +00:00
mimo 81839be0f1 Adds test in ProductionQueue for the {civ} tech replacement from 8de5c26540
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D1125
This was SVN commit r20604.
2017-12-07 21:40:42 +00:00
mimo 2a6fcafbae Add a {native} civ replacement in buildable and trainable template names
Reviewed By: wraitii, elexis, with inputs from s0600204
Differential Revision: https://code.wildfiregames.com/D1084
This was SVN commit r20603.
2017-12-07 18:33:08 +00:00
elexis 6bbd8297db Fix idle worker button mess.
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.
2017-12-06 21:25:17 +00:00
elexis 32981e6f5e Allow the AI to read JSON simulation files and use the Resources prototype from 52f311da2b for the AI directly.
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.
2017-12-06 20:26:01 +00:00
elexis 0d51f0391a Add buttons to visit the website of the selected mod.
Differential Revision: https://code.wildfiregames.com/D1101
Refs #4890
Reviewed By: Grugnas
Comments By: fpre / ffffffff
This was SVN commit r20599.
2017-12-06 19:58:23 +00:00
elexis 46dfcf3b95 Simplify Barter component by passing playerID instead of playerEntity.
Differential Revision: https://code.wildfiregames.com/D1114
Refs D1050
Patch By: temple
This was SVN commit r20598.
2017-12-06 13:29:18 +00:00
elexis 505c1f5ead Fix typo in 54904b1750.
This was SVN commit r20597.
2017-12-06 12:54:35 +00:00
Imarok 274902167c Add a move modifier hotkey
Patch by: temple
Differential Revision: https://code.wildfiregames.com/D674
This was SVN commit r20594.
2017-12-05 20:46:11 +00:00
Imarok 52494580f6 Fix name colors in gamedescription
Patch by: ffffffff
Differential Revision: https://code.wildfiregames.com/D1086
This was SVN commit r20593.
2017-12-05 20:29:10 +00:00
mimo a2f7038ff6 fix oversight in 8de5c26540
This was SVN commit r20592.
2017-12-05 18:10:44 +00:00
Imarok af03c72f76 Move GetAvailableMods
Reviewed by: elexis
Differential Revision: https://code.wildfiregames.com/D1106
This was SVN commit r20591.
2017-12-05 17:17:21 +00:00
s0600204 175171c9d4 Amend wallpiece lengths in preparation for D900.
Values approved of by FeXoR
Refs D900, #2944

This was SVN commit r20589.
2017-12-05 02:39:50 +00:00
elexis fed3fbee5d Expose the same FileExists to JS GUI, simulation and rmgen.
Thus restrict rmgen FileExists from 871ed04521 to rmgen/ and
simulation/.

Refs #4868, 8de5c26540
Differential Revision: https://code.wildfiregames.com/D1104
Same rap as in 0cfe9ab153, 7fda43d14e.

This was SVN commit r20588.
2017-12-05 00:22:03 +00:00
elexis 8582dcf47f Check for Technology existence by looking up loaded technologies rather than performing disk access ingame, refs D1024 / 8de5c26540.
Differential Revision: https://code.wildfiregames.com/D1105
Discussed with: mimo

This was SVN commit r20587.
2017-12-04 23:58:44 +00:00
elexis 7fda43d14e Expose the same file listing function to JS GUI, simulation and rmgen, refs #4868.
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.
2017-12-04 23:46:55 +00:00
elexis 54904b1750 Add gui tag color setter function, so that we don't have to read and ensure the color syntax each time.
Differential Revision: https://code.wildfiregames.com/D1088
Patch By: fpre / ffffffff
This was SVN commit r20585.
2017-12-04 17:29:26 +00:00
elexis 2c8b78ddaa Option to disable fog effects.
Fixes #4626
Patch By: dp304
This was SVN commit r20584.
2017-12-04 15:54:24 +00:00
elexis 247bde356c Reload water shaders too when changing shader settings.
Refs #4626
Patch By: dp304
This was SVN commit r20583.
2017-12-04 15:51:20 +00:00
elexis 30c3b7c3b8 Fix two clang warnings in 61261d14fc reported by leper.
Differential Revision: https://code.wildfiregames.com/D1064
Reviewed By: fcxSanya
Refs #2305

This was SVN commit r20582.
2017-12-04 14:30:38 +00:00
bb ac8c0d1d94 Fix of by one error in 9faf90a4b1
Spotted by temple

This was SVN commit r20581.
2017-12-04 09:18:05 +00:00
elexis 1bf2221b83 Idle unit hotkey.
Differential Revision: https://code.wildfiregames.com/D1060
Patch By: temple
Reviewed By: wraitii
This was SVN commit r20578.
2017-12-04 02:54:51 +00:00
elexis cd571035bb Allow fast-forwarding of matches with only AI players.
Differential Revision: https://code.wildfiregames.com/D595
Refs #4078
Accepted By: Grugnas
This was SVN commit r20577.
2017-12-04 02:37:21 +00:00
elexis 0cfe9ab153 Expose the same ReadJSONFile function to simulation, GUI and rmgen.
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.
2017-12-03 23:02:27 +00:00
elexis 5e85ca5d7b Deprecate type property of mods.
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.
2017-12-03 21:44:16 +00:00
elexis c670f14812 Fix camouflaged oversight in d3ce5289b6 reported by leper and stupidly forgotton regex.
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.
2017-12-03 21:14:54 +00:00
bb 9faf90a4b1 Move undeletable tag to identity component, preparation for allowing units without health component.
Also fix a missing init from D750/7e1646afd5

Patch By: temple
Differential Revision: https://code.wildfiregames.com/D341
This was SVN commit r20573.
2017-12-03 20:54:53 +00:00
elexis 9f0484e5ce Delete unused SpiderMonkey GarbageCollection ScriptFunctions ForceGC in the AI and GUI context (e9e05f4efc) and MaybeGC in the random mapgen context (942a45372c).
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.
2017-12-03 12:48:21 +00:00
wraitii dcc49a064b Change gathering rally points to use gather nstead of gather-near-position when possible.
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.
2017-12-03 10:25:59 +00:00
wraitii 93b052ba10 Let Fauna cast silhouettes to make them more visible inside forests or behind buildings.
This doesn't affect purely decorative animals.

Reviewed By: wraitii
Patch By: temple
Differential Revision: https://code.wildfiregames.com/D965
This was SVN commit r20570.
2017-12-03 10:16:45 +00:00
wraitii 99d486c1d7 Allow models using alpha-blending (transparent models) to be silhouette casters.
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.
2017-12-03 10:14:16 +00:00
wraitii 0790ceb3ef Fix individual combat when attacked
In particular, better handle melee units attacking capturing units.

Reviewed By: wraitii
Patch By: temple
Differential Revision: https://code.wildfiregames.com/D1047
This was SVN commit r20568.
2017-12-03 10:10:13 +00:00
mimo 36fadbb070 fix oversight in 854288a6dc
This was SVN commit r20567.
2017-12-02 10:01:40 +00:00
mimo 854288a6dc Add AI difficulty in options
Reviewed By: elexis
Trac Tickets: #4876

Differential Revision: https://code.wildfiregames.com/D1096
This was SVN commit r20566.
2017-12-01 20:05:58 +00:00
Itms 0ce7a7f5c8 Go back to the legacy syntax for detecting premake actions.
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.
2017-11-29 22:37:09 +00:00
Itms f22dfba717 Support Visual Studio 2015 (MSVC 14.0), fixes #3439.
VS 2013 stays the default Windows compiler, but support for it will be
dropped as soon as possible.
Tested By: Stan
This was SVN commit r20562.
2017-11-29 21:16:10 +00:00
Itms 2da6c0ce2a Use default Unicode encoding in source code on Windows.
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.
2017-11-29 20:14:22 +00:00
Itms 8bb7a20ec1 Remove hack from cxxtest premake module, refs #3729.
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.
2017-11-29 20:04:44 +00:00
mimo ff724b8645 fix a rare error in petra
This was SVN commit r20559.
2017-11-29 17:30:31 +00:00
mimo 0afa4a38da fix cheat following 8de5c26540
This was SVN commit r20558.
2017-11-29 17:10:03 +00:00
Imarok 326f759050 Lobby: Don't display a timestamp when an invalid command is sent
Reviewed by: elexis
Differential Revision: https://code.wildfiregames.com/D1077
This was SVN commit r20557.
2017-11-29 15:48:41 +00:00
elexis 71ef1a6e95 Replace mod selection sorting choice dropdown and checkbox with the column based sorting from b8fce56821, refs #2405.
Use case insensitive sorting iff it's the locale default.

This was SVN commit r20555.
2017-11-29 12:47:16 +00:00
elexis d3ce5289b6 Cleanup mod selection GUI page.
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.
2017-11-28 22:43:27 +00:00
mimo 8de5c26540 Allow civ specific techs with {civ}
Discussed with leper

Reviewed By: bb
Trac Tickets: #4589

Differential Revision: https://code.wildfiregames.com/D1024
This was SVN commit r20551.
2017-11-28 20:43:00 +00:00
elexis 752005c4a4 Enable and disable mods more comfortably using the doubleclick event, refs #3574 / 70164a02c4.
Filter mods while typing, refs D860 / 7a157faf3c.

This was SVN commit r20550.
2017-11-28 18:57:01 +00:00
elexis b1a116db37 Move translate functions from mod/globalscripts/ to mod/gui/common/.
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.
2017-11-28 18:48:52 +00:00
s0600204 1e879527d3 Fix a redeclaration error with 9504f5c36a.
Reported by: @minohaka
This was SVN commit r20548.
2017-11-28 10:22:12 +00:00
s0600204 9504f5c36a Change var -> let and i++ -> ++i in rmgen wall builder and demo map
In a bid to reduce size of D900 patch.

`var` -> `let` change suggested by @elexis

Refs D900, #2944

This was SVN commit r20546.
2017-11-28 01:38:54 +00:00
Stan c6807e2fc0 Add new operators for onager by Alexandermb,
Reviewed by me and Lordgood.

This was SVN commit r20545.
2017-11-27 22:30:47 +00:00
Imarok 2877ae1c38 Fix oversight in 16afbf32c8 noticed by Geramoto
Reviewed by: bb
Refs: #4722
Differential Revision: https://code.wildfiregames.com/D1072
This was SVN commit r20544.
2017-11-27 19:51:21 +00:00
Imarok 215a102c27 Count Trained Cattle as resource and not as unit. Also only count the net amount of gathered/used food for cattle.
Reviewed by: temple
Fixes: #3948
Differential Revision: https://code.wildfiregames.com/D1052
This was SVN commit r20543.
2017-11-27 19:47:45 +00:00
Imarok aec1ff5493 Wild domestic animals should stay visible in FOW.
This is broken since 9d232fd39a.

Reviewed by: temple
Differential Revision: https://code.wildfiregames.com/D1071
This was SVN commit r20542.
2017-11-27 19:38:00 +00:00
elexis 5ce9a2f19d Rename gui/savedgames/ to gui/savegame/ so that the page XML filename always matches the directory name.
This was SVN commit r20541.
2017-11-27 18:50:06 +00:00
mimo f84d195b9d Fix Builder and ProductionQueue schemas inconsistencies
Reviewed By: bb
Differential Revision: https://code.wildfiregames.com/D1070
This was SVN commit r20540.
2017-11-27 18:42:46 +00:00
elexis 1375925367 Split locale and locale_advanced GUI page into two directories.
Include the entire directory instead of all files in the directory,
completing D619.

This was SVN commit r20539.
2017-11-27 18:05:34 +00:00
elexis 2b31ebad0d Cleanup summary screen init.
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.
2017-11-27 17:35:55 +00:00
elexis 63522189a0 Disjoint save and load GUI page.
Include the entire directory as in D619.

This was SVN commit r20537.
2017-11-27 17:02:24 +00:00
elexis c326b4fab6 Fix lineendings of the new files in 77a2f484a2, 0146c705ce, efd9b3e212.
This was SVN commit r20536.
2017-11-27 16:56:45 +00:00
elexis 9950e06d4c Include entire directories in GUI pages instead of a subset of the files contained, where possible.
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.
2017-11-27 16:29:23 +00:00
elexis 683723faf8 Fix whitespace of createDecoration calls.
Add one missing constraint in mainland of 822e37f70c.
Remove unneeded grass patch min/max angle value.

This was SVN commit r20532.
2017-11-27 01:30:19 +00:00
elexis ff6bb138ba Fix clFood and constraint argument forgotton in createFood calls of 822e37f70c as reported by temple.
Fix whitespace of all createFood calls while at it.

This was SVN commit r20531.
2017-11-27 00:25:04 +00:00
wraitii d0ca03d7ba Fix OSX compilation
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.
2017-11-26 16:50:21 +00:00
mimo 6a10797355 gamesetup panel should indicate the AI level without having to open the AI-config panel
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D1066
This was SVN commit r20529.
2017-11-26 14:42:10 +00:00
elexis 89055ef858 Delete GetCivData from MapGeneratorWorker.cpp which is redundant with the ReadJSONFile from 871ed04521.
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.
2017-11-26 13:30:57 +00:00
elexis ba8d1c6166 Fix Builder test following 3a5be78aa9, refs #4870.
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.
2017-11-26 11:51:59 +00:00
elexis 69b7f39bf1 Rename RMS to Engine.
This was SVN commit r20525.
2017-11-25 22:17:01 +00:00
bb 65fe9737b1 Enlarge dropdown size for the ingame gamespeed dropdown, so the scrollbar is hidden for replays.
Patch By: temple
Reviewed By: elexis, vladislavbelov
Differential Revision: https://code.wildfiregames.com/D1053
This was SVN commit r20524.
2017-11-25 19:01:42 +00:00
Itms 94db174b25 Fix the pkgconfig premake module when headers are force-included.
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.
2017-11-25 16:56:56 +00:00
mimo 3a5be78aa9 Units should only be able to build structures from their owner's civ, and not from their identity civ
Reviewed By: elexis
Trac Tickets: #4870

Differential Revision: https://code.wildfiregames.com/D1065
This was SVN commit r20521.
2017-11-25 16:22:03 +00:00
wraitii 60ae523f92 Fix territory borders not showing up on OSX when compiled with the lastest xCode.
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.
2017-11-25 12:48:37 +00:00
leper f7206dc77d More ScriptInterface const.
Reviewed By: elexis; some comments by bb
Differential Revision: https://code.wildfiregames.com/D863
This was SVN commit r20519.
2017-11-25 06:49:58 +00:00
elexis 60801158b5 Remove +1 in getPlayerTeam and areAllies of rmgen/ and -1 in the calls to that following 8097eeb8ab.
This was SVN commit r20517.
2017-11-25 00:37:41 +00:00
elexis 993869ffb8 Remove getTeamsArray copy from Island Stronghold (875a774da9) following the introduction of rmgen2 in 6d52a71d4a (d8ed6d828a).
(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.
2017-11-25 00:24:44 +00:00
elexis bbe1ddc5cf Corsica & Sardinia player placement simplification, refs 9016b8d866.
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.
2017-11-25 00:09:33 +00:00
vladislavbelov 0146c705ce Adds basic tests for the CinemaManager component
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D1013
This was SVN commit r20514.
2017-11-24 22:38:03 +00:00
elexis 713a26368e Remove +1 playerID offset in getCivCode and -1 offset in the calls to that following 8097eeb8ab.
This was SVN commit r20513.
2017-11-24 22:16:29 +00:00
elexis 446fef2b35 Delete FALLBACK_CIV "athen" and related code in rmgen/, refs #4034.
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.
2017-11-24 21:01:12 +00:00
mimo 817763f6ef petra: improve the way to detect that an ally is attacked
This was SVN commit r20511.
2017-11-24 20:08:04 +00:00
mimo 2662a0297a petra: decrease the number of trained siege units in easier difficulty levels
This was SVN commit r20510.
2017-11-24 19:58:55 +00:00
mimo 9687a7af1a AIManager: loads only the used templates when starting (or deserializing) a game
Discussed with leper

Differential Revision: https://code.wildfiregames.com/D1049
This was SVN commit r20509.
2017-11-24 19:13:28 +00:00
Stan c0439d04a2 New gaul stable
Reviewed by Lordgood.

This was SVN commit r20508.
2017-11-24 17:27:12 +00:00
elexis 4275a8a33c Unify two rmgen and GUI JSON file loading script functions, refs #4868.
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.
2017-11-24 17:19:16 +00:00
elexis 7a17a3152c Pass the size in meters of a terrain grid tile from Terrain.h to the rmgen JS code to avoid hardcoding thereof.
Refs #4034, D900
Differential Revision: https://code.wildfiregames.com/D1059
Reviewed By: s0600204
This was SVN commit r20504.
2017-11-23 20:54:48 +00:00
elexis 4734997098 Always generate the island on Phoenician Levant (by using 100 intead of 10 retries).
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.
2017-11-23 10:18:05 +00:00
bb e6dff349bd Fix scrollbare edgy-case and off by 1's in dropdown
Reviewed By: Imarok
Comments By: elexis
Differential Revision: https://code.wildfiregames.com/D1030
This was SVN commit r20500.
2017-11-21 20:07:23 +00:00
bb 2fa4457453 Allow walls to have rally-points
While at it also nuking some duplicate template entries

Patch By: temple
Differential Revision: https://code.wildfiregames.com/D1038
This was SVN commit r20498.
2017-11-21 17:06:48 +00:00
elexis 235f452765 Let units face away from the building they were trained or ungarrisoned from.
Uses the vector functions from 8ee2a8aca2 and fixes the TODO from
08db7ebe13 / 0aaddf62aa.

Differential Revision: https://code.wildfiregames.com/D1037
Patch By: temple
This was SVN commit r20497.
2017-11-21 16:22:09 +00:00
elexis 8ee2a8aca2 Add Vector2D angleTo and Vector3D horizAngleTo function.
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.
2017-11-21 16:17:30 +00:00
Stan 7e8849366b Remove useless ungiven specific names, add drop props for the briton workshop, and fixed a broken drop prop in the elephant stable that caused warnings. convert files from utf-8 with bom, to without. fixes 8ee600b979
This was SVN commit r20495.
2017-11-21 14:47:11 +00:00
Stan 70e7c5e806 Fix broken (as with wrong parent) template. noticed by Imarok
fixes c6356b41b4

This was SVN commit r20494.
2017-11-21 14:42:39 +00:00
LordGood c6356b41b4 mauryan range and workshop
This was SVN commit r20492.
2017-11-21 13:22:04 +00:00
Stan 4e8eac9857 Change onager footprint to better reflect its shape add player color and icon (Textures edited by WowGetOffYourCellPhone)
And change its specific name to onager

This was SVN commit r20491.
2017-11-21 09:23:32 +00:00
Stan 19c123b213 New tools made by Alexandermb + fix for the berry basket uv (UV was out of bounds, and since texture do not tile, it appeared stretched)
reviewed by Lordgood

This was SVN commit r20488.
2017-11-20 22:51:08 +00:00
mimo f737bc4be0 put back a line removed unintentionally in 1af6ccbd41
This was SVN commit r20487.
2017-11-20 18:32:55 +00:00
mimo 2bde5874a7 fix an inconsistency in 3b6c612975, noticed by leper
This was SVN commit r20486.
2017-11-20 18:30:21 +00:00
Stan 9cdf20f123 New goat mesh, reviewed by Lordgood and Wowgetoffyourcellphone.
Made on fatherbushido's request.

This was SVN commit r20485.
2017-11-20 17:14:47 +00:00
Stan b244e5db78 Fix broken fireraiser actor, and unify them. Use Alexandermb's units as placeholders for the time being.
This was SVN commit r20484.
2017-11-20 16:29:47 +00:00
Stan 23e750ac88 New siege fire animations for units, made by AlexanderMb and some cleanup in those files done by myself.
Reviewed by Lordgood

This was SVN commit r20483.
2017-11-20 16:28:45 +00:00
Stan f132e1ca66 Add new textures for Pureon's onager, so it can be used as a unit, or as a prop.
This was SVN commit r20482.
2017-11-20 16:08:11 +00:00
mimo 3b6c612975 allow the ai to run without loading all templates at startup (not yet enabled).
This was SVN commit r20480.
2017-11-19 19:05:54 +00:00
mimo 1af6ccbd41 petra: a few tunings and add a protection in tradeRoute serialization in case a market was destroyed in the last few turns between AI running and serialization
This was SVN commit r20479.
2017-11-19 14:56:22 +00:00
mimo cfa3f4a993 petra: cleanup of a142dfa2df (treat all events of hq and baseManager in a same place)
This was SVN commit r20478.
2017-11-19 14:43:41 +00:00
elexis 4aa1632365 Rename oWood to oWoodTreasure et cetera on random maps to prevent confusion with resource templates.
This was SVN commit r20477.
2017-11-18 15:43:24 +00:00
elexis 8f4363f146 Split uncommon random map playerbase terrain code from the common playerbase starting entities code.
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.
2017-11-18 15:35:29 +00:00
elexis 46979b52a9 Fix units getting wet feet on Corinthian Isthmus due to an unrightful right angle in b0bd645fbb until rubber boots are implemented.
This was SVN commit r20475.
2017-11-18 15:25:59 +00:00
mimo a142dfa2df petra: some tweaks for playing on nomad maps (mainly delaying some strategic choices after the cc is built)
This was SVN commit r20474.
2017-11-17 19:20:18 +00:00
elexis b10f2b5a62 Move all units (which only is the Mustang plane) from the templates/other/ directory to the templates/units/ directory, refs #4770.
Differential Revision: https://code.wildfiregames.com/D1007
Patch By: Nescio
Comments By: fatherbushido, leper
This was SVN commit r20473.
2017-11-17 17:15:11 +00:00
elexis 74b83e9634 On both Deep Forest (83422923aa) and Schwarzwald (49194819f6) random maps, replace the copy of the magic number approximating the engine constant specifying the impassable map border tiles with a passability check from the library. Refs #4814, #4805.
Remove the duplication of the subsequent createArea call as in
376d8b3d1e.

This was SVN commit r20472.
2017-11-17 16:09:31 +00:00
bb 722578fdcd Cleanup the conquest code
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.
2017-11-17 11:38:51 +00:00
elexis b0bd645fbb Unify the other axis of the 8 remaining playerPlacementRiver calls following f1e352927c, refs #4805.
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.
2017-11-17 03:11:12 +00:00
elexis eb96b61954 Add rotateAround Vector2D function.
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.
2017-11-17 00:10:29 +00:00
elexis a2f7dba96c Move simulation test for approximate equality from e18598cd62 to the test setup, so that it can be reused.
Remove unneeded helper variable from e18598cd62 as intended by
7778a7b436 by using the set method.

This was SVN commit r20467.
2017-11-16 23:54:38 +00:00
elexis 05ea4c84d8 Unify 7 variants of the rmgen player line-positioning code, refs #4805.
Drop the negligible per-player location randomization on Latium.

This was SVN commit r20466.
2017-11-16 17:54:38 +00:00
elexis db9a52b94a Fix some unintended obliteration in efd9b3e212.
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.
2017-11-16 17:33:59 +00:00
elexis 5cfd4382dd Delete unused "blank" random map script from 0e0ed94926 which doesn't have an accompanying json file either.
This was SVN commit r20464.
2017-11-16 13:51:58 +00:00
elexis 5256d8497e Survival Of The Fittest cleanup:
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.
2017-11-16 13:11:03 +00:00
bb 0a6d78ddd5 Allow loot to be modified by technologies and auras
Patch By: Grugnas
Commented on By: fatherbushido, elexis
Differential Revision: https://code.wildfiregames.com/D408
This was SVN commit r20462.
2017-11-15 22:56:04 +00:00
mimo 446889bc52 workshop repair aura
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D1043
This was SVN commit r20461.
2017-11-15 22:33:27 +00:00
mimo 34d7477b5b petra cleanup following 77a2f484a2
This was SVN commit r20460.
2017-11-15 22:31:25 +00:00
bb 77a2f484a2 Rearrange tower templates
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.
2017-11-15 21:16:17 +00:00
Stan 013a93293b New bows and arrows for every civ ! Blendfiles are in the repo.
Reviewed by LordGood and partially WGOYCP
Thread :
https://wildfiregames.com/forum/index.php?/topic/21546-enhancement-macedonian-helmets/&page=2

This was SVN commit r20458.
2017-11-15 20:56:56 +00:00
mimo 1447bfbd7c Workshop templates reorganization
Discussed with elexis and Nescio

Differential Revision: https://code.wildfiregames.com/D1031
This was SVN commit r20457.
2017-11-15 18:44:23 +00:00
elexis f5f094602f Fix typo in e596ef6011, fixes #4851.
This was SVN commit r20456.
2017-11-15 18:38:18 +00:00
mimo 93be4091cc petra: look for initial treasures at start game, sometimes needed on nomad maps to build the first cc
This was SVN commit r20455.
2017-11-15 18:27:50 +00:00
elexis 57e547bd32 Split vector test scopes to make it easier to add tests in between, refs 99494251a1.
This was SVN commit r20454.
2017-11-15 12:47:48 +00:00
Stan 260c78cc1a Fix an issue with the woman basket having a hole at the bottom. Use a different actor for gathering, as the previous basket was tilted on the wrong side. Slightly tweak the tip of the basket to look like there is a hole in it. Fix indent in the file.
This was SVN commit r20452.
2017-11-14 20:31:25 +00:00
bb 62c8403eab Fix some SelectionGroupNames
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.
2017-11-14 19:21:58 +00:00
Stan 72e2d0440e Remove ram from fortress to let people in charge of balancing make the call on whether it should be added to the civ or not.
Add Alexandermb to the list of 3D contributors.
Thanks elexis for raising concerns

This was SVN commit r20450.
2017-11-14 18:48:13 +00:00
mimo 6b4d73f6df ai cleanup: move some functions from Entity to template where they should have been
This was SVN commit r20449.
2017-11-14 17:38:05 +00:00
Imarok 15ff2f0ca9 unitActions is a global variable (unitActions --> g_UnitActions)
Reviewed By: O8 JS GUI, elexis
Differential Revision: https://code.wildfiregames.com/D1012
This was SVN commit r20448.
2017-11-14 13:43:14 +00:00
Imarok fb8aa3ef19 Not so small input.js (originally been batch training) cleanup
* 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.
2017-11-14 13:30:01 +00:00
Stan 3e9b7fa5fa New ram for Mauryans, by AlexanderMB, with a new icon. This mechanical unit is now trainable in the fortress.
Blend file + Icon xcf committed to the art repository

This was SVN commit r20446.
2017-11-14 12:53:45 +00:00
mimo 72e2cbeb3a Fix Ptolemy catapult packing entity
Patch by temple

Reviewed By: mimo
Differential Revision: https://code.wildfiregames.com/D1032
This was SVN commit r20445.
2017-11-13 17:55:24 +00:00
Stan d53cde2c8c New Brittonic workshop + compressed blendfile with packed textures
Reviewed by LordGood

This was SVN commit r20443.
2017-11-12 21:28:31 +00:00
Stan 68996d5749 Remove some specific useless specific names from my previous commits
This was SVN commit r20442.
2017-11-12 21:25:43 +00:00
wraitii 62f07098ea Introduce a new hotkey to order only one unit from the current selection.
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.
2017-11-11 17:20:37 +00:00
Itms 82d6256171 Silence build output with third-party libs on Unix during Jenkins builds.
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D958
This was SVN commit r20440.
2017-11-11 16:21:30 +00:00
elexis a39aae833b Tidy up rmgen point location randomization and retry loops.
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.
2017-11-11 14:54:10 +00:00
wraitii f60f58d3d6 Use the rangeManager's subdivisions in the obstruction manager shape tests
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.
2017-11-11 11:14:39 +00:00
elexis c56f0976bd Unify rmgen modifyTilesBasedOnHeight (d970c5019a) with the HeightPlacer (24f02d97eb).
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.
2017-11-10 22:29:04 +00:00
mimo 8eb7aa368b petra: remove an old hack against rabbits as its template was modified some time ago
This was SVN commit r20436.
2017-11-10 17:37:30 +00:00
elexis db1d94bad0 Further clarify geometric meaning of the river painting in a9b963c3a5 and e596ef6011.
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.
2017-11-10 17:17:59 +00:00
elexis d33130d8d6 Prevent the mountains on the Unknown map variant "Passes" from becoming passable to only one player. Fixes #4060.
This was SVN commit r20434.
2017-11-10 15:37:21 +00:00
elexis 54460e926b Fix straggler trees on Phoenician Levant following ac8f4f49fc and remove two unused variables.
This was SVN commit r20433.
2017-11-10 13:19:53 +00:00
bb ae74075a22 Rename TriggerHelper.EntityHasClass to TriggerHelper.EntityMatchesClassList
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.
2017-11-10 12:14:16 +00:00
elexis ea404a8825 Credit mmayfield45 for the Ardennes Forest map from 9272153ee7 after the JS note was removed in 62b7c07353.
This was SVN commit r20430.
2017-11-09 22:19:53 +00:00
elexis e596ef6011 Extend the random map river algorithm (7d0cc59136) to allow arbitrary start and end points.
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.
2017-11-09 19:08:31 +00:00
elexis b3dbcc457b Add Vector3D crossproduct and Vector2D perpendicular function.
Describe geometric features of the two cross- and dot-product functions.

This was SVN commit r20428.
2017-11-09 19:04:39 +00:00
LordGood 8ee600b979 Carthaginian range, workshop, elephant stable, mauryan stable, babylonian defense tower
This was SVN commit r20427.
2017-11-08 22:24:51 +00:00
Stan a35da35c33 "Remove History string wrongly re-added in previous commit and height tag, which is inherited from the parent template"
This was SVN commit r20426.
2017-11-08 22:00:11 +00:00
Stan 28b2bd9d03 New Brittonic storehouse + compressed blendfile with packed textures
Reviewed by LordGood & Enrique

This was SVN commit r20425.
2017-11-08 21:31:54 +00:00
vladislavbelov aa6617f431 Removes a buffer_zone from the game speed dropdown, introduced in 16de5c75ac
This was SVN commit r20423.
2017-11-07 23:13:42 +00:00
mimo 34557b5bb8 petra: few tunings
This was SVN commit r20422.
2017-11-07 19:11:06 +00:00
mimo dcdc89056f remove town_phase from crannog techs as this tech is required to build the crannog, and that gives a weird structree
This was SVN commit r20421.
2017-11-07 17:36:45 +00:00
elexis efd9b3e212 Obliterate Unknown (0d0bc32736), Unknown Land (25682da568) and Unknown Nomad (7f8adcf8cb) triplication of doom, fixes #4317.
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.
2017-11-07 17:11:51 +00:00
elexis 280a797620 Fix reference error in cfdd37f6d9 by computing that value independent from prior code.
This was SVN commit r20419.
2017-11-07 16:20:43 +00:00
Stan 680186478e New Brittonic range + compressed blendfile with packed textures
Reviewed by LordGood

This was SVN commit r20418.
2017-11-06 22:40:03 +00:00
elexis 75c479d3cb Unify Caledonian Meadows and Wild Lake player location duplication from ca654e3f79 / 8d4af29faf, refs #4805.
Move getOrderOfPointsForShortestClosePath from library.js to math.js,
refs #4804 and name it sortPointsShortestCycle.

This was SVN commit r20417.
2017-11-06 13:51:43 +00:00
elexis 6fb6a65fc5 Move rmgen player location functions from library.js to player.js, refs #4804.
Doesn't change the code besides abstracting distributePointsOnCircle and
attempting to improve the documentation, refs #4831.

This was SVN commit r20416.
2017-11-06 13:40:10 +00:00
elexis df14c914e6 Move starting player entity rmgen functions from misc.js to a new player.js, refs #4804.
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.
2017-11-06 12:17:56 +00:00
Stan a10b8e16c2 New Brittonic stable + compressed blendfile with packed textures
Reviewed by LordGood

This was SVN commit r20414.
2017-11-05 22:51:58 +00:00
mimo 567c485d92 petra: fix 86b9159609 (typo and deserialization)
This was SVN commit r20413.
2017-11-05 21:08:37 +00:00
elexis b1e8036f35 Cleanup gate locking GUI code of 013ab4bda7.
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.
2017-11-05 16:59:09 +00:00
elexis 6a890127f6 Unify 5 copies of the tributary river placement code, refs #4805.
This was SVN commit r20411.
2017-11-05 15:51:40 +00:00
elexis cfdd37f6d9 Move landscape generation functions from misc.js to gaia_terrain.js, refs #4804.
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.
2017-11-05 13:56:21 +00:00
mimo 86b9159609 petra: revisit the management of constructions for better performances and cleaner implementation
This was SVN commit r20409.
2017-11-05 13:56:16 +00:00
elexis 4562bc998c Fix wrong dock owner (off-by-1) in Migration in 376d8b3d1e, fixes #4837.
This was SVN commit r20408.
2017-11-05 11:06:26 +00:00
elexis ac8f4f49fc Delete the remains of rmgen/utilityfunctions.js, refs #4804 by
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.
2017-11-04 13:04:54 +00:00
elexis 822e37f70c Remove references from the random mapgen library to terrain globals of maps.
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.
2017-11-04 11:17:23 +00:00
fatherbushido 17b50a2aa7 Remove duplicated builder list.
Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D1008
This was SVN commit r20404.
2017-11-03 17:23:44 +00:00
fatherbushido 22d1481cf5 Template organization: move some structures from other/ to structures/
Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D1002
This was SVN commit r20403.
2017-11-03 11:00:07 +00:00
fatherbushido 4104bf6ce0 Fix a typo.
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D1005
This was SVN commit r20402.
2017-11-03 10:22:27 +00:00
elexis 886096e215 Use @file JSDoc tag for the rmgen library, so that these comments are distinguished from block tags about globals, refs #4831.
Cleanup Area class.

This was SVN commit r20400.
2017-11-02 17:35:19 +00:00
mimo 2ead236afe petra: allow elephant stables for all civs, and some internal cleanups
This was SVN commit r20399.
2017-11-02 16:16:11 +00:00
mimo bff1f33bfd template organization: elephant stables
Patch by: Nescio
Reviewed By: mimo
Differential Revision: https://code.wildfiregames.com/D1001
This was SVN commit r20398.
2017-11-02 15:58:19 +00:00
elexis 63e77de94e Use only one coordinate system for locations in the rmgen system.
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.
2017-11-01 22:59:27 +00:00
elexis 1f36686e6c Move checkIfIntersect and distanceOfPointFromLine from misc.js to math.js (because the latter should only contain terrain and entity placement utilities), refs #4804.
Delete unused getGradient and move getAngle from library.js to math.js.

This was SVN commit r20395.
2017-11-01 22:30:03 +00:00
elexis c7fee7f04f Remove wrong tension comment from a482f7bc1e and mention that this functon can compute a cardinal spline.
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.
2017-11-01 16:02:08 +00:00
fatherbushido de1bb8a766 Move out of world promoted, packed and upgraded entity as they are not destroyed immediately. So they don't interact with the 'physical' world. Refs #4595.
Differential Revision: https://code.wildfiregames.com/D590
Reviewed By: wraitii
This was SVN commit r20393.
2017-11-01 14:55:18 +00:00
mimo 502ebdbe42 Adapt trade gain normalization to map size (increased on small maps and decreased on large maps), and slow down the increase of the gain at very large distances.
Reviewed By: Grugnas
Differential Revision: https://code.wildfiregames.com/D879
This was SVN commit r20391.
2017-10-31 17:52:08 +00:00
mimo bbac905de8 petra cleanup
This was SVN commit r20390.
2017-10-31 17:43:28 +00:00
mimo 4b0709c00c petra: allows stables and siege workshops build orders for all civs
This was SVN commit r20389.
2017-10-31 17:24:56 +00:00
elexis f41a9bb2c4 rmgen cleanup.
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.
2017-10-31 14:11:09 +00:00
elexis cdb8bd2100 rmgen cleanup.
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.
2017-10-31 13:42:56 +00:00
elexis cba0022560 rmgen cleanup.
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.
2017-10-31 13:06:15 +00:00
elexis a19aaed550 Move catafalque relic templates from the "other" directory to the regular units directory.
Differential Revision: https://code.wildfiregames.com/D994
Refs #4770, D152, D269
Patch By: Nescio
Some comments by fatherbushido

This was SVN commit r20385.
2017-10-31 11:44:24 +00:00
elexis a482f7bc1e Extend the cubicInterpolation function to consume a tension argument allowing to modulate the smoothness of the interpolation.
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.
2017-10-30 20:43:01 +00:00
vladislavbelov 71a5ebe1c9 Adds a missed initialisation in 7e239f38a3.
This was SVN commit r20382.
2017-10-30 19:32:16 +00:00
Itms 7d1f56e617 Migrate to premake5, fixes #3729.
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.
2017-10-30 13:52:05 +00:00
vladislavbelov 7e239f38a3 Adds a wireframe mode to the water rendering.
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D769
This was SVN commit r20378.
2017-10-30 00:02:29 +00:00
vladislavbelov 38d09ce35c Adds a perspective matrix, refracts a matrix projection setup to prepare for an isometric view.
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D971
This was SVN commit r20377.
2017-10-29 23:41:59 +00:00
elexis cd1b40f295 Consistently use utf8 instead of iso-8859-1 encoding in XML files.
Differential Revision: https://code.wildfiregames.com/D622
Reviewed By: Dunedan
This was SVN commit r20376.
2017-10-29 17:18:32 +00:00
elexis 2374c0bc10 New unit selection textures for the healer and mods/future usage.
Differential Revision: https://code.wildfiregames.com/D889
Patch By: Nescio
Reviewed By: wowgetoffyourcellphone
This was SVN commit r20374.
2017-10-29 14:10:38 +00:00
fatherbushido c4cf9efad0 Add a unit test to EntityLimits component. Refs 1f10d2a711.
Differential Revision: https://code.wildfiregames.com/D987
This was SVN commit r20373.
2017-10-29 08:06:45 +00:00
fatherbushido 1f10d2a711 Fix an issue with upgrade and entity limits.
Reviewed by: wraitii
Differential Revision: https://code.wildfiregames.com/D960
This was SVN commit r20372.
2017-10-29 08:03:43 +00:00
elexis f5b978f5c2 Document the rmgen Map class, refs #4831
(excluding the height handling which needs revision and functions that
should be relocated).

This was SVN commit r20371.
2017-10-29 06:25:06 +00:00
elexis 5c0c11b20a Construct the final object containing the random map data in ExportMap passed to the engine in place instead of scattering that in multiple functions of multiple files.
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.
2017-10-29 05:29:04 +00:00
elexis 7b93690c76 Fix few typos found with the Debian lintian tool.
Differential Revision: https://code.wildfiregames.com/D973
Differential Revision: https://code.wildfiregames.com/D974
Differential Revision: https://code.wildfiregames.com/D975
Patch By: LudovicRousseau
Reviewed By: Dunedan, bb
This was SVN commit r20369.
2017-10-28 22:34:57 +00:00
elexis 3647200e8f Remove min/max mapsize constants from the rmgen library, refs #4034.
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.
2017-10-28 17:37:09 +00:00
bb c72d2b6dc0 Allow attack and attack_impact sounds for multiple attacks
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.
2017-10-28 16:52:37 +00:00
Itms b856281197 Alpha 12 version of Premake 5, including prebuilt binary for Windows.
Directly taken from https://premake.github.io/.

Refs #3729.

This was SVN commit r20366.
2017-10-28 16:10:49 +00:00
Itms e87517be69 Add our script for building patches with Jenkins to version control.
Refs #4419.
Reviewed By: leper, elexis
Differential Revision: https://code.wildfiregames.com/D18
This was SVN commit r20365.
2017-10-28 15:54:44 +00:00
Itms 7e0d19cd7a Linting with Coala.
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.
2017-10-28 15:30:37 +00:00
fatherbushido 1033e105f0 Tweak a bit citizen cavalry costs. Follow the same infantry vs cavalry policy as for champs and heros. Motivations are: infantry vs cavalry consistency (from the abstract unit role point of view), preventing some unbalances, enforcing a more realistic infantry vs cavalry ratio in game.
Accepted by: Nescio, Grugnas
Differential Revision: https://code.wildfiregames.com/D983
This was SVN commit r20363.
2017-10-28 10:33:01 +00:00
elexis f5375cbcb9 Delete _kali's Alpha 21 maps since it is not certain that they are not derived works, refs D957, 33e3e6c2ab, 34c26767ca, f61f051d74, c70975b116, a68881dd0f, 64b1da0ddf, 127ca4e177, #4226.
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.
2017-10-27 19:26:46 +00:00
elexis 24f02d97eb Move the HeightPlacer from the Schwarzwald map (49194819f6) to the placer library, refs #4804.
Remove the unneeded NullConstraint check.

This was SVN commit r20361.
2017-10-27 15:32:22 +00:00
elexis 6677f2bfe1 Rename placer.js to placer_centered.js and pathplacer.js to placer_noncentered.js, refs #4804.
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.
2017-10-27 12:40:30 +00:00
elexis 93b2211d17 Move SimpleObject and RandomObject from placers.js to a new file, because they aren't Placers, refs #4804.
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.
2017-10-26 23:51:54 +00:00
elexis c136848b74 Fix lineendings of new files and the ones in source/ that didn't receive the eol property yet.
To confirm, use svn diff -r 20355:20356 -x "-w --ignore-eol-style"
--ignore-properties  | less

This was SVN commit r20356.
2017-10-26 17:03:29 +00:00
elexis f6c2ea6b0e Move SimpleGroup and RandomGroup from placers.js to a new file, because they aren't Placers, refs #4804.
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.
2017-10-26 16:47:07 +00:00
elexis 77f28c5a56 Remove SemiRandomElevationPainter from Pyrenean Sierra, which is a painful straight copy of the SmoothElevationPainter introduced in a796800bb1, refs #4805.
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.
2017-10-26 13:50:28 +00:00
elexis 8d49497671 Replace SmoothElevationPainter 8/9 weights with 1, so that the elevation of a heightmap grid vertex is exactly the average of the new elevation and the average of the existing elevation of the 9 vertices that are the current vertex or adjacent to it.
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.
2017-10-26 13:25:51 +00:00
LordGood 40289e4a1a band-aid for a couple spartan building's garrison points. actual fixes still needed
This was SVN commit r20352.
2017-10-26 13:16:50 +00:00
elexis 21ea4c3173 Do not use the spread operator in the AI euclidian distance helper function which made it 200 times slower, as reported.
(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.
2017-10-26 12:56:51 +00:00
elexis ed0fb223b2 Unify duplicate Breadth-First-Search traversing of the LayeredPainter and SmoothElevationPainter in a new helper function, refs #4805, making it much more comprehensible what each part does.
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.
2017-10-26 12:37:02 +00:00
elexis 007748d9b3 Move ElevationPainter and SmoothElevationPainter constants above the SmoothElevationPainter, refs #4804 and define them, refs #4831.
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.
2017-10-26 11:51:54 +00:00
vladislavbelov cb6c571c2d Fix bottom corners alignment in Modern dialog
Reviewed By: elexis, vladislavbelov
Differential Revision: https://code.wildfiregames.com/D982
This was SVN commit r20348.
2017-10-25 20:53:40 +00:00
elexis 7c89acc2ed Add rmgen Painter definitions, refs #4831.
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.
2017-10-25 13:56:46 +00:00
fatherbushido 6c9c9f728f Missing added files in 266ddfa8da. Noticed by Imarok.
This was SVN commit r20346.
2017-10-25 09:30:05 +00:00
fatherbushido 266ddfa8da Display fruit tree as fruit and not as wood on the minimap. Rework a bit inheritence of fruit tree and of wood bushes. The noticeable change is that fruit tree block movement as other trees.
Patch by: Temple
Differential Revision: https://code.wildfiregames.com/D845
This was SVN commit r20345.
2017-10-25 08:05:53 +00:00
LordGood c5ccdccfc4 seleucid elephant stable and carthaginian regular stable. fixed persian hay cart
This was SVN commit r20342.
2017-10-24 23:40:30 +00:00
Imarok 66a357f286 The server should choose the guid
Reviewed by: elexis
Differential Revision: https://code.wildfiregames.com/D943
This was SVN commit r20341.
2017-10-24 22:05:24 +00:00
LordGood 4e2866baeb seleucid,persian, and stan's iberian models, actors, and templates. persian ballista tower in there for a goof. little seleucid house edit
This was SVN commit r20339.
2017-10-24 13:49:39 +00:00
elexis 5cc9e998e0 Remove abstract rmgen Terrain class that was inherited by SimpleTerrain and RandomTerrain.
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.
2017-10-24 03:24:05 +00:00
elexis ba65661f3e Define rmgen Entity class, refs #4831.
Make playerID non-optional.
Move default orientation code to the function header.
Add missing quotes.

This was SVN commit r20337.
2017-10-24 03:09:42 +00:00
elexis 86d3cdf2d5 Define rmgen Constraints, refs #4831.
Use an array function instead of a loop.

This was SVN commit r20336.
2017-10-24 03:06:05 +00:00
elexis 0c9205e5b8 Fix missing [] to undefined replacement in b4503bb61e that was never noticeable because Terrain.place overwrites it on every tile of every map.
Fix wrong variable name in 45bb3d2a43.

This was SVN commit r20335.
2017-10-23 14:45:26 +00:00
fatherbushido 0ddfe51b55 Tweak a bit Scipio's aura radius. Patch by temple. Reviewed by Grugnas.
Differential Revision: https://code.wildfiregames.com/D737
This was SVN commit r20334.
2017-10-23 14:05:07 +00:00
bb f55aac2521 Make the biome setting visible for mp clients.
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D979
This was SVN commit r20333.
2017-10-23 12:34:13 +00:00
elexis 1a896f531a Add diskArea rmgen helper function and use it instead of Math.PI * Math.pow(radius, 2).
Use getMapArea instead of mapSize*mapSize.

This was SVN commit r20332.
2017-10-23 10:39:32 +00:00
elexis 1dee1eced9 Remove rmgen euclidian distance helper function, refs 6590f301c2 / D969.
Use Math.square(x) instead of Math.pow(x, 2) in places that don't
multiply it with Math.PI.

This was SVN commit r20331.
2017-10-23 10:13:49 +00:00
fatherbushido 32812f0974 Add unit tests to the EntityLimits component.
Differential Revision: https://code.wildfiregames.com/D970
This was SVN commit r20329.
2017-10-23 06:27:00 +00:00
elexis 6590f301c2 Add Math.square to compute the square of a number without the need to repeat the term, without using the slower Math.pow.
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.
2017-10-22 20:46:41 +00:00
vladislavbelov 67e27ed7ea Atlas: Cleanup horizontal alignment flags being ignored, fix warnings on a start.
Fix #3824
Patch by: Clockwork-Muse.
Reviewed by: vladislavbelov.
Differential Revision: https://code.wildfiregames.com/D824
This was SVN commit r20327.
2017-10-22 20:09:28 +00:00
fatherbushido ad7d7ec1e9 Fix a disabled template manager test.
Fix #4522
Patch by: Sandarac.
Reviewed by: elexis.
Differential Revision: https://code.wildfiregames.com/D968
This was SVN commit r20326.
2017-10-22 15:39:50 +00:00
LordGood aeaf3d1f43 Persian range and Stan's Iberian stables. Template edited for Iberian range.
This was SVN commit r20325.
2017-10-21 21:12:23 +00:00
elexis 56ba3e4416 Show stacktrace too in case custom JS exceptions are thrown.
This was SVN commit r20324.
2017-10-21 20:38:10 +00:00
mimo 3c2f5ca5a6 rework a bit D964
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D967
This was SVN commit r20323.
2017-10-21 19:05:52 +00:00
Imarok 6c5a8269f3 Fix some style issues noticed by our linter
Reviewed By: bb
Differential Revision: https://code.wildfiregames.com/D585
This was SVN commit r20322.
2017-10-21 17:31:05 +00:00
Imarok 5f0a0fbbef Add id for IQ stanzas
Patch by: Dunedan
Differential Revision: https://code.wildfiregames.com/D899
This was SVN commit r20321.
2017-10-21 14:11:25 +00:00
mimo 23893415d1 Unify trade gain computation between simulation and ai
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D964
This was SVN commit r20320.
2017-10-21 08:40:11 +00:00
mimo e5ec6d0bff petra: allow gatherers to switch to a nearer resource when slots become available
This was SVN commit r20319.
2017-10-20 18:06:12 +00:00
Imarok 00ce80a1b8 Gamesetup unification variable renaming
Reviewed by: bb
Differential Revision: https://code.wildfiregames.com/D429
This was SVN commit r20318.
2017-10-20 16:04:24 +00:00
elexis 7e0b54a36b Fix collisions of random resources and starting base resources on the Corinthian Isthmus random map script, refs #4600.
This was SVN commit r20316.
2017-10-19 22:52:23 +00:00
LordGood 11c52a255f few minor edits to the spartan range and workshop, added template tree for future ranges, stables, and workshops and assigned new actors to them
This was SVN commit r20315.
2017-10-19 21:41:25 +00:00
fatherbushido 2beea46de7 Revert a naked fanatic armor nerf done in 2e5138bad9. It has now the same armor as other champions but don't have the armor bonus of spearmen. Requested by Feldfeld, borg-, Grugnas.
This was SVN commit r20314.
2017-10-19 18:04:07 +00:00
LordGood b389c9f846 whoops! coulda sworn i had these checked. missing .dae files restored
This was SVN commit r20313.
2017-10-18 19:32:39 +00:00
LordGood fe1401ec3d Last of the Spartan buildings, wow's normal fix, and Stan's archery range
This was SVN commit r20312.
2017-10-18 18:34:11 +00:00
mimo a37d8807f6 petra: some performance optimizations
This was SVN commit r20311.
2017-10-18 17:45:04 +00:00
mimo dc40f711db ai: remove some unused filter stuff + cleanup
This was SVN commit r20310.
2017-10-18 17:00:38 +00:00
elexis 99066df0c5 Unify beyond ridiculous Snowflake Searocks duplication gore, refs a9b963c3a5.
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.
2017-10-17 10:23:54 +00:00
elexis d79fdd75df Unify duplicate Corsica & Sardinia island generation, refs 9016b8d866.
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.
2017-10-17 00:21:38 +00:00
bb 5b72870745 Enlarge default sidebar size, so everything is visible by default
Accepted By: elexis
Differential Revision: https://code.wildfiregames.com/D855
This was SVN commit r20305.
2017-10-16 13:07:07 +00:00
LordGood 442e9a9184 corral and possible theatron fix?
This was SVN commit r20303.
2017-10-16 02:14:00 +00:00
elexis dd03ec801f Fix wrong forest type replacement in the prior commit (376d8b3d1e).
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.
2017-10-15 19:27:24 +00:00
elexis 376d8b3d1e Cleanup most createArea and some createObjectGroup calls in random map scripts.
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.
2017-10-15 17:53:12 +00:00
mimo e396ff170e No need to create aura's rangequery when the aura is not applied
Reviewed By: fatherbushido
Differential Revision: https://code.wildfiregames.com/D963
This was SVN commit r20300.
2017-10-15 15:14:11 +00:00
mimo 2cf88d79a4 Ranged auras not enabled (because of a tech requirement for example) should not be visualized
Reviewed By: fatherbushido
Differential Revision: https://code.wildfiregames.com/D962
This was SVN commit r20299.
2017-10-15 09:28:18 +00:00
LordGood 3242d5dae7 Spartan buildings
This was SVN commit r20298.
2017-10-15 04:00:27 +00:00
elexis 8062b7fa6d Unify Cycladic Archipelago Island duplication in a helper function createCycladicArchipelagoIsland, refs #4805, ac4e25e17f.
Do not place starting resources but random resources on non-player
islands.

This was SVN commit r20297.
2017-10-15 01:18:59 +00:00
elexis 6273d111fe Corsica & Sardinia cleanup.
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.
2017-10-14 21:04:29 +00:00
elexis 4256744e26 Replace hardcoded trigonometry magic numbers on Corinthian Isthmus with a rotateCoordinates computation, allowing to change the river angle arbitrarily.
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.
2017-10-14 15:55:04 +00:00
elexis 6656ec6de6 Remove about 360 unused variables in random map scripts, refs #4805.
Remove unused hasTextureInRadius from 9016b8d866.

This was SVN commit r20294.
2017-10-14 14:25:53 +00:00
elexis 8dc6ed427d Fix string format of the JS test assertion failure following 7c2e9027c2 (cxxtest expects a char* instead of a std::wstring, so newlines were printed as \n characters).
Differential Revision: https://code.wildfiregames.com/D952
Fixes #4807

This was SVN commit r20292.
2017-10-13 21:56:45 +00:00
mimo b8e9dbca0c petra: tune requirements when building defenses
This was SVN commit r20291.
2017-10-13 17:59:30 +00:00
elexis dcc7b1b056 Fix collisions of random forests and mines with starting resources on Cycladic Archipelago and the Lion's Den. Refs #4600.
This was SVN commit r20290.
2017-10-13 14:56:44 +00:00
Imarok c965a7c723 Only close the diplomacy window on succesfull bribe
Reviewed by: bb
Differential Revision: https://code.wildfiregames.com/D171
This was SVN commit r20289.
2017-10-13 10:58:29 +00:00
mimo 3c285a5c54 Wrong FSM state when a unit is captured while unpacking during an attack
Reviewed By: leper
Differential Revision: https://code.wildfiregames.com/D954
This was SVN commit r20287.
2017-10-11 16:33:31 +00:00
elexis b7bf55f054 Fix incorrectly replaced unrelated magic number in 3a1c5669f8, refs #4814.
This was SVN commit r20286.
2017-10-11 15:04:22 +00:00
elexis 024d0e8f34 Fix rmgen2 bug in 6d52a71d4a revealed by the 1* removal in a1949d0b86.
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.
2017-10-11 14:42:56 +00:00
elexis 3a1c5669f8 Fix rmgen2 SimpleObject and RandomObject ignoring the 3 invalid map border tiles.
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.
2017-10-11 01:48:12 +00:00
mimo 13b2858259 petra: remove a useless arbitrary historical classes separation
This was SVN commit r20282.
2017-10-10 17:35:40 +00:00
elexis a1949d0b86 Remove rmgen2 defautls that are and should always be given (that could have been inlined in the function header).
Remove 1 * x multiplication, replace scaleByMapSize(x, x) with x.

This was SVN commit r20281.
2017-10-10 10:43:19 +00:00
elexis 0517c34bc8 Delete an unneeded initForestFloor found by leper in 9e931b6fbe.
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.
2017-10-10 10:32:02 +00:00
elexis 9e931b6fbe Remove confusing rmgen2 g_MapInfo and initMapSettings, fixes #4813.
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.
2017-10-09 21:21:35 +00:00
LordGood 87ff880445 fixed a few errors and complaints regarding new spartan structures
This was SVN commit r20277.
2017-10-09 19:42:10 +00:00
mimo 6db2590858 Cache a list of TerritoryDecay components in the TerritoryDecayManager instead of retrieving it each time
Reviewed By: bb
Differential Revision: https://code.wildfiregames.com/D951
This was SVN commit r20276.
2017-10-09 19:38:56 +00:00
fatherbushido 49b7d6fb95 Test integer validation.
Reviewed By: leper
Differential Revision: https://code.wildfiregames.com/D947
This was SVN commit r20274.
2017-10-09 07:00:31 +00:00
LordGood e63a938529 first commit for Spartan buildings
This was SVN commit r20273.
2017-10-08 17:06:31 +00:00
elexis e18598cd62 Fix Vector.js rotate oversight in 7778a7b436 (this.x may not be modified before reading again and sin/cos should not be computed twice).
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.
2017-10-08 15:25:21 +00:00
Imarok 8bbe94c926 Add spies to the summary screen
Patch by: mmoains
Fixes: #4498
Differential Revision: https://code.wildfiregames.com/D567
This was SVN commit r20271.
2017-10-08 11:35:55 +00:00
mimo 9885cc5b79 petra: tune the proportion of support workers
This was SVN commit r20269.
2017-10-07 08:50:31 +00:00
mimo b5e3b83c9e Add a TerritoryDecayManager component to update territoryMap with the blinking state when territories are recomputed. That's needed by the AI which was up to now not aware of blinking cells.
Differential Revision: https://code.wildfiregames.com/D910
This was SVN commit r20268.
2017-10-07 08:42:39 +00:00
bb af9c25f879 Fix option page tabs xml style.
Following dd7f38e370 and 3312a83f82

Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D949
This was SVN commit r20266.
2017-10-06 20:50:00 +00:00
elexis 1fcdc3d7f4 Deepfreeze the map settings object (created from g_GameAttributes.settings by the gamesetup extending the map JSON data) to prevent random map scripts from unintentionally modifying that, refs #4257.
This was SVN commit r20265.
2017-10-06 18:53:24 +00:00
elexis a8b8a33c8e Remove unneeded waterheight init loop from River Archipelago (refs #4354, D467).
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.
2017-10-06 18:49:09 +00:00
elexis 7778a7b436 Readability improvements of globalscripts vector.js.
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.
2017-10-06 18:20:57 +00:00
elexis 99494251a1 Add test for globalscripts vector, refs #4427.
This was SVN commit r20262.
2017-10-06 18:15:09 +00:00
mimo 2f24006afb petra: rework the management of siege units in attacks, to remove some civ hardcodings + some cleanup
This was SVN commit r20260.
2017-10-04 16:29:25 +00:00
mimo 862fd197d9 some cleanups of ai and petra
This was SVN commit r20257.
2017-10-02 17:49:27 +00:00
mimo 35af7390c0 Fix Hierarchical Pathfinder out of bounds bug
Patch by temple

Reviewed By: mimo
Differential Revision: https://code.wildfiregames.com/D926
This was SVN commit r20256.
2017-10-02 17:44:23 +00:00
bb 10277d4ee6 Equal siege status bar sizes
Patch By: temple
Differential Revision: https://code.wildfiregames.com/D942
This was SVN commit r20254.
2017-10-01 16:50:08 +00:00
mimo 365dea222d petra: try to make a better use of ranged siege units
This was SVN commit r20253.
2017-10-01 09:26:07 +00:00
fatherbushido fca5022f9b Tweak the decay special filter: decay time is set in the rubble template. Refs D938.
This was SVN commit r20252.
2017-10-01 05:38:45 +00:00
Imarok 0da0eaea3b Fix repair hotkey and remove build command
Fix f7ff71e8d5
Ack by elexis
Differential Revision: https://code.wildfiregames.com/D358
This was SVN commit r20250.
2017-09-30 22:04:24 +00:00
Imarok 7a5c5100c0 Allow command line options to start with - or --
Reviewed by: mimo
Differential Revision: https://code.wildfiregames.com/D883
This was SVN commit r20249.
2017-09-30 16:12:18 +00:00
Imarok 9d232fd39a Domesticated animals shouldn't be visible in FOW
Reviewed by: Stan
Refs #3201
Differential Revision: https://code.wildfiregames.com/D891
This was SVN commit r20248.
2017-09-30 16:10:13 +00:00
leper 8629b83ed9 Remove unneeded include.
That was a leftover from a previous iteration of the code.

This was SVN commit r20247.
2017-09-30 15:29:13 +00:00
leper 84674911cc Switch back to an unplaceable filter for templates.
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.
2017-09-30 15:22:51 +00:00
fatherbushido 40cafe5049 Remove unneeded Vision and UnitMotion properties from gaia templates.
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D941
This was SVN commit r20245.
2017-09-30 14:57:12 +00:00
leper b78896dfa6 Make rubble non-decaying by default.
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.
2017-09-30 13:50:39 +00:00
leper ff7511d9fc Move special_filter/ templates to special/filter/.
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.
2017-09-30 07:14:35 +00:00
leper a85c532f8f Move formations/ templates to special/formations/.
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.
2017-09-30 06:51:56 +00:00
fatherbushido 8c15a81c58 Removed health leftover from Seleucid wonder.
Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D936
This was SVN commit r20240.
2017-09-29 18:52:05 +00:00
mimo a9f95feb42 fix missing parenthese in 49758c8337 and some other minor changes"
This was SVN commit r20239.
2017-09-29 16:58:25 +00:00
fatherbushido b1d71bfb43 Add a new function to emit a sound from a position not attached to an entity. Use it to improve the attack impact sound code and allow to emit that sound even if the attacker died meanwhile. Use the sound provided by Pureon for catapult. Fix #4779.
Patch By: Mate-86
Differential Revision: https://code.wildfiregames.com/D921
This was SVN commit r20236.
2017-09-28 19:26:07 +00:00
mimo 49758c8337 petra: various minor fixes
This was SVN commit r20234.
2017-09-27 18:58:51 +00:00
elexis 995f9b5975 Northern lights river cleanup following 7d0cc59136.
This was SVN commit r20233.
2017-09-27 14:35:46 +00:00
fatherbushido bebcd56a84 Leftover in fb6748d723.
This was SVN commit r20231.
2017-09-26 10:06:31 +00:00
fatherbushido fb6748d723 Use relative templates for unit speed. No significant value change. It makes balancing easier and will permit to change the speed of all units by changing one number. Refs #4352.
Differential Revision: https://code.wildfiregames.com/D930
This was SVN commit r20230.
2017-09-25 18:27:18 +00:00
mimo c6c02eb081 petra: refactor a bit the defense code to ease future changes
This was SVN commit r20229.
2017-09-25 17:20:15 +00:00
bb 6b9acadda4 Match house obstructions visually and cleanup some related template data.
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.
2017-09-24 16:15:13 +00:00
bb 026b04d345 Improve acoustic GUI notifications
Patch By: Polakrity
Reviewed By: elexis, bb
Differential Revision: https://code.wildfiregames.com/D821
This was SVN commit r20226.
2017-09-24 12:20:11 +00:00
bb b1f0bd2974 Resize storehouse so obstructions matches visually
Patch By: temple
Differential Revision: https://code.wildfiregames.com/D727
This was SVN commit r20225.
2017-09-24 11:28:23 +00:00
bb 9c23af265a Align session panels
Patch By: temple
Reviewed By: elexis, bb
Differential Revision: https://code.wildfiregames.com/D922
This was SVN commit r20224.
2017-09-24 10:13:34 +00:00
mimo 12bd37f70b Revisit the random walk of animals
Reviewed By: O2 JS Simulation, bb
Differential Revision: https://code.wildfiregames.com/D927
This was SVN commit r20223.
2017-09-24 09:44:59 +00:00
elexis d3301a6161 Fix division by zero in 0d0bc32736 and 25682da568 for the gulf map layout with only one player.
This was SVN commit r20222.
2017-09-23 13:28:43 +00:00
elexis 1f1a9ffbf1 Fix oversights in ba36f233fa (missing brace removal in latium) and 635e608776 (missing startAngle argument).
missing starting

This was SVN commit r20221.
2017-09-23 13:23:49 +00:00
Pureon 03862937a6 Removed stereo channel
This was SVN commit r20219.
2017-09-22 21:41:25 +00:00
bb 69ad6f9b97 Make corral obstruction and footprint match the actual building size.
Use correct rubbles and foundation actors also.

Patch By: temple
Differential Revision: https://code.wildfiregames.com/D728
This was SVN commit r20218.
2017-09-22 19:21:58 +00:00
mimo 3fa38fe480 petra: some fixes in attacks (choice of target and withdrawal)
This was SVN commit r20217.
2017-09-22 17:53:01 +00:00
fatherbushido 4e62ad38fe Remove some wrong references in root templates.
Differential Revision: https://code.wildfiregames.com/D923
This was SVN commit r20216.
2017-09-22 16:58:31 +00:00
fatherbushido da03e1a528 Get rid of special_units templates for packable siege units. Refs #1718.
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D925
This was SVN commit r20215.
2017-09-22 16:11:45 +00:00
bb 3d95c43430 Add footprint and obstruction sizes in skirmish farmstead fixing 2e02c88d2c
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.
2017-09-22 15:34:03 +00:00
Pureon 6c5b67e890 Some new siege projectile impact sounds
This was SVN commit r20211.
2017-09-21 22:40:39 +00:00
mimo c1684ccd5f ConquestCritical consistency
Patch by Nescio

Reviewed By: mimo
Differential Revision: https://code.wildfiregames.com/D892
This was SVN commit r20210.
2017-09-20 18:00:20 +00:00
mimo 11009c56b7 petra: do not try to defend some structures in blinking territories that the AI has no chance to defend.
(Will only be effective when D910 is commited as currently the blinking
tiles are not transfered to the AI)

This was SVN commit r20209.
2017-09-20 17:54:53 +00:00
fatherbushido 2a46552c2e Fix a wrong sound file reference.
This was SVN commit r20208.
2017-09-20 13:04:16 +00:00
mimo 123f732a15 petra: fix a bug when choosing the best unit for a given task, and cleanup a bit that function from unused stuff
This was SVN commit r20206.
2017-09-19 20:30:10 +00:00
fatherbushido 7992277692 Delayed damage. When a projectile hits the ground, it makes its damage (or its splash damage) a specified time later. It can be use for grenades. Refs #1911.
Patch By: Mate-86
Differential Revision: https://code.wildfiregames.com/D748
This was SVN commit r20204.
2017-09-18 17:00:36 +00:00
leper 725aa8a686 Move damage types definition to a new helper similar to how resources are handled.
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.
2017-09-18 16:33:56 +00:00
bb 2e02c88d2c Cleanup farmstead size related template data.
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.
2017-09-18 12:21:02 +00:00
leper 1c47c5ad44 Rename cmpPosition's IsFloating to CanFloat.
Reviewed By: fatherbushido
Differential Revision: https://code.wildfiregames.com/D916
This was SVN commit r20201.
2017-09-18 09:54:54 +00:00
fatherbushido b49ca424c7 Remove some leftovers in wonders templates.
Differential Revision: https://code.wildfiregames.com/D917
This was SVN commit r20200.
2017-09-18 09:33:14 +00:00
fatherbushido 6ecba5025b Add test for height and water logic in Position component. Refs 38cca12ec6.
Reviewed By: leper
Differential Revision: https://code.wildfiregames.com/D915
This was SVN commit r20199.
2017-09-18 08:46:11 +00:00
leper 38cca12ec6 Add float depth support to cmpPosition.
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.
2017-09-18 03:55:33 +00:00
leper fd034c9bcd Use white text in the mod selection screen. Patch by Nescio.
Differential Revision: https://code.wildfiregames.com/D911
This was SVN commit r20195.
2017-09-18 03:08:25 +00:00
fatherbushido b3db71aa63 Fix an issue with tests. Allow to mock several components for the system entity. Reviewed by leper.
Differential Revision: https://code.wildfiregames.com/D848
This was SVN commit r20194.
2017-09-17 07:06:09 +00:00
fatherbushido 6f8dddef5a Tag exhausted resource as not available in ResourceSupply component. Fix #4507. Reviewed by leper.
Differential Revision: https://code.wildfiregames.com/D902
This was SVN commit r20193.
2017-09-17 05:40:33 +00:00
fatherbushido 015f9bbf33 Remove a Brit fortress bonus. Agreed by scythetwirler.
Differential Revision: https://code.wildfiregames.com/D913
This was SVN commit r20192.
2017-09-17 05:21:14 +00:00
fatherbushido e8ff10620b Add a generic healer hero template and make the mauryan healer hero inherit from it. Follow discussion with elexis.
Differential Revision: https://code.wildfiregames.com/D912
This was SVN commit r20191.
2017-09-16 15:53:47 +00:00
fatherbushido 455ab4b9e2 Fix some format specifiers in debug strings. Reviewed by leper.
Differential Revision: https://code.wildfiregames.com/D909
This was SVN commit r20190.
2017-09-16 15:28:01 +00:00
elexis d970c5019a Remove some more recursive duplication in the rmgen library (painting terrain based on height).
This was SVN commit r20189.
2017-09-16 10:28:49 +00:00
bb 0353b9ff49 Change comment for the MatchesClassList function so we can use it for other things aswell
Useful for f.e. required techs and attack types

Reviewed By: leper
Differential Revision: https://code.wildfiregames.com/D869
This was SVN commit r20188.
2017-09-15 16:07:04 +00:00
elexis bf5370ac02 Unify 34 copies of the civic center tile class setting of random map scripts.
This was SVN commit r20186.
2017-09-15 03:52:50 +00:00
elexis 7d0cc59136 Reverse engineer and unify the 14 copies of the river drawing random mapgen code.
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.
2017-09-15 03:24:35 +00:00
mimo a507fe1101 petra: remove some unused code + some minor tunings
This was SVN commit r20184.
2017-09-14 18:57:33 +00:00
leper e55c8bda07 Move placeable templates out of special/.
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.
2017-09-13 01:35:20 +00:00
leper f6683fcbce Fix SpiderMonkey build on FreeBSD 12. Fixes #4765.
Patch By: madpilot
Differential Revision: https://code.wildfiregames.com/D886
This was SVN commit r20180.
2017-09-13 00:10:27 +00:00
leper 189da09a7e Make FromJSProperty actually part of ScriptInterface.
Reviewed By: Imarok
Differential Revision: https://code.wildfiregames.com/D876
This was SVN commit r20179.
2017-09-12 22:52:15 +00:00
leper 66bdc460f4 Cleanup damage type related code in cmpDamageReceiver and cmpDamage.
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.
2017-09-12 22:18:45 +00:00
leper 2534010d0f Fix build without precompiled headers.
Refs 21f69ef574.

This was SVN commit r20177.
2017-09-12 22:18:39 +00:00
elexis 3312a83f82 Don't overwrite invalid input in numeric fields of the options page following 7a157faf3c.
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.
2017-09-12 19:32:50 +00:00
mimo a5b4dd3744 petra: take field diminishingReturns into account
This was SVN commit r20175.
2017-09-12 17:26:23 +00:00
mimo 96219942d2 petra: fix cases where UnitAI (because of autocontinue) would make the AI build some field foundations while it was not needed
This was SVN commit r20174.
2017-09-12 16:47:30 +00:00
elexis 486aec18d4 Move Main ScriptFunctions to a new JS Interface, refs #4772.
This was SVN commit r20172.
2017-09-12 03:11:33 +00:00
elexis d6cb9c845b Move Debugging ScriptFunctions to a new JS Interface, refs #4772.
This was SVN commit r20171.
2017-09-12 02:25:28 +00:00
elexis 921c5515a6 Move Simulation GUI ScriptFunctions to a new JS Interface, refs #4772.
This was SVN commit r20170.
2017-09-12 01:53:46 +00:00
elexis 5f8be8e0c6 Move Game ScriptFunctions to a new JS Interface, refs #4772.
This was SVN commit r20169.
2017-09-12 01:38:46 +00:00
elexis fa54a8cd65 Move GUI Manager ScriptFunctions to a new JS Interface, refs #4772.
This was SVN commit r20168.
2017-09-12 00:54:49 +00:00
elexis 21f69ef574 Move networking ScriptFunctions to a new JS Interface, refs #4772.
This was SVN commit r20167.
2017-09-12 00:29:10 +00:00
elexis 0e3a6d811c Move SavedGame ScriptFunctions to a new JS Interface, refs #4772.
This was SVN commit r20166.
2017-09-11 23:22:28 +00:00
elexis f1cc54cc18 Move GameView ScriptFunctions to its JS Interface, refs #4772.
Use early returns as initialization checks.

This was SVN commit r20165.
2017-09-11 23:03:27 +00:00
elexis 4d931b57e9 Move ReadJSONFile and WriteJSONFile GUI ScriptFunctions that only handle VFS paths to the VFS JS Interface.
This was SVN commit r20164.
2017-09-11 22:21:34 +00:00
elexis e69a0fb9db Remove unused clumsy JS GUI ScriptFunctions debug timer from ed7b4b5fca.
GetMicroseconds from 7a91d330d3 provides microsecond precise timing.

Refs #4772.

This was SVN commit r20163.
2017-09-11 22:08:54 +00:00
mimo 8f05358b5e Template loading from the AI
Patch by Sandarac

Reviewed By: mimo
Trac Tickets: #4611

Differential Revision: https://code.wildfiregames.com/D639
This was SVN commit r20162.
2017-09-11 16:23:54 +00:00
fatherbushido 57c8473783 Add ResourceSupply component unit tests.
Differential Revision: https://code.wildfiregames.com/D901
This was SVN commit r20161.
2017-09-11 13:00:01 +00:00
elexis ac0e6fd0d0 Pick the closest match for SimRates like 0.10000000149011612 in the session gamespeed dropdown and warn next time a value can't be displayed.
Reported by Grugnas.

This was SVN commit r20160.
2017-09-11 10:16:12 +00:00
mimo 4541543f0e petra: another fix in foundation properties in view of https://code.wildfiregames.com/D639
This was SVN commit r20158.
2017-09-10 17:55:50 +00:00
elexis 32d8283be1 Move the 12MB heightmap data from the JS code of _kali's 9 alpha 21 realworld maps to separate JSON files (following the new JSON function in 871ed04521).
Don't use the JSON file ending, so that Atlas and gamesetup don't need
code to avoid parsing these huge files.

This was SVN commit r20157.
2017-09-10 15:54:26 +00:00
elexis 97e1d002f1 Add two missing checks in the EndgameManager for players who already had won or were defeated in d2d43ab46f as reported by fatherbushido, refs #4382.
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.
2017-09-10 15:30:53 +00:00
mimo 8e78a2ba0b Petra: fix in foundation properties when using https://code.wildfiregames.com/D639
This was SVN commit r20155.
2017-09-10 12:15:14 +00:00
elexis 921630408d Create arrays with [], not new Array in random map scripts, as stated by the Coding_Conventions,
except Snowflake Searocks which will receive special treatment.

This was SVN commit r20153.
2017-09-10 01:58:04 +00:00
elexis 9750d09032 Fix oversight in 757b6efa43 (don't pick the "random" biome by chance when launching the game with a random biome), refs D852.
This was SVN commit r20152.
2017-09-10 01:52:11 +00:00
elexis f1e352927c Merge the 14 copies of the player placement code on river maps.
This was SVN commit r20151.
2017-09-10 01:04:11 +00:00
elexis 9119b663d8 Fix wrong comma in cc0d4f25da and a mismatched brace in ba36f233fa (hidden by the wrong indentation of a9b963c3a5).
This was SVN commit r20150.
2017-09-09 22:57:46 +00:00
elexis 635e608776 Unify 36 copies of the radial playerplacement loop of random mapscripts.
Trim unused PlayerAngle, StartAngle and baseRadius variables.

This was SVN commit r20149.
2017-09-09 19:12:28 +00:00
elexis 4477bcfb7e Replace 55 playerarray sorting loops copies with calls to two random mapgen helper functions.
Rename randomizePlayers as it paradoxically called sortPlayers on the
result.

This was SVN commit r20148.
2017-09-09 16:49:35 +00:00
fatherbushido 7bc941cf62 Add Heal component unit tests.
Differential Revision: https://code.wildfiregames.com/D898
This was SVN commit r20147.
2017-09-09 16:24:28 +00:00
elexis 45bb3d2a43 Remove 23 copies of the random mapgen terrain init loop (including 16 copies of unused x and z vars).
This was SVN commit r20146.
2017-09-09 15:30:44 +00:00
mimo 4d22667ac9 petra cleanup
This was SVN commit r20145.
2017-09-09 15:01:35 +00:00
elexis ba36f233fa Remove 1400 useless random map script comments.
This was SVN commit r20144.
2017-09-09 14:41:50 +00:00
mimo 25282a5552 Petra: fix population bonus of foundation when using https://code.wildfiregames.com/D639
This was SVN commit r20143.
2017-09-09 14:38:40 +00:00
elexis 5e019b5818 Don't use the default metal/stone mines of the random biome system in the independent heightmap library (following 7471a0db63) that is only used by a map that doesn't use the random biome system, revealed by cc0d4f25da.
Don't mix alpine and mediterranean (rmbiome) mines on Schwarzwald as
before 7471a0db63. Refs #3764.

This was SVN commit r20142.
2017-09-09 14:34:15 +00:00
Imarok ab7089ad61 Command line option for pid+timestamp in OOS dump, mainlog and interestinglog
Reviewed by: elexis Fixes #3339
Differential Revision: https://code.wildfiregames.com/D51
This was SVN commit r20141.
2017-09-09 13:16:05 +00:00
elexis 84d2b89fef Fix missing conversion of biome environment constants in 871ed04521 as reported by fatherbushido, fixes #4766.
Remove wrong defaultbiome copypasta.

This was SVN commit r20140.
2017-09-09 12:30:35 +00:00
elexis 74bfe5fd55 Add biome descriptions.
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.
2017-09-09 00:10:08 +00:00
bb 339c1f2210 Add missing and remove redundant phase required technology entries from templates
Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D887
This was SVN commit r20138.
2017-09-08 21:23:51 +00:00
mimo 76a2cd43d0 Fix broken Autogarrison in 1638727c23
Patch by Stan

Reviewed By: mimo
Differential Revision: https://code.wildfiregames.com/D885
This was SVN commit r20137.
2017-09-08 18:04:19 +00:00
elexis 1cdc8f1356 Mark simulation component template and entity properties as read-only in simulation tests (as they are in actual games).
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/D871
Fixes #4759
setup.js and setup_test.js Reviewed By: leper

This was SVN commit r20134.
2017-09-08 04:22:53 +00:00
elexis eb4e66aab3 Move VFS GUI script function registration to its interface file.
This was SVN commit r20133.
2017-09-08 04:01:26 +00:00
elexis 47ac189e62 Remove unnecessary, terribly named random biome getter functions.
Refs #892 / bc805bd357
Proposed by leper in irc on 2016-06-15
Discussed with FeXoR in irc on 2016-04-10

This was SVN commit r20132.
2017-09-08 03:26:06 +00:00
elexis dcba05e881 Remove biome constants, so that mods can remove biomes without triggering reference errors, refs 871ed04521.
This was SVN commit r20131.
2017-09-08 02:49:49 +00:00
elexis a7d1cba47b Fix compulsory JSON syntax error.
This was SVN commit r20130.
2017-09-08 02:44:23 +00:00
elexis 871ed04521 Move biome definitions to JSON and JS files, so that mods can easily remove or add new biomes, refs cc0d4f25da.
Move environment biome constants from JS to JSON.

This was SVN commit r20129.
2017-09-08 02:15:54 +00:00
mimo b4cf5d0a73 petra: further improve performance in structure placement
Differential Revision: https://code.wildfiregames.com/D875
This was SVN commit r20128.
2017-09-07 17:21:24 +00:00
elexis cc0d4f25da Move random biome system to a separate mapgen library.
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.
2017-09-07 15:34:15 +00:00
elexis e95f4e9744 Unify deepcopy and clone.
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.
2017-09-06 20:58:27 +00:00
Itms e1bf09977c Fix the "Thermistocles" typo in the helmet prop file name. Refs 4d31ff14eb.
Reviewed By: Stan
Differential Revision: https://code.wildfiregames.com/D604
This was SVN commit r20124.
2017-09-06 20:56:13 +00:00
bb f42205b2d7 Improve wolve target-finder performance
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.
2017-09-06 08:59:56 +00:00
bb 63ca7ad672 Split VictoryDuration in RelicDuration and WonderDuration
As proposed by leper in 35377c51a7
refs #4014

Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D874
This was SVN commit r20122.
2017-09-06 08:44:26 +00:00
leper a46b44e4dc Allow specifying the gravity affecting projectiles.
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.
2017-09-06 00:23:13 +00:00
leper 154ff3c517 Factor out resource generation in cmpTrader.
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.
2017-09-06 00:18:05 +00:00
elexis 757b6efa43 Fix missing harbor and wild lake random biome implementation.
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.
2017-09-05 22:34:57 +00:00
elexis 2c5a6052ea Allow selecting the biome on all maps that support the random biome system, refs D852.
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.
2017-09-05 16:16:25 +00:00
bb deba66c376 Allow arbitrary order between dropdowns and checkboxes in gamesetup
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D862
This was SVN commit r20116.
2017-09-05 15:58:21 +00:00
elexis f2550705d3 Select the biome of the random map in the gamesetup.
Differential Revision: https://code.wildfiregames.com/D852
Based on patch by: Grugnas
This was SVN commit r20115.
2017-09-05 12:57:22 +00:00
leper 38865845d3 Stop using postfix increment in a few places.
Pointed out by cppcheck.

Reviewed By: vladislavbelov
Differential Revision: https://code.wildfiregames.com/D414
This was SVN commit r20113.
2017-09-04 22:00:04 +00:00
leper 4551e911a4 Cleanup of damage type related code in cmpDeathDamage.
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.
2017-09-04 21:22:11 +00:00
elexis c4f6371940 Move lobby panels to custom file, so that they could be shown in a dialog as well.
Refs #4106, D817
Patch By: fpre / ffffffff
This was SVN commit r20111.
2017-09-04 20:47:42 +00:00
elexis b3d1d02e53 Move prelobby files to a separate directory (to prepare splitting the lobby code into several files).
Refs #4106, D817

This was SVN commit r20110.
2017-09-04 19:41:40 +00:00
elexis 7cd3689f03 Fix a nearly hidden gamesetup bug that exists since at least alpha 19, revealed by 9cb0a60d73 / D829, reported by mimo.
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.
2017-09-04 19:03:19 +00:00
mimo a3b9d16eff Petra: Look for aquatic treasure on naval maps
Patch by Sandarac

Reviewed By: mimo
Differential Revision: https://code.wildfiregames.com/D765
This was SVN commit r20108.
2017-09-04 18:06:02 +00:00
mimo bce425ede5 petra: add some protections for non-existing templates
Differential Revision: https://code.wildfiregames.com/D867
This was SVN commit r20107.
2017-09-04 16:58:00 +00:00
elexis 5cc7fd27d7 Fix oversight in dd7f38e370 (thought undefined was converted to emptystring instead of "undefined"), refs D805.
This was SVN commit r20106.
2017-09-04 11:49:03 +00:00
elexis 3aca693db1 Add +1 tab indentation following dd7f38e370 / D805 for the lines not affected by 892876a571.
This was SVN commit r20103.
2017-09-03 22:08:13 +00:00
elexis 892876a571 Remove unneeded parameters nesting from the options page following c20ee2ad5e, refs #2596.
Add +1 tab for the affected lines following dd7f38e370, refs D805.

This was SVN commit r20102.
2017-09-03 21:59:45 +00:00
elexis dd7f38e370 Use tabs for the options page and rewrite it altogether.
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.
2017-09-03 21:38:50 +00:00
elexis 9cb0a60d73 Deepfreeze Aura, Technology and Resource Templates, Simulation states, GameAttributes and few other JS objects.
This reveals unintentional modifications to these objects which would
most often imply hidden bugs.

Differential Revision: https://code.wildfiregames.com/D829
Fixes #4257
Refs #3647

This was SVN commit r20100.
2017-09-03 16:37:09 +00:00
elexis 1b47451d32 Add deepfreeze function to recursively mark JS Objects as read-only.
Refs #4257, D829
Proofread By: leper
This was SVN commit r20099.
2017-09-03 12:50:45 +00:00
mimo 8707c2106b petra: some small tunings in defenseManager + various cleanup
This was SVN commit r20098.
2017-09-02 13:45:02 +00:00
elexis ec3b1be38b Display the targer marker in the shroud of darkness as well.
Patch By: wowgetoffyourcellphone
Refs D606

This was SVN commit r20097.
2017-09-02 10:18:23 +00:00
leper 5c01b50ca4 Add FALLTHROUGH, which in the best case is just [[fallthrough]].
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.
2017-09-01 20:04:53 +00:00
mimo faa1a3fd41 petra: update some entities collections when diplomacy changes
Differential Revision: https://code.wildfiregames.com/D858
This was SVN commit r20094.
2017-09-01 17:38:49 +00:00
mimo a7d7a74d08 petra: improve performance of building placement
This was SVN commit r20093.
2017-09-01 17:33:10 +00:00
elexis 86d5b4e7e4 Options page cleanup.
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.
2017-09-01 14:23:36 +00:00
elexis 7a157faf3c Allow the GUI to subscribe to text edit events to redeem three workarounds in the options page.
Differential Revision: https://code.wildfiregames.com/D860
Refs #2451, #3511, 5c61f68600 (registerChanges), 7fa2962c45
(onMouseLeave), e909567004 (onPress)
Reviewed By: Vladislav
This was SVN commit r20091.
2017-09-01 12:06:18 +00:00
elexis 2cb6139761 Fix typo in f8d53d8f7b / D786 and some whitespace in CInput.cpp
This was SVN commit r20088.
2017-09-01 01:51:48 +00:00
elexis beb7c4ae34 Main Menu cleanup.
Remove unused names, CData and comments.
Add missing quotes and fix whitespace.

This was SVN commit r20087.
2017-08-31 18:22:09 +00:00
mimo 8a066abe69 move the Introductory_Tutorial to the tutorial folder
This was SVN commit r20086.
2017-08-31 18:07:03 +00:00
mimo f80ae9236a add missing file in previous commit
This was SVN commit r20085.
2017-08-31 18:03:17 +00:00
mimo 744581a255 Remove the tutorial-ai which is obsolete
Discussed with Elexis

Differential Revision: https://code.wildfiregames.com/D526
This was SVN commit r20084.
2017-08-31 17:48:50 +00:00
mimo 6ed9017253 fix typo in LongPathfinder
Reviewed By: fatherbushido
Differential Revision: https://code.wildfiregames.com/D847
This was SVN commit r20082.
2017-08-30 16:41:10 +00:00
elexis db73e97185 Focus on deleted entities in observermode if the follow-player feature is enabled, refs #3743.
This was SVN commit r20081.
2017-08-30 13:42:25 +00:00
elexis 8653d0631c Unify two indistinguishable session sprites.
This was SVN commit r20080.
2017-08-30 13:22:53 +00:00
bb 1ca585ccf2 Allow BuildRestrictions Min Max Distance to be modified by auras/technologies
Patch By: Grugnas
Differential Revision: https://code.wildfiregames.com/D276
This was SVN commit r20079.
2017-08-30 13:02:13 +00:00
elexis a5c60619e2 Input GUI object cleanup.
Remove redundant if-statement following 5593f573f4 as reported by
Vladislav.
Use switch-statement in ManuallyHandleEvent.

This was SVN commit r20078.
2017-08-30 12:01:17 +00:00
elexis ee38f0db37 Implement readonly Input GUI objects and use it in the file location indicator in the replay menu,
so that the user can copy the file path.

Fixes #4225
Refs D763
Patch By: Vladislav
This was SVN commit r20075.
2017-08-29 23:53:23 +00:00
elexis 23118ba847 Split the Input GUI object key processing into two methods (methods changing the text and methods not changing it).
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.
2017-08-29 23:29:29 +00:00
elexis b88f1aba20 Display move indicator to observers if the follow-player feature is enabled.
Don't use the marker for the repair order.

Refs D606

This was SVN commit r20073.
2017-08-29 22:40:13 +00:00
mimo 9e96bca85e petra: improve the way units capturing a structure react when attacked by enemy units + some code cleanup
This was SVN commit r20072.
2017-08-29 18:23:16 +00:00
elexis c17f379513 Visual move order indicator.
Differential Revision: https://code.wildfiregames.com/D606
Fixes #4732
Patch By: Stan
Template Reviewed by: fatherbushido
This was SVN commit r20071.
2017-08-29 17:02:32 +00:00
elexis e8dfde9ba6 Display previously received lobby chat messages when returning from the gamesetup.
Differential Revision: https://code.wildfiregames.com/D819
Fixes #3306
Patch By: fpre / ffffffff
This was SVN commit r20070.
2017-08-29 16:04:45 +00:00
elexis 0ceeaf921b Fix typo in 0940db3fc0 / D835 reported by gameboy.
Reviewed By: Vladislav
This was SVN commit r20069.
2017-08-29 12:22:31 +00:00
fatherbushido 75324347d4 Remove a misleading fishing bonus tooltip. Reviewed by elexis.
Differential Revision: https://code.wildfiregames.com/D841
This was SVN commit r20068.
2017-08-29 08:46:09 +00:00
s0600204 27d99765bb Add an icon to pyrogenesis' application window
Tested By: Imarok (Windows, Ubuntu w. Gnome), s0600204 (Arch w. Xfce),
ffffffff (Kubuntu w. KDE)
Reviewed By: ffffffff, s0600204
Differential Revision: https://code.wildfiregames.com/D768
Trac Tickets: #4363

This was SVN commit r20067.
2017-08-28 21:56:54 +00:00
elexis 8da0f129ef Options page cleanup.
Unify renderer and common callback function.

Differential Revision: https://code.wildfiregames.com/D839
Reviewed By: bb
Agreed with Vladislav

This was SVN commit r20066.
2017-08-28 19:37:31 +00:00
mimo f6c8fb4ba0 let petra build a wonder also when not in wonder mode but approaching the max pop"
This was SVN commit r20065.
2017-08-28 18:16:01 +00:00
elexis 0940db3fc0 XmppClient cleanup.
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.
2017-08-28 17:47:43 +00:00
mimo 6861588371 petra: fix building of first cc as it is also used after all cc's have been destroyed and was not fully correct in that case"
This was SVN commit r20063.
2017-08-28 17:15:48 +00:00
elexis 1b44946078 Replace deprecated jsval with JS::Value.
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.
2017-08-28 10:27:36 +00:00
elexis 8f51469793 Colorize relic victory message.
Refs D36 / 9a6c5eac60, D152 / 35377c51a7

This was SVN commit r20060.
2017-08-27 23:30:33 +00:00
bb 565abd5f1b Fix directory for Atlas help from a93d260643
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.
2017-08-27 19:32:54 +00:00
bb 62c9c6d7fc Add scrollbars to all tabs in Atlas.
Reviewed By: vladislavbelov
Differential Revision: https://code.wildfiregames.com/D793
This was SVN commit r20058.
2017-08-27 18:47:39 +00:00
mimo ced95e1318 remove an unwanted change from last commit
This was SVN commit r20057.
2017-08-27 18:10:00 +00:00
mimo 8577b681cc petra: more fixes on buildings placement
Differential Revision: https://code.wildfiregames.com/D783
This was SVN commit r20056.
2017-08-27 18:04:14 +00:00
elexis a53ccc54a0 Display untranslated developer overlay chat message if an observer opens it (rather than no message at all) following 844566c787.
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.
2017-08-27 17:23:24 +00:00
mimo 820c22dc46 petra fixes linked to building placements
This was SVN commit r20054.
2017-08-27 17:21:28 +00:00
elexis 14f33dc078 Disable lobby login/register button after pressing it.
Differential Revision: https://code.wildfiregames.com/D832
Comments by Vladislav

This was SVN commit r20053.
2017-08-27 17:12:13 +00:00
mimo a1619db209 AI: take more obstruction shapes into account
Differential Revision: https://code.wildfiregames.com/D837
This was SVN commit r20052.
2017-08-27 17:08:13 +00:00
elexis b5a69885e6 Hide gamesetup controls until they are initialized in multiplayer.
Differential Revision: https://code.wildfiregames.com/D833
Refs D322

This was SVN commit r20051.
2017-08-27 17:05:04 +00:00
elexis 4aff6078c9 Display all heroes and relics in the top panel when chosing the "Observer" perspective.
Differential Revision: https://code.wildfiregames.com/D814
Agreed with: Hannibal_Barca, fpre / ffffffff

This was SVN commit r20050.
2017-08-27 16:37:57 +00:00
elexis eb70d83b67 Fix rallypoint color after deserialization following 505a10cef6.
Differential Revision: https://code.wildfiregames.com/D826
Refs #4618, D623

This was SVN commit r20049.
2017-08-27 16:05:20 +00:00
elexis 83ee8cd62e Small JS GUI performance improvement.
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.
2017-08-26 21:48:57 +00:00
elexis 3c73b329f2 JS cleanup.
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.
2017-08-26 20:10:39 +00:00
elexis 024aa77c35 JS Cleanup.
Don't change the Upgrade costs in the entity state when displaying the
Upgrade tooltip.

Refs #2706, D829

This was SVN commit r20046.
2017-08-26 19:34:23 +00:00
elexis 5be8528b57 JS cleanup.
Don't copy the long-wall-segment aura to the original template data when
displaying the construction tooltip.

Refs D829

This was SVN commit r20045.
2017-08-26 19:20:27 +00:00
elexis bb55629a5b JS Cleanup.
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.
2017-08-26 19:01:44 +00:00
elexis b5ea27904d JS GUI cleanup.
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.
2017-08-26 18:53:37 +00:00
elexis c4cef0d289 Don't write two helper variables to g_CivInfo in the structure tree,
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.
2017-08-26 17:57:11 +00:00
elexis 16b976fc35 Remove unneeded GetMucMessageCount from the XmppClient.
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.
2017-08-25 18:51:26 +00:00
mimo ce7e727ff0 petra: revisit the phasing up to be more mod-friendly
Differential Revision: https://code.wildfiregames.com/D654
This was SVN commit r20039.
2017-08-25 16:23:23 +00:00
mimo bcdfbd28f8 Change some occurrences of BroadcastMessage where an entity id is available to use PostMessage
Patch by echotangoecho

Reviewed By: O2 JS Simulation, mimo
Differential Revision: https://code.wildfiregames.com/D733
This was SVN commit r20038.
2017-08-25 16:06:29 +00:00
leper ce580f0de0 Always delete CMapReader. Patch by Sandarac. Fixes #4154.
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.
2017-08-25 00:37:48 +00:00
elexis 9680b7437e Close the options page with escape.
Refs D813
Patch By: fpre / ffffffff
This was SVN commit r20034.
2017-08-24 22:55:08 +00:00
mimo f0a0f6c4cd Remove unused TemplateDataWithoutLocalization
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D831
This was SVN commit r20033.
2017-08-24 21:03:53 +00:00
elexis f27efac053 Enhance lobby / XMPP timestamp parsing documentation.
Refs #3832, 9a5e1ddedb / D760, 6141c5c4fa / D514
Reviewed By: leper
This was SVN commit r20032.
2017-08-24 20:57:21 +00:00
mimo a89c32f36b Petra: Fix some cases that would cause territory expansion with Sandbox difficulty
Patch by Sandarac

Reviewed By: mimo
Differential Revision: https://code.wildfiregames.com/D764
This was SVN commit r20031.
2017-08-24 19:47:35 +00:00
Imarok 31bbb56b58 Remove some unneeded ternary and fix some style issues in gamesetup.
Reviewed by: elexis
Differential Revision: https://code.wildfiregames.com/D615
This was SVN commit r20030.
2017-08-24 10:40:51 +00:00
leper 9defd11440 Pass ScriptInterface as a const ref where possible.
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D739
This was SVN commit r20028.
2017-08-24 00:32:42 +00:00
leper 7970c3dc54 Pass a const reference, if someone wants to modify it they should use the global directly.
Reviewed By: vladislavbelov
Differential Revision: https://code.wildfiregames.com/D738
This was SVN commit r20027.
2017-08-23 23:52:32 +00:00
mimo 683e19a7ed cleaning of the list of useful templates in AIInterface
This was SVN commit r20026.
2017-08-23 17:40:51 +00:00
mimo a13a860890 AI stats modifications from techs and auras broken for templates
Tested by Grugnas

Differential Revision: https://code.wildfiregames.com/D811
This was SVN commit r20025.
2017-08-23 17:31:47 +00:00
elexis d0654b4d58 Fix two translation oversights in 8cfd494b88 / D505.
This was SVN commit r20024.
2017-08-23 13:13:23 +00:00
elexis a93d260643 Add help button to Atlas with a link to the Manual and bugtracker.
Differential Revision: https://code.wildfiregames.com/D794
Patch By: Vladislav
This was SVN commit r20021.
2017-08-21 23:32:29 +00:00
s0600204 993b6c1632 Fix foundation 6x6 and 8x8 actors.
Patch By: Stan
Differential Revision: https://code.wildfiregames.com/D651
This was SVN commit r20020.
2017-08-21 19:08:56 +00:00
elexis 1ddd24bb8c Remove unused Renderer function from 12e2428495.
Refs #2137
Reviewed By: Vladislav
This was SVN commit r20019.
2017-08-21 17:05:45 +00:00
elexis d4cb7a05d7 Tiny JS options page cleanup.
Use strict comparison only if it actually matters.
Some var/let changes, refs D510.
Some lineendings.

This was SVN commit r20018.
2017-08-21 14:40:27 +00:00
elexis f61dd9bfc8 Grammar improvement for the wonder victory message, as proposed by WhiteTreePaladin / brian in accordance with 661284a403.
This was SVN commit r20017.
2017-08-21 13:13:08 +00:00
fatherbushido ff90bb8490 Fix issues with civ and classes bonuses for splash damage. Even if those bonuses were in splash schema they was not taken into account. Update, fix, clean and complete unit tests for those logic. Reviewed by Mate-86.
Differential Revision: https://code.wildfiregames.com/D792
This was SVN commit r20015.
2017-08-21 06:52:37 +00:00
elexis 028ce1d9e9 Use different translation contexts for the "enter your password" string.
Differential Revision: https://code.wildfiregames.com/D770
Based on patch by: Vladislav
This was SVN commit r20013.
2017-08-21 02:00:37 +00:00
elexis b1e3664208 Fix 23d8bc11a5 bug that shows the "enter your password" label before the password field becomes visible.
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.
2017-08-21 01:55:24 +00:00
elexis 6f9bf55ac5 Change the shadow map quality without restarting the match.
Differential Revision: https://code.wildfiregames.com/D804
Refs #4351
Patch By: Vladislav
This was SVN commit r20011.
2017-08-21 01:10:56 +00:00
elexis 04f2209b50 Rename WaterUgly setting to WaterEffects in order to remove the invertedboolean workaround of the options page.
Differential Revision: https://code.wildfiregames.com/D815
Refs #3737
Tested By: Stan
This was SVN commit r20010.
2017-08-21 00:09:25 +00:00
mimo abbdd391b5 Simplify work in translation of tutorials by cutting long strings by paragraph
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D802
also includes https://code.wildfiregames.com/D755

This was SVN commit r20009.
2017-08-20 18:04:48 +00:00
elexis 7d1e8056c1 Delete unused, not too appealing Modern Gray button from 80663a6c8a.
Fix some whitespace.

Differential Revision: https://code.wildfiregames.com/D809
In agreement with mimo

This was SVN commit r20008.
2017-08-20 18:03:47 +00:00
fatherbushido 4bd81b2761 Use the aimed position instead of the current target position for spread calculation. Patch by temple.
Differential Revision: https://code.wildfiregames.com/D780
This was SVN commit r20007.
2017-08-20 15:46:54 +00:00
elexis fc2cfd7744 Invert arrow sprites for sortable columns and unify duplication in a new ModernSortedList style.
Differential Revision: https://code.wildfiregames.com/D789
Patch By: fpre / ffffffff
Reviewed By: Vladislav
This was SVN commit r20006.
2017-08-20 12:23:08 +00:00
elexis 39e77a8caa Support the Message of the Day and Announcements sent by the lobby administrator instead of throwing a JS warning.
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.
2017-08-20 11:34:24 +00:00
elexis 73481f4cc4 Support numerical data in option dropdowns, as expected by the shadow map quality option.
Differential Revision: https://code.wildfiregames.com/D803
Refs #4351, D745.
Patch By: Vladislav
This was SVN commit r20003.
2017-08-19 19:43:26 +00:00
elexis f8d53d8f7b Move summary screen and credits page Tab button styles to the Modern theme.
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.
2017-08-19 19:00:26 +00:00
elexis 8df36bace4 Shadow map quality option.
Differential Revision: https://code.wildfiregames.com/D745
Fixes #4351
Refs #743
Patch By: Vladislav
This was SVN commit r20001.
2017-08-19 12:46:05 +00:00
elexis 661284a403 Fix some string issues and reveal the name of the next release (Ken Wood).
Change the tense of the Capture The Relic message, as proposed by brian
(WhiteTreePaladin).
Consistently use title case for buttons.
Use more descriptive and concise option titles.
Remove two unused strings.

Fixes #4718
Refs
https://wildfiregames.com/forum/index.php?/topic/22745-all-relics-captured-message/
Refs
https://wildfiregames.com/forum/index.php?/topic/22461-alpha-23-name-suggestions/
Reviewed by: brian (WhiteTreePaladin), leper, GunChleoc.
Release name agreed with Itms on 2017-07-29 on irc.

This was SVN commit r20000.
2017-08-19 11:47:24 +00:00
fatherbushido be2f3b4d42 Cap the pack progress getter at 100% to avoid oversizing bars in the gui. Update the test who caught that bug. Reviewed by bb_.
Differential Revision: https://code.wildfiregames.com/D796
This was SVN commit r19999.
2017-08-19 11:31:20 +00:00
mimo 8a32deb5ca Fix tutorial stuck after building farm
Trac Tickets: #4696, #4697

Differential Revision: https://code.wildfiregames.com/D774
This was SVN commit r19998.
2017-08-19 09:38:52 +00:00
elexis ce7848522e Fix copy&paste typo in the BuildRestrictions introduced by 9e39d6b46c.
Fixes #4728
Refs #3081, D276
Patch By: Grugnas
This was SVN commit r19997.
2017-08-19 08:44:09 +00:00
fatherbushido 67a7a92b95 Fix the missing hp for gates: when a full health wall was upgraded to a gate, it lost 1 hp. Complete c312c35698. Ultimately, the copy-move of health should be handled by the Health component itself.
This was SVN commit r19996.
2017-08-19 07:43:24 +00:00
fatherbushido c312c35698 Fix the missing health bug when an unit is promoted. Promotion component should not do the job of the Health component. Patch by Grugnas.
Accepted by FeXoR.
Differential Revision: https://code.wildfiregames.com/D409
This was SVN commit r19995.
2017-08-19 07:36:21 +00:00
fatherbushido bb58e7cb45 Add outlines of unit test for Promote component. Catch the missing 1 hp bug for the promoted unit when moving health from the old entity to the new one.
Differential Revision: https://code.wildfiregames.com/D798
This was SVN commit r19994.
2017-08-19 07:32:51 +00:00
elexis f1490be16f Delete unused ugly Yellow button theme.
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.
2017-08-18 22:30:24 +00:00
elexis 0d06fd00ab Modern style cleanup.
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.
2017-08-18 19:33:05 +00:00
elexis 0c43deaae4 Modern style cleanup.
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.
2017-08-18 18:37:39 +00:00
elexis f08ccf2a43 Remove unused ModernPanel style introduced by 5582409973 that duplicates some properties of the widely used ModernWindow.
This was SVN commit r19990.
2017-08-18 17:39:54 +00:00
elexis 0063aca6b5 Simplify Tab handling of the credits page.
Differential Revision: https://code.wildfiregames.com/D785
Reviewed By: Vladislav
This was SVN commit r19989.
2017-08-18 16:30:11 +00:00
bb 7e1646afd5 Fix the attack cursor when the target is outside FoW and restrictedClasses are specified in the attack component by miraging the restrictedClasses data.
refs: d5db047c9a
Differential Revision: https://code.wildfiregames.com/D750
Reviewed By: mimo
This was SVN commit r19987.
2017-08-16 17:59:58 +00:00
fatherbushido d35fdbd542 Add some tests for Attack component. Some cleanup. Reviewed by Mate-86.
Differential Revision: https://code.wildfiregames.com/D782
This was SVN commit r19985.
2017-08-14 15:57:56 +00:00
mimo 36464f7fa7 a few petra cleanup, mainly useless parentheses
This was SVN commit r19984.
2017-08-14 11:16:04 +00:00
mimo 48c2e789b0 AI:fix typo spotted by s0600204, fixes #4720
This was SVN commit r19981.
2017-08-12 18:09:48 +00:00
elexis cb18830a81 Remove CinemaManager input handler to allow user interaction on other GUI pages like message boxes and possibly few selected hotkeys.
Disable gameview/camera hotkeys while cinematic paths are playing.

Differential Revision: https://code.wildfiregames.com/D697
Refs #3301, #3814, 89aef0b6eb
Reviewed By: Vladislav
This was SVN commit r19980.
2017-08-12 10:32:07 +00:00
fatherbushido 1eca31cda6 Add a test for testing circular splash damage. That test would have protected for the regression introduced in 1fc4f55e38 and fixed in 1fc4f55e38. Reviewed by elexis.
Differential Revision: https://code.wildfiregames.com/D784
This was SVN commit r19979.
2017-08-12 08:59:05 +00:00
fatherbushido ac84d5b2eb Fix an oversight in 1fc4f55e38.
This was SVN commit r19978.
2017-08-12 06:52:25 +00:00
elexis 316a8848a0 Ignore few Ownership changes in the Selectable and RallyPointRenderer component.
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.
2017-08-11 20:05:03 +00:00
mimo 756d3b4a7c AI: remove some old unused functions
This was SVN commit r19975.
2017-08-11 19:26:39 +00:00
elexis 83528d0859 Allow Danubius CC attackers to actually use the secondary gates by leaving a gap there following d724347812 / D380.
This was SVN commit r19974.
2017-08-11 18:44:44 +00:00
elexis 00e7d49368 Profile Footprint calls that can easily consume 90% of the simtime on a turn ("sunken ship lag").
Differential Revision: https://code.wildfiregames.com/D778
Refs #4713
Reviewed By: Vladislav
This was SVN commit r19973.
2017-08-11 18:08:30 +00:00
elexis fe9cc4a150 Don't spawn Danubius attackers (indefinitely) at the Gaia Civic Center if all targeted player buildings on that riverside were destroyed or captured by gaia.
Differential Revision: https://code.wildfiregames.com/D777
Fixes #4715
Reviewed By: bb
This was SVN commit r19972.
2017-08-11 17:05:32 +00:00
Imarok 1a792b31c9 [Summary] Move the resource total to the left
Reviewed by: bb
Differential Revision: https://code.wildfiregames.com/D775
This was SVN commit r19970.
2017-08-10 11:41:53 +00:00
fatherbushido 1fc4f55e38 Fix a confusion with 2D and 3D vector for linear splash damage which silently appeared in 4b7ab63172. Add back a comment and slightly change the related damaged area. Add a test for linear splash damage. Patch by temple.
Differential Revision: https://code.wildfiregames.com/D767
This was SVN commit r19969.
2017-08-10 08:10:09 +00:00
mimo ced0a71782 Add a cost for unsuccessful bribe attempts.
Patch By: mmoanis
Reviewed By: mimo
Trac Tickets: #4623

Differential Revision: https://code.wildfiregames.com/D624
This was SVN commit r19967.
2017-08-09 16:09:34 +00:00
bb e9a2334298 Make the buildTime tooltip return the correct value when worker with a rate different then 1 work on it.
Differential Revision: https://code.wildfiregames.com/D522
Patch By: temple
This was SVN commit r19966.
2017-08-09 11:19:15 +00:00
elexis 343ec21e75 Update the color of the selection ring, rallypoints and territory outline when the playercolor is changed in atlas.
Merge duplicate Selectable component playercolor code.

Differential Revision: https://code.wildfiregames.com/D687
Fixes #4643
Refs D623
Patch in cooperation with: Stan

This was SVN commit r19965.
2017-08-09 11:19:14 +00:00
Imarok dde09b491a Scythian Archer has no capture animation
Patch by: Stan
Fixes #4711
Differential Revision: https://code.wildfiregames.com/D771
This was SVN commit r19964.
2017-08-09 09:45:53 +00:00
fatherbushido 3d0bfc7e1b Forgotten years replacement in 3a3bcca0c5.
This was SVN commit r19962.
2017-08-09 07:11:53 +00:00
s0600204 b80a255a0a Purge all History strings from entity templates.
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.
2017-08-08 21:52:49 +00:00
fatherbushido 3a3bcca0c5 Refactor the code for cutting a circle into chords for textured line overlay in Selectable component. Don't compute useless arccos and avoid compound rounding errors. Reviewed by Itms.
Differential Revision: https://code.wildfiregames.com/D673
This was SVN commit r19959.
2017-08-08 17:48:44 +00:00
bb 1f42f65eb0 Restructure and cleanup the teamdata code for the summaryscreen
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.
2017-08-08 14:20:24 +00:00
elexis 505a10cef6 Display rallypoints in the playercolor instead of plain blue.
Differential Revision: https://code.wildfiregames.com/D623
Fixes #4618
Patch By: Stan
This was SVN commit r19957.
2017-08-08 12:48:57 +00:00
elexis c9c30b29b1 Only 2 relics by default, as having more makes it very unlikely to achieve the Capture The Relic victory.
Differential Revision: https://code.wildfiregames.com/D766
Reviewed By: Imarok
This was SVN commit r19956.
2017-08-08 11:35:01 +00:00
elexis d2d43ab46f Victory and defeat reason strings.
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/D762
Fixes #4382
Based on patch by: Angen
This was SVN commit r19955.
2017-08-08 11:32:00 +00:00
fatherbushido eff4e12656 Add unit tests for DeathDamage component. Refs 523ae47ee2.
Differential Revision: https://code.wildfiregames.com/D772
This was SVN commit r19954.
2017-08-08 11:12:56 +00:00
fatherbushido ba71cf5ea9 Complete support of civ replacement in Builder list as in ProductionQueue list. Reviewed by s0600204.
Differential Revision: https://code.wildfiregames.com/D707
This was SVN commit r19952.
2017-08-07 20:00:29 +00:00
mimo 37c2f18b9e Add AI engine function for template loading
Partial commit of https://code.wildfiregames.com/D639, taken from
Sandarac patch

Reviewed by mimo

This was SVN commit r19951.
2017-08-07 19:35:43 +00:00
fatherbushido 523ae47ee2 Splash damage on death. When an entity dies, it can do a splash damage. Fire ship and fire raiser templates provided as example. Fix #1910.
Patch by Mate-86.
Advices from leper.
Reviewed by fatherbushido.
Differential Revision: https://code.wildfiregames.com/D451
This was SVN commit r19950.
2017-08-07 12:38:57 +00:00
elexis 6e513069ad GarrisonHolder simulation tests.
Differential Revision: D90 (style fixes committed in 1638727c23)
Patch By: Stan
This was SVN commit r19949.
2017-08-07 11:26:18 +00:00
elexis af274111b8 Fix detached heads of Spartan elite spearmen.
Differential Revision: https://code.wildfiregames.com/D752
Fixes #4686
Patch By: Stan
Reported in
https://wildfiregames.com/forum/index.php?/topic/22635-spartan-hoplite-headless/
Incidentally 83680b0dee replaced the reported headless unit bug with a
different headless unit bug.

This was SVN commit r19948.
2017-08-07 10:31:50 +00:00
elexis 9a5e1ddedb Fix BSD and OSX build that don't provide the AT&T version of timezone used by 6141c5c4fa. Refs #3832, D514.
Mostly reviewed by: leper
Tested on Windows by: Stan
This was SVN commit r19947.
2017-08-07 09:56:31 +00:00
mimo 79537fee3b Fix AI error in ApplyEntitiesDelta()
Patch by Sandarac

Reviewed By: mimo
Differential Revision: https://code.wildfiregames.com/D751
This was SVN commit r19945.
2017-08-05 17:27:06 +00:00
elexis 9641d0cdb0 Fix typo in 39fcd1d031 reported by Imarok.
This was SVN commit r19941.
2017-07-31 16:33:14 +00:00
s0600204 cdf6109713 Relocate and Rearrange the structree codebase
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.
2017-07-31 12:49:00 +00:00
fatherbushido be5b300abd Add a test for the DeriveModificationsFromTech script. It emphasizes the syntax to use for editing specific affects in technologies files. Reviewed by s0600204.
Differential Revision: https://code.wildfiregames.com/D696
This was SVN commit r19939.
2017-07-31 11:21:34 +00:00
leper 00fafda955 Stop copying the territory grid when recomputing the texture.
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.
2017-07-30 23:37:05 +00:00
Imarok f1894418aa Fix metal mines in latium
Reviewed by: FeXoR. Refs #4695.
Differential Revision: https://code.wildfiregames.com/D486
This was SVN commit r19935.
2017-07-30 10:18:51 +00:00
leper 98d7763765 Remove code that doesn't do anything.
Reviewed By: Imarok
Differential Revision: https://code.wildfiregames.com/D743
This was SVN commit r19933.
2017-07-29 23:27:28 +00:00
leper 5ab426d621 Remove commented out code.
Reviewed By: Sandarac
Differential Revision: https://code.wildfiregames.com/D742
This was SVN commit r19932.
2017-07-29 23:27:14 +00:00
leper 781cec163e Remove CTerritoryManager pointer from CWorld, a relic from before simulation2.
Patch By: Sandarac
Differential Revision: https://code.wildfiregames.com/D731
This was SVN commit r19931.
2017-07-29 23:27:02 +00:00
leper 27e5c5b25a Mark a few functions const.
Reviewed By: Itms
Differential Revision: https://code.wildfiregames.com/D499
This was SVN commit r19930.
2017-07-29 23:26:44 +00:00
Imarok a639050a41 Fix SimpleGroup and RandomGroup placement retries
Reviewed by: FeXoR. Fixes: #4294
Differential Revision: https://code.wildfiregames.com/D249
This was SVN commit r19929.
2017-07-29 21:02:09 +00:00
Imarok 3fca871fd6 Take gui.scale into account when repositioning tooltips
Patch by: joskar
Differential Revision: https://code.wildfiregames.com/D749
This was SVN commit r19928.
2017-07-29 18:30:59 +00:00
Imarok 1638727c23 Garrison Holder code style fixes
Reviewed By: Imarok, bb
Refs #4102, D90

This was SVN commit r19927.
2017-07-29 17:19:58 +00:00
Imarok 7605b00c0e Fix af0f74074e
This was SVN commit r19926.
2017-07-29 17:16:04 +00:00
Imarok af0f74074e StatusBar style cleanup
Reviewed By: elexis, bb
Differential Revision: https://code.wildfiregames.com/D719
This was SVN commit r19925.
2017-07-29 17:10:54 +00:00
fatherbushido 4a81397537 Remove the ApplyValueModifiationsToPlayer helper function which is redundant. Reviewed by bb.
Differential Revision: ​https://code.wildfiregames.com/D543
This was SVN commit r19924.
2017-07-29 17:04:01 +00:00
elexis 99b0362edf Bump version number to Alpha 23.
Differential Revision: https://code.wildfiregames.com/D758
Reviewed By: fatherbushido
This was SVN commit r19923.
2017-07-29 16:36:55 +00:00
8298 changed files with 601261 additions and 91388 deletions
+10
View File
@@ -0,0 +1,10 @@
[Source]
bears = CPPCheckBear
files = source/**.(cpp|h)
ignore = source/third_party/**
[JS]
bears = ESLintBear, JSHintBear
eslint_config = build/jenkins/lint-config/eslintrc.json
jshint_config = build/jenkins/lint-config/jshintrc.json
files = binaries/data/**.js
+13 -2
View File
@@ -17,12 +17,15 @@ in particular, let us know and we can try to clarify it.
/binaries/data
GPL version 2 (or later) - see license_gpl-2.0.txt
/binaries/data/mods/art
/binaries/data/mods/audio
/binaries/data/mods/*/art
/binaries/data/mods/*/audio
Creative Commons Attribution-Share Alike 3.0 - see
http://creativecommons.org/licenses/by-sa/3.0/
and also see LICENSE.txt within those directories
/binaries/data/mods/*/maps/
see LICENSE.txt within those directories
/binaries/system
Various (unspecified)
@@ -34,6 +37,7 @@ in particular, let us know and we can try to clarify it.
Various (unspecified)
/build/premake/premake4
/build/premake/premake5
BSD
/build/premake/*.lua
@@ -79,3 +83,10 @@ in particular, let us know and we can try to clarify it.
/source/tools/atlas
GPL version 2 (or later) - see license_gpl-2.0.txt
/binaries/data/mods/public/gui/prelobby/common/terms
/binaries/data/mods/public/gui/userreport/Terms_and_Conditions.txt
/binaries/data/mods/mod/gui/modio/Disclaimer.txt
Redistributing modified Terms and Conditions of online services may be within the licensing,
but may not change the legality or enforceability of the terms of the service provider.
It may be against the terms of the service provider to use online services with modified terms.
+68 -11
View File
@@ -61,7 +61,7 @@ macmouse = false
; if false, actors won't be rendered but anything entity will be.
renderactors = true
waterugly=false; Force usage of the fixed pipeline water. This is faster, but really, really ugly.
watereffects=true ; When disabled, force usage of the fixed pipeline water. This is faster, but really, really ugly.
waterfancyeffects = false
waterrealdepth = true
waterrefraction = true
@@ -69,9 +69,12 @@ waterreflection = true
shadowsonwater = false
shadows = true
shadowquality = 0 ; Shadow map resolution. (-2 - Very Low, -1 - Low, 0 - Medium, 1 - High, 2 - Very High)
; High values can crash the game when using a graphics card with low memory!
shadowpcf = true
vsync = false
particles = true
fog = true
silhouettes = true
showsky = true
@@ -144,10 +147,16 @@ screenshot = F2 ; Take PNG screenshot
bigscreenshot = "Shift+F2" ; Take large BMP screenshot
togglefullscreen = "Alt+Return" ; Toggle fullscreen/windowed mode
screenshot.watermark = "Alt+K" ; Toggle product/company watermark for official screenshots
wireframe = "Alt+W" ; Toggle wireframe mode
silhouettes = "Alt+S" ; Toggle unit silhouettes
wireframe = "Alt+Shift+W" ; Toggle wireframe mode
silhouettes = "Alt+Shift+S" ; Toggle unit silhouettes
showsky = "Alt+Z" ; Toggle sky
; > DIALOG HOTKEYS
summary = "Ctrl+Tab" ; Toggle in-game summary
lobby = "Alt+L" ; Show the multiplayer lobby in a dialog window.
structree = "Alt+Shift+T" ; Show structure tree
civinfo = "Alt+Shift+H" ; Show civilization info
; > CLIPBOARD CONTROLS
copy = "Ctrl+C" ; Copy to clipboard
paste = "Ctrl+V" ; Paste from clipboard
@@ -164,8 +173,10 @@ timeelapsedcounter.toggle = "F12" ; Toggle time elapsed counter
session.showstatusbars = Tab ; Toggle display of status bars
session.highlightguarding = PgDn ; Toggle highlight of guarding units
session.highlightguarded = PgUp ; Toggle highlight of guarded units
session.toggleaurarange = "Alt+V" ; Toggle display of aura range overlays of selected units and structures
session.toggleattackrange = "Alt+C" ; Toggle display of attack range overlays of selected defensive structures
session.toggleaurasrange = "Alt+V" ; Toggle display of aura range overlays of selected units and structures
session.togglehealrange = "Alt+B" ; Toggle display of heal range overlays of selected units
session.diplomacycolors = "Alt+X" ; Toggle diplomacy colors
; > HOTKEYS ONLY
chat = Return ; Toggle chat window
@@ -233,12 +244,15 @@ toggle = "Ctrl+F11" ; Enable/disable HTTP/GPU modes for new profiler
[hotkey.selection]
add = Shift ; Add units to selection
milonly = Alt ; Add only military units to selection
militaryonly = Alt ; Add only military units to the selection
nonmilitaryonly = "Alt+Y" ; Add only non-military units to the selection
idleonly = "I" ; Select only idle units
woundedonly = "O" ; Select only wounded units
remove = Ctrl ; Remove units from selection
cancel = Esc ; Un-select all units and cancel building placement
idleworker = Period ; Select next idle worker
idlewarrior = ForwardSlash ; Select next idle warrior
idleunit = BackSlash ; Select next idle unit
offscreen = Alt ; Include offscreen units in selection
[hotkey.selection.group.add]
0 = "Shift+0"
@@ -279,7 +293,8 @@ kill = Delete ; Destroy selected units
stop = "H" ; Stop the current action
backtowork = "Y" ; The unit will go back to work
unload = "U" ; Unload garrisoned units when a building/mechanical unit is selected
attack = Ctrl ; Modifier to attack instead of another action (eg capture)
move = unused ; Modifier to move to a point instead of another action (e.g. gather)
attack = Ctrl ; Modifier to attack instead of another action (e.g. capture)
attackmove = Ctrl ; Modifier to attackmove when clicking on a point
attackmoveUnit = "Ctrl+Q" ; Modifier to attackmove targeting only units when clicking on a point (should contain the attackmove keys)
garrison = Ctrl ; Modifier to garrison when clicking on building
@@ -288,6 +303,7 @@ guard = "G" ; Modifier to escort/guard when clicking on unit/bu
patrol = "P" ; Modifier to patrol a unit
repair = "J" ; Modifier to repair when clicking on building/mechanical unit
queue = Shift ; Modifier to queue unit orders instead of replacing
orderone = Alt ; Modifier to order only one entity in selection.
batchtrain = Shift ; Modifier to train units in batches
massbarter = Shift ; Modifier to barter bunch of resources
masstribute = Shift ; Modifier to tribute bunch of resources
@@ -302,6 +318,7 @@ rotate.ccw = LeftBracket ; Rotate building placement preview anticlockwise
toggle = "Alt+G" ; Toggle visibility of session GUI
menu.toggle = "F10" ; Toggle in-game menu
barter.toggle = "Ctrl+B" ; Toggle in-game barter/trade page
tutorial.toggle = "Ctrl+P" ; Toggle in-game tutorial panel
[hotkey.session.savedgames]
delete = Delete ; Delete the selected saved game asking confirmation
@@ -321,6 +338,10 @@ noconfirmation = Shift ; Do not ask confirmation when deleting a game
fastforward = Space ; If timewarp mode enabled, speed up the game
rewind = Backspace ; If timewarp mode enabled, go back to earlier point in the game
[hotkey.tab]
next = "Tab", "Alt+S" ; Show the next tab
prev = "Shift+Tab", "Alt+W" ; Show the previous tab
[hotkey.text] ; > GUI TEXTBOX HOTKEYS
delete.left = "Ctrl+Backspace" ; Delete word to the left of cursor
delete.right = "Ctrl+Del" ; Delete word to the right of cursor
@@ -334,13 +355,22 @@ scale = 1.0 ; GUI scaling factor, for improved compatibili
[gui.gamesetup]
enabletips = true ; Enable/Disable tips during gamesetup (for newcomers)
assignplayers = everyone ; Whether to assign joining clients to free playerslots. Possible values: everyone, buddies, disabled.
aidifficulty = 3 ; Difficulty level, from 0 (easiest) to 5 (hardest)
aibehavior = "random" ; Default behavior of the AI (random, balanced, aggressive or defensive)
settingsslide = true ; Enable/Disable settings panel slide
[gui.session]
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
batchtrainingsize = 5 ; Number of units to be trained per batch (when pressing the hotkey)
aurarange = true ; Display aura range overlays of selected units and structures
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
@@ -356,6 +386,12 @@ phase = completed ; Show a chat notification if you or an ally h
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
[joystick] ; EXPERIMENTAL: joystick/gamepad settings
enable = false
deadzone = 8192
@@ -375,10 +411,18 @@ extended = true ; Whether to display the chat history
[lobby]
history = 0 ; Number of past messages to display on join
room = "arena22" ; Default MUC room to join
room = "arena23b" ; Default MUC room to join
server = "lobby.wildfiregames.com" ; Address of lobby server
xpartamupp = "wfgbot22" ; Name of the server-side xmpp client that manage games
tls = true ; Whether to use TLS encryption when connecting to the server.
verify_certificate = false ; Whether to reject connecting to the lobby if the TLS certificate is invalid (TODO: wait for Gloox GnuTLS trust implementation to be fixed)
terms_url = "https://trac.wildfiregames.com/browser/ps/trunk/binaries/data/mods/public/gui/prelobby/common/terms/"; Allows the user to save the text and print the terms
terms_of_service = "0" ; Version (hash) of the Terms of Service that the user has accepted
terms_of_use = "0" ; Version (hash) of the Terms of Use that the user has accepted
privacy_policy = "0" ; Version (hash) of the Privacy Policy that the user has accepted
xpartamupp = "wfgbot23b" ; Name of the server-side XMPP-account that manage games
echelon = "echelon23b" ; 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
[lobby.columns]
gamerating = false ; Show the average rating of the participating players in a column of the gamelist
@@ -394,10 +438,20 @@ delay = 200 ; Duration in milliseconds that is waited b
[mod]
enabledmods = "mod public"
[modio]
public_key = "RWTsHxQMrRq4xwHisyBa2rNQfAedcINzbTT83jeX4/ZcfVxqLfWB4y8w" ; Public key corresponding to the private key valid mods are signed with
disclaimer = "0" ; Version (hash) of the Disclaimer that the user has accepted
[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.
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
gamestarttimeout = 60000 ; Don't disconnect clients timing out in the loading screen and rejoin process before exceeding this timeout.
[overlay]
fps = "false" ; Show frames per second in top right corner
@@ -424,7 +478,10 @@ nick = true ; Play a sound when someone mentions your name
debug = false ; Print error messages each time a translation for an English string is not found.
[userreport] ; Opt-in online user reporting system
url = "http://feedback.wildfiregames.com/report/upload/v1/"
url_upload = "https://feedback.wildfiregames.com/report/upload/v1/" ; URL where UserReports are uploaded to
url_publication = "https://feedback.wildfiregames.com/" ; URL where UserReports were analyzed and published
url_terms = "https://trac.wildfiregames.com/browser/ps/trunk/binaries/data/mods/public/gui/userreport/Terms_and_Conditions.txt"; Allows the user to save the text and print the terms
terms = "0" ; Version (hash) of the UserReporter Terms that the user has accepted
[view] ; Camera control settings
scroll.speed = 120.0
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Program>
<Shaders>
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Program>
<Shaders>
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Program>
<Shaders>
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Program>
<Shaders>
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Program>
<Shaders>
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Program>
<Shaders>
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Program>
<Shaders>
@@ -1,17 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Entity>
<VisualActor>
<Actor>example</Actor>
<SilhouetteDisplay>false</SilhouetteDisplay>
<SilhouetteOccluder>false</SilhouetteOccluder>
<VisibleInAtlasOnly>false</VisibleInAtlasOnly>
</VisualActor>
<Selectable/>
<Position>
<Altitude>0</Altitude>
<Anchor>upright</Anchor>
<Floating>false</Floating>
<TurnRate>6.0</TurnRate>
</Position>
<UnitAI/>
</Entity>
@@ -1,31 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Entity>
<VisualActor>
<Actor>example</Actor>
<SilhouetteDisplay>false</SilhouetteDisplay>
<SilhouetteOccluder>false</SilhouetteOccluder>
<VisibleInAtlasOnly>false</VisibleInAtlasOnly>
</VisualActor>
<Selectable/>
<Position>
<Altitude>0</Altitude>
<Anchor>upright</Anchor>
<Floating>false</Floating>
<TurnRate>6.0</TurnRate>
</Position>
<UnitAI/>
<Footprint>
<Circle radius="4"/>
<Height>1.0</Height>
</Footprint>
<Obstruction>
<Unit radius="4"/>
<Active>true</Active>
<BlockMovement>true</BlockMovement>
<BlockPathfinding>false</BlockPathfinding>
<BlockFoundation>false</BlockFoundation>
<BlockConstruction>true</BlockConstruction>
<DisableBlockMovement>false</DisableBlockMovement>
<DisableBlockPathfinding>false</DisableBlockPathfinding>
</Obstruction>
</Entity>
Binary file not shown.
+19 -19
View File
@@ -1,19 +1,19 @@
namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
##
# NOTE: To modify this Relax NG grammar, edit the Relax NG Compact (.rnc) file
# and use a converter tool like trang to generate the Relax NG XML (.rng) file
##
element Textures {
element File {
attribute pattern { text }? &
attribute format { "dxt1" | "dxt3" | "dxt5" | "rgba" | "alpha" }? &
attribute mipmap { "true" | "false" }? &
attribute normal { "true" | "false" }? &
attribute alpha { "none" | "player" | "transparency" }? &
attribute filter { "box" | "triangle" | "kaiser" }? &
attribute kaiserwidth { xsd:float }? &
attribute kaiseralpha { xsd:float }? &
attribute kaiserstretch { xsd:float }?
}*
}
namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
##
# NOTE: To modify this Relax NG grammar, edit the Relax NG Compact (.rnc) file
# and use a converter tool like trang to generate the Relax NG XML (.rng) file
##
element Textures {
element File {
attribute pattern { text }? &
attribute format { "dxt1" | "dxt3" | "dxt5" | "rgba" | "alpha" }? &
attribute mipmap { "true" | "false" }? &
attribute normal { "true" | "false" }? &
attribute alpha { "none" | "player" | "transparency" }? &
attribute filter { "box" | "triangle" | "kaiser" }? &
attribute kaiserwidth { xsd:float }? &
attribute kaiseralpha { xsd:float }? &
attribute kaiserstretch { xsd:float }?
}*
}
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<SoundGroup>
<Gain>1</Gain>
<Priority>100</Priority>
<ConeGain>1</ConeGain>
<Looping>0</Looping>
<RandOrder>1</RandOrder>
<RandGain>1</RandGain>
<RandPitch>1</RandPitch>
<Threshold>1</Threshold>
<Path>audio/interface/ui</Path>
<Sound>ui_button_click.ogg</Sound>
<Sound>ui_button_longclick.ogg</Sound>
<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<SoundGroup>
<Gain>1</Gain>
<Priority>100</Priority>
<ConeGain>1</ConeGain>
<Looping>0</Looping>
<RandOrder>1</RandOrder>
<RandGain>1</RandGain>
<RandPitch>1</RandPitch>
<Threshold>1</Threshold>
<Path>audio/interface/ui</Path>
<Sound>ui_button_click.ogg</Sound>
<Sound>ui_button_longclick.ogg</Sound>
</SoundGroup>
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<SoundGroup>
<Gain>1</Gain>
<Priority>100</Priority>
<ConeGain>1</ConeGain>
<Looping>0</Looping>
<RandOrder>1</RandOrder>
<RandGain>1</RandGain>
<RandPitch>1</RandPitch>
<Threshold>1</Threshold>
<Path>audio/interface/ui</Path>
<Sound>ui_button_longclick.ogg</Sound>
</SoundGroup>
<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<SoundGroup>
<Gain>1</Gain>
<Priority>100</Priority>
<ConeGain>1</ConeGain>
<Looping>0</Looping>
<RandOrder>1</RandOrder>
<RandGain>1</RandGain>
<RandPitch>1</RandPitch>
<Threshold>1</Threshold>
<Path>audio/interface/ui</Path>
<Sound>ui_button_longclick.ogg</Sound>
</SoundGroup>
+36 -36
View File
@@ -1,36 +1,36 @@
namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
##
# NOTE: To modify this Relax NG grammar, edit the Relax NG Compact (.rnc) file
# and use a converter tool like trang to generate the Relax NG XML (.rng) file
##
##
# Types #
##
flag = "0" | "1"
start = SoundGroup
SoundGroup = element SoundGroup {
element Gain { xsd:float }? &
element Looping { flag }? &
element Omnipresent { flag }? &
element HeardBy { "owner" }? &
element Distanceless { flag }? &
element Pitch { xsd:float }? &
element Priority { xsd:float }? &
element RandOrder { flag }? &
element RandGain { flag }? &
element GainUpper { xsd:float }? &
element GainLower { xsd:float }? &
element RandPitch { flag }? &
element PitchUpper { xsd:float }? &
element PitchLower { xsd:float }? &
element ConeGain { xsd:float }? &
element ConeInner { xsd:float }? &
element ConeOuter { xsd:float }? &
element Threshold { xsd:float }? &
element Decay { xsd:float }? &
element Sound { text }+ &
element Path { text }
}
namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
##
# NOTE: To modify this Relax NG grammar, edit the Relax NG Compact (.rnc) file
# and use a converter tool like trang to generate the Relax NG XML (.rng) file
##
##
# Types #
##
flag = "0" | "1"
start = SoundGroup
SoundGroup = element SoundGroup {
element Gain { xsd:float }? &
element Looping { flag }? &
element Omnipresent { flag }? &
element HeardBy { "owner" }? &
element Distanceless { flag }? &
element Pitch { xsd:float }? &
element Priority { xsd:float }? &
element RandOrder { flag }? &
element RandGain { flag }? &
element GainUpper { xsd:float }? &
element GainLower { xsd:float }? &
element RandPitch { flag }? &
element PitchUpper { xsd:float }? &
element PitchLower { xsd:float }? &
element ConeGain { xsd:float }? &
element ConeInner { xsd:float }? &
element ConeOuter { xsd:float }? &
element Threshold { xsd:float }? &
element Decay { xsd:float }? &
element Sound { text }+ &
element Path { text }
}
@@ -1,188 +1,3 @@
/**
* These functions rely on the JS cache where possible and
* should be prefered over the Engine.Translate ones to optimize the performance.
*/
var g_Translations = {};
var g_PluralTranslations = {};
var g_TranslationsWithContext = {};
var g_PluralTranslationsWithContext = {};
function isTranslatableString(message)
{
return typeof message == "string" && !!message.trim();
}
/**
* Translates the specified English message into the current language.
*/
function translate(message)
{
if (!g_Translations[message])
g_Translations[message] = Engine.Translate(message);
return g_Translations[message];
}
/**
* Translates the specified English message into the current language for the specified number.
*/
function translatePlural(singularMessage, pluralMessage, number)
{
if (!g_PluralTranslations[singularMessage])
g_PluralTranslations[singularMessage] = {};
if (!g_PluralTranslations[singularMessage][number])
g_PluralTranslations[singularMessage][number] = Engine.TranslatePlural(singularMessage, pluralMessage, number);
return g_PluralTranslations[singularMessage][number];
}
/**
* Translates the specified English message into the current language for the specified context.
*/
function translateWithContext(context, message)
{
if (!g_TranslationsWithContext[context])
g_TranslationsWithContext[context] = {}
if (!g_TranslationsWithContext[context][message])
g_TranslationsWithContext[context][message] = Engine.TranslateWithContext(context, message);
return g_TranslationsWithContext[context][message];
}
/**
* Translates the specified English message into the current language for the specified context and number.
*/
function translatePluralWithContext(context, singularMessage, pluralMessage, number)
{
if (!g_PluralTranslationsWithContext[context])
g_PluralTranslationsWithContext[context] = {};
if (!g_PluralTranslationsWithContext[context][singularMessage])
g_PluralTranslationsWithContext[context][singularMessage] = {};
if (!g_PluralTranslationsWithContext[context][singularMessage][number])
g_PluralTranslationsWithContext[context][singularMessage][number] =
Engine.TranslatePluralWithContext(context, singularMessage, pluralMessage, number);
return g_PluralTranslationsWithContext[context][singularMessage][number];
}
/**
* The input object should contain either of the following properties:
*
* • A message property that contains a message to translate.
*
* • A list property that contains a list of messages to translate as a
* comma-separated list of translated.
*
* Optionally, the input object may contain a context property. In that case,
* the value of this property is used as translation context, that is, passed to
* the translateWithContext(context, message) function.
*/
function translateMessageObject(object)
{
let trans = translate;
if (object.context)
trans = msg => translateWithContext(object.context, msg);
if (object.message)
object = trans(object.message);
else if (object.list)
object = object.list.map(trans).join(translateWithContext("enumeration", ", "));
return object;
}
/**
* Translates any string value in the specified JavaScript object
* that is associated with a key included in the specified keys array.
*
* it accepts an object in the form of
*
* {
* translatedString1: "my first message",
* unTranslatedString1: "some English string",
* ignoredObject: {
* translatedString2: "my second message",
* unTranslatedString2: "some English string"
* },
* translatedObject1: {
* message: "my third singular message",
* context: "message context",
* },
* translatedObject2: {
* list: ["list", "of", "strings"],
* context: "message context",
* },
* }
*
* Together with a keys list to translate the strings and objects
* ["translatedString1", "translatedString2", "translatedObject1",
* "translatedObject2"]
*
* The result will be (f.e. in Dutch)
* {
* translatedString1: "mijn eerste bericht",
* unTranslatedString1: "some English string",
* ignoredObject: {
* translatedString2: "mijn tweede bericht",
* unTranslatedString2: "some English string"
* },
* translatedObject1: "mijn derde bericht",
* translatedObject2: "lijst, van, teksten",
* }
*
* So you see that the keys array can also contain lower-level keys,
* And that you can include objects in the keys array to translate
* them with a context, or to join a list of translations.
*
* Also, the keys array may be an object where properties are keys to translate
* and values are translation contexts to use for each key.
*/
function translateObjectKeys(object, keys)
{
if (keys instanceof Array)
{
for (let property in object)
{
if (keys.indexOf(property) > -1)
{
if (isTranslatableString(object[property]))
object[property] = translate(object[property]);
else if (object[property] instanceof Object)
object[property] = translateMessageObject(object[property]);
}
else if (object[property] instanceof Object)
translateObjectKeys(object[property], keys);
}
}
// If keys is not an array, it is an object where keys are properties to
// translate and values are translation contexts to use for each key.
// An empty value means no context.
else
{
for (let property in object)
{
if (property in keys)
{
if (isTranslatableString(object[property]))
if (keys[property])
object[property] = translateWithContext(keys[property], object[property]);
else
object[property] = translate(object[property]);
else if (object[property] instanceof Object)
object[property] = translateMessageObject(object[property]);
}
else if (object[property] instanceof Object)
translateObjectKeys(object[property], keys);
}
}
}
/**
* Function is used by the extract-messages tool.
* So it may only be used on a plain string,
@@ -0,0 +1,61 @@
// We want to pass callback functions for the different buttons in a convenient way.
// Because passing functions accross compartment boundaries is a pain, we just store them here together with some optional arguments.
// The messageBox page will return the code of the pressed button and the according function will be called.
var g_MessageBoxBtnFunctions = [];
var g_MessageBoxCallbackArgs = [];
function messageBoxCallbackFunction(btnCode)
{
if (btnCode !== undefined && g_MessageBoxBtnFunctions[btnCode])
{
// Cache the variables to make it possible to call a messageBox from a callback function.
let callbackFunction = g_MessageBoxBtnFunctions[btnCode];
let callbackArgs = g_MessageBoxCallbackArgs[btnCode];
g_MessageBoxBtnFunctions = [];
g_MessageBoxCallbackArgs = [];
if (callbackArgs !== undefined)
callbackFunction(callbackArgs);
else
callbackFunction();
return;
}
g_MessageBoxBtnFunctions = [];
g_MessageBoxCallbackArgs = [];
};
function messageBox(mbWidth, mbHeight, mbMessage, mbTitle, mbButtonCaptions, mbBtnCode, mbCallbackArgs)
{
if (g_MessageBoxBtnFunctions && g_MessageBoxBtnFunctions.length)
{
warn("A messagebox was called when a previous callback function is still set, aborting!");
return;
}
g_MessageBoxBtnFunctions = mbBtnCode;
g_MessageBoxCallbackArgs = mbCallbackArgs || g_MessageBoxCallbackArgs;
Engine.PushGuiPage("page_msgbox.xml", {
"width": mbWidth,
"height": mbHeight,
"message": mbMessage,
"title": mbTitle,
"buttonCaptions": mbButtonCaptions,
"callback": mbBtnCode && "messageBoxCallbackFunction"
});
}
function openURL(url)
{
Engine.OpenURL(url);
messageBox(
600, 200,
sprintf(
translate("Opening %(url)s\n in default web browser. Please wait…"),
{ "url": url }
),
translate("Opening page"));
}
@@ -0,0 +1,23 @@
/**
* Add color to text string.
*/
function coloredText(text, color)
{
return '[color="' + color + '"]' + text + '[/color]';
}
/**
* Set GUI tags on text string.
*
* @param {string} string - String to apply tags to.
* @param {object} tags - Object containing the tags, for instance { "color": "white" } or { "font": "sans-13" }.
*/
function setStringTags(text, tags)
{
let result = text;
for (let tag in tags)
result = '[' + tag + '="' + tags[tag] + '"]' + result + '[/' + tag + ']';
return result;
}
+232
View File
@@ -0,0 +1,232 @@
/**
* @param filesize - In bytes.
* @return Object with quantized filesize and suitable unit of size.
*/
function filesizeToObj(filesize)
{
// We are unlikely to download files measured in units greater than GiB.
let units = [
translateWithContext("filesize unit", "B"),
translateWithContext("filesize unit", "KiB"),
translateWithContext("filesize unit", "MiB"),
translateWithContext("filesize unit", "GiB")
];
let i = 0;
while (i < units.length - 1)
{
if (filesize < 1024)
break;
filesize /= 1024;
++i;
}
return {
"filesize": filesize.toFixed(i == 0 ? 0 : 1),
"unit": units[i]
};
}
function filesizeToString(filesize)
{
// Translation: For example: 123.4 KiB
return sprintf(translate("%(filesize)s %(unit)s"), filesizeToObj(filesize));
}
/**
* Convert time in milliseconds to [HH:]mm:ss string representation.
*
* @param time Time period in milliseconds (integer)
* @return String representing time period
*/
function timeToString(time)
{
return Engine.FormatMillisecondsIntoDateStringGMT(time, time < 1000 * 60 * 60 ?
// Translation: Time-format string. See http://userguide.icu-project.org/formatparse/datetime for a guide to the meaning of the letters.
translate("mm:ss") : translate("HH:mm:ss"));
}
/**
* These functions rely on the JS cache where possible and
* should be prefered over the Engine.Translate ones to optimize the performance.
*/
var g_Translations = {};
var g_PluralTranslations = {};
var g_TranslationsWithContext = {};
var g_PluralTranslationsWithContext = {};
function isTranslatableString(message)
{
return typeof message == "string" && !!message.trim();
}
/**
* Translates the specified English message into the current language.
*/
function translate(message)
{
if (!g_Translations[message])
g_Translations[message] = Engine.Translate(message);
return g_Translations[message];
}
/**
* Translates the specified English message into the current language for the specified number.
*/
function translatePlural(singularMessage, pluralMessage, number)
{
if (!g_PluralTranslations[singularMessage])
g_PluralTranslations[singularMessage] = {};
if (!g_PluralTranslations[singularMessage][number])
g_PluralTranslations[singularMessage][number] = Engine.TranslatePlural(singularMessage, pluralMessage, number);
return g_PluralTranslations[singularMessage][number];
}
/**
* Translates the specified English message into the current language for the specified context.
*/
function translateWithContext(context, message)
{
if (!g_TranslationsWithContext[context])
g_TranslationsWithContext[context] = {};
if (!g_TranslationsWithContext[context][message])
g_TranslationsWithContext[context][message] = Engine.TranslateWithContext(context, message);
return g_TranslationsWithContext[context][message];
}
/**
* Translates the specified English message into the current language for the specified context and number.
*/
function translatePluralWithContext(context, singularMessage, pluralMessage, number)
{
if (!g_PluralTranslationsWithContext[context])
g_PluralTranslationsWithContext[context] = {};
if (!g_PluralTranslationsWithContext[context][singularMessage])
g_PluralTranslationsWithContext[context][singularMessage] = {};
if (!g_PluralTranslationsWithContext[context][singularMessage][number])
g_PluralTranslationsWithContext[context][singularMessage][number] =
Engine.TranslatePluralWithContext(context, singularMessage, pluralMessage, number);
return g_PluralTranslationsWithContext[context][singularMessage][number];
}
/**
* The input object should contain either of the following properties:
*
* • A message property that contains a message to translate.
*
* • A list property that contains a list of messages to translate as a
* comma-separated list of translated.
*
* Optionally, the input object may contain a context property. In that case,
* the value of this property is used as translation context, that is, passed to
* the translateWithContext(context, message) function.
*/
function translateMessageObject(object)
{
let trans = translate;
if (object.context)
trans = msg => translateWithContext(object.context, msg);
if (object.message)
object = trans(object.message);
else if (object.list)
object = object.list.map(trans).join(translateWithContext("enumeration", ", "));
return object;
}
/**
* Translates any string value in the specified JavaScript object
* that is associated with a key included in the specified keys array.
*
* it accepts an object in the form of
*
* {
* translatedString1: "my first message",
* unTranslatedString1: "some English string",
* ignoredObject: {
* translatedString2: "my second message",
* unTranslatedString2: "some English string"
* },
* translatedObject1: {
* message: "my third singular message",
* context: "message context",
* },
* translatedObject2: {
* list: ["list", "of", "strings"],
* context: "message context",
* },
* }
*
* Together with a keys list to translate the strings and objects
* ["translatedString1", "translatedString2", "translatedObject1",
* "translatedObject2"]
*
* The result will be (f.e. in Dutch)
* {
* translatedString1: "mijn eerste bericht",
* unTranslatedString1: "some English string",
* ignoredObject: {
* translatedString2: "mijn tweede bericht",
* unTranslatedString2: "some English string"
* },
* translatedObject1: "mijn derde bericht",
* translatedObject2: "lijst, van, teksten",
* }
*
* So you see that the keys array can also contain lower-level keys,
* And that you can include objects in the keys array to translate
* them with a context, or to join a list of translations.
*
* Also, the keys array may be an object where properties are keys to translate
* and values are translation contexts to use for each key.
*/
function translateObjectKeys(object, keys)
{
if (keys instanceof Array)
{
for (let property in object)
{
if (keys.indexOf(property) > -1)
{
if (isTranslatableString(object[property]))
object[property] = translate(object[property]);
else if (object[property] instanceof Object)
object[property] = translateMessageObject(object[property]);
}
else if (object[property] instanceof Object)
translateObjectKeys(object[property], keys);
}
}
// If keys is not an array, it is an object where keys are properties to
// translate and values are translation contexts to use for each key.
// An empty value means no context.
else
{
for (let property in object)
{
if (property in keys)
{
if (isTranslatableString(object[property]))
if (keys[property])
object[property] = translateWithContext(keys[property], object[property]);
else
object[property] = translate(object[property]);
else if (object[property] instanceof Object)
object[property] = translateMessageObject(object[property]);
}
else if (object[property] instanceof Object)
translateObjectKeys(object[property], keys);
}
}
}
+32
View File
@@ -0,0 +1,32 @@
/**
* Check the mod compatibility between the saved game to be loaded and the engine
*/
function hasSameMods(modsA, modsB)
{
if (!modsA || !modsB || modsA.length != modsB.length)
return false;
// Mods must be loaded in the same order. 0: modname, 1: modversion
return modsA.every((mod, index) => [0, 1].every(i => mod[i] == modsB[index][i]));
}
/**
* Converts a list of mods and their version into a human-readable string.
*/
function modsToString(mods)
{
return mods.map(mod => sprintf(translateWithContext("Mod comparison", "%(mod)s (%(version)s)"), {
"mod": mod[0],
"version": mod[1]
})).join(translate(", "));
}
/**
* Convert the required and active mods and their version into a humanreadable translated string.
*/
function comparedModsString(required, active)
{
return sprintf(translateWithContext("Mod comparison", "Required: %(mods)s"),
{ "mods": modsToString(required) }) + "\n" +
sprintf(translateWithContext("Mod comparison", "Active: %(mods)s"),
{ "mods": modsToString(active) });
}
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?>
<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<!DOCTYPE setup SYSTEM "..\..\gui.dtd">
<setup>
@@ -1,12 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
- This file contains the sprites for the 'modern' style GUI.
-
-->
<sprites>
<!--
==========================================
- Scrollbar -
@@ -49,7 +43,6 @@
texture_size = "0 0 1024 256"
size = "12 100%-268 100%-12 100%-12"
/>
<image texture = "global/modern/shadow-high.png"
texture_size = "1024 256 0 0"
size = "12 22 100%-12 268"
@@ -78,9 +71,7 @@
real_texture_placement = "32 32 0 0"
size = "50%+122 4 50%+154 37"
/>
</sprite>
<!--
==========================================
- Dialog -
@@ -100,7 +91,6 @@
texture_size = "0 0 1024 128"
size = "4 100%-132 100%-4 100%-4"
/>
<image texture = "global/modern/shadow-low.png"
texture_size = "1024 128 0 0"
size = "4 0 100%-4 128"
@@ -130,12 +120,12 @@
<image texture = "global/modern/dialog-deco-bottom.png"
real_texture_placement = "0 0 64 32"
texture_size = "64 0 0 32"
size = "-31 100%-23 33 100%+9"
size = "-31 100%-22 33 100%+10"
/>
<image texture = "global/modern/dialog-deco-bottom.png"
real_texture_placement = "0 0 64 32"
texture_size = "0 0 64 32"
size = "100%-31 100%-23 100%+33 100%+9"
size = "100%-31 100%-22 100%+33 100%+10"
/>
<!-- title frame -->
@@ -152,33 +142,6 @@
size = "50%+102 0%-18 50%+134 15"
/>
</sprite>
<!--
==========================================
- Panel -
==========================================
-->
<sprite name = "ModernPanel">
<!-- background -->
<image backcolor = "12 12 12"/>
<image texture = "global/modern/background.png"
texture_size = "0 0 1024 1024"
size = "12 22 100%-12 100%-12"
/>
<!-- shading -->
<!-- we just mirror the same texture on the top and bottom -->
<image texture = "global/modern/shadow-high.png"
texture_size = "0 0 1024 256"
size = "12 100%-268 100%-12 100%-12"
/>
<image texture = "global/modern/shadow-high.png"
texture_size = "1024 256 0 0"
size = "12 22 100%-12 268"
/>
</sprite>
<!--
==========================================
- Box -
@@ -230,6 +193,21 @@
size = "0 1 100% 100%-1"
/>
</sprite>
<sprite name="ModernDarkBoxWhiteInvalid">
<!-- borders -->
<image texture = "global/modern/white-separator.png"
real_texture_placement = "0 0 806 1"
size = "0 0 100% 1"
/>
<image texture = "global/modern/white-separator.png"
real_texture_placement = "0 0 806 1"
size = "0 100%-1 100% 100%"
/>
<!-- background -->
<image backcolor = "127 0 0 100"
size = "0 1 100% 100%-1"
/>
</sprite>
<sprite name = "ModernDarkBoxGoldNoBottom">
<image texture = "global/modern/gold-separator.png"
real_texture_placement = "0 0 806 1"
@@ -430,290 +408,96 @@
size="100%-8 100%-8 100% 100%"
/>
</sprite>
<!-- YELLOW -->
<sprite name="ModernButtonYellow">
<!-- Left -->
<image texture="global/modern/button/yellow-unselected-left-top.png"
real_texture_placement="0 0 8 8"
size="0 0 8 8"
<!--
==========================================
- Progress Bar -
==========================================
-->
<sprite name="ModernProgressBarBackground">
<image
texture="global/modern/progressbar/background_end.png"
real_texture_placement="3 0 8 32"
size="0 50%-16 5 50%+16"
/>
<image texture="global/modern/button/yellow-unselected-left-center.png"
real_texture_placement="0 0 8 16"
texture_size="0 0 8 16"
size="0 8 8 100%-8"
<image
texture="global/modern/progressbar/background_end.png"
real_texture_placement="6 0 7 32"
size="5 50%-16 100%-5 50%+16"
/>
<image texture="global/modern/button/yellow-unselected-left-bottom.png"
real_texture_placement="0 0 8 8"
size="0 100%-8 8 100%"
/>
<!-- Center -->
<image texture="global/modern/button/yellow-unselected-center-top.png"
real_texture_placement="0 0 128 8"
texture_size="0 0 128 8"
size="8 0 100%-8 8"
/>
<image texture="global/modern/button/yellow-unselected-center-center.png"
real_texture_placement="0 0 128 16"
texture_size="0 0 128 16"
size="8 8 100%-8 100%-8"
/>
<image texture="global/modern/button/yellow-unselected-center-bottom.png"
real_texture_placement="0 0 128 8"
texture_size="0 0 128 8"
size="8 100%-8 100%-8 100%"
/>
<!-- Right -->
<image texture="global/modern/button/yellow-unselected-right-top.png"
real_texture_placement="0 0 8 8"
size="100%-8 0 100% 8"
/>
<image texture="global/modern/button/yellow-unselected-right-center.png"
real_texture_placement="0 0 8 16"
texture_size="0 0 8 16"
size="100%-8 8 100% 100%-8"
/>
<image texture="global/modern/button/yellow-unselected-right-bottom.png"
real_texture_placement="0 0 8 8"
size="100%-8 100%-8 100% 100%"
<image
texture="global/modern/progressbar/background_end.png"
real_texture_placement="8 0 3 32"
size="100%-5 50%-16 100% 50%+16"
/>
</sprite>
<sprite name="ModernButtonYellowOver">
<effect add_color="60 42 42 0"/>
<!-- Left -->
<image texture="global/modern/button/yellow-unselected-left-top.png"
real_texture_placement="0 0 8 8"
size="0 0 8 8"
<sprite name="ModernProgressBar">
<image
texture="global/modern/progressbar/bar_end.png"
real_texture_placement="3 0 4 32"
size="-1 50%-16 0 50%+16"
/>
<image texture="global/modern/button/yellow-unselected-left-center.png"
real_texture_placement="0 0 8 16"
texture_size="0 0 8 16"
size="0 8 8 100%-8"
<image
texture="global/modern/progressbar/bar_end.png"
real_texture_placement="6 0 7 32"
size="0 50%-16 100% 50%+16"
/>
<image texture="global/modern/button/yellow-unselected-left-bottom.png"
real_texture_placement="0 0 8 8"
size="0 100%-8 8 100%"
/>
<!-- Center -->
<image texture="global/modern/button/yellow-unselected-center-top.png"
real_texture_placement="0 0 128 8"
texture_size="0 0 128 8"
size="8 0 100%-8 8"
/>
<image texture="global/modern/button/yellow-unselected-center-center.png"
real_texture_placement="0 0 128 16"
texture_size="0 0 128 16"
size="8 8 100%-8 100%-8"
/>
<image texture="global/modern/button/yellow-unselected-center-bottom.png"
real_texture_placement="0 0 128 8"
texture_size="0 0 128 8"
size="8 100%-8 100%-8 100%"
/>
<!-- Right -->
<image texture="global/modern/button/yellow-unselected-right-top.png"
real_texture_placement="0 0 8 8"
size="100%-8 0 100% 8"
/>
<image texture="global/modern/button/yellow-unselected-right-center.png"
real_texture_placement="0 0 8 16"
texture_size="0 0 8 16"
size="100%-8 8 100% 100%-8"
/>
<image texture="global/modern/button/yellow-unselected-right-bottom.png"
real_texture_placement="0 0 8 8"
size="100%-8 100%-8 100% 100%"
<image
texture="global/modern/progressbar/bar_end.png"
real_texture_placement="4 0 3 32"
size="100% 50%-16 100%+1 50%+16"
/>
</sprite>
<sprite name="ModernButtonYellowDisabled">
<effect grayscale=""/>
<!-- Left -->
<image texture="global/modern/button/yellow-unselected-left-top.png"
real_texture_placement="0 0 8 8"
size="0 0 8 8"
/>
<image texture="global/modern/button/yellow-unselected-left-center.png"
real_texture_placement="0 0 8 16"
texture_size="0 0 8 16"
size="0 8 8 100%-8"
/>
<image texture="global/modern/button/yellow-unselected-left-bottom.png"
real_texture_placement="0 0 8 8"
size="0 100%-8 8 100%"
/>
<!-- Center -->
<image texture="global/modern/button/yellow-unselected-center-top.png"
real_texture_placement="0 0 128 8"
texture_size="0 0 128 8"
size="8 0 100%-8 8"
/>
<image texture="global/modern/button/yellow-unselected-center-center.png"
real_texture_placement="0 0 128 16"
texture_size="0 0 128 16"
size="8 8 100%-8 100%-8"
/>
<image texture="global/modern/button/yellow-unselected-center-bottom.png"
real_texture_placement="0 0 128 8"
texture_size="0 0 128 8"
size="8 100%-8 100%-8 100%"
/>
<!-- Right -->
<image texture="global/modern/button/yellow-unselected-right-top.png"
real_texture_placement="0 0 8 8"
size="100%-8 0 100% 8"
/>
<image texture="global/modern/button/yellow-unselected-right-center.png"
real_texture_placement="0 0 8 16"
texture_size="0 0 8 16"
size="100%-8 8 100% 100%-8"
/>
<image texture="global/modern/button/yellow-unselected-right-bottom.png"
real_texture_placement="0 0 8 8"
size="100%-8 100%-8 100% 100%"
/>
<!--
==========================================
- Horizontal Tabs -
==========================================
-->
<sprite name="ModernTabHorizontalForeground">
<image backcolor="255 255 255 40" size="0 0 100% 100%"/>
<!-- Left, Top, Right Edge -->
<image backcolor="gold" size="0 0 2 100%"/>
<image backcolor="gold" size="2 0 100%-2 2"/>
<image backcolor="gold" size="100%-2 0 100% 100%"/>
</sprite>
<!-- GRAY -->
<sprite name="ModernButtonGray">
<!-- Background -->
<image texture="global/modern/button/gray-unselected-background.png"
real_texture_placement="0 0 512 128"
texture_size="0 0 512 128"
size="2 2 100%-2 100%-2"
/>
<!-- Left -->
<image texture="global/modern/button/gray-unselected-left-top.png"
real_texture_placement="0 0 8 8"
size="0 0 8 8"
/>
<image texture="global/modern/button/gray-unselected-left-center.png"
real_texture_placement="0 0 8 16"
texture_size="0 0 8 16"
size="0 8 8 100%-8"
/>
<image texture="global/modern/button/gray-unselected-left-bottom.png"
real_texture_placement="0 0 8 8"
size="0 100%-8 8 100%"
/>
<!-- Center -->
<image texture="global/modern/button/gray-unselected-center-top.png"
real_texture_placement="0 0 128 8"
texture_size="0 0 128 8"
size="8 0 100%-8 8"
/>
<image texture="global/modern/button/gray-unselected-center-bottom.png"
real_texture_placement="0 0 128 8"
texture_size="0 0 128 8"
size="8 100%-8 100%-8 100%"
/>
<!-- Right -->
<image texture="global/modern/button/gray-unselected-right-top.png"
real_texture_placement="0 0 8 8"
size="100%-8 0 100% 8"
/>
<image texture="global/modern/button/gray-unselected-right-center.png"
real_texture_placement="0 0 8 16"
texture_size="0 0 8 16"
size="100%-8 8 100% 100%-8"
/>
<image texture="global/modern/button/gray-unselected-right-bottom.png"
real_texture_placement="0 0 8 8"
size="100%-8 100%-8 100% 100%"
/>
<sprite name="ModernTabHorizontalBackground">
<image backcolor="50 35 0 120" size="0 0 100% 100%"/>
<!-- Left, Top, Right Edge -->
<image backcolor="gold" size="0 0 1 100%"/>
<image backcolor="gold" size="1 0 100%-1 1"/>
<image backcolor="gold" size="100%-1 0 100% 100%"/>
</sprite>
<sprite name="ModernButtonGrayOver">
<!-- Background -->
<image texture="global/modern/button/gray-unselected-background.png"
real_texture_placement="0 0 512 128"
texture_size="0 0 512 128"
size="2 2 100%-2 100%-2"
>
<effect add_color="42 42 42 0"/>
</image>
<!-- Left -->
<image texture="global/modern/button/gray-unselected-left-top.png"
real_texture_placement="0 0 8 8"
size="0 0 8 8"
/>
<image texture="global/modern/button/gray-unselected-left-center.png"
real_texture_placement="0 0 8 16"
texture_size="0 0 8 16"
size="0 8 8 100%-8"
/>
<image texture="global/modern/button/gray-unselected-left-bottom.png"
real_texture_placement="0 0 8 8"
size="0 100%-8 8 100%"
/>
<!-- Center -->
<image texture="global/modern/button/gray-unselected-center-top.png"
real_texture_placement="0 0 128 8"
texture_size="0 0 128 8"
size="8 0 100%-8 8"
/>
<image texture="global/modern/button/gray-unselected-center-bottom.png"
real_texture_placement="0 0 128 8"
texture_size="0 0 128 8"
size="8 100%-8 100%-8 100%"
/>
<!-- Right -->
<image texture="global/modern/button/gray-unselected-right-top.png"
real_texture_placement="0 0 8 8"
size="100%-8 0 100% 8"
/>
<image texture="global/modern/button/gray-unselected-right-center.png"
real_texture_placement="0 0 8 16"
texture_size="0 0 8 16"
size="100%-8 8 100% 100%-8"
/>
<image texture="global/modern/button/gray-unselected-right-bottom.png"
real_texture_placement="0 0 8 8"
size="100%-8 100%-8 100% 100%"
/>
<sprite name="ModernTabHorizontalSpacer">
<image backcolor="gold" size="0 0 100% 100%"/>
</sprite>
<sprite name="ModernButtonGrayDisabled">
<!-- Background -->
<image texture="global/modern/button/gray-unselected-background.png"
real_texture_placement="0 0 512 128"
texture_size="0 0 512 128"
size="2 2 100%-2 100%-2"
/>
<!-- Left -->
<image texture="global/modern/button/gray-unselected-left-top.png"
real_texture_placement="0 0 8 8"
size="0 0 8 8"
/>
<image texture="global/modern/button/gray-unselected-left-center.png"
real_texture_placement="0 0 8 16"
texture_size="0 0 8 16"
size="0 8 8 100%-8"
/>
<image texture="global/modern/button/gray-unselected-left-bottom.png"
real_texture_placement="0 0 8 8"
size="0 100%-8 8 100%"
/>
<!-- Center -->
<image texture="global/modern/button/gray-unselected-center-top.png"
real_texture_placement="0 0 128 8"
texture_size="0 0 128 8"
size="8 0 100%-8 8"
/>
<image texture="global/modern/button/gray-unselected-center-bottom.png"
real_texture_placement="0 0 128 8"
texture_size="0 0 128 8"
size="8 100%-8 100%-8 100%"
/>
<!-- Right -->
<image texture="global/modern/button/gray-unselected-right-top.png"
real_texture_placement="0 0 8 8"
size="100%-8 0 100% 8"
/>
<image texture="global/modern/button/gray-unselected-right-center.png"
real_texture_placement="0 0 8 16"
texture_size="0 0 8 16"
size="100%-8 8 100% 100%-8"
/>
<image texture="global/modern/button/gray-unselected-right-bottom.png"
real_texture_placement="0 0 8 8"
size="100%-8 100%-8 100% 100%"
/>
<sprite name="ModernTabHorizontalFrame">
<image backcolor="255 255 255 40" size="0 0 100% 100%"/>
<!-- Left, Right, Bottom Edge -->
<image backcolor="gold" size="0 0 2 100%"/>
<image backcolor="gold" size="100%-2 0 100% 100%"/>
<image backcolor="gold" size="2 100%-2 100%-2 100%"/>
</sprite>
<!--
==========================================
- Vertical Tabs -
==========================================
-->
<sprite name="ModernTabVerticalBackground">
<image backcolor="50 35 0 120" size="0 0 100% 100%"/>
<!-- Left, Top, Right, Bottom Edge -->
<image backcolor="gold" size="0 0 1 100%"/>
<image backcolor="gold" size="1 0 100%-1 1"/>
<image backcolor="gold" size="100%-1 0 100% 100%"/>
<image backcolor="gold" size="0 100%-1 100% 100%"/>
</sprite>
<sprite name="ModernTabVerticalForeground">
<image backcolor="255 255 255 40" size="0 0 100% 100%"/>
<!-- Left, Top, Right, Bottom Edge -->
<image backcolor="gold" size="0 0 2 100%"/>
<image backcolor="gold" size="2 0 100%-2 2"/>
<image backcolor="gold" size="100%-2 0 100% 100%"/>
<image backcolor="gold" size="2 100%-2 100%-2 100%"/>
</sprite>
<!--
==========================================
@@ -738,6 +522,26 @@
- Misc. -
==========================================
-->
<sprite name = "ModernWindowCornerBottomRight">
<!-- background -->
<image backcolor = "12 12 12"/>
<image texture = "global/modern/background.png"
texture_size = "0 0 1024 1024"
size = "0 0 100%-12 100%-12"
/>
<!-- shading -->
<image texture = "global/modern/shadow-high.png"
texture_size = "0 0 1024 256"
size = "0 100%-268 100%-12 100%-12"
/>
<!-- bottom edge -->
<image texture = "global/modern/border.png"
real_texture_placement = "0 0 2048 8"
size = "0 100%-16 100%-10 100%-8"
/>
</sprite>
<sprite name = "ModernDropDownArrow">
<image texture = "global/modern/dropdown-arrow.png"
real_texture_placement = "0 0 16 16"
@@ -834,4 +638,41 @@
size="0 50%-1 100% 50%+1"
/>
</sprite>
<sprite name="ModernArrowDownRed">
<effect add_color="123 53 53"/>
<image texture="global/modern/arrow_down_128x128.png"
size="0 4 100% 100%"
/>
</sprite>
<sprite name="ModernArrowDownRedBright">
<effect add_color="166 96 96"/>
<image texture="global/modern/arrow_down_128x128.png"
size="0 4 100% 100%"
/>
</sprite>
<sprite name="ModernArrowDownGrey">
<effect add_color="35 35 35"/>
<image texture="global/modern/arrow_down_128x128.png"
size="0 4 100% 100%"
/>
</sprite>
<sprite name="ModernArrowUpRed">
<effect add_color="123 53 53"/>
<image texture="global/modern/arrow_up_128x128.png"
size="0 4 100% 100%"
/>
</sprite>
<sprite name="ModernArrowUpRedBright">
<effect add_color="166 96 96"/>
<image texture="global/modern/arrow_up_128x128.png"
size="0 4 100% 100%"
/>
</sprite>
<sprite name="ModernArrowUpGrey">
<effect add_color="35 35 35"/>
<image texture="global/modern/arrow_up_128x128.png"
size="0 4 100% 100%"
/>
</sprite>
</sprites>
@@ -1,4 +1,4 @@
<?xml version = "1.0" encoding = "utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<styles>
<!--
@@ -18,38 +18,50 @@
buffer_zone="5"
multiline="false"
/>
<style name = "ModernWindow"
sprite = "ModernWindow"
buffer_zone = "12"
text_align = "left"
text_valign = "top"
<style name="ModernWindow"
sprite="ModernWindow"
buffer_zone="12"
text_align="left"
text_valign="top"
/>
<style name = "ModernDialog"
sprite = "ModernDialog"
buffer_zone = "12"
text_align = "left"
text_valign = "top"
<style name="ModernDialog"
sprite="ModernDialog"
buffer_zone="12"
text_align="left"
text_valign="top"
/>
<style name = "ModernPanel"
sprite = "ModernPanel"
buffer_zone = "12"
text_align = "left"
text_valign = "top"
/>
<style name = "ModernList"
buffer_zone = "5"
font = "sans-bold-stroke-14"
<style name="ModernList"
buffer_zone="5"
font="sans-bold-stroke-14"
heading_height="25"
scrollbar = "true"
scrollbar_style = "ModernScrollBar"
sprite = "ModernDarkBoxGoldNoTop"
sprite_selectarea = "ModernDarkBoxWhite"
sprite_heading = "ModernDarkBoxGoldNoBottom"
textcolor = "white"
textcolor_selected = "white"
text_align = "left"
text_valign = "center"
sound_selected = "audio/interface/ui/ui_button_click.ogg"
scrollbar="true"
scrollbar_style="ModernScrollBar"
sprite="ModernDarkBoxGoldNoTop"
sprite_selectarea="ModernDarkBoxWhite"
sprite_heading="ModernDarkBoxGoldNoBottom"
textcolor="white"
textcolor_selected="white"
text_align="left"
text_valign="center"
sound_selected="audio/interface/ui/ui_button_click.ogg"
/>
<style name="ModernSortedList"
buffer_zone="5"
font="sans-bold-stroke-14"
heading_height="25"
scrollbar="true"
scrollbar_style="ModernScrollBar"
sprite="ModernDarkBoxGoldNoTop"
sprite_selectarea="ModernDarkBoxWhite"
sprite_heading="ModernDarkBoxGoldNoBottom"
sprite_asc="ModernArrowUp"
sprite_desc="ModernArrowDown"
sprite_not_sorted="ModernNotSorted"
textcolor="white"
textcolor_selected="white"
text_align="left"
text_valign="center"
sound_selected="audio/interface/ui/ui_button_click.ogg"
/>
<style name="ModernDropDown"
dropdown_buffer="1"
@@ -57,24 +69,21 @@
textcolor="white"
text_align="left"
text_valign="center"
button_width="16"
sprite="ModernDarkBoxGold"
sprite_disabled="ModernDarkBoxGoldDisabled"
button_width="16"
sprite2="ModernDropDownArrow"
sprite2_disabled="ModernDropDownArrowDisabled"
sprite2_pressed="ModernDropDownArrowHighlight"
buffer_zone="8"
dropdown_size="224"
dropdown_size="225"
minimum_visible_items="3"
sprite_list="BlackBorderOnGray"
sprite_selectarea="ModernDarkBoxWhite"
textcolor_selected="white"
textcolor_disabled="140 140 140 255"
scrollbar="true"
scrollbar_style="ModernScrollBar"
sound_opened="audio/interface/ui/ui_button_click.ogg"
sound_closed="audio/interface/ui/ui_button_click.ogg"
sound_selected="audio/interface/ui/ui_button_click.ogg"
@@ -100,19 +109,13 @@
text_align="left"
text_valign="center"
/>
<style name="ModernTabLabelText"
<style name="ModernTopLabelText"
font="sans-bold-stroke-14"
textcolor="white"
text_align="center"
text_valign="top"
/>
<style name="ModernRightTabLabelText"
font="sans-bold-stroke-14"
textcolor="white"
text_align="right"
text_valign="top"
/>
<style name="ModernLeftTabLabelText"
<style name="ModernLeftTopLabelText"
font="sans-bold-stroke-14"
textcolor="white"
text_align="left"
@@ -126,6 +129,15 @@
scrollbar="true"
scrollbar_style="ModernScrollBar"
/>
<style name="ModernTextPanel"
buffer_zone="8"
scrollbar="true"
scrollbar_style="ModernScrollBar"
textcolor="white"
text_align="left"
text_valign="center"
sprite="ModernDarkBoxGold"
/>
<style name="ModernInput"
sprite="ModernDarkBoxWhite"
sprite_selectarea="color:150 0 0"
@@ -158,26 +170,34 @@
text_valign="center"
sound_pressed="audio/interface/ui/ui_button_click.ogg"
/>
<style name="ModernButtonYellow"
sprite="ModernButtonYellow"
sprite_disabled="ModernButtonYellowDisabled"
sprite_over="ModernButtonYellowOver"
sprite_pressed="ModernButtonYellow"
font="sans-bold-stroke-14"
<style name="ModernProgressBarBackground"
sprite="ModernProgressBarBackground"
/>
<style name="ModernProgressBar"
sprite_bar="ModernProgressBar"
size="3 0 100%-3 100%"
/>
<style name="ModernProgressBarText"
font="sans-stroke-14"
textcolor="white"
text_align="center"
text_valign="center"
/>
<style name="ModernTabButtonHorizontal"
sprite="ModernTabHorizontalBackground"
sound_pressed="audio/interface/ui/ui_button_click.ogg"
/>
<style name="ModernButtonGray"
sprite="ModernButtonGray"
sprite_disabled="ModernButtonGrayDisabled"
sprite_over="ModernButtonGrayOver"
sprite_pressed="ModernButtonGray"
font="sans-bold-stroke-14"
textcolor="white"
text_align="center"
text_valign="center"
<style name="ModernTabButtonVertical"
sprite="ModernTabVerticalBackground"
sound_pressed="audio/interface/ui/ui_button_click.ogg"
/>
<style name="ModernChart"
axis_color="209 174 132 255"
axis_width="2"
buffer_zone="4"
font="sans-stroke-14"
format_x="DECIMAL2"
format_y="DECIMAL2"
text_align="left"
/>
</styles>
@@ -0,0 +1,53 @@
var g_Terms = {};
function initTerms(terms)
{
g_Terms = terms;
}
function openTerms(page)
{
Engine.PushGuiPage("page_termsdialog.xml", {
"file": g_Terms[page].file,
"title": g_Terms[page].title,
"sprintf": g_Terms[page].sprintf,
"urlButtons": g_Terms[page].urlButtons || [],
"termsURL": g_Terms[page].termsURL || undefined,
"page": page,
"callback": "acceptTerms"
});
}
function acceptTerms(data)
{
g_Terms[data.page].accepted = data.accepted;
let value = data.accepted ? getTermsHash(data.page) : "0";
Engine.ConfigDB_CreateValue("user", g_Terms[data.page].config, value);
Engine.ConfigDB_WriteValueToFile("user", g_Terms[data.page].config, value, "config/user.cfg");
if (g_Terms[data.page].callback)
g_Terms[data.page].callback(data);
}
function checkTerms()
{
for (let page in g_Terms)
if (!g_Terms[page].accepted)
return g_Terms[page].instruction || page;
return "";
}
function getTermsHash(page)
{
return Engine.CalculateMD5(
(g_Terms[page].salt ? g_Terms[page].salt() : "") +
Engine.ReadFile(g_Terms[page].file));
}
function loadTermsAcceptance()
{
for (let page in g_Terms)
g_Terms[page].accepted = Engine.ConfigDB_GetValue("user", g_Terms[page].config) == getTermsHash(page);
}
+8 -2
View File
@@ -47,6 +47,7 @@ base_settings =
# Defaults are not put in here, because it ruins the concept of styles.
ex_settings =
attribute anchor { valign }?&
attribute auto_scroll { bool }?&
attribute buffer_zone { xsd:decimal }?&
attribute buffer_width { xsd:decimal }?&
attribute button_width { xsd:decimal }?&
@@ -54,8 +55,11 @@ ex_settings =
attribute clip { bool }?&
attribute dropdown_size { xsd:decimal }?&
attribute dropdown_buffer { xsd:decimal }?&
attribute minimum_visible_items { xsd:nonNegativeInteger }?&
attribute enabled { bool }?&
attribute font { text }?&
attribute format_x { text }?&
attribute format_y { text }?&
attribute fov_wedge_color { ccolor }?&
attribute heading_height { text }?&
attribute hotkey { text }?&
@@ -68,6 +72,7 @@ ex_settings =
attribute maxwidth { xsd:decimal }? &
attribute multiline { bool }?&
attribute offset { pos }?&
attribute readonly { bool }?&
attribute scrollbar { bool }?&
attribute scrollbar_style { text }?&
attribute scroll_bottom { bool }?&
@@ -158,7 +163,7 @@ column =
}
\include =
element include {
attribute file { text }|
attribute file { text }|
attribute directory { text }
}
item =
@@ -233,6 +238,8 @@ tooltip =
attribute name { text }&
attribute sprite { text }?&
attribute anchor { valign }?&
attribute axis_color { ccolor }?&
attribute axis_width { xsd:decimal { minInclusive = "0" } }?&
attribute buffer_zone { xsd:decimal }?&
attribute font { text }?&
attribute maxwidth { xsd:decimal }?&
@@ -278,6 +285,5 @@ image =
effect =
element effect {
attribute add_color { ccolor }?,
attribute multiply_color { ccolor }?,
attribute grayscale { empty }?
}
+33 -5
View File
@@ -174,6 +174,23 @@
<ref name="valign"/>
</attribute>
</optional>
<optional>
<attribute name="auto_scroll">
<ref name="bool"/>
</attribute>
</optional>
<optional>
<attribute name="axis_color">
<ref name="ccolor"/>
</attribute>
</optional>
<optional>
<attribute name="axis_width">
<data type="decimal">
<param name="minInclusive">0</param>
</data>
</attribute>
</optional>
<optional>
<attribute name="buffer_zone">
<data type="decimal"/>
@@ -209,6 +226,11 @@
<data type="decimal"/>
</attribute>
</optional>
<optional>
<attribute name="minimum_visible_items">
<data type="nonNegativeInteger"/>
</attribute>
</optional>
<optional>
<attribute name="enabled">
<ref name="bool"/>
@@ -217,6 +239,12 @@
<optional>
<attribute name="font"/>
</optional>
<optional>
<attribute name="format_x"/>
</optional>
<optional>
<attribute name="format_y"/>
</optional>
<optional>
<attribute name="fov_wedge_color">
<ref name="ccolor"/>
@@ -276,6 +304,11 @@
<ref name="pos"/>
</attribute>
</optional>
<optional>
<attribute name="readonly">
<ref name="bool"/>
</attribute>
</optional>
<optional>
<attribute name="scrollbar">
<ref name="bool"/>
@@ -842,11 +875,6 @@
<ref name="ccolor"/>
</attribute>
</optional>
<optional>
<attribute name="multiply_color">
<ref name="ccolor"/>
</attribute>
</optional>
<optional>
<attribute name="grayscale">
<empty/>
@@ -0,0 +1,11 @@
0 A.D. Empires Ascendant mod.io Disclaimer
Document Date: 2018-10-12
You are about to connect to the mod.io online service.
This service provides an easy way to download and install community-made mods and is provided by DBolical Pty Ltd, the company behind IndieDB and ModDB.
The service is for users age 13 and over.
Wildfire Games has taken care to make this connection secure and reviewed the mods for security flaws, but cannot guarantee that this does not pose any risks.
By using the service, you understand that mod.io's Terms of Use and Privacy Policy apply and that Wildfire Games is not liable for any damages resulting from this service.
+344
View File
@@ -0,0 +1,344 @@
var g_ModsAvailableOnline = [];
/**
* Indicates if we have encountered an error in one of the network-interaction attempts.
*
* We use a global so we don't get multiple messageBoxes appearing (one for each "tick").
*
* Set to `true` by showErrorMessageBox
* Set to `false` by init, updateModList, downloadFile, and cancelRequest
*/
var g_Failure;
/**
* Indicates if the user has cancelled a request.
*
* Primarily used so the user can cancel the mod list fetch, as whenever that get cancelled,
* the modio state reverts to "ready", even if we've successfully listed mods before.
*
* Set to `true` by cancelRequest
* Set to `false` by updateModList, and downloadFile
*/
var g_RequestCancelled;
var g_RequestStartTime;
/**
* Returns true if ModIoAdvanceRequest should be called.
*/
var g_ModIOState = {
/**
* Finished status indicators
*/
"ready": progressData => {
// GameID acquired, ready to fetch mod list
if (!g_RequestCancelled)
updateModList();
return true;
},
"listed": progressData => {
// List of available mods acquired
// Only run this once (for each update).
if (Engine.GetGUIObjectByName("modsAvailableList").list.length)
return true;
hideDialog();
Engine.GetGUIObjectByName("refreshButton").enabled = true;
g_ModsAvailableOnline = Engine.ModIoGetMods();
displayMods();
return true;
},
"success": progressData => {
// Successfully acquired a mod file
hideDialog();
Engine.GetGUIObjectByName("downloadButton").enabled = true;
return true;
},
/**
* In-progress status indicators.
*/
"gameid": progressData => {
// Acquiring GameID from mod.io
return true;
},
"listing": progressData => {
// Acquiring list of available mods from mod.io
return true;
},
"downloading": progressData => {
// Downloading a mod file
updateProgressBar(progressData.progress, g_ModsAvailableOnline[selectedModIndex()].filesize);
return true;
},
/**
* Error/Failure status indicators.
*/
"failed_gameid": progressData => {
// Game ID couldn't be retrieved
showErrorMessageBox(
sprintf(translateWithContext("mod.io error message", "Game ID could not be retrieved.\n\n%(technicalDetails)s"), {
"technicalDetails": progressData.error
}),
translateWithContext("mod.io error message", "Initialization Error"),
[translate("Abort"), translate("Retry")],
[closePage, init]);
return false;
},
"failed_listing": progressData => {
// Mod list couldn't be retrieved
showErrorMessageBox(
sprintf(translateWithContext("mod.io error message", "Mod List could not be retrieved.\n\n%(technicalDetails)s"), {
"technicalDetails": progressData.error
}),
translateWithContext("mod.io error message", "Fetch Error"),
[translate("Abort"), translate("Retry")],
[cancelModListUpdate, updateModList]);
return false;
},
"failed_downloading": progressData => {
// File couldn't be retrieved
showErrorMessageBox(
sprintf(translateWithContext("mod.io error message", "File download failed.\n\n%(technicalDetails)s"), {
"technicalDetails": progressData.error
}),
translateWithContext("mod.io error message", "Download Error"),
[translate("Abort"), translate("Retry")],
[cancelRequest, downloadMod]);
return false;
},
"failed_filecheck": progressData => {
// The file is corrupted
showErrorMessageBox(
sprintf(translateWithContext("mod.io error message", "File verification error.\n\n%(technicalDetails)s"), {
"technicalDetails": progressData.error
}),
translateWithContext("mod.io error message", "Verification Error"),
[translate("Abort")],
[cancelRequest]);
return false;
},
/**
* Default
*/
"none": progressData => {
// Nothing has happened yet.
return true;
}
};
function init(data)
{
progressDialog(
translate("Initializing mod.io interface."),
translate("Initializing"),
false,
translate("Cancel"),
closePage);
g_Failure = false;
Engine.ModIoStartGetGameId();
}
function onTick()
{
let progressData = Engine.ModIoGetDownloadProgress();
let handler = g_ModIOState[progressData.status];
if (!handler)
{
warn("Unrecognized progress status: " + progressData.status);
return;
}
if (handler(progressData))
Engine.ModIoAdvanceRequest();
}
function displayMods()
{
let modsAvailableList = Engine.GetGUIObjectByName("modsAvailableList");
let selectedMod = modsAvailableList.list[modsAvailableList.selected];
modsAvailableList.selected = -1;
let displayedMods = clone(g_ModsAvailableOnline);
for (let i = 0; i < displayedMods.length; ++i)
displayedMods[i].i = i;
let filterColumns = ["name", "name_id", "summary"];
let filterText = Engine.GetGUIObjectByName("modFilter").caption.toLowerCase();
displayedMods = displayedMods.filter(mod => filterColumns.some(column => mod[column].toLowerCase().indexOf(filterText) != -1));
displayedMods.sort((mod1, mod2) =>
modsAvailableList.selected_column_order *
(modsAvailableList.selected_column == "filesize" ?
mod1.filesize - mod2.filesize :
String(mod1[modsAvailableList.selected_column]).localeCompare(String(mod2[modsAvailableList.selected_column]))));
modsAvailableList.list_name = displayedMods.map(mod => mod.name);
modsAvailableList.list_name_id = displayedMods.map(mod => mod.name_id);
modsAvailableList.list_version = displayedMods.map(mod => mod.version);
modsAvailableList.list_filesize = displayedMods.map(mod => filesizeToString(mod.filesize));
modsAvailableList.list_dependencies = displayedMods.map(mod => (mod.dependencies || []).join(" "));
modsAvailableList.list = displayedMods.map(mod => mod.i);
modsAvailableList.selected = modsAvailableList.list.indexOf(selectedMod);
}
function clearModList()
{
let modsAvailableList = Engine.GetGUIObjectByName("modsAvailableList");
modsAvailableList.selected = -1;
for (let listIdx of Object.keys(modsAvailableList).filter(key => key.startsWith("list")))
modsAvailableList[listIdx] = [];
}
function selectedModIndex()
{
let modsAvailableList = Engine.GetGUIObjectByName("modsAvailableList");
if (modsAvailableList.selected == -1)
return undefined;
return +modsAvailableList.list[modsAvailableList.selected];
}
function showModDescription()
{
let selected = selectedModIndex();
Engine.GetGUIObjectByName("downloadButton").enabled = selected !== undefined;
Engine.GetGUIObjectByName("modDescription").caption = selected !== undefined ? g_ModsAvailableOnline[selected].summary : "";
}
function cancelModListUpdate()
{
cancelRequest();
if (!g_ModsAvailableOnline.length)
{
closePage();
return;
}
displayMods();
Engine.GetGUIObjectByName('refreshButton').enabled = true;
}
function updateModList()
{
clearModList();
Engine.GetGUIObjectByName("refreshButton").enabled = false;
progressDialog(
translate("Fetching and updating list of available mods."),
translate("Updating"),
false,
translate("Cancel Update"),
cancelModListUpdate);
g_Failure = false;
g_RequestCancelled = false;
Engine.ModIoStartListMods();
}
function downloadMod()
{
let selected = selectedModIndex();
progressDialog(
sprintf(translate("Downloading “%(modname)s”"), {
"modname": g_ModsAvailableOnline[selected].name
}),
translate("Downloading"),
true,
translate("Cancel Download"),
() => { Engine.GetGUIObjectByName("downloadButton").enabled = true; });
Engine.GetGUIObjectByName("downloadButton").enabled = false;
g_Failure = false;
g_RequestCancelled = false;
Engine.ModIoStartDownloadMod(selected);
}
function cancelRequest()
{
g_Failure = false;
g_RequestCancelled = true;
Engine.ModIoCancelRequest();
hideDialog();
}
function closePage(data)
{
Engine.PopGuiPageCB(undefined);
}
function showErrorMessageBox(caption, title, buttonCaptions, buttonActions)
{
if (g_Failure)
return;
messageBox(500, 250, caption, title, buttonCaptions, buttonActions);
g_Failure = true;
}
function progressDialog(dialogCaption, dialogTitle, showProgressBar, buttonCaption, buttonAction)
{
Engine.GetGUIObjectByName("downloadDialog_title").caption = dialogTitle;
let downloadDialog_caption = Engine.GetGUIObjectByName("downloadDialog_caption");
downloadDialog_caption.caption = dialogCaption;
let size = downloadDialog_caption.size;
size.rbottom = showProgressBar ? 40 : 80;
downloadDialog_caption.size = size;
Engine.GetGUIObjectByName("downloadDialog_progress").hidden = !showProgressBar;
Engine.GetGUIObjectByName("downloadDialog_status").hidden = !showProgressBar;
let downloadDialog_button = Engine.GetGUIObjectByName("downloadDialog_button");
downloadDialog_button.caption = buttonCaption;
downloadDialog_button.onPress = () => { cancelRequest(); buttonAction(); };
Engine.GetGUIObjectByName("downloadDialog").hidden = false;
g_RequestStartTime = Date.now();
}
/*
* The "remaining time" and "average speed" texts both naively assume that
* the connection remains relatively stable throughout the download.
*/
function updateProgressBar(progress, totalSize)
{
let progressPercent = Math.ceil(progress * 100);
Engine.GetGUIObjectByName("downloadDialog_progressBar").caption = progressPercent;
let transferredSize = progress * totalSize;
let transferredSizeObj = filesizeToObj(transferredSize);
// Translation: Mod file download indicator. Current size over expected final size, with percentage complete.
Engine.GetGUIObjectByName("downloadDialog_progressText").caption = sprintf(translate("%(current)s / %(total)s (%(percent)s%%)"), {
"current": filesizeToObj(totalSize).unit == transferredSizeObj.unit ? transferredSizeObj.filesize : filesizeToString(transferredSize),
"total": filesizeToString(totalSize),
"percent": progressPercent
});
let elapsedTime = Date.now() - g_RequestStartTime;
let remainingTime = progressPercent ? (100 - progressPercent) * elapsedTime / progressPercent : 0;
let avgSpeed = filesizeToObj(transferredSize / (elapsedTime / 1000));
// Translation: Mod file download status message.
Engine.GetGUIObjectByName("downloadDialog_status").caption = sprintf(translate("Time Elapsed: %(elapsed)s\nEstimated Time Remaining: %(remaining)s\nAverage Speed: %(avgSpeed)s"), {
"elapsed": timeToString(elapsedTime),
"remaining": remainingTime ? timeToString(remainingTime) : translate("∞"),
// Translation: Average download speed, used to give the user a very rough and naive idea of the download time. For example: 123.4 KiB/s
"avgSpeed": sprintf(translate("%(number)s %(unit)s/s"), {
"number": avgSpeed.filesize,
"unit": avgSpeed.unit
})
});
}
function hideDialog()
{
Engine.GetGUIObjectByName("downloadDialog").hidden = true;
}
+110
View File
@@ -0,0 +1,110 @@
<?xml version="1.0" encoding="utf-8"?>
<objects>
<script directory="gui/common/"/>
<script directory="gui/modio/"/>
<object type="image" sprite="ModernFade" z="0"/>
<object name="modio" type="image" style="ModernDialog" size="10% 10% 90% 90%">
<action on="Tick">
onTick();
</action>
<!-- Page Title -->
<object style="ModernLabelText" type="text" size="50%-128 -18 50%+128 14">
<translatableAttribute id="caption">mod.io Mods</translatableAttribute>
</object>
<!-- Available Mods Wrapper -->
<object name="modsAvailable" size="16 20 100%-16 100%-70" style="ModmodScrollbar">
<object style="ModernLabelText" type="text" size="0 5 100% 25">
<translatableAttribute id="caption">Available Mods</translatableAttribute>
</object>
<object name="modFilter"
type="input"
style="ModernInput"
size="16 0 200 24"
>
<action on="Press">displayMods();</action>
<action on="TextEdit">displayMods();</action>
</object>
<object name="modsAvailableList"
type="olist"
style="ModernSortedList"
size="0 30 100%-2 100%"
sortable="true"
selected_column="name"
selected_column_order="1"
font="sans-stroke-13"
>
<action on="SelectionChange">showModDescription();</action>
<action on="SelectionColumnChange">displayMods();</action>
<action on="MouseLeftDoubleClickItem">downloadMod();</action>
<!-- List headers -->
<!-- Keep in sync with mod property names -->
<column id="name_id" color="255 255 255" width="20%">
<translatableAttribute id="heading">Name</translatableAttribute>
</column>
<column id="version" color="255 255 255" width="15%">
<translatableAttribute id="heading">Version</translatableAttribute>
</column>
<column id="name" color="255 255 255" width="20%">
<translatableAttribute id="heading">Mod Label</translatableAttribute>
</column>
<column id="filesize" color="255 255 255" width="20%">
<translatableAttribute id="heading">File Size</translatableAttribute>
</column>
<column id="dependencies" color="255 255 255" width="25%">
<translatableAttribute id="heading">Dependencies</translatableAttribute>
</column>
</object>
<object name="modDescription" type="text" style="ModmodScrollbar" size="0 100% 100%-16 100%+28" />
</object>
<!-- Buttons -->
<object type="button" style="ModernButtonRed" size="100%-552 100%-44 100%-372 100%-16">
<translatableAttribute id="caption">Back</translatableAttribute>
<action on="Press">closePage();</action>
</object>
<object name="refreshButton" type="button" style="ModernButtonRed" size="100%-368 100%-44 100%-188 100%-16" enabled="false">
<translatableAttribute id="caption">Refresh List</translatableAttribute>
<action on="Press">updateModList();</action>
</object>
<object name="downloadButton" type="button" style="ModernButtonRed" size="100%-184 100%-44 100%-16 100%-16" enabled="false">
<translatableAttribute id="caption">Download</translatableAttribute>
<action on="Press">downloadMod();</action>
</object>
</object>
<!-- Download/Request-in-progress Dialog -->
<!-- Captions are supplied in modio.js -->
<!-- This must be after the buttons, and with "z" > 20, else it and/or other objects will not be drawn correctly -->
<object name="downloadDialog" type="image" sprite="ModernFade" z="30" size="0 0 100% 100%">
<object type="image" style="ModernDialog" size="50%-210 50%-96 50%+210 50%+96">
<object name="downloadDialog_title" type="text" style="ModernLabelText" size="50%-128 0%-16 50%+128 16"/>
<object name="downloadDialog_caption" type="text" style="ModernLabelText" size="0 0 100% 40%"/>
<object name="downloadDialog_progress" size="50%-160 35%-16 50%+160 35%+16" type="image" style="ModernProgressBarBackground">
<object name="downloadDialog_progressBar" type="progressbar" style="ModernProgressBar"/>
<object name="downloadDialog_progressText" type="text" style="ModernProgressBarText"/>
</object>
<object name="downloadDialog_status" type="text" style="ModernLabelText" size="0 35%+16 100% 35%+64"/>
<object name="downloadDialog_button" type="button" style="ModernButtonRed" size="50%-120 80%-14 50%+120 80%+14" hotkey="cancel"/>
</object>
</object>
</objects>
@@ -0,0 +1,4 @@
function init(data)
{
Engine.GetGUIObjectByName("mainText").caption = Engine.TranslateLines(Engine.ReadFile("gui/modmod/help/help.txt"));
}
@@ -0,0 +1,7 @@
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!
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<objects>
<script directory="gui/common/"/>
<script directory="gui/modmod/help/"/>
<!-- Add a translucent black background to fade out the menu page -->
<object type="image" z="0" sprite="ModernFade"/>
<object type="image" style="ModernDialog" size="50%-466 50%-316 50%+466 50%+316">
<object name="title" style="ModernLabelText" type="text" size="50%-128 -18 50%+128 14">
<translatableAttribute id="caption">Pyrogenesis Mod Selector</translatableAttribute>
</object>
<object type="image" sprite="ModernFade" size="20 20 100%-20 100%-58">
<object name="mainText" type="text" style="ModernTextPanel"/>
</object>
<object type="button" style="ModernButtonRed" tooltip_style="snToolTip" size="100%-602 100%-52 100%-412 100%-24" hotkey="cancel">
<translatableAttribute id="caption">Close</translatableAttribute>
<action on="Press">Engine.PopGuiPage();</action>
</object>
<object type="button" style="ModernButtonRed" size="100%-408 100%-52 100%-218 100%-24">
<translatableAttribute id="caption">Modding Guide</translatableAttribute>
<action on="Press">Engine.OpenURL("https://trac.wildfiregames.com/wiki/Modding_Guide");</action>
</object>
<object type="button" style="ModernButtonRed" size="100%-214 100%-52 100%-24 100%-24">
<translatableAttribute id="caption">Visit mod.io</translatableAttribute>
<action on="Press">Engine.OpenURL("https://mod.io");</action>
</object>
</object>
</objects>
+257 -376
View File
@@ -1,340 +1,246 @@
/*
Example contents of g_mods:
{
"foldername1": { // this is the content of the json file in a specific mod
name: "unique_shortname", // eg "0ad", "rote"
version: "0.0.16",
label: "Nice Mod Name", // eg "0 A.D. - Empires Ascendant"
type: "content|functionality|mixed/mod-pack",
url: "http://wildfregames.com/",
description: "",
dependencies: [] // (name({<,<=,==,>=,>}version)?)+
},
"foldername2": {
name: "mod2",
label: "Mod 2",
version: "1.1",
type: "content|functionality|mixed/mod-pack", // optional
url: "http://play0ad.wfg.com/", //optional
description: "",
dependencies: []
}
}
*/
var g_mods = {}; // Contains all JSONs as explained in the structure above
var g_modsEnabled = []; // folder names
var g_modsAvailable = []; // folder names
const g_sortByOptions = [translate("Name"), translate("Folder"), translate("Label"), translate("Version")];
const SORT_BY_NAME = 0;
const SORT_BY_FOLDER = 1;
const SORT_BY_LABEL = 2;
const SORT_BY_VERSION = 3;
var g_modTypes = [translate("Type: Any")];
/**
* @file This GUI page displays all available mods and allows the player to enabled and launch a set of compatible mods.
*/
/**
* Fetches the mod lists in JSON from the Engine.
* Initiates a first creation of the GUI lists.
* Enabled mods are read from the Configuration and checked if still available.
* A mod is defined by a mod.json file, for example
* {
* "name": "0ad",
* "version": "0.0.23",
* "label": "0 A.D. - Empires Ascendant",
* "url": "https://wildfiregames.com/",
* "description": "A free, open-source, historical RTS game.",
* "dependencies": []
* }
*
* Or:
* {
* "name": "mod2",
* "label": "Mod 2",
* "version": "1.1",
* "description": "",
* "dependencies": ["0ad<=0.0.23", "rote"]
* }
*
* A mod is identified by the directory name.
* A mod must define the "name", "version", "label", "description" and "dependencies" property.
* The "url" property is optional.
*
* The property "name" can consist alphanumeric characters, underscore and dash.
* The name is used for version comparison of mod dependencies.
* The property "version" may only contain numbers and up to two periods.
* The property "label" is a human-readable name of the mod.
* The property "description" is a human-readable summary of the features of the mod.
* The property "url" is reference to a website about the mod.
* The property "dependencies" is an array of strings. Each string is either a modname or a mod version comparison.
* A mod version comparison is a modname, followed by an operator (=, <, >, <= or >=), followed by a mod version.
* This allows mods to express upwards and downwards compatibility.
*/
function init()
/**
* Mod definitions loaded from the files, including invalid mods.
*/
var g_Mods = {};
/**
* Folder names of all mods that are or can be launched.
*/
var g_ModsEnabled = [];
var g_ModsDisabled = [];
/**
* Name of the mods installed by the ModInstaller.
*/
var g_InstalledMods;
var g_ColorNoModSelected = "255 255 100";
var g_ColorDependenciesMet = "100 255 100";
var g_ColorDependenciesNotMet = "255 100 100";
function init(data, hotloadData)
{
let mods = Engine.GetAvailableMods();
let keys = ["name", "label", "description", "dependencies", "version"];
Object.keys(mods).forEach(function(k) {
for (let i = 0; i < keys.length; ++i)
if (!keys[i] in mods[k])
{
log("Skipping mod '"+k+"'. Missing property '"+keys[i]+"'.");
return;
}
g_InstalledMods = data && data.installedMods || hotloadData && hotloadData.installedMods || [];
g_mods[k] = mods[k];
});
initMods();
initGUIButtons(data);
}
g_modsEnabled = getExistingModsFromConfig();
g_modsAvailable = Object.keys(g_mods).filter(function(i) { return g_modsEnabled.indexOf(i) === -1; });
function initMods()
{
loadMods();
loadEnabledMods();
validateMods();
initGUIFilters();
}
function getHotloadData()
{
return { "installedMods": g_InstalledMods };
}
function loadMods()
{
g_Mods = Engine.GetAvailableMods();
deepfreeze(g_Mods);
}
function loadEnabledMods()
{
g_ModsEnabled = Engine.ConfigDB_GetValue("user", "mod.enabledmods").split(/\s+/).filter(folder => !!g_Mods[folder]);
g_ModsDisabled = Object.keys(g_Mods).filter(folder => g_ModsEnabled.indexOf(folder) == -1);
}
function validateMods()
{
for (let folder in g_Mods)
validateMod(folder, g_Mods[folder], true);
}
function initGUIFilters()
{
Engine.GetGUIObjectByName("negateFilter").checked = false;
Engine.GetGUIObjectByName("modGenericFilter").caption = translate("Filter");
Engine.GetGUIObjectByName("modTypeFilter").selected = 0;
var sortBy = Engine.GetGUIObjectByName("sortBy");
sortBy.list = g_sortByOptions;
sortBy.selected = SORT_BY_NAME;
// sort ascending by default
Engine.GetGUIObjectByName("isOrderDescending").checked = false;
generateModsLists();
Engine.GetGUIObjectByName("message").caption = translate("Message: Mods Loaded.");
displayModLists();
}
/**
* Recreating both the available and enabled mods lists.
*/
function generateModsLists()
function initGUIButtons(data)
{
generateModsList('modsAvailableList', g_modsAvailable);
generateModsList('modsEnabledList', g_modsEnabled);
// Either get back to the previous page or quit if there is no previous page
let cancelButton = !data || data.cancelbutton;
Engine.GetGUIObjectByName("cancelButton").hidden = !cancelButton;
Engine.GetGUIObjectByName("quitButton").hidden = cancelButton;
}
function saveMods()
{
// always sort mods before saving
sortMods();
Engine.ConfigDB_CreateValue("user", "mod.enabledmods", ["mod"].concat(g_modsEnabled).join(" "));
sortEnabledMods();
Engine.ConfigDB_CreateValue("user", "mod.enabledmods", ["mod"].concat(g_ModsEnabled).join(" "));
Engine.ConfigDB_WriteFile("user", "config/user.cfg");
}
function startMods()
{
// always sort mods before starting
sortMods();
Engine.SetMods(["mod"].concat(g_modsEnabled));
sortEnabledMods();
Engine.SetMods(["mod"].concat(g_ModsEnabled));
Engine.RestartEngine();
}
function getExistingModsFromConfig()
function displayModLists()
{
var existingMods = [];
var mods = [];
var cfgMods = Engine.ConfigDB_GetValue("user", "mod.enabledmods");
if (cfgMods.length > 0)
mods = cfgMods.split(/\s+/);
mods.forEach(function(mod) {
if (mod in g_mods)
existingMods.push(mod);
});
return existingMods;
displayModList("modsEnabledList", g_ModsEnabled);
displayModList("modsDisabledList", g_ModsDisabled);
}
/**
* (Re-)Generate List of all mods.
* @param listObjectName The GUI object's name (e.g. "modsEnabledList", "modsAvailableList")
*/
function generateModsList(listObjectName, mods)
function displayModList(listObjectName, folders)
{
var sortBy = Engine.GetGUIObjectByName("sortBy");
var orderDescending = Engine.GetGUIObjectByName("isOrderDescending");
var isDescending = orderDescending && orderDescending.checked;
let listObject = Engine.GetGUIObjectByName(listObjectName);
// TODO: Sorting mods by dependencies would be nice
if (listObjectName != "modsEnabledList")
if (listObjectName == "modsDisabledList")
{
var idx = -1;
if (sortBy)
idx = sortBy.selected;
switch (idx)
{
default:
warn("generateModsList: invalid index '"+idx+"'"); // fall through
// sort by unique name alphanumerically by default:
case -1:
case SORT_BY_NAME:
mods.sort(function(a, b)
{
var ret = compare(g_mods[a].name.toLowerCase(), g_mods[b].name.toLowerCase());
return ret * (isDescending ? -1 : 1);
});
break;
case SORT_BY_FOLDER:
mods.sort(function(a, b)
{
return compare(a.toLowerCase(), b.toLowerCase()) * (isDescending ? -1 : 1);
});
break;
case SORT_BY_LABEL:
mods.sort(function(a, b)
{
var ret = compare(g_mods[a].label.toLowerCase(), g_mods[b].label.toLowerCase());
return ret * (isDescending ? -1 : 1);
});
break;
case SORT_BY_VERSION:
mods.sort(function(a, b)
{
// TODO reuse actual logic
var ret = compare(g_mods[a].version, g_mods[b].version);
return ret * (isDescending ? -1 : 1);
});
break;
}
let sortFolder = folder => String(g_Mods[folder][listObject.selected_column] || folder);
folders.sort((folder1, folder2) =>
listObject.selected_column_order *
sortFolder(folder1).localeCompare(sortFolder(folder2)));
}
var [keys, names, folders, labels, types, urls, versions, dependencies] = [[],[],[],[],[],[],[],[]];
mods.forEach(function(foldername)
{
var mod = g_mods[foldername];
if (mod.type && g_modTypes.indexOf(mod.type) == -1)
g_modTypes.push(mod.type);
folders = folders.filter(filterMod);
if (filterMod(foldername))
return;
keys.push(foldername);
names.push(mod.name);
folders.push('[color="45 45 45"](' + foldername + ')[/color]');
labels.push(mod.label || "");
types.push(mod.type || "");
urls.push(mod.url || "");
versions.push(mod.version || "");
dependencies.push((mod.dependencies || []).join(" "));
});
// Update the list
var obj = Engine.GetGUIObjectByName(listObjectName);
obj.list_name = names;
obj.list_modFolderName = folders;
obj.list_modLabel = labels;
obj.list_modType = types;
obj.list_modURL = urls;
obj.list_modVersion = versions;
obj.list_modDependencies = dependencies;
obj.list = keys;
var modTypeFilter = Engine.GetGUIObjectByName("modTypeFilter");
modTypeFilter.list = g_modTypes;
}
function compare(a, b)
{
return ( (a > b) ? 1 : (b > a) ? -1 : 0 );
listObject.list_name = folders.map(folder => g_Mods[folder].name).map(name => g_InstalledMods.indexOf(name) == -1 ? name : coloredText(name, "green"));
listObject.list_folder = folders;
listObject.list_label = folders.map(folder => g_Mods[folder].label);
listObject.list_url = folders.map(folder => g_Mods[folder].url || "");
listObject.list_version = folders.map(folder => g_Mods[folder].version);
listObject.list_dependencies = folders.map(folder => g_Mods[folder].dependencies.join(" "));
listObject.list = folders;
}
function enableMod()
{
var obj = Engine.GetGUIObjectByName("modsAvailableList");
var pos = obj.selected;
if (pos === -1)
let modsDisabledList = Engine.GetGUIObjectByName("modsDisabledList");
let pos = modsDisabledList.selected;
if (pos == -1 || !areDependenciesMet(g_ModsDisabled[pos]))
return;
var mod = g_modsAvailable[pos];
g_ModsEnabled.push(g_ModsDisabled.splice(pos, 1)[0]);
// Move it to the other table
// check dependencies, warn about not satisfied dependencies and abort if so:
if (!areDependenciesMet(mod))
return;
if (pos >= g_ModsDisabled.length)
--pos;
g_modsEnabled.push(g_modsAvailable.splice(pos, 1)[0]);
modsDisabledList.selected = pos;
if (pos >= g_modsAvailable.length)
pos--;
obj.selected = pos;
generateModsLists();
displayModLists();
}
function disableMod()
{
var obj = Engine.GetGUIObjectByName("modsEnabledList");
var pos = obj.selected;
if (pos === -1)
let modsEnabledList = Engine.GetGUIObjectByName("modsEnabledList");
let pos = modsEnabledList.selected;
if (pos == -1)
return;
var mod = g_modsEnabled[pos];
g_modsAvailable.push(g_modsEnabled.splice(pos, 1)[0]);
g_ModsDisabled.push(g_ModsEnabled.splice(pos, 1)[0]);
// Remove mods that required the removed mod and cascade
// Sort them, so we know which ones can depend on the removed mod
// TODO: Find position where the removed mod would have fit (for now assume idx 0)
sortMods();
for (var i = 0; i < g_modsEnabled.length; ++i)
{
if (!areDependenciesMet(g_modsEnabled[i]))
sortEnabledMods();
for (let i = 0; i < g_ModsEnabled.length; ++i)
if (!areDependenciesMet(g_ModsEnabled[i]))
{
g_modsAvailable.push(g_modsEnabled.splice(i, 1)[0]);
g_ModsDisabled.push(g_ModsEnabled.splice(i, 1)[0]);
--i;
}
}
// select the last element even if more than 1 mod has been removed:
if (pos > g_modsEnabled.length - 1)
pos = g_modsEnabled.length - 1;
obj.selected = pos;
modsEnabledList.selected = Math.min(pos, g_ModsEnabled.length - 1);
generateModsLists();
}
function resetFilters()
{
Engine.GetGUIObjectByName("modGenericFilter").caption = "";
Engine.GetGUIObjectByName("negateFilter").checked = false;
// NOTE: Calling generateModsLists() is not needed as the selection changes and that calls applyFilters()
Engine.GetGUIObjectByName("modTypeFilter").selected = 0;
displayModLists();
}
function applyFilters()
{
// Save selected rows
let modsAvailableList = Engine.GetGUIObjectByName("modsAvailableList");
let modsDisabledList = Engine.GetGUIObjectByName("modsDisabledList");
let modsEnabledList = Engine.GetGUIObjectByName("modsEnabledList");
let selectedModAvailableFolder = modsAvailableList.list_modFolderName[modsAvailableList.selected];
let selectedModEnabledFolder = modsEnabledList.list_modFolderName[modsEnabledList.selected];
let selectedDisabledFolder = modsDisabledList.list_folder[modsDisabledList.selected];
let selectedEnabledFolder = modsEnabledList.list_folder[modsEnabledList.selected];
// Remove selected rows to prevent a link to a non existing item
modsAvailableList.selected = -1;
modsDisabledList.selected = -1;
modsEnabledList.selected = -1;
generateModsLists();
displayModLists();
// Restore previously selected rows
modsAvailableList.selected = modsAvailableList.list_modFolderName.indexOf(selectedModAvailableFolder);
modsEnabledList.selected = modsEnabledList.list_modFolderName.indexOf(selectedModEnabledFolder);
modsDisabledList.selected = modsDisabledList.list_folder.indexOf(selectedDisabledFolder);
modsEnabledList.selected = modsEnabledList.list_folder.indexOf(selectedEnabledFolder);
Engine.GetGUIObjectByName("globalModDescription").caption = "";
}
/**
* Filter a mod based on the status of the filters.
*
* @param modFolder Mod to be tested.
* @return True if mod should not be displayed.
*/
function filterMod(modFolder)
function filterMod(folder)
{
var mod = g_mods[modFolder];
let mod = g_Mods[folder];
var modTypeFilter = Engine.GetGUIObjectByName("modTypeFilter");
var genericFilter = Engine.GetGUIObjectByName("modGenericFilter");
var negateFilter = Engine.GetGUIObjectByName("negateFilter");
let negateFilter = Engine.GetGUIObjectByName("negateFilter").checked;
let searchText = Engine.GetGUIObjectByName("modGenericFilter").caption;
// TODO: and result of filters together (type && generic)
if (searchText &&
searchText != translate("Filter") &&
folder.indexOf(searchText) == -1 &&
mod.name.indexOf(searchText) == -1 &&
mod.label.indexOf(searchText) == -1 &&
(mod.url || "").indexOf(searchText) == -1 &&
mod.version.indexOf(searchText) == -1 &&
mod.description.indexOf(searchText) == -1 &&
mod.dependencies.indexOf(searchText) == -1)
return negateFilter;
// We assume index 0 means display all for any given filter.
if (modTypeFilter.selected > 0
&& (mod.type || "") != modTypeFilter.list[modTypeFilter.selected])
return !negateFilter.checked;
if (genericFilter && genericFilter.caption && genericFilter.caption != "" && genericFilter.caption != translate("Filter"))
{
var t = genericFilter.caption;
if (modFolder.indexOf(t) === -1
&& mod.name.indexOf(t) === -1
&& mod.label.indexOf(t) === -1
&& (mod.type || "").indexOf(t) === -1
&& (mod.url || "").indexOf(t) === -1
&& mod.version.indexOf(t) === -1
&& mod.description.indexOf(t) === -1
&& mod.dependencies.indexOf(t) === -1)
{
return !negateFilter.checked;
}
}
return negateFilter.checked;
return !negateFilter;
}
function closePage()
@@ -343,176 +249,151 @@ function closePage()
}
/**
* Moves an item in the list @p objectName up or down depending on the value of @p up.
* Moves an item in the list up or down.
*/
function moveCurrItem(objectName, up)
{
var obj = Engine.GetGUIObjectByName(objectName);
if (!obj)
let obj = Engine.GetGUIObjectByName(objectName);
let idx = obj.selected;
if (idx == -1)
return;
var idx = obj.selected;
if (idx === -1)
return;
var num = obj.list.length;
var idx2 = idx + (up ? -1 : 1);
let num = obj.list.length;
let idx2 = idx + (up ? -1 : 1);
if (idx2 < 0 || idx2 >= num)
return;
var tmp = g_modsEnabled[idx];
g_modsEnabled[idx] = g_modsEnabled[idx2];
g_modsEnabled[idx2] = tmp;
let tmp = g_ModsEnabled[idx];
g_ModsEnabled[idx] = g_ModsEnabled[idx2];
g_ModsEnabled[idx2] = tmp;
// Selected object reached the new position.
obj.list = g_modsEnabled;
obj.list = g_ModsEnabled;
obj.selected = idx2;
generateModsList('modsEnabledList', g_modsEnabled);
displayModList("modsEnabledList", g_ModsEnabled);
}
function areDependenciesMet(mod)
function areDependenciesMet(folder)
{
var guiObject = Engine.GetGUIObjectByName("message");
for (var dependency of g_mods[mod].dependencies)
let guiObject = Engine.GetGUIObjectByName("message");
for (let dependency of g_Mods[folder].dependencies)
{
if (isDependencyMet(dependency))
continue;
guiObject.caption = '[color="250 100 100"]' + translate(sprintf('Dependency not met: %(dep)s', { "dep": dependency })) +'[/color]';
guiObject.caption = coloredText(
sprintf(translate('Dependency not met: %(dep)s'), { "dep": dependency }),
g_ColorDependenciesNotMet);
return false;
}
guiObject.caption = '[color="100 250 100"]' + translate('All dependencies met') + '[/color]';
guiObject.caption = coloredText(translate('All dependencies met'), g_ColorDependenciesMet);
return true;
}
/**
* @param dependency: Either id (unique modJson.name) and version or only the unique mod name.
* Concatenated by either "=", ">", "<", ">=", "<=".
* @param dependency is a mod name or a mod version comparison.
*/
function isDependencyMet(dependency_idAndVersion, modsEnabled = null)
function isDependencyMet(dependency)
{
if (!modsEnabled)
modsEnabled = g_modsEnabled;
let operator = dependency.match(g_RegExpComparisonOperator);
let [name, version] = operator ? dependency.split(operator[0]) : [dependency, undefined];
// Split on {=,<,<=,>,>=} and use the second part as the version number
// and whatever we split on as a way to handle that version.
var op = dependency_idAndVersion.match(/(<=|>=|<|>|=)/);
// Did the dependency contain a version number?
if (op)
{
op = op[0];
var dependency_parts = dependency_idAndVersion.split(op);
var dependency_version = dependency_parts[1];
var dependency_id = dependency_parts[0];
}
else
var dependency_id = dependency_idAndVersion;
// modsEnabled_key currently is the mod folder name.
for (var modsEnabled_key of modsEnabled)
{
var modJson = g_mods[modsEnabled_key];
if (modJson.name != dependency_id)
continue;
// There could be another mod with a satisfying version
if (!op || versionSatisfied(modJson.version, op, dependency_version))
return true;
}
return false;
return g_ModsEnabled.some(folder =>
g_Mods[folder].name == name &&
(!operator || versionSatisfied(g_Mods[folder].version, operator[0], version)));
}
/**
* Returns true if @p version satisfies @p op (<,<=,=,>=,>) @p requirement.
* @note @p version and @p requirement are split on '.' and everything after
* Compares the given versions using the given operator.
* '-' or '_' is ignored. Only numbers are supported.
* @note "5.3" < "5.3.0"
*/
function versionSatisfied(version, op, requirement)
function versionSatisfied(version1, operator, version2)
{
var reqList = requirement.split(/[-_]/)[0].split(/\./g);
var avList = version.split(/[-_]/)[0].split(/\./g);
let versionList1 = version1.split(/[-_]/)[0].split(/\./g);
let versionList2 = version2.split(/[-_]/)[0].split(/\./g);
var eq = op.indexOf("=") !== -1;
var lt = op.indexOf("<") !== -1;
var gt = op.indexOf(">") !== -1;
if (!(eq || lt || gt))
let eq = operator.indexOf("=") != -1;
let lt = operator.indexOf("<") != -1;
let gt = operator.indexOf(">") != -1;
for (let i = 0; i < Math.min(versionList1.length, versionList2.length); ++i)
{
warn("No valid compare op");
return false;
}
let diff = +versionList1[i] - +versionList2[i];
var l = Math.min(reqList.length, avList.length);
for (var i = 0; i < l; ++i)
{
// TODO: Handle NaN
var diff = +avList[i] - +reqList[i];
// Early success
if (gt && diff > 0)
return true;
if (lt && diff < 0)
if (gt && diff > 0 || lt && diff < 0)
return true;
// Early failure
if (gt && diff < 0)
return false;
if (lt && diff > 0)
return false;
if (eq && diff !== 0)
if (gt && diff < 0 || lt && diff > 0 || eq && diff)
return false;
}
// common prefix matches
var ldiff = avList.length - reqList.length;
if (ldiff === 0)
let ldiff = versionList1.length - versionList2.length;
if (!ldiff)
return eq;
// NB: 2.3 != 2.3.0
if (ldiff < 0)
return lt;
if (ldiff > 0)
return gt;
// Can't be reached
error("version checking code broken");
return false;
return gt;
}
function sortMods()
function sortEnabledMods()
{
// store the list of dependencies per mod, but strip the version numbers
var deps = {};
for (var mod of g_modsEnabled)
{
deps[mod] = [];
if (!g_mods[mod].dependencies)
continue;
deps[mod] = g_mods[mod].dependencies.map(function(d) { return d.split(/(<=|>=|<|>|=)/)[0]; });
}
var sortFunction = function(mod1, mod2)
{
var name1 = g_mods[mod1].name;
var name2 = g_mods[mod2].name;
if (deps[mod1].indexOf(name2) != -1)
return 1;
if (deps[mod2].indexOf(name1) != -1)
return -1;
return 0;
}
g_modsEnabled.sort(sortFunction);
generateModsList("modsEnabledList", g_modsEnabled);
let dependencies = {};
for (let folder of g_ModsEnabled)
dependencies[folder] = g_Mods[folder].dependencies.map(d => d.split(g_RegExpComparisonOperator)[0]);
g_ModsEnabled.sort((folder1, folder2) =>
dependencies[folder1].indexOf(g_Mods[folder2].name) != -1 ? 1 :
dependencies[folder2].indexOf(g_Mods[folder1].name) != -1 ? -1 : 0);
displayModList("modsEnabledList", g_ModsEnabled);
}
function showModDescription(listObjectName)
function selectedMod(listObjectName)
{
var listObject = Engine.GetGUIObjectByName(listObjectName);
if (listObject.selected == -1)
var desc = '[color="255 100 100"]' + translate("No mod has been selected.") + '[/color]';
else
let listObject = Engine.GetGUIObjectByName(listObjectName);
let otherListObject = Engine.GetGUIObjectByName(listObjectName == "modsDisabledList" ?
"modsEnabledList" : "modsDisabledList");
if (listObject.selected != -1)
{
let key = listObject.list[listObject.selected];
var desc = g_mods[key].description;
otherListObject.selected = -1;
Engine.GetGUIObjectByName("visitWebButton").enabled = true;
let toggleModButton = Engine.GetGUIObjectByName("toggleModButton");
toggleModButton.caption = listObjectName == "modsDisabledList" ? "Enable" : "Disable";
toggleModButton.enabled = true;
toggleModButton.onPress = listObjectName == "modsDisabledList" ? enableMod : disableMod;
Engine.GetGUIObjectByName("enabledModUp").enabled = listObjectName == "modsEnabledList";
Engine.GetGUIObjectByName("enabledModDown").enabled = listObjectName == "modsEnabledList";
}
Engine.GetGUIObjectByName("globalModDescription").caption = desc;
Engine.GetGUIObjectByName("globalModDescription").caption =
listObject.list[listObject.selected] ?
g_Mods[listObject.list[listObject.selected]].description :
'[color="' + g_ColorNoModSelected + '"]' + translate("No mod has been selected.") + '[/color]';
}
function visitModWebsite()
{
let modsEnabledList = Engine.GetGUIObjectByName("modsEnabledList");
let modsDisabledList = Engine.GetGUIObjectByName("modsDisabledList");
let list = modsEnabledList.selected == -1 ? modsDisabledList : modsEnabledList;
let folder = list.list_folder[list.selected];
let url = folder && g_Mods[folder] && g_Mods[folder].url;
if (!url)
return;
if (!url.startsWith("http://") && !url.startsWith("https://"))
url = "http://" + url;
openURL(url);
}
+102 -97
View File
@@ -1,40 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<objects>
<script file="gui/modmod/modmod.js"/>
<object name="modmod" type="image" style="ModernWindow" size="0 0 100% 100%">
<script directory="gui/common/"/>
<script directory="gui/modmod/"/>
<object type="image" style="ModernWindow" size="0 0 100% 100%">
<!-- Page Title -->
<object style="ModernLabelText" type="text" size="50%-128 4 50%+128 36">
<translatableAttribute id="caption">Modifications</translatableAttribute>
</object>
<!-- Message -->
<object name="message" type="text" size="15 40 100%-15 88" text_align="left" textcolor="white"/>
<!-- reset filters -->
<object name="resetFilters" size="15 72 184 100" type="button" style="ModernButtonRed">
<translatableAttribute id="caption">Reset Filters</translatableAttribute>
<action on="Press">resetFilters();</action>
</object>
<!-- Filter Panel -->
<object name="filterPanel" size="184 64 50% 98">
<object size="0 40 312 64">
<object name="modGenericFilter"
type="input"
style="ModernInput"
size="10 100%-24 170 100%"
size="16 0 176 100%"
>
<action on="Press">applyFilters();</action>
</object>
<object name="modTypeFilter"
type="dropdown"
style="ModernDropDown"
size="180 100%-24 350 100%"
font="sans-bold-13"
>
<action on="SelectionChange">applyFilters();</action>
<action on="TextEdit">applyFilters();</action>
</object>
<!-- Checkboxes -->
@@ -42,92 +28,74 @@
type="checkbox"
checked="false"
style="ModernTickBox"
size="355 100%-24 375 100%"
size="186 0 206 100%"
font="serif-bold-13"
>
<action on="Press">applyFilters();</action>
</object>
<object type="text" size="377 100%-24 460 100%" text_align="left" textcolor="white">
<object type="text" size="208 0 100% 100%" text_align="left" textcolor="white">
<translatableAttribute id="caption">Negate</translatableAttribute>
</object>
</object>
<!-- Sort by -->
<object name="sortingWrapper" size="100%-400 74 100% 98">
<object type="text" size="0 0 75 100%" text_align="left" textcolor="white">
<translatableAttribute id="caption">Sorting:</translatableAttribute>
</object>
<object name="sortBy"
type="dropdown"
style="ModernDropDown"
size="75 100%-24 75%-25 100%"
font="sans-bold-13"
>
<action on="SelectionChange">applyFilters();</action>
</object>
<!-- Checkboxes -->
<object type="text" size="75% 100%-24 100% 100%" text_align="left" textcolor="white">
<translatableAttribute id="caption">Descending.</translatableAttribute>
</object>
<object name="isOrderDescending"
type="checkbox"
checked="false"
style="ModernTickBox"
size="75%-20 100%-24 75% 100%"
font="serif-bold-13"
>
<action on="Press">applyFilters();</action>
</object>
<object
name="globalModDescription"
type="text"
size="312 32 100%-16 69"
textcolor="180 180 180"
text_align="left"
text_valign="center"
>
<translatableAttribute id="caption">Description</translatableAttribute>
</object>
<!-- Available Mods Wrapper -->
<object name="modsAvailable" size="16 100 100%-15 75%-4" style="ModmodScrollbar">
<object size="16 66 100%-15 62%" style="ModmodScrollbar">
<object style="ModernLabelText" type="text" size="0 5 100% 25">
<translatableAttribute id="caption">Available Mods</translatableAttribute>
</object>
<object name="modsAvailableList"
style="ModernList"
<object name="modsDisabledList"
type="olist"
style="ModernSortedList"
sortable="true"
selected_column="name"
selected_column_order="1"
size="0 25 100%-2 100%"
font="sans-stroke-13"
auto_scroll="true"
>
<action on="SelectionChange">showModDescription(this.name);</action>
<action on="SelectionChange">selectedMod(this.name);</action>
<action on="SelectionColumnChange">applyFilters();</action>
<action on="MouseLeftDoubleClickItem">enableMod();</action>
<!-- List headers -->
<column id="name" color="100 100 200" width="10%">
<!-- Keep the column names in sync with the property names of mods -->
<column id="name" color="255 255 255" width="10%">
<translatableAttribute id="heading">Name</translatableAttribute>
</column>
<column id="modVersion" color="128 128 128" width="7%">
<column id="version" color="255 255 255" width="7%">
<translatableAttribute id="heading">Version</translatableAttribute>
</column>
<column id="modFolderName" color="100 100 200" width="13%">
<column id="folder" color="255 255 255" width="13%">
<translatableAttribute id="heading">(Folder)</translatableAttribute>
</column>
<column id="modLabel" color="0 60 0" width="18%">
<column id="label" color="255 255 255" width="26%">
<translatableAttribute id="heading">Mod Label</translatableAttribute>
</column>
<column id="modType" color="0 128 128" width="12%">
<translatableAttribute id="heading">Mod Type</translatableAttribute>
</column>
<column id="modDependencies" color="128 128 128" width="20%">
<column id="dependencies" color="255 255 255" width="20%">
<translatableAttribute id="heading">Dependencies</translatableAttribute>
</column>
<column id="modURL" color="128 128 128" width="24%">
<column id="url" color="255 255 255" width="24%">
<translatableAttribute id="heading">Website</translatableAttribute>
</column>
</object>
<object name="globalModDescription" type="text" style="ModmodScrollbar" size="0 100%-28 100%-16 100%">
<attribute id="caption"><keep>[color="100 100 100"]</keep><translate>Description</translate><keep>[/color]</keep></attribute>
</object>
<object type="button" style="ModernButtonRed" size="100%-184 100%-28 100% 100%">
<translatableAttribute id="caption">Enable</translatableAttribute>
<action on="Press">enableMod();</action>
</object>
</object>
<!-- Enabled Mods Wrapper -->
<object name="modsEnabled" size="16 75% 100%-15 100%-50">
<object size="16 62% 100%-15 100%-84">
<object style="ModernLabelText" type="text" size="0 5 100% 25">
<translatableAttribute id="caption">Enabled Mods</translatableAttribute>
</object>
@@ -135,67 +103,104 @@
<object name="modsEnabledList"
style="ModernList"
type="olist"
size="0 25 96%-5 100%"
size="0 25 100%-32-2-2 100%"
font="sans-stroke-13"
tooltip_style="pgToolTip"
auto_scroll="true"
>
<action on="SelectionChange">showModDescription(this.name);</action>
<action on="SelectionChange">selectedMod(this.name);</action>
<action on="MouseLeftDoubleClickItem">disableMod();</action>
<!-- List headers -->
<column id="name" color="100 100 200" width="10%">
<column id="name" color="255 255 255" width="10%">
<translatableAttribute id="heading">Name</translatableAttribute>
</column>
<column id="modVersion" color="128 128 128" width="7%">
<column id="version" color="255 255 255" width="7%">
<translatableAttribute id="heading">Version</translatableAttribute>
</column>
<column id="modFolderName" color="100 100 200" width="13%">
<column id="folder" color="255 255 255" width="13%">
<translatableAttribute id="heading">(Folder)</translatableAttribute>
</column>
<column id="modLabel" color="0 60 0" width="18%">
<column id="label" color="255 255 255" width="26%">
<translatableAttribute id="heading">Mod Label</translatableAttribute>
</column>
<column id="modType" color="0 128 128" width="12%">
<translatableAttribute id="heading">Mod Type</translatableAttribute>
</column>
<column id="modDependencies" color="128 128 128" width="20%">
<column id="dependencies" color="255 255 255" width="20%">
<translatableAttribute id="heading">Dependencies</translatableAttribute>
</column>
<column id="modURL" color="128 128 128" width="20%">
<column id="url" color="255 255 255" width="24%">
<translatableAttribute id="heading">Website</translatableAttribute>
</column>
</object>
<object type="button" style="ModernButtonRed" size="96% 23 100% 40%+12">
<translatableAttribute id="caption">Up</translatableAttribute>
<action on="Press">moveCurrItem(this.parent.name + "List", true);</action>
<object
name="enabledModUp"
type="button"
style="ModernButtonRed"
size="100%-32-2 23+4 100%-2 23+32+4"
enabled="false"
sprite="ModernArrowUpRed"
sprite_pressed="ModernArrowUpRed"
sprite_over="ModernArrowUpRedBright"
sprite_disabled="ModernArrowUpGrey"
>
<translatableAttribute id="tooltip">Change the order in which mods are launched. This should match the mods dependencies.</translatableAttribute>
<action on="Press">moveCurrItem("modsEnabledList", true);</action>
</object>
<object type="button" style="ModernButtonRed" size="96% 40%+12 100% 60%+10">
<translatableAttribute id="caption">X</translatableAttribute>
<action on="Press">disableMod();</action>
</object>
<object type="button" style="ModernButtonRed" size="96% 60%+10 100% 100%">
<translatableAttribute id="caption">Down</translatableAttribute>
<action on="Press">moveCurrItem(this.parent.name + "List", false);</action>
<object
name="enabledModDown"
type="button"
style="ModernButtonRed"
size="100%-32-2 100%-32-4 100%-2 100%-4"
enabled="false"
sprite="ModernArrowDownRed"
sprite_pressed="ModernArrowDownRed"
sprite_over="ModernArrowDownRedBright"
sprite_disabled="ModernArrowDownGrey"
>
<translatableAttribute id="tooltip">Change the order in which mods are launched. This should match the mods dependencies.</translatableAttribute>
<action on="Press">moveCurrItem("modsEnabledList", false);</action>
</object>
</object>
<!-- MOD-SPECIFIC BUTTONS -->
<object name="toggleModButton" type="button" style="ModernButtonRed" size="16 100%-80 236 100%-52" enabled="false">
<translatableAttribute id="caption">Enable/Disable</translatableAttribute>
</object>
<object name="visitWebButton" type="button" style="ModernButtonRed" size="240 100%-80 460 100%-52" enabled="false">
<translatableAttribute id="caption">Visit Website</translatableAttribute>
<action on="Press">visitModWebsite();</action>
</object>
<!-- Message -->
<object name="message" type="text" size="466 100%-78 100%-15 100%-52" text_align="left" textcolor="white"/>
<!-- BUTTONS -->
<object type="button" style="ModernButtonRed" size="16 100%-44 200 100%-16">
<object name="quitButton" type="button" style="ModernButtonRed" size="100%-994 100%-44 100%-804 100%-16">
<translatableAttribute id="caption">Quit</translatableAttribute>
<action on="Press">Engine.Exit();</action>
</object>
<object type="button" style="ModernButtonRed" size="100%-576 100%-44 100%-392 100%-16" hotkey="cancel">
<object name="cancelButton" type="button" style="ModernButtonRed" size="100%-994 100%-44 100%-804 100%-16" hotkey="cancel">
<translatableAttribute id="caption">Cancel</translatableAttribute>
<action on="Press">closePage();</action>
</object>
<object name="saveConfigurationButton" type="button" style="ModernButtonRed" size="100%-388 100%-44 100%-204 100%-16">
<object type="button" style="ModernButtonRed" size="100%-800 100%-44 100%-610 100%-16">
<translatableAttribute id="caption">Help</translatableAttribute>
<action on="Press">Engine.PushGuiPage("page_modhelp.xml");</action>
</object>
<object type="button" style="ModernButtonRed" size="100%-606 100%-44 100%-412 100%-16">
<translatableAttribute id="caption">Download Mods</translatableAttribute>
<action on="Press">downloadModsButton();</action>
</object>
<object name="saveConfigurationButton" type="button" style="ModernButtonRed" size="100%-408 100%-44 100%-214 100%-16">
<translatableAttribute id="caption">Save Configuration</translatableAttribute>
<action on="Press">saveMods();</action>
</object>
<object name="startModsButton" type="button" style="ModernButtonRed" size="100%-200 100%-44 100%-16 100%-16">
<object name="startModsButton" type="button" style="ModernButtonRed" size="100%-210 100%-44 100%-16 100%-16">
<translatableAttribute id="caption">Start Mods</translatableAttribute>
<action on="Press">startMods();</action>
</object>
@@ -0,0 +1,32 @@
function downloadModsButton()
{
initTerms({
"Disclaimer": {
"title": translate("Disclaimer"),
"file": "gui/modio/Disclaimer.txt",
"config": "modio.disclaimer",
"accepted": false,
"callback": openModIo,
"urlButtons": [
{
"caption": translate("mod.io Terms"),
"url": "https://mod.io/terms"
},
{
"caption": translate("mod.io Privacy Policy"),
"url": "https://mod.io/privacy"
}
]
}
});
openTerms("Disclaimer");
}
function openModIo(data)
{
if (data.accepted)
Engine.PushGuiPage("page_modio.xml", {
"callback": "initMods"
});
}
@@ -0,0 +1,153 @@
const g_ModProperties = {
// example: "0ad"
"name": {
"required": true,
"type": "string",
"validate": validateName
},
// example: "0.0.23"
"version": {
"required": true,
"type": "string",
"validate": validateVersion
},
// example: ["0ad<=0.0.16", "rote"]
"dependencies": {
"required": true,
"type": "object",
"validate": validateDependencies
},
// example: "0 A.D. - Empires Ascendant"
"label": {
"require": true,
"type": "string",
"validate": validateLabel
},
// example: "A free, open-source, historical RTS game."
"description": {
"required": true,
"type": "string"
},
// example: "https://wildfiregames.com/"
"url": {
"required": false,
"type": "string"
}
};
/**
* Tests if the string only contains alphanumeric characters and _ -
*/
const g_RegExpName = /[a-zA-Z0-9\-\_]+/;
/**
* Tests if the version string consists only of numbers and at most two periods.
*/
const g_RegExpVersion= /[0-9]+(\.[0-9]+){0,2}/;
/**
* Version checks in mod dependencies can use these operators.
*/
const g_RegExpComparisonOperator = /(<=|>=|<|>|=)/;
/**
* Tests if a dependency compares a mod version against another, for instance "0ad<=0.0.16".
*/
const g_RegExpComparison = globalRegExp(new RegExp(g_RegExpName.source + g_RegExpComparisonOperator.source + g_RegExpVersion.source));
/**
* The label may not be empty.
*/
const g_RegExpLabel = /.*\S.*/;
function globalRegExp(regexp)
{
return new RegExp("^" + regexp.source + "$");
}
/**
* Returns whether the mod defines all required properties and whether all properties are valid.
* Shows a notification if not.
*/
function validateMod(folder, modData, notify)
{
let valid = true;
for (let propertyName in g_ModProperties)
{
let property = g_ModProperties[propertyName];
if (modData[propertyName] === undefined)
{
if (!property.required)
continue;
if (notify)
warn("Mod '" + folder + "' does not define '" + propertyName + "'!");
valid = false;
}
if (typeof modData[propertyName] != property.type)
{
if (notify)
warn(propertyName + " in mod '" + folder + "' is not of the type '" + property.type + "'!");
valid = false;
continue;
}
if (property.validate && !property.validate(folder, modData, notify))
valid = false;
}
return valid;
}
function validateName(folder, modData, notify)
{
let valid = modData.name.match(globalRegExp(g_RegExpName));
if (!valid && notify)
warn("mod name of " + folder + " may only contain alphanumeric characters, but found '" + modData.name + "'!");
return valid;
}
function validateVersion(folder, modData, notify)
{
let valid = modData.version.match(globalRegExp(g_RegExpVersion));
if (!valid && notify)
warn("mod version of " + folder + " may only contain numbers and at most 2 periods, but found '" + modData.version + "'!");
return valid;
}
function validateDependencies(folder, modData, notify)
{
let valid = true;
for (let dependency of modData.dependencies)
{
valid = valid && (
dependency.match(globalRegExp(g_RegExpName)) ||
dependency.match(globalRegExp(g_RegExpComparison)));
if (!valid && notify)
warn("mod folder " + folder + " requires an invalid dependency '" + dependency + "'!");
}
return valid;
}
function validateLabel(folder, modData, notify)
{
let valid = modData.label.match(g_RegExpLabel);
if (!valid && notify)
warn("mod label of " + folder + " may not be empty!");
return valid;
}
@@ -0,0 +1,93 @@
const g_ValidTestMods = {
"public": {
"name": "0ad",
"version": "0.0.23",
"label": "0 A.D. Empires Ascendant",
"url": "https://play0ad.com",
"description": "A free, open-source, historical RTS game.",
"dependencies": []
},
"tm": {
"name": "Terra_Magna",
"version": "0.0.22",
"label": "0 A.D. Terra Magna",
"url": "https://forum.wildfiregames.com",
"description": "Adds various civilizations to 0 A.D.",
"dependencies": ["0ad"]
},
"mil": {
"name": "millenniumad",
"version": "0.0.22",
"label": "0 A.D. Medieval Extension",
"url": "https://forum.wildfiregames.com",
"description": "Adds medieval content like civilizations + maps.",
"dependencies": ["0ad=0.0.23"]
}
};
const g_TestModsInvalid = {
"broken1": {
"name": "name may not contain whitespace",
"version": "1",
"label": "1",
"description": "",
"dependencies": []
},
"broken2": {
"name": "broken2",
"version": "0.0.2.1",
"label": "2",
"description": "it has too many dots in the version",
"dependencies": []
},
"broken3": {
"name": "broken3",
"version": "broken3",
"label": "3",
"description": "version numbers must be numeric",
"dependencies": []
},
"broken4": {
"name": "broken4",
"version": "4",
"label": "4",
"description": "dependencies must be mod names or valid comparisons",
"dependencies": ["mod version=3"]
},
"broken5": {
"name": "broken5",
"version": "5",
"label": "5",
"description": "names in mod dependencies may not contain whitespace either",
"dependencies": ["mod version"]
},
"broken6": {
"name": "broken6",
"version": "6",
"label": "6",
"description": "should have used =",
"dependencies": ["mod==3"]
},
"broken7": {
"name": "broken7",
"version": "7",
"label": "",
"description": "label may not be empty",
"dependencies": []
},
"broken8": {
"name": "broken8",
"version": "8",
"label": "8",
"description": "a version is an invalid dependency",
"dependencies": ["0.0.23"]
}
};
for (let folder in g_ValidTestMods)
if (!validateMod(folder, g_ValidTestMods[folder], false))
throw new Error("Valid mod '" + folder + "' should have passed the test.");
for (let folder in g_TestModsInvalid)
if (validateMod(folder, g_TestModsInvalid[folder], false))
throw new Error("Invalid mod '" + folder + "' should not have passed the test.");
@@ -27,9 +27,9 @@ function init(data)
// Set button captions and visibility
let mbButton = [];
captions.forEach((caption, i) => {
mbButton[i] = Engine.GetGUIObjectByName("mbButton" + (i+1));
mbButton[i] = Engine.GetGUIObjectByName("mbButton" + (i + 1));
let action = function ()
let action = function()
{
if (data.callback)
Engine.PopGuiPageCB(i);
@@ -1,8 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<objects>
<script file="gui/msgbox/msgbox.js"/>
<script file="gui/common/functions_global_object.js"/>
<script directory="gui/common/"/>
<script directory="gui/msgbox/"/>
<!-- Fade out the background because it's non-interactable -->
<object sprite="ModernFade" type="image" z="0"/>
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<page>
<include>common/modern/setup.xml</include>
<include>common/modern/styles.xml</include>
<include>common/modern/sprites.xml</include>
<include>modmod/help/help.xml</include>
</page>
+10
View File
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<page>
<include>common/modern/setup.xml</include>
<include>common/modern/styles.xml</include>
<include>common/modern/sprites.xml</include>
<include>modmod/styles.xml</include>
<include>modio/modio.xml</include>
</page>
@@ -5,5 +5,4 @@
<include>common/modern/sprites.xml</include>
<include>msgbox/msgbox.xml</include>
<include>common/global.xml</include>
</page>
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<page>
<include>common/modern/setup.xml</include>
<include>common/modern/styles.xml</include>
<include>common/modern/sprites.xml</include>
<include>termsdialog/termsdialog.xml</include>
</page>
@@ -1,4 +1,6 @@
function init()
{
Engine.SwitchGuiPage("page_modmod.xml", {});
Engine.SwitchGuiPage("page_modmod.xml", {
"cancelbutton": false
});
}
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<objects>
<script file="gui/pregame/mainmenu.js"/>
<script directory="gui/pregame/"/>
</objects>
@@ -0,0 +1,89 @@
/**
* This implements a basic "Clickwrap agreement", which is an industry standard:
*
* The European Court of Justice decided in the case El Majdoub (case nr C-322/14) that click-wrap agreements are acceptable under certain circumstances
* as proof of the acceptance of terms and conditions (in the meaning of Regulation 44/2001, now replaced by Regulation 1215/2012).
* See https://eur-lex.europa.eu/legal-content/en/TXT/HTML/?uri=uriserv%3AOJ.C_.2015.236.01.0019.01.ENG
* The user should be able to save and print the text of the terms.
*/
var g_TermsPage;
var g_TermsFile;
var g_TermsSprintf;
function init(data)
{
g_TermsPage = data.page;
g_TermsFile = data.file;
g_TermsSprintf = data.sprintf;
Engine.GetGUIObjectByName("title").caption = data.title;
initURLButtons(data.termsURL, data.urlButtons);
initLanguageSelection();
}
function initURLButtons(termsURL, urlButtons)
{
if (termsURL)
urlButtons.unshift({
// Translation: Label of a button that when pressed opens the Terms and Conditions in the default webbrowser.
"caption": translate("View online"),
"url": termsURL
});
urlButtons.forEach((urlButton, i) => {
let button = Engine.GetGUIObjectByName("button[" + i + "]");
button.caption = urlButton.caption;
button.hidden = false;
button.tooltip = sprintf(translate("Open %(url)s in the browser."), {
"url": urlButton.url
});
button.onPress = () => {
openURL(urlButton.url);
};
});
}
function initLanguageSelection()
{
let languageLabel = Engine.GetGUIObjectByName("languageLabel");
let languageLabelWidth = Engine.GetTextWidth(languageLabel.font, languageLabel.caption)
languageLabel.size = "0 0 " + languageLabelWidth + " 100%";
let languageDropdown = Engine.GetGUIObjectByName("languageDropdown");
languageDropdown.size = (languageLabelWidth + 10) + " 4 100% 100%";
languageDropdown.list = (() => {
let displayNames = Engine.GetSupportedLocaleDisplayNames();
let baseNames = Engine.GetSupportedLocaleBaseNames();
// en-US
let list = [displayNames[0]];
// current locale
let currentLocaleDict = Engine.GetFallbackToAvailableDictLocale(Engine.GetCurrentLocale());
if (currentLocaleDict != baseNames[0])
list.push(displayNames[baseNames.indexOf(currentLocaleDict)]);
return list;
})();
languageDropdown.onSelectionChange = () => {
Engine.GetGUIObjectByName("mainText").caption =
sprintf(
languageDropdown.selected == 1 ?
Engine.TranslateLines(Engine.ReadFile(g_TermsFile)) :
Engine.ReadFile(g_TermsFile),
g_TermsSprintf);
};
languageDropdown.selected = languageDropdown.list.length - 1;
}
function closeTerms(accepted)
{
Engine.PopGuiPageCB({
"page": g_TermsPage,
"accepted": accepted
});
}
@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="utf-8"?>
<objects>
<script directory="gui/common/"/>
<script directory="gui/termsdialog/"/>
<object type="image" z="0" sprite="ModernFade"/>
<object type="image" style="ModernDialog" size="50%-360 50%-290 50%+360 50%+290">
<object name="title" style="ModernLabelText" type="text" size="50%-128 -18 50%+128 14"/>
<object size="25 18 100%-25 50">
<object type="text" name="languageLabel" style="ModernLabelText">
<translatableAttribute id="caption">Language</translatableAttribute>
</object>
<object type="dropdown" name="languageDropdown" style="ModernDropDown"/>
</object>
<object size="20 60 100%-20 100%-50">
<object name="mainTextPanel" type="image" sprite="ModernFade">
<object name="mainText" type="text" style="ModernTextPanel"/>
</object>
</object>
<object size="25 100%-45 100% 100%-16">
<object size="0 0 160 100%" type="button" name="button[0]" style="ModernButtonRed" hidden="true"/>
<object size="170 0 330 100%" type="button" name="button[1]" style="ModernButtonRed" hidden="true"/>
<object size="100%-355 0 100% 100%">
<object type="button" style="ModernButtonRed" size="0 0 160 100%" hotkey="cancel">
<translatableAttribute id="caption">Decline</translatableAttribute>
<action on="Press">closeTerms(false);</action>
</object>
<object name="connectButton" type="button" style="ModernButtonRed" size="170 0 330 100%">
<translatableAttribute id="caption">Accept</translatableAttribute>
<action on="Press">closeTerms(true);</action>
</object>
</object>
</object>
</object>
</objects>
+8 -8
View File
@@ -101,7 +101,7 @@ var g_IntelWindowsChipsets = [
"*",
];
// Determined manually from data reports.
// See http://en.wikipedia.org/wiki/Intel_GMA for useful listing.
// See https://en.wikipedia.org/wiki/Intel_GMA for useful listing.
var g_IntelMacChipsets = [
"Intel GMA 950",
@@ -112,7 +112,7 @@ var g_IntelMacChipsets = [
"*",
];
// Determined manually from data reports.
// See http://support.apple.com/kb/HT3246 for useful listing.
// See https://support.apple.com/kb/HT3246 for useful listing.
function IsWorseThanIntelMesa(renderer, chipset)
{
@@ -245,7 +245,7 @@ function RunDetection(settings)
}
// NVIDIA 260.19.* UNIX drivers cause random crashes soon after startup.
// http://www.wildfiregames.com/forum/index.php?showtopic=13668
// https://www.wildfiregames.com/forum/index.php?showtopic=13668
// Fixed in 260.19.21:
// "Fixed a race condition in OpenGL that could cause crashes with multithreaded applications."
if (os_unix && GL_VERSION.match(/NVIDIA 260\.19\.(0[0-9]|1[0-9]|20)$/))
@@ -253,7 +253,7 @@ function RunDetection(settings)
dialog_warnings.push("You are using 260.19.* series NVIDIA drivers, which may crash the game. Please upgrade to 260.19.21 or later.");
}
// http://trac.wildfiregames.com/ticket/684
// https://trac.wildfiregames.com/ticket/684
// https://bugs.freedesktop.org/show_bug.cgi?id=24047
// R600 drivers will advertise support for S3TC but not actually support it,
// and will draw everything in grey instead, so forcibly disable S3TC.
@@ -261,7 +261,7 @@ function RunDetection(settings)
if (os_unix && GL_RENDERER.match(/^Mesa DRI R600 /))
disable_s3tc = true;
// http://trac.wildfiregames.com/ticket/623
// https://trac.wildfiregames.com/ticket/623
// Shadows are reportedly very slow on various drivers:
// r300 classic
// Intel 945
@@ -292,7 +292,7 @@ function RunDetection(settings)
disable_shadowpcf = true;
}
// http://trac.wildfiregames.com/ticket/780
// https://trac.wildfiregames.com/ticket/780
// r300 classic has problems with shader mode, so fall back to non-shader
if (os_unix && GL_RENDERER.match(/^Mesa DRI R[123]00 /))
{
@@ -300,7 +300,7 @@ function RunDetection(settings)
warnings.push("Some graphics features are disabled, due to bugs in old graphics drivers. Upgrading to a Gallium-based driver might help.");
}
// http://www.wildfiregames.com/forum/index.php?showtopic=15058
// https://www.wildfiregames.com/forum/index.php?showtopic=15058
// GF FX has poor shader performance, so fall back to non-shader
if (GL_RENDERER.match(/^GeForce FX /))
{
@@ -308,7 +308,7 @@ function RunDetection(settings)
disable_allwater = true;
}
// http://trac.wildfiregames.com/ticket/964
// https://trac.wildfiregames.com/ticket/964
// SiS Mirage 3 drivers apparently crash with shaders, so fall back to non-shader
// (The other known SiS cards don't advertise GL_ARB_fragment_program so we
// don't need to do anything special for them)
+10 -2
View File
@@ -8,7 +8,7 @@
{
"extractor": "javascript",
"filemasks": [
"gui/modmod/**.js"
"gui/**.js"
],
"options": {
"format": "javascript-format",
@@ -28,7 +28,7 @@
{
"extractor": "xml",
"filemasks": [
"gui/modmod/**.xml"
"gui/**.xml"
],
"options": {
"format": "none",
@@ -39,6 +39,14 @@
"translate": {}
}
}
},
{
"extractor": "txt",
"filemasks": [
"gui/**.txt"
],
"options": {
}
}
]
}
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<actor version="1">
<castshadow/>
<group>
<variant frequency="100" name="Mesh">
<mesh>skeletal/wolf.dae</mesh>
<animations>
<animation file="quadraped/wolf_walk.dae" name="Walk" speed="75"/>
<animation file="quadraped/wolf_run.dae" name="Run" speed="10"/>
<animation file="quadraped/wolf_attack_01.dae" name="attack_melee" speed="165"/>
<animation file="quadraped/wolf_attack_02.dae" name="attack_melee" speed="165"/>
<animation file="quadraped/wolf_idle_01.dae" name="Idle" speed="100"/>
<animation file="quadraped/wolf_idle_02.dae" name="Idle" speed="100"/>
<animation file="quadraped/wolf_idle_03.dae" name="Idle" speed="100"/>
<animation file="quadraped/wolf_death_01.dae" name="death" speed="100"/>
<animation file="quadraped/wolf_death_02.dae" name="death" speed="100"/>
</animations>
</variant>
</group>
<group>
<variant frequency="1" name="fur-white">
<textures><texture file="skeletal/animal_wolf_white.png" name="baseTex"/></textures>
</variant>
</group>
<group>
<variant frequency="100" name="Idle"/>
<variant name="death">
<props>
<prop actor="props/units/blood_01.xml" attachpoint="root"/>
</props>
</variant>
</group>
</actor>
@@ -1,37 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<actor version="1">
<castshadow/>
<group>
<variant frequency="100" name="camel">
<animations>
<animation file="quadraped/camel_walk.dae" name="Walk" speed="65"/>
<animation file="quadraped/camel_run.dae" name="Run" speed="25"/>
<animation file="quadraped/camel_death.dae" name="Death" speed="90"/>
<animation file="quadraped/camel_idle_01.dae" name="Idle" speed="50"/>
<animation file="quadraped/camel_idle_02.dae" name="Idle" speed="50"/>
</animations>
<mesh>skeletal/camel_1.dae</mesh>
</variant>
</group>
<group>
<variant frequency="100" name="texture">
<textures><texture file="skeletal/animal_camel.png" name="baseTex"/></textures>
</variant>
</group>
<castshadow/>
<group>
<variant frequency="100" name="Idle"/>
<variant name="death">
<props>
<prop actor="props/units/blood_01.xml" attachpoint="root"/>
</props>
<textures>
<texture file="skeletal/animal_camel_dead.png" name="baseTex"/>
</textures>
</variant>
<variant name="Run">
<variant frequency="1" file="quadraped/base_camel_fauna.xml">
<mesh>skeletal/camel.dae</mesh>
<props>
<prop actor="particle/dust_cav.xml" attachpoint="root"/>
<prop actor="props/camel/teeths.xml" attachpoint="mouth_bot"/>
</props>
</variant>
</group>
<group>
<variant frequency="3" name="Dark Brown">
<textures>
<texture file="skeletal/animal_camel_a.png" name="baseTex"/>
</textures>
</variant>
<variant frequency="3" name="Beige">
<textures>
<texture file="skeletal/animal_camel_b.png" name="baseTex"/>
</textures>
</variant>
<variant frequency="3" name="Light Brown">
<textures>
<texture file="skeletal/animal_camel_c.png" name="baseTex"/>
</textures>
</variant>
</group>
<group>
<variant frequency="100" name="Idle"/>
<variant file="quadraped/base_camel_run.xml" />
<variant file="quadraped/base_camel_death.xml" />
</group>
<material>default.xml</material>
</actor>
@@ -1,21 +1,22 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<?xml version="1.0" encoding="UTF-8"?>
<actor version="1">
<castshadow/>
<group>
<variant frequency="100" name="Mesh">
<mesh>skeletal/elephant.dae</mesh>
</variant>
</group>
<group>
<variant frequency="1" name="hide-brown">
<textures><texture file="skeletal/animal_elephant.dds" name="baseTex"/></textures>
<textures>
<texture file="skeletal/animal_elephant.dds" name="baseTex"/>
</textures>
</variant>
<variant frequency="1" name="hide-gray">
<textures><texture file="skeletal/animal_elephant2.dds" name="baseTex"/></textures>
<textures>
<texture file="skeletal/animal_elephant2.dds" name="baseTex"/>
</textures>
</variant>
</group>
<material>basic_trans.xml</material>
</actor>
@@ -1,18 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<actor version="1">
<castshadow/>
<group>
<variant frequency="1" name="elephant_african_bush [infant]">
<variant file="quadraped/base_elephant_african_bush_infant.xml">
<mesh>skeletal/elephant_african_baby.dae</mesh>
<textures><texture file="skeletal/animal-elephant-base-baby.dds" name="baseTex"/></textures>
<textures>
<texture file="skeletal/animal-elephant-base-baby.dds" name="baseTex"/>
</textures>
</variant>
</group>
<group>
<variant frequency="100" name="Idle"/>
<variant name="death">
<props>
<prop actor="props/units/blood_01.xml" attachpoint="root"/>
</props>
</variant>
<variant file="quadraped/base_elephant_death.xml"/>
<variant file="quadraped/base_elephant_run.xml"/>
</group>
<material>basic_trans.xml</material>
</actor>
@@ -1,22 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<actor version="1">
<castshadow/>
<group>
<variant frequency="1" name="elephant_african_bush [adult]">
<animations>
<animation file="quadraped/elephant_african_bush_idle_01.dae" name="Idle" speed="25"/>
<animation file="quadraped/elephant_african_bush_idle_01.dae" name="Idle" speed="25"/>
<animation file="quadraped/elephant_african_bush_idle_01.dae" name="Idle" speed="25"/>
<animation file="quadraped/elephant_african_bush_idle_01.dae" name="Idle" speed="25"/>
<animation file="quadraped/elephant_african_bush_idle_02.dae" name="Idle" speed="85"/>
<animation file="quadraped/elephant_african_bush_idle_03.dae" name="Idle" speed="50"/>
<animation file="quadraped/elephant_african_bush_idle_03.dae" name="Idle" speed="75"/>
<animation file="quadraped/elephant_african_bush_idle_03.dae" name="Idle" speed="150"/>
<animation file="quadraped/elephant_african_bush_walk.dae" name="Walk" speed="30"/>
<animation file="quadraped/elephant_african_bush_walk.dae" name="Run" speed="35"/>
<animation file="quadraped/elephant_african_bush_attack.dae" name="attack_melee" speed="100"/>
<animation file="quadraped/elephant_african_bush_death.dae" name="Death" speed="100"/>
</animations>
<variant file="quadraped/base_elephant_african_bush.xml">
<mesh>skeletal/elephant_african_bush.dae</mesh>
<textures>
<texture file="skeletal/animal-elephant-base.dds" name="baseTex"/>
@@ -26,16 +12,8 @@
</group>
<group>
<variant frequency="100" name="Idle"/>
<variant name="Run">
<props>
<prop actor="particle/dust_cav.xml" attachpoint="root"/>
</props>
</variant>
<variant name="death">
<props>
<prop actor="props/units/blood_01.xml" attachpoint="root"/>
</props>
</variant>
<variant file="quadraped/base_elephant_death.xml"/>
<variant file="quadraped/base_elephant_run.xml"/>
</group>
<material>basic_specmap.xml</material>
<material>basic_trans_spec.xml</material>
</actor>
@@ -2,21 +2,7 @@
<actor version="1">
<castshadow/>
<group>
<variant frequency="1" name="elephant_african_forest [adult]">
<animations>
<animation file="quadraped/elephant_african_idle_01.dae" name="Idle" speed="25"/>
<animation file="quadraped/elephant_african_idle_01.dae" name="Idle" speed="25"/>
<animation file="quadraped/elephant_african_idle_01.dae" name="Idle" speed="25"/>
<animation file="quadraped/elephant_african_idle_01.dae" name="Idle" speed="25"/>
<animation file="quadraped/elephant_african_idle_02.dae" name="Idle" speed="85"/>
<animation file="quadraped/elephant_african_idle_03.dae" name="Idle" speed="50"/>
<animation file="quadraped/elephant_african_idle_03.dae" name="Idle" speed="75"/>
<animation file="quadraped/elephant_african_idle_03.dae" name="Idle" speed="150"/>
<animation file="quadraped/elephant_african_walk.dae" name="Walk" speed="30"/>
<animation file="quadraped/elephant_african_walk.dae" name="Run" speed="35"/>
<animation file="quadraped/elephant_african_attack.dae" name="attack_melee" speed="100"/>
<animation file="quadraped/elephant_african_death.dae" name="Death" speed="100"/>
</animations>
<variant file="quadraped/base_elephant_asian_armor.xml">
<mesh>skeletal/elephant_african_forest.dae</mesh>
<textures>
<texture file="skeletal/animal-elephant-base.dds" name="baseTex"/>
@@ -26,16 +12,8 @@
</group>
<group>
<variant frequency="100" name="Idle"/>
<variant name="Run">
<props>
<prop actor="particle/dust_cav.xml" attachpoint="root"/>
</props>
</variant>
<variant name="death">
<props>
<prop actor="props/units/blood_01.xml" attachpoint="root"/>
</props>
</variant>
<variant file="quadraped/base_elephant_death.xml"/>
<variant file="quadraped/base_elephant_run.xml"/>
</group>
<material>basic_specmap.xml</material>
<material>basic_trans_spec.xml</material>
</actor>
@@ -1,40 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<actor version="1">
<castshadow/>
<group>
<variant frequency="1" name="elephant_asian [adult male]">
<animations>
<animation file="quadraped/elephant_asian_idle_01.dae" name="Idle" speed="25"/>
<animation file="quadraped/elephant_asian_idle_01.dae" name="Idle" speed="25"/>
<animation file="quadraped/elephant_asian_idle_01.dae" name="Idle" speed="25"/>
<animation file="quadraped/elephant_asian_idle_02.dae" name="Idle" speed="85"/>
<animation file="quadraped/elephant_asian_idle_03.dae" name="Idle" speed="75"/>
<animation file="quadraped/elephant_asian_idle_03.dae" name="Idle" speed="75"/>
<animation file="quadraped/elephant_asian_walk.dae" name="Walk" speed="20"/>
<animation file="quadraped/elephant_asian_walk.dae" name="Run" speed="20"/>
<animation file="quadraped/elephant_asian_attack.dae" name="attack_melee" speed="75"/>
<animation file="quadraped/elephant_asian_death.dae" name="Death" speed="75"/>
</animations>
<mesh>skeletal/elephant_asian_male.dae</mesh>
<textures>
<texture file="skeletal/animal-elephant-asian-base.png" name="baseTex"/>
<texture file="skeletal/animal-elephant-asian-spec.png" name="specTex"/>
<texture file="skeletal/animal-elephant-asian-norm.png" name="normTex"/>
</textures>
</variant>
</group>
<group>
<variant frequency="100" name="Idle"/>
<variant name="Run">
<props>
<prop actor="particle/dust_cav.xml" attachpoint="root"/>
</props>
</variant>
<variant name="death">
<props>
<prop actor="props/units/blood_01.xml" attachpoint="root"/>
</props>
</variant>
</group>
<material>basic_trans_parallax_spec.xml</material>
</actor>
<?xml version="1.0" encoding="utf-8"?>
<actor version="1">
<castshadow/>
<group>
<variant file="quadraped/base_elephant_asian.xml">
<mesh>skeletal/elephant_asian_male.dae</mesh>
<textures>
<texture file="skeletal/animal-elephant-asian-base.png" name="baseTex"/>
<texture file="skeletal/animal-elephant-asian-spec.png" name="specTex"/>
<texture file="skeletal/animal-elephant-asian-norm.png" name="normTex"/>
</textures>
</variant>
</group>
<group>
<variant frequency="100" name="Idle"/>
<variant file="quadraped/base_elephant_death.xml"/>
<variant file="quadraped/base_elephant_run.xml"/>
</group>
<material>basic_trans_parallax_spec.xml</material>
</actor>
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<actor version="1">
<castshadow/>
<group>
<variant frequency="100" name="Mesh">
<mesh>skeletal/fish_single.dae</mesh>
<animations>
<animation frequency="1" file="others/fish_move.dae" name="idle" speed="80"/>
<animation frequency="1" file="others/fish_move.dae" name="idle" speed="22"/>
<animation file="others/fish_move.dae" name="walk" speed="20"/>
</animations>
<textures>
<texture file="skeletal/animal_fish_generic.png" name="baseTex"/>
</textures>
</variant>
</group>
<material>default.xml</material>
</actor>
@@ -2,16 +2,45 @@
<actor version="1">
<castshadow/>
<group>
<variant frequency="100" name="Mesh">
<variant frequency="100" name="Female">
<animations>
<animation file="quadraped/goat_walk.dae" name="Walk" speed="75"/>
<animation file="quadraped/goat_idle_01.dae" name="Idle" speed="100"/>
<animation file="quadraped/goat_idle_02.dae" name="Idle" speed="100"/>
<animation file="quadraped/goat_death.dae" name="Death" speed="100"/>
</animations>
<mesh>skeletal/goat.dae</mesh>
</variant>
<variant frequency="100" name="Male">
<animations>
<animation file="quadraped/goat_walk.dae" name="Walk" speed="75"/>
<animation file="quadraped/goat_idle_01.dae" name="Idle" speed="100"/>
<animation file="quadraped/goat_idle_02.dae" name="Idle" speed="100"/>
<animation file="quadraped/goat_death.dae" name="Death" speed="100"/>
</animations>
<mesh>skeletal/goat_male.dae</mesh>
</variant>
</group>
<group>
<variant frequency="1" name="Hair-dark">
<textures><texture file="skeletal/animal_goat.dds" name="baseTex"/></textures>
<variant frequency="1" name="Gray">
<textures>
<texture file="skeletal/animal_goat_grey.png" name="baseTex"/>
</textures>
</variant>
<variant frequency="1" name="Hair-light">
<textures><texture file="skeletal/animal_goat2.dds" name="baseTex"/></textures>
<variant frequency="1" name="Brown">
<textures>
<texture file="skeletal/animal_goat.png" name="baseTex"/>
</textures>
</variant>
<variant frequency="1" name="Black">
<textures>
<texture file="skeletal/animal_goat_black.png" name="baseTex"/>
</textures>
</variant>
<variant frequency="1" name="White">
<textures>
<texture file="skeletal/animal_goat_white.png" name="baseTex"/>
</textures>
</variant>
</group>
<group>
@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="utf-8"?>
<actor version="1">
<castshadow/>
<group>
<variant frequency="1" file="quadraped/base_horse_fauna.xml" name="fauna horse">
<mesh>skeletal/horse.dae</mesh>
</variant>
</group>
<group>
<variant frequency="16" name="black">
<textures>
<texture file="skeletal/horse_black_a.dds" name="baseTex"/>
</textures>
</variant>
<variant frequency="17" name="brown">
<textures>
<texture file="skeletal/horse_brown_a.dds" name="baseTex"/>
</textures>
</variant>
<variant frequency="16" name="chestnut">
<textures>
<texture file="skeletal/horse_chestnut_a.dds" name="baseTex"/>
</textures>
</variant>
<variant frequency="17" name="dun">
<textures>
<texture file="skeletal/horse_dun_a.dds" name="baseTex"/>
</textures>
</variant>
<variant frequency="17" name="gray">
<textures>
<texture file="skeletal/horse_gray_a.dds" name="baseTex"/>
</textures>
</variant>
<variant frequency="17" name="tan">
<textures>
<texture file="skeletal/horse_tan_a.dds" name="baseTex"/>
</textures>
</variant>
</group>
<group>
<variant frequency="1" name="Idle"/>
<variant file="quadraped/base_horse_death.xml"/>
<variant file="quadraped/base_horse_run.xml"/>
</group>
<material>basic_trans.xml</material>
</actor>
@@ -1,48 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<actor version="1">
<castshadow/>
<group>
<variant frequency="100" name="Base">
<animations>
<animation file="quadraped/horse_idle_a.psa" name="Idle" speed="50"/>
<animation file="quadraped/horse_walk.psa" name="Walk" speed="120"/>
<animation file="quadraped/horse_gallop.psa" name="Run" speed="40"/>
<animation file="quadraped/horse_death.psa" name="death" speed="250"/>
</animations>
<mesh>skeletal/horse.pmd</mesh>
</variant>
</group>
<group>
<variant frequency="16" name="black">
<textures><texture file="skeletal/horse_black_a.dds" name="baseTex"/></textures>
</variant>
<variant frequency="17" name="brown">
<textures><texture file="skeletal/horse_brown_a.dds" name="baseTex"/></textures>
</variant>
<variant frequency="16" name="chestnut">
<textures><texture file="skeletal/horse_chestnut_a.dds" name="baseTex"/></textures>
</variant>
<variant frequency="17" name="dun">
<textures><texture file="skeletal/horse_dun_a.dds" name="baseTex"/></textures>
</variant>
<variant frequency="17" name="gray">
<textures><texture file="skeletal/horse_gray_a.dds" name="baseTex"/></textures>
</variant>
<variant frequency="17" name="tan">
<textures><texture file="skeletal/horse_tan_a.dds" name="baseTex"/></textures>
</variant>
</group>
<group>
<variant frequency="100" name="Idle"/>
<variant name="Run">
<props>
<prop actor="particle/dust_cav.xml" attachpoint="root"/>
</props>
</variant>
<variant name="death">
<props>
<prop actor="props/units/blood_01.xml" attachpoint="root"/>
</props>
</variant>
</group>
</actor>
@@ -1,10 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<actor version="1">
<castshadow/>
<group>
<variant frequency="100" name="Base">
<mesh>skeletal/horse_new.dae</mesh>
<textures><texture file="null_white.dds" name="baseTex"/></textures>
</variant>
</group>
</actor>
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<actor version="1">
<castshadow/>
<group>
<variant frequency="100" name="Base">
<animations>
<animation file="quadraped/mastiff_idle_shake.dae" name="Idle" speed="100"/>
<animation file="quadraped/mastiff_idle.dae" name="Idle" speed="100"/>
<animation file="quadraped/mastiff_idle2.dae" name="Idle" speed="100"/>
<animation file="quadraped/mastiff_run.dae" name="Walk" speed="10"/>
<animation file="quadraped/mastiff_run.dae" name="run" speed="10"/>
<animation file="quadraped/mastiff_death.dae" name="death" speed="100"/>
<animation file="quadraped/mastiff_death2.dae" name="death" speed="100"/>
<animation file="quadraped/mastiff_attack.dae" name="attack_melee" speed="100"/>
</animations>
<mesh>skeletal/mastiff_no_spikes.dae</mesh>
</variant>
</group>
<group>
<variant frequency="1" name="brown">
<textures>
<texture file="skeletal/mastiff_new.png" name="baseTex"/>
</textures>
</variant>
<variant frequency="1" name="taupe">
<textures>
<texture file="skeletal/mastiff_new2.png" name="baseTex"/>
</textures>
</variant>
</group>
<material>player_trans.xml</material>
</actor>
@@ -2,21 +2,20 @@
<actor version="1">
<castshadow/>
<group>
<variant frequency="100" name="Mesh">
<variant frequency="1" name="Base">
<mesh>skeletal/muskox.dae</mesh>
<textures>
<texture file="skeletal/animal_muskox.png" name="baseTex"/>
</textures>
</variant>
</group>
<group>
<variant frequency="100" name="texture">
<textures><texture file="skeletal/animal_muskox.dds" name="baseTex"/></textures>
</variant>
</group>
<group>
<variant frequency="100" name="Idle"/>
<variant frequency="1" name="Idle"/>
<variant name="death">
<props>
<prop actor="props/units/blood_01.xml" attachpoint="root"/>
</props>
</variant>
</group>
<material>basic_trans.xml</material>
</actor>
@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<actor version="1">
<castshadow/>
<group>
<variant frequency="1" file="quadraped/base_pony_fauna.xml" name="Pony">
<mesh>skeletal/pony.dae</mesh>
</variant>
</group>
<group>
<variant frequency="16" name="black">
<textures>
<texture file="skeletal/horse_black_a.dds" name="baseTex"/>
</textures>
</variant>
<variant frequency="17" name="brown">
<textures>
<texture file="skeletal/horse_brown_a.dds" name="baseTex"/>
</textures>
</variant>
<variant frequency="16" name="chestnut">
<textures>
<texture file="skeletal/horse_chestnut_a.dds" name="baseTex"/>
</textures>
</variant>
<variant frequency="17" name="dun">
<textures>
<texture file="skeletal/horse_dun_a.dds" name="baseTex"/>
</textures>
</variant>
<variant frequency="17" name="gray">
<textures>
<texture file="skeletal/horse_gray_a.dds" name="baseTex"/>
</textures>
</variant>
<variant frequency="17" name="tan">
<textures>
<texture file="skeletal/horse_tan_a.dds" name="baseTex"/>
</textures>
</variant>
</group>
<group>
<variant frequency="100" name="Idle"/>
<variant name="Run">
<props>
<prop actor="particle/dust_cav.xml" attachpoint="root"/>
</props>
</variant>
<variant name="death">
<props>
<prop actor="props/units/blood_01.xml" attachpoint="root"/>
</props>
</variant>
</group>
</actor>
@@ -3,8 +3,49 @@
<castshadow/>
<group>
<variant frequency="100" name="Base">
<mesh>gaia/temprabbit.dae</mesh>
<textures><texture file="skeletal/animal_rabbit_a.dds" name="baseTex"/></textures>
<animations>
<animation file="quadraped/rabbit_idle_01.dae" name="Idle" speed="100"/>
<animation file="quadraped/rabbit_idle_02.dae" name="Idle" speed="100"/>
<animation file="quadraped/rabbit_idle_03.dae" name="Idle" speed="100"/>
<animation file="quadraped/rabbit_walk.dae" name="walk" speed="20"/>
<animation file="quadraped/rabbit_walk.dae" name="run" speed="40"/>
<animation file="quadraped/rabbit_death.dae" name="Death" speed="100"/>
</animations>
</variant>
</group>
<group>
<variant name="Normal" frequency="100">
<mesh>skeletal/rabbit_01.dae</mesh>
</variant>
<variant name="Fat" frequency="100">
<mesh>skeletal/rabbit_02.dae</mesh>
</variant>
</group>
<group>
<variant name="Grey 1" frequency="100">
<textures>
<texture file="skeletal/animal_rabbit_04.png" name="baseTex"/>
</textures>
</variant>
<variant name="Grey 2" frequency="100">
<textures>
<texture file="skeletal/animal_rabbit_03.png" name="baseTex"/>
</textures>
</variant>
<variant name="White" frequency="1">
<textures>
<texture file="skeletal/animal_rabbit_05.png" name="baseTex"/>
</textures>
</variant>
<variant name="Red" frequency="100">
<textures>
<texture file="skeletal/animal_rabbit_02.png" name="baseTex"/>
</textures>
</variant>
<variant name="Red 2" frequency="100">
<textures>
<texture file="skeletal/animal_rabbit_01.png" name="baseTex"/>
</textures>
</variant>
</group>
<group>
@@ -15,4 +56,5 @@
</props>
</variant>
</group>
<material>basic_trans.xml</material>
</actor>
@@ -2,9 +2,11 @@
<actor version="1">
<castshadow/>
<group>
<variant frequency="100" name="Base">
<variant frequency="1" name="Main">
<mesh>gaia/temp_sheep2.dae</mesh>
<textures><texture file="gaia/ani_sheep_a.dds" name="baseTex"/></textures>
<textures>
<texture file="skeletal/animal_sheep_no_player_color_a.dds" name="baseTex"/>
</textures>
</variant>
</group>
<group>
@@ -13,6 +15,10 @@
<props>
<prop actor="props/units/blood_01.xml" attachpoint="root"/>
</props>
<textures>
<texture file="skeletal/animal_sheep_dead.png" name="baseTex"/>
</textures>
</variant>
</group>
<material>player_trans.xml</material>
</actor>
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<actor version="1">
<castshadow/>
<group>
<variant frequency="1" name="Main">
<animations>
<animation file="quadraped/sheep_idle_01.dae" name="Idle" speed="40"/>
<animation file="quadraped/sheep_idle_01.dae" name="Idle" speed="40"/>
<animation file="quadraped/sheep_idle_02.dae" name="Idle" speed="50"/>
<animation file="quadraped/sheep_walk.dae" name="Walk" speed="45"/>
<animation file="quadraped/sheep_run.dae" name="Run" speed="6"/>
<animation file="quadraped/sheep_death.dae" name="Death" speed="90"/>
</animations>
<mesh>skeletal/sheep.dae</mesh>
<textures>
<texture file="skeletal/animal_sheep_no_player_color_a.dds" name="baseTex"/>
</textures>
</variant>
</group>
<group>
<variant frequency="100" name="Idle"/>
<variant name="death">
<props>
<prop actor="props/units/blood_01.xml" attachpoint="root"/>
</props>
<textures>
<texture file="skeletal/animal_sheep_dead.png" name="baseTex"/>
</textures>
</variant>
</group>
<material>player_trans.xml</material>
</actor>
@@ -1,33 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<actor version="1">
<castshadow/>
<group>
<variant frequency="100" name="Mesh">
<mesh>skeletal/wolf.dae</mesh>
<animations>
<animation file="quadraped/wolf_walk.dae" name="Walk" speed="75"/>
<animation file="quadraped/wolf_run.dae" name="Run" speed="10"/>
<animation file="quadraped/wolf_attack_01.dae" name="attack_melee" speed="165"/>
<animation file="quadraped/wolf_attack_02.dae" name="attack_melee" speed="165"/>
<animation file="quadraped/wolf_idle_01.dae" name="Idle" speed="100"/>
<animation file="quadraped/wolf_idle_02.dae" name="Idle" speed="100"/>
<animation file="quadraped/wolf_idle_03.dae" name="Idle" speed="100"/>
<animation file="quadraped/wolf_death_01.dae" name="death" speed="100"/>
<animation file="quadraped/wolf_death_02.dae" name="death" speed="100"/>
</animations>
</variant>
</group>
<group>
<variant frequency="1" name="fur-white">
<textures><texture file="skeletal/animal_wolf_white.png" name="baseTex"/></textures>
</variant>
</group>
<group>
<variant frequency="100" name="Idle"/>
<variant name="death">
<props>
<prop actor="props/units/blood_01.xml" attachpoint="root"/>
</props>
</variant>
</group>
</actor>
@@ -2,9 +2,17 @@
<actor version="1">
<castshadow/>
<group>
<variant>
<mesh>skeletal/horse.pmd</mesh>
<textures><texture file="skeletal/animal_zebra_2.png" name="baseTex"/></textures>
<variant file="quadraped/base_horse_fauna.xml" frequency="1" name="Base">
<mesh>skeletal/horse.dae</mesh>
<textures>
<texture file="skeletal/animal_zebra_2.png" name="baseTex"/>
</textures>
</variant>
</group>
<group>
<variant frequency="1" name="Idle"/>
<variant file="quadraped/base_horse_death.xml"/>
<variant file="quadraped/base_horse_run.xml"/>
</group>
<material>default.xml</material>
</actor>
@@ -2,12 +2,44 @@
<actor version="1">
<castshadow/>
<group>
<variant frequency="1" name="Zebra">
<variant frequency="100" name="Zebu">
<animations>
<animation file="quadraped/zebu_idle01.dae" name="Idle" speed="90"/>
<animation file="quadraped/zebu_idle02.dae" name="Idle" speed="40"/>
<animation file="quadraped/zebu_walk.dae" name="Walk" speed="30"/>
<animation file="quadraped/zebu_walk.dae" name="Run" speed="45"/>
<animation file="quadraped/zebu_death_right_01.dae" name="Death" speed="100"/>
<animation file="quadraped/zebu_death_right_02.dae" name="Death" speed="100"/>
<animation file="quadraped/zebu_death_left_01.dae" name="Death" speed="100"/>
<animation file="quadraped/zebu_death_left_02.dae" name="Death" speed="100"/>
</animations>
<mesh>skeletal/zebu.dae</mesh>
</variant>
</group>
<group>
<variant frequency="100" name="Zebu">
<textures>
<texture file="skeletal/animal_zebu.png" name="baseTex"/>
</textures>
</variant>
<variant frequency="100" name="Black Zebu">
<textures>
<texture file="skeletal/animal_zebu_black.png" name="baseTex"/>
</textures>
</variant>
<variant frequency="100" name="Brown Zebu">
<textures>
<texture file="skeletal/animal_zebu_brown.png" name="baseTex"/>
</textures>
</variant>
</group>
<group>
<variant frequency="100" name="Idle"/>
<variant name="death">
<props>
<prop actor="props/units/blood_01.xml" attachpoint="root"/>
</props>
</variant>
</group>
<material>basic_trans.xml</material>
</actor>
</actor>
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<actor version="1">
<castshadow/>
<group>
<variant frequency="1" name="Base">
<textures>
<texture file="gaia/mushrooms/mushrooms.png" name="baseTex"/>
<texture file="gaia/mushrooms/mushrooms_norm.png" name="normTex"/>
<texture file="gaia/mushrooms/mushrooms_spec.png" name="specTex"/>
</textures>
</variant>
</group>
<group>
<variant frequency="1" name="A">
<mesh>gaia/mushrooms/medium_agaric_01.dae</mesh>
</variant>
<variant frequency="1" name="B">
<mesh>gaia/mushrooms/medium_agaric_02.dae</mesh>
</variant>
<variant frequency="1" name="C">
<mesh>gaia/mushrooms/medium_agaric_03.dae</mesh>
</variant>
</group>
<material>basic_trans_parallax_spec.xml</material>
</actor>
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<actor version="1">
<castshadow/>
<group>
<variant frequency="1" name="Base">
<mesh>gaia/mushrooms/medium_agaric_reversed_01.dae</mesh>
<textures>
<texture file="gaia/mushrooms/mushrooms.png" name="baseTex"/>
<texture file="gaia/mushrooms/mushrooms_norm.png" name="normTex"/>
<texture file="gaia/mushrooms/mushrooms_spec.png" name="specTex"/>
</textures>
</variant>
</group>
<material>basic_trans_parallax_spec.xml</material>
</actor>
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<actor version="1">
<castshadow/>
<group>
<variant frequency="1" name="Base">
<mesh>gaia/mushrooms/medium_beige_01.dae</mesh>
<textures>
<texture file="gaia/mushrooms/mushrooms.png" name="baseTex"/>
<texture file="gaia/mushrooms/mushrooms_norm.png" name="normTex"/>
<texture file="gaia/mushrooms/mushrooms_spec.png" name="specTex"/>
</textures>
</variant>
</group>
<material>basic_trans_parallax_spec.xml</material>
</actor>
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<actor version="1">
<castshadow/>
<group>
<variant frequency="1" name="Base">
<mesh>gaia/mushrooms/medium_beige_reversed_01.dae</mesh>
<textures>
<texture file="gaia/mushrooms/mushrooms.png" name="baseTex"/>
<texture file="gaia/mushrooms/mushrooms_norm.png" name="normTex"/>
<texture file="gaia/mushrooms/mushrooms_spec.png" name="specTex"/>
</textures>
</variant>
</group>
<material>basic_trans_parallax_spec.xml</material>
</actor>

Some files were not shown because too many files have changed in this diff Show More