1
0
forked from 0ad/0ad

Compare commits

...

79 Commits

Author SHA1 Message Date
33375b49af lint: add workflow to check copyright 2024-09-11 14:18:31 +02:00
a0232eae82 Add pre-commit hook to check for copyright year
This replaces the previous arclint linter for checking the copyright
year in license headers with a pre-commit hook.

This pre-commit hook is a bit different than the usual pre-commit, as we
don't want it to complain files not modified in the current year, when
run with `pre-commit run --all-files` (as we do on Gitea Actions). To
achieve that, this hook checks against the year of the last commit to a
file, if that file isn't being staged.
2024-09-11 14:16:18 +02:00
04aa01a39b
Speed up fetching of translations from Transifex
This increases the number of workers to use when fetching translations
from Transifex from 5 (the default) to 12. While the Transifex CLI
allows up to 20 workers, using more workers results in frequent request
throttling, which hurts performance more than it improves it.
2024-09-10 07:34:48 +02:00
ccb1d747f0
Use PEP 8 naming conventions for templatesanalyzer 2024-09-10 07:29:33 +02:00
5bea0a0f97 Add the large address aware flag to the nightly build. 2024-09-09 11:46:31 +03:00
26994b156b Split source package downloads
Instead of fetching the whole svn repo containing all current
dependencies into source, fetch them individually into subdirectories of
source.

Adds a wrapper script to each package to place the build output where
it's currently expected.

This allows adding and removing dependencies as well as changing origin
of those packages on a case by case basis.

It's recommended to run "git clean -dxf libraries/source" to free up
extra space and remove untracked files no longer covered by changes in
.gitignore.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-09-08 22:17:08 +02:00
2b5ecd02a7 build-source-libs.sh: drop Perl dependency
Instead of using Perl to get the absolute path due to readlink -f
implementations differing behaviour use realpath. Since the inclusion
into coreutils this should be a valid alternative.

Also check for [[:space:]] instead of only \s as if that one is an issue
the others are as well.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-09-08 17:51:16 +02:00
bf82871ca8 build-source-libs.sh: remove --source-libs-dir
During the migration it apparently looked possibly useful at some point,
in the end it remained unused.

Further the clean-source-libs.sh doesn't handle the case where
build-source-libs.sh was invoked with --source-libs-dir.

Finally, when switching to support individual package this becomes very
complex to support.

For all the above reason remove the option.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-09-08 17:51:16 +02:00
33134af6c3 Stop using the source-libs repository on Windows
All prebuilt files for Windows libraries are now stored in the
windows-libs SVN repository for the foreseeable future.
2024-09-08 17:51:15 +02:00
966d859050 Add yamllint to pre-commit
Adding a hook to pre-commit to enforce a consistent style and remove the
hook check-yaml which only checks if a document is parsable and so
become redundant.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-09-08 13:08:11 +02:00
87f667732c Format yaml files
The schema at https://json.schemastore.org/gitea-issue-forms.json
doesn't like empty titles, so just remove the key to the same effect as
a zero length string.

Add document start markers where they are missing.

Use a max line length of 100 as discussed with Dunedan.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-09-08 13:08:11 +02:00
10e7513bba
Revert changes in check_diff.py in batches
This is to avoid running into errors caused by the limited length of
command line input when reverting lots of files.
2024-09-08 11:39:08 +02:00
fce48ca4be Include names of unit actions before descriptions in tooltips
Respecting the format of the tooltips of the other panels, include
a short name in bold on the first line of the tooltip to facilitate
a quick understanding of the action, and below, in normal font, a
description with relevant details.

The description of the patrol action is rewritten to make it more
understandable.

Fixes #7016
2024-09-08 10:25:59 +02:00
34a209b680
Update glad to 2.0.7
Release: https://github.com/Dav1dde/glad/releases/tag/v2.0.7
2024-09-08 09:31:14 +02:00
0f87124b98
Some glad improvements
- Silence a MSVC warning in vulkan.cpp, refs #6987
- Document the patching of gl.h for macOS, from r26094
- Fix shellcheck warnings in the generation script
2024-09-08 09:26:46 +02:00
35d998694f
Move glad from source-libs to source/third_party
Improve definition of the gladwrapper project in premake.
2024-09-08 09:18:45 +02:00
09f55a1afc Revising the loading screen tips and adding new ones 2024-09-06 14:53:35 +02:00
afa9f212f4 Add yaml setting to editorconfig
Currently all files adhere to the same formatting, let's codify it so it
stays like this in the future.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-09-04 19:45:50 +02:00
8d0af4b184
Unify Windows scripts for getting nightly binaries
The new script merges existing scripts for downloading translations and
SPIR-V shaders, and also exports game binaries from the latest nightly
build into the git repo.

This allows contributors, especially artists, to obtain a working build
of the game without learning how to build the game for Windows, refs #1814.
2024-09-04 17:20:50 +02:00
eb499b4c5c
Fix a regression introduced with 4a049c5f3a 2024-09-04 15:03:21 +02:00
19e7d14506
Use PEP 8 naming conventions for fontbuilder2 2024-09-03 14:01:47 +02:00
4a049c5f3a
Use PEP 8 naming conventions for i18n tools 2024-09-03 13:51:27 +02:00
80f808df4a
Markdown format for fontbuilder2 README
The fontbuilder2 README file was already partially formatted with
Markdown, but didn't indicate that via its file extension. This commit
changes that and improves the formatting of the README itself.
2024-09-03 13:39:28 +02:00
9fd05e38a4 Update libraries to fix some build errors on recent macOS.
Fixes #6797
Fixes #6902
Refs #6915
Fixes #6916
Refs #4362
2024-09-03 11:17:12 +02:00
f7630b155c Do not hardcode JOBS in CI pipelines
This build environment variable is now set agent-wide and corresponds to
the number of CPUs of each agent.
2024-09-02 21:47:08 +02:00
670f68c1c5 Fix remnant from old Jenkins configuration 2024-09-02 21:47:08 +02:00
f87dfebc71 build-macos-libs.sh: move to posix shell
This removes the remaining bashisms and changes the shebang.

Also remove command chaining in subshells as this allows for comments
to go where they belong and shellcheck directives to be more specific.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-09-02 15:37:44 +02:00
79127ec59d Automatically try to unbreak CI incremental builds
This entirely reverts ee3318309b and removes the [CLEANBUILD] feature,
which needed to be used without omission to be efficient.

Instead, in case of build failure, the CI automatically starts a
non-incremental second build by running `make clean` (or the MSBuild
equivalent) before retrying the build.
2024-09-01 13:29:17 +02:00
bcf97b608b
Enable ruff rules for docstrings and comments
This enables some ruff rules for docstrings and comments. The idea is to
not enforce the presence of docstrings, but to ensure they are properly
formatted if they're present.

For comments this adds checks that they don't contain code and verify
the formatting of comments with "TODO" tags.

As part of this, some commented out code which hasn't been touch in the
past 10 years gets removed as well.

The rules enabled enabled by this are:

- check formatting of existing docstrings (D200-)
- check comments for code (ERA)
- check formatting of TODO tags (TD001, TD004-)
2024-08-31 21:09:20 +02:00
91ab55d6ea
Convert license_dbghelp.txt to UTF-8 2024-08-31 17:04:05 +02:00
9ac60514c3 build-macos-libs.sh: partial move to posix shell
Change all non posix constructs except for stacked pushd/popd for the
sake of reviewability.

The reminder will be done in a separate commit.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-08-30 18:36:09 +02:00
3564512a63 android/setup-libs.sh: move to posix shell
Convert various non posix consturcts and change shebang to /bin/sh

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-08-29 12:55:48 +02:00
2634f8762e build-unix-win32.sh: move to posix shell
Convert non posix shell constructs and change shebang to /bin/sh

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-08-29 12:55:26 +02:00
1c4a32baa4 build-archives.sh: move to posix shell
Convert various no posix constructs and change the shebang to /bin/sh.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-08-29 12:55:26 +02:00
8ed1a0cb5a templatessorter.sh: move to posix shell
This one is already clean, so just change the shebang

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-08-29 12:55:26 +02:00
f2bef8388a
Use UTF-8 as encoding when working with files
This explicitly uses UTF-8 encoding when reading or writing files with
Python. This is necessary as the default locale varies between
operating systems.
2024-08-29 07:22:46 +02:00
c3b99feb60
Enable ruff rules for code simplification
This enables ruff rules which check for code which can be simplified to
improve readability.

The additionally rules getting enabled by this are:

- remove unnecessary nesting of if-statements (SIM102)
- use contextlib.suppress() for no-op exception handling (SIM105)
- use enumerate() for counting in loops (SIM113)
- use context managers for opening files (SIM115)
2024-08-29 07:00:43 +02:00
028ec40165
Add a RC file to add metadata to the pyrogenesis executable 2024-08-28 23:37:36 +02:00
631f7b292e Add pre-commit hook for shellcheck
Using shellcheck-py[1] instead of the official shellcheck-precommit[2]
to avoid a dependency on docker.

[1] https://github.com/shellcheck-py/shellcheck-py
[2] https://github.com/koalaman/shellcheck-precommit

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-08-28 18:23:18 +02:00
6f5ac7c4ae Fix issues pointed out by shellcheck
Some are real bugs, some are bashisms, but most is zealous quoting of
variables.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-08-28 18:23:18 +02:00
0feeb5884a
Cache Python dependencies in pre-commit workflow
This should speed up installation of pre-commit as part of the Gitea
Action a bit, as it caches the Python packages required for it.

The cache functionality of actions/setup-python is unsuitable for this
use case, as we don't have a file with requirements we want to use as
key. Instead, we just want to cache whatever is downloaded via pip from
PyPI and keep it for further invocations. This commit achieves that by
using the same cache key for every workflow run. The cache is being
updated even if pre-commit fails so we always keep the the Python
packages used for installing pre-commit cached.
2024-08-28 07:42:08 +02:00
97e6691c76
Fix Atlas in the nightly build
The Windows autobuilder contains two built versions of wxWidgets. One
corresponds to the oldest supported version of the library, and is used
for CI. However, the nightly build should use a recent version of the
library, compiled with the same toolset as the main game.

This commit adapts the nightly-build pipeline to use the rebuilt recent
copy of wxWidgets.
2024-08-27 21:38:37 +02:00
ea647067f0
Enable ruff rules to check for ambiguous code
This enables some ruff rules to check for ambiguous and dead Python
code, which might cause unintended side-effects.

The enabled rules are:

- a bunch of rules related to shadowing of builtin structures (A)
- a bunch of rules checking for unused arguments (ARG)
- a rule checking for useless expressions (B018)
- a rule checking for unbound loop variables (B023)
- a rule checking redefined function parameters (PLR1704)
2024-08-27 19:28:11 +02:00
ee3318309b
Allow to force non-incremental Jenkins builds
In all the builds using precompiled headers, an update to libraries will
crash the CI, as those headers will become outdated. It is then
necessary to force a full rebuild of the game by cleaning up the
workspaces.

This commit allows this CI behavior to be triggered by specifying
[CLEANBUILD] in the first line of the commit message.
This will constitute an opportunity to inform users that they need to
clean their workspaces when pulling the update.
2024-08-27 17:13:49 +02:00
2a67c9a503
Abort previous builds in pull requests
This will save precious build time by stopping the build of obsolete
commits.
2024-08-27 14:39:19 +02:00
f8ac0e4f68 Run checkrefs.py as Gitea Actions workflow 2024-08-27 13:33:21 +02:00
183a0b13f3 Add .already-built for premake to .gitignore
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-08-27 12:55:17 +02:00
13da3457bc
Delete wrongly committed file from abdda50892 2024-08-27 12:46:33 +02:00
ae3fad73ce
Add a markdownlint pre-commit hook
This adds a pre-commit hook to link Markdown files and fixes all
reported findings.
2024-08-27 10:06:31 +02:00
af6cda9073 Add shfmt to .pre-commit-config
Run shfmt as part of the ci workflow.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-08-26 09:03:00 +02:00
a04a5f70c7 Add global .editorconfig
This sets some reasonable defaults for all files.

Adds settings for *.sh files, doubles as configuration for shfmt.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-08-26 09:03:00 +02:00
abdda50892 Format shell scripts using shfmt
This updates shell scripts to use a consistent style that can be enforced
via pre-commit hook.

As for choosing tabs over spaces, some arguments are:

- tabs can help people with visual impairment
- tabs allow for indenting heredocs in bash
- tabs are the default for the tool shfmt

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-08-26 09:03:00 +02:00
c763c010b8
Add a bunch of additional pre-commit hooks 2024-08-26 07:46:41 +02:00
1800b5f1c0
Add executable bits for files with shebangs 2024-08-26 07:46:38 +02:00
f58dc9b485
Remove unnecessary executable bits
This removes the executable bits from files which aren't supposed to
have them.

Also removes shebangs for files which aren't supposed to be executable.
2024-08-26 07:46:34 +02:00
05e708f987
Refactor check_* functions for better readability 2024-08-25 21:24:00 +02:00
75949e1f5a
Replace use of os.path with pathlib 2024-08-25 21:24:00 +02:00
4b77d7bb74
Compile regex pattern once
This should slightly increase the performance as the pattern has to be
only compiled once, instead of so during every loop iteration.
2024-08-25 21:24:00 +02:00
87029f2a91
Replace uses of re.split() with str.split() 2024-08-25 21:23:59 +02:00
24e67746f9
Log a warning when a specified mod can't be found 2024-08-25 21:23:59 +02:00
92d92fac1b
Remove unnecessary default value for dict.get() 2024-08-25 21:23:59 +02:00
0dea22285e
Fix the exit codes of checkrefs.py 2024-08-25 21:23:59 +02:00
39f2889cf7
Support calling checkrefs.py from other dirs 2024-08-25 21:23:59 +02:00
f22d0d899e Add final to classes introduced in f9114a87f2
A class which can not be derived from should tell that in the
declaration.
2024-08-25 13:38:09 +02:00
62c0080e1b Don't use std::shared_ptr in CStrIntern
Now there is less allocation and reference counting.
2024-08-25 11:58:22 +02:00
45984c905b Fix get-nightly scripts on Unix
A wrong syntax was used in for loops.
2024-08-25 10:12:21 +02:00
e36c6a31fe
Enable additional ruff rules
In the ruff config file added in #6954 explicitly selecting the ruff
rules to check was missed, resulting in ruff only checking a very small
subset of its available rules. That hasn't been desired, so this is the
first of a series of commits enabling more rules. In this PR all rules
whose violations can be either automatically fixed by ruff or are
trivial to fix manually get enabled. For the follow up PRs it's intended
to focus on one area of rules per PR to gradually improve the Python
code quality.
2024-08-25 06:29:39 +02:00
0ba8ea3429
Update CODEOWNERS
This updates CODEOWNERS to remove owners for the lobby bot code, which
isn't included in this repository anymore. It also adds me for some
areas where I can help with PR reviews.
2024-08-24 13:48:43 +02:00
1f51fcb87f
Add hook for non-breaking space in 0 A.D.
This replaces the existing arclint linter to ensure the project name
does only include a non-breaking space with a pre-commit hook. The regex
to check is slightly different to account for escaped non-breaking
spaces in JavaScript files and to avoid some false-positives.
2024-08-24 13:08:42 +02:00
a44dd59a0c Add some missing headers
When running clang-format which reorders headers, those are the ones
that came up as missing.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-08-24 12:19:52 +02:00
d055090dd2
Add ruff pre-commit hook
Add configuration for pre-commit, ruff as a hook and configuration to
run ruff whenever a pull request is opened or code is pushed.
2024-08-24 10:54:26 +02:00
c49d4eedd0
Lint and format Python files using ruff
To improve quality und uniformity of the included Python code this
lints and formats the included Python files with ruff.
2024-08-24 10:54:26 +02:00
8519eb9b86
Reduce time needed for STUN
In my tests this reduced the time necessary for starting to host a game
or joining a hosted game by ~180ms.
2024-08-23 21:00:15 +02:00
0efaf5ac4b Add common IDE temporary files to gitignore 2024-08-23 19:29:28 +02:00
eeb0f1cce6
Make checkrefs and called scripts return an error 2024-08-23 17:54:56 +02:00
2a06eea08a
Fix checkrefs.py for python 3.12
Fixes #6898
Reported by: @Itms
2024-08-23 15:59:36 +02:00
393ad6c8a6
Improve windows pipeline 2024-08-23 13:08:04 +02:00
a2e0749c01
Fix regression introduced in 5c1195f66a 2024-08-21 19:17:50 +02:00
7786ef8def
Add Free BSD pipeline. 2024-08-21 19:17:35 +02:00
246 changed files with 23059 additions and 4933 deletions

18
.editorconfig Normal file
View File

@ -0,0 +1,18 @@
root = true
[*]
charset = utf-8
insert_final_newline = true
trim_trailing_whitespace = true
[*.sh]
indent_style = tab
function_next_line = true
switch_case_indent = true
[*.{yaml,yml}]
indent_style = space
indent_size = 2
[build/premake/premake5/**]
ignore = true

View File

@ -1,5 +1,8 @@
## == Project configuration
## Gitea configuration
\\.gitea/.* @Stan @Itms
## Linting
\\.pre-commit-config\\.yaml @Dunedan
## == Build & Libraries
(build|libraries)/.* @Itms @Stan
@ -15,10 +18,9 @@ source/(collada|graphics|renderer)/.* @vladislavbelov
source/simulation2/.* @wraitii @Itms
## == Tools
source/tools/.*\\.py @Dunedan
## Atlas
source/tools/atlas/.* @vladislavbelov @trompetin17
## Lobby
source/tools/XpartaMuPP/.* @Dunedan @user1
## == Scripts
## GUI

View File

@ -1,19 +1,24 @@
---
name: Defect
about: Report an issue with the game. Errors, crashes, unexpected behaviour should be reported this way.
title: ""
about: >
Report an issue with the game. Errors, crashes, unexpected behaviour should be reported this way.
labels:
- "Type/Defect"
- "Priority/3: Should Have"
body:
- type: markdown
attributes:
value: |
**Please select a Theme label that corresponds best to your issue. You can also adjust the Priority label.**
value: >
**Please select a Theme label that corresponds best to your issue. You can also adjust the
Priority label.**
- type: checkboxes
attributes:
label: Reporting Errors
description: For crashes and errors, you must read the [ReportingErrors](wiki/ReportingErrors) page. In particular, if you are reporting a crash, you must upload crashlog files in the Description field below.
description: >
For crashes and errors, you must read the [ReportingErrors](wiki/ReportingErrors) page. In
particular, if you are reporting a crash, you must upload crashlog files in the Description
field below.
options:
- label: I have read the ReportingErrors wiki page.
required: true
@ -29,6 +34,8 @@ body:
- type: input
attributes:
label: Version
description: Type the version of the game you are running (displayed at the bottom of the main menu, or the Alpha version, or "nightly-build").
description: >
Type the version of the game you are running (displayed at the bottom of the main menu, or
the Alpha version, or "nightly-build").
validations:
required: true

View File

@ -1,14 +1,15 @@
---
name: Enhancement
about: Ask us for an improvement you wish to see in the game.
title: ""
labels:
- "Type/Enhancement"
- "Priority/3: Should Have"
body:
- type: markdown
attributes:
value: |
**Please select a Theme label that corresponds best to your issue. You can also adjust the Priority label.**
value: >
**Please select a Theme label that corresponds best to your issue. You can also adjust the
Priority label.**
- type: textarea
attributes:
@ -18,7 +19,9 @@ body:
- type: markdown
attributes:
value: |
**Important Note:** Gameplay and balance changes require preliminary discussion, and consensus must be reached with the Balancing team.<br>
If this is a gameplay change, please add the *Needs Design Input* label, and open a forum topic for discussing your proposal.<br>
value: >
**Important Note:** Gameplay and balance changes require preliminary discussion, and
consensus must be reached with the Balancing team.<br>
If this is a gameplay change, please add the *Needs Design Input* label, and open a forum
topic for discussing your proposal.<br>
You should link that forum topic in the ticket Description above.

View File

@ -26,6 +26,7 @@ All details about each step are documented in [ReleaseProcess](wiki/ReleaseProce
**All the following issues must be fixed in `main` (which closes the issue) and then cherry-picked to the release branch (after that, you can tick the checkbox below).**
Here are the Release Blocking issues currently delaying the release:
- [x] None currently
## Progress Tracking
@ -56,6 +57,7 @@ Here are the Release Blocking issues currently delaying the release:
---
Before moving on with Full Freeze, make sure that:
- [ ] At least 10 days have passed since the string freeze announcement
- [ ] Only this ticket remains in the Milestone
- [ ] All previous checkboxes are ticked

View File

@ -0,0 +1,22 @@
---
name: checkrefs
on:
- push
- pull_request
jobs:
checkrefs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Install lxml
run: pip3 install lxml
- name: Workaround for authentication problem with LFS
# https://gitea.com/gitea/act_runner/issues/164
run: >
git config --local
http.${{ gitea.server_url }}/${{ gitea.repository }}.git/info/lfs/objects/.extraheader ''
- name: Download necessary LFS assets
run: git lfs pull -I binaries/data/mods/public/maps
- name: Check for missing references
run: ./source/tools/entity/checkrefs.py

View File

@ -0,0 +1,15 @@
---
name: copyright
on:
- push
- pull_request
jobs:
copyright:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Fetch the base branch, so we can use `git diff`
# yamllint disable-line rule:line-length
run: git fetch origin ${{ github.event.pull_request.base.ref }}:${{ github.event.pull_request.base.ref }}
- name: Check for issues
run: ./lint/copyright/copyright.sh --diff ${{ github.event.pull_request.base.ref }}

View File

@ -0,0 +1,22 @@
---
name: pre-commit
on:
- push
- pull_request
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- id: restore-pip-cache
uses: actions/cache/restore@v4
with:
key: pip-cache-v1-${{ github.workflow }}
path: ~/.cache/pip
- uses: pre-commit/action@v3.0.1
- uses: actions/cache/save@v4
if: steps.restore-pip-cache.outcome == 'success'
with:
key: pip-cache-v1-${{ github.workflow }}
path: ~/.cache/pip

17
.gitignore vendored
View File

@ -1,7 +1,6 @@
# Built and prebuilt binaries
binaries/system/*
!binaries/system/Atlas.bat
!binaries/system/Quickstart.bat
!binaries/system/*.bat
!binaries/system/readme.txt
# Workspaces
@ -15,9 +14,15 @@ build/workspaces/vs2017
# Libraries
libraries/macos
libraries/source
libraries/win32
libraries/source/cxxtest-4.4/*
libraries/source/fcollada/*
libraries/source/nvtt/*
libraries/source/spidermonkey/*
!libraries/source/**/build.sh
!libraries/source/**/patches/
# premake5 build files, adapted from upstream
build/premake/premake5/**/.gitignore
build/premake/premake5/**/.travis.yml
@ -35,6 +40,7 @@ build/premake/premake5/build/vs200*/
build/premake/premake5/build/vs201[0-5]/
build/premake/premake5/build/xcode4/
build/premake/premake5/packages/
build/premake/.already-built
build/premake/.gccmachine.tmp
build/premake/.gccver.tmp
@ -96,3 +102,8 @@ Thumbs.db
# macOS specific data
.DS_Store
# IDE files
/.vs/
/.vscode/
/.idea/

8
.markdownlint.yaml Normal file
View File

@ -0,0 +1,8 @@
---
commands-show-output: false
default: true
no-bare-urls: false
line-length:
line_length: 100
fenced-code-language: false
no-space-in-emphasis: false

77
.pre-commit-config.yaml Normal file
View File

@ -0,0 +1,77 @@
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-case-conflict
- id: check-executables-have-shebangs
exclude: ^build/premake/premake5
- id: check-json
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
exclude: ^build/premake/premake5
- id: check-symlinks
- id: check-toml
- id: check-xml
exclude: |
(?x)(
^binaries/data/mods/_test.xero/a/b/test1.xml|
^binaries/data/mods/_test.xero/test1.xml|
^binaries/data/mods/_test.sim/simulation/templates.illformed.xml|
^binaries/data/mods/public/maps/.*\.xml
)
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.1
hooks:
- id: ruff
args:
- --output-format=full
exclude: ^source/tools/webservices/
- id: ruff-format
args:
- --check
- --target-version
- py311
exclude: ^source/tools/webservices/
- repo: local
hooks:
- id: non-breaking-space-in-0ad
name: check for non-breaking space in "0 A.D."
description: |
Verify a non-breaking spaces is used in the project name ("0 A.D").
entry: '0(?!(\xc2\xa0|\\xa0)A\.D\.)\s?(?<!\\xa0)(A|a)\.(D|d)\.?'
language: pygrep
types: [text]
files: ^binaries/
exclude: (^binaries/data/mods/(mod|public)/art/.*\.xml|\.dae$)
- repo: https://github.com/scop/pre-commit-shfmt
rev: v3.9.0-1
hooks:
- id: shfmt
args:
- --diff
- --simplify
stages: [pre-commit]
exclude: ^build/premake/premake5/
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.10.0.1
hooks:
- id: shellcheck
exclude: ^build/premake/premake5/
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.41.0
hooks:
- id: markdownlint
exclude: |
(?x)(
^.gitea/ISSUE_TEMPLATE/|
^build/premake/|
^source/third_party/
)
- repo: https://github.com/adrienverge/yamllint
rev: v1.35.1
hooks:
- id: yamllint
args:
- --strict
exclude: ^build/premake/premake5/

8
.yamllint.yaml Normal file
View File

@ -0,0 +1,8 @@
---
# https://yamllint.readthedocs.io/en/stable/index.html
extends: default
rules:
line-length:
max: 100
truthy:
check-keys: false

View File

@ -15,7 +15,6 @@ There are several ways to contact us and find more information:
- Gitea (development info, bug tracker): https://gitea.wildfiregames.com/
- IRC: #0ad on irc.quakenet.org
## Running precompiled binaries on Windows
A precompiled, ready-to-play development version of the game is available from
@ -27,33 +26,28 @@ In a checkout of the `nightly-build` SVN repository, open the "binaries\system"
- To launch the game: Run pyrogenesis.exe
- To launch the map editor: Run Atlas.bat or "pyrogenesis.exe -editor"
## Compiling the game from source code
The instructions for compiling the game on Windows, Linux and OS X are at
[BuildInstructions](https://gitea.wildfiregames.com/0ad/0ad/wiki/BuildInstructions).
## Reporting problems
Bugs should be reported on Gitea. For information on reporting problems
and finding logs, see [ReportingErrors](https://gitea.wildfiregames.com/0ad/0ad/wiki/ReportingErrors).
## Contributing Code
If you want to help out programming for the game, have a look at
[GettingStartedProgrammers](https://gitea.wildfiregames.com/0ad/0ad/wiki/GettingStartedProgrammers)
or contact us on #0ad-dev on irc.quakenet.org
## Contributing Artwork
If you want to make artwork for the game, have a look at
[For Artists](https://gitea.wildfiregames.com/0ad/0ad/wiki#for-artists)
or visit [the forums](https://www.wildfiregames.com/forum).
## Translating
You can help translating the game at https://www.transifex.com/projects/p/0ad

View File

@ -518,8 +518,13 @@ enabled = true ; The STUN protocol allows hosting games wi
; If STUN is disabled, the game relies on direct connection, UPnP and port forwarding.
server = "lobby.wildfiregames.com" ; Address of the STUN server.
port = 3478 ; Port of the STUN server.
delay = 200 ; Duration in milliseconds that is waited between STUN messages.
; Smaller numbers speed up joins but also become less stable.
delay = 10 ; Duration in milliseconds that is waited between checking for retrieved STUN responses.
; Smaller numbers speed up joins but may make them less stable, if max_tries isn't increased proportionally as well.
max_tries = 100 ; Maximum number of tries for receiving STUN responses.
[lobby.fw_punch]
delay = 200 ; Duration in milliseconds between sending hole punching messages.
num_msg = 3 ; Number of hole punching messages to send.
[mod]
enabledmods = "mod public"

0
binaries/data/mods/_test.gui/gui/event/event.js Executable file → Normal file
View File

0
binaries/data/mods/_test.gui/gui/event/event.xml Executable file → Normal file
View File

0
binaries/data/mods/_test.gui/gui/gui.rng Executable file → Normal file
View File

0
binaries/data/mods/_test.gui/gui/gui_page.rng Executable file → Normal file
View File

0
binaries/data/mods/_test.gui/gui/hotkey/hotkey.js Executable file → Normal file
View File

0
binaries/data/mods/_test.gui/gui/hotkey/hotkey.xml Executable file → Normal file
View File

0
binaries/data/mods/_test.gui/gui/hotkey/page_hotkey.xml Executable file → Normal file
View File

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

View File

View File

@ -1363,7 +1363,8 @@ var g_EntityCommands =
return {
"tooltip": colorizeHotkey("%(hotkey)s" + " ", "session.unload") +
translate("Unload All."),
translate("Unload All") + "\n" +
bodyFont(translate("Order all units to leave the selected entities.")),
"icon": "garrison-out.png",
"count": count,
"enabled": true
@ -1398,7 +1399,8 @@ var g_EntityCommands =
return {
"tooltip": colorizeHotkey("%(hotkey)s" + " ", "session.unloadturrets") +
translate("Unload Turrets."),
translate("Unload Turrets") + "\n" +
bodyFont(translate("Order all units to leave the selected turret points.")),
"icon": "garrison-out.png",
"count": count,
"enabled": true
@ -1418,10 +1420,12 @@ var g_EntityCommands =
{
"tooltip":
colorizeHotkey("%(hotkey)s" + " ", "session.kill") +
translate("Destroy the selected units or structures.") + "\n" +
colorizeHotkey(
translate("Use %(hotkey)s to avoid the confirmation dialog."),
"session.noconfirmation"
translate("Self-Destruct") + "\n" +
bodyFont(translate("Destroy the selected entities.") + "\n" +
colorizeHotkey(
translate("Use %(hotkey)s to avoid the confirmation dialog."),
"session.noconfirmation"
)
),
"icon": "kill_small.png",
"enabled": true
@ -1470,7 +1474,8 @@ var g_EntityCommands =
return {
"tooltip": colorizeHotkey("%(hotkey)s" + " ", "session.stop") +
translate("Abort the current order."),
translate("Abort") + "\n" +
bodyFont(translate("Cancel the current orders for the selected units.")),
"icon": "stop.png",
"enabled": true
};
@ -1491,7 +1496,8 @@ var g_EntityCommands =
return false;
return {
"tooltip": colorizeHotkey("%(hotkey)s" + " ", "session.calltoarms") +
translate("Send the selected units on attack move to the specified location after dropping resources."),
translate("Attack") + "\n" +
bodyFont(translate("Send the selected units on attack move to the specified location after dropping resources.")),
"icon": "call-to-arms.png",
"enabled": true
};
@ -1513,7 +1519,8 @@ var g_EntityCommands =
return {
"tooltip": colorizeHotkey("%(hotkey)s" + " ", "session.garrison") +
translate("Order the selected units to garrison in a structure or unit."),
translate("Garrison") + "\n" +
bodyFont(translate("Order the selected units to garrison in a structure or another unit.")),
"icon": "garrison.png",
"enabled": true
};
@ -1535,7 +1542,8 @@ var g_EntityCommands =
return {
"tooltip": colorizeHotkey("%(hotkey)s" + " ", "session.occupyturret") +
translate("Order the selected units to occupy a turret point."),
translate("Occupy Turret") + "\n" +
bodyFont(translate("Order the selected units to occupy a turret point.")),
"icon": "occupy-turret.png",
"enabled": true
};
@ -1557,7 +1565,8 @@ var g_EntityCommands =
return false;
return {
"tooltip": translate("Unload"),
"tooltip": translate("Unload") + "\n" +
bodyFont(translate("Order the selected units to leave their turret points.")),
"icon": "leave-turret.png",
"enabled": true
};
@ -1577,7 +1586,8 @@ var g_EntityCommands =
return {
"tooltip": colorizeHotkey("%(hotkey)s" + " ", "session.repair") +
translate("Order the selected units to repair a structure, ship, or siege engine."),
translate("Repair") + "\n" +
bodyFont(translate("Order the selected units to repair a structure, ship, or siege engine.")),
"icon": "repair.png",
"enabled": true
};
@ -1598,7 +1608,8 @@ var g_EntityCommands =
return {
"tooltip": colorizeHotkey("%(hotkey)s" + " ", "camera.rallypointfocus") +
translate("Focus on Rally Point."),
translate("Focus on Rally Point") + "\n" +
bodyFont(translate("Center the view on the selected rally point.")),
"icon": "focus-rally.png",
"enabled": true
};
@ -1635,7 +1646,8 @@ var g_EntityCommands =
return {
"tooltip": colorizeHotkey("%(hotkey)s" + " ", "session.backtowork") +
translate("Back to Work"),
translate("Back to Work") + "\n" +
bodyFont(translate("Order the selected units to resume their work.")),
"icon": "back-to-work.png",
"enabled": true
};
@ -1656,7 +1668,8 @@ var g_EntityCommands =
return {
"tooltip": colorizeHotkey("%(hotkey)s" + " ", "session.guard") +
translate("Order the selected units to guard a structure or unit."),
translate("Guard") + "\n" +
bodyFont(translate("Order the selected units to guard a structure or unit.")),
"icon": "add-guard.png",
"enabled": true
};
@ -1676,7 +1689,8 @@ var g_EntityCommands =
return false;
return {
"tooltip": translate("Remove guard"),
"tooltip": translate("Abort Guard") + "\n" +
bodyFont(translate("Order the selected units to stop guarding.")),
"icon": "remove-guard.png",
"enabled": true
};
@ -1695,7 +1709,9 @@ var g_EntityCommands =
return false;
return {
"tooltip": translate("Barter & Trade"),
"tooltip": colorizeHotkey("%(hotkey)s" + " ", "session.gui.barter.toggle") +
translate("Barter & Trade") + "\n" +
bodyFont(translate("Open the dialog for managing resource trading and bartering.")),
"icon": "economics.png",
"enabled": true
};
@ -1715,8 +1731,8 @@ var g_EntityCommands =
return {
"tooltip": colorizeHotkey("%(hotkey)s" + " ", "session.patrol") +
translate("Patrol") + "\n" +
translate("Attack all encountered enemy units while avoiding structures."),
translate("Patrol") + "\n" +
bodyFont(translate("Order to repeatedly go to a point and come back, attacking all enemies along the way.")),
"icon": "patrol.png",
"enabled": true
};
@ -1744,12 +1760,14 @@ var g_EntityCommands =
return sharableEntities.some(entState => !entState.resourceDropsite.shared) ?
{
"tooltip": translate("Press to allow allies to use this dropsite"),
"tooltip": translate("Share Dropsite") + "\n" +
bodyFont(translate("Allow allies to use this dropsite, now locked.")),
"icon": "locked_small.png",
"enabled": true
} :
{
"tooltip": translate("Press to prevent allies from using this dropsite"),
"tooltip": translate("Lock Dropsite") + "\n" +
bodyFont(translate("Prevent allies from using this dropsite, now shared.")),
"icon": "unlocked_small.png",
"enabled": true
};
@ -1784,14 +1802,16 @@ var g_EntityCommands =
if (!shareableEntities.every(entState => entState.resourceDropsite.shared))
return {
"tooltip": translate("The use of this dropsite is prohibited"),
"tooltip": translate("Locked Dropsite") + "\n" +
bodyFont(translate("The use of this dropsite is prohibited.")),
"icon": "locked_small.png",
"enabled": false
};
return {
"tooltip": g_IsObserver ? translate("Allies are allowed to use this dropsite.") :
translate("You are allowed to use this dropsite"),
"tooltip": translate("Shared Dropsite") + "\n" +
bodyFont(g_IsObserver ? translate("Allies are allowed to use this dropsite.") :
translate("You are allowed to use this dropsite.")),
"icon": "unlocked_small.png",
"enabled": false
};
@ -1810,7 +1830,8 @@ var g_EntityCommands =
return false;
return {
"tooltip": colorizeHotkey("%(hotkey)s" + " ", "session.queueunit.autoqueueon") +
translate("Activate auto-queue for selected structures."),
translate("Activate Auto-Queue") + "\n" +
bodyFont(translate("Activate the production auto-queue for the selected structures.")),
"icon": "autoqueue-on.png",
"enabled": true
};
@ -1830,7 +1851,8 @@ var g_EntityCommands =
return false;
return {
"tooltip": colorizeHotkey("%(hotkey)s" + " ", "session.queueunit.autoqueueoff") +
translate("Deactivate auto-queue for selected structures."),
translate("Deactivate Auto-Queue") + "\n" +
bodyFont(translate("Deactivate the production auto-queue for the selected structures.")),
"icon": "autoqueue-off.png",
"enabled": true
};

View File

@ -1,4 +1,5 @@
ROMAN ARMY CAMP
Buildable in neutral or enemy territory. Good for building a secret base behind enemy lines or to consolidate gains within enemy territory.
Construct rams and train citizen soldiers.
Garrison units to slowly heal them and protect the army camp from attacks and decay.
Buildable in neutral or enemy territory. Good for setting up a secret base behind enemy lines or to consolidate gains within enemy territory.
Constructs Rams and trains high-rank Citizen Soldiers.
Fires arrows at any enemies in sight.
Garrison units inside for protection and additional arrows.

View File

@ -1,5 +1,5 @@
ARROW SHIPS
The basic Warship for most factions.
Transport up to 30 troops across the water.
The basic Warship for most civilizations.
Transports up to 30 troops across the water.
Good against melee Warships, such as Ramming Ships and Fire Ships.
Countered by Siege Ships and other Arrow Ships.

View File

@ -1,5 +1,5 @@
BARRACKS
Train all citizen soldiers. Some civilizations can unlock the training of champions as well.
Units gain experience while garrisoned inside the building.
Build one early to train citizen soldiers while you phase up your settlement.
Build in a forward base to resupply your assault with fresh troops.
Trains all Citizen Infantry. Some civilizations can unlock the training of Champions in it as well.
Units gain experience while garrisoned inside.
Build one early to train Citizen Soldiers while you phase up your settlement.
Build near the front lines to resupply your assault with fresh troops.

View File

@ -0,0 +1,3 @@
BARTER
At the Market structure, a player can exchange a resource for another of a different type.
Rates are affected globally by all players. Turn this into an advantage by checking prices regularly.

View File

@ -1,3 +1,3 @@
BIOMES
Biomes can be used on some random maps and determine which region of the world the map represents.
They influence the appearence of the maps and also the amount of resources that are available.
Biomes can be used on some random maps to determine which region of the world the map represents.
They influence the appearence of the maps and also the available amount of different resources.

View File

@ -1,4 +1,5 @@
WAR DOG
A dog that the Britons can train at the cavalry stable.
A unique dog unit that the Britons can train at the Cavalry Stable.
Has low health, but is fast and will fearlessly attack enemies.
Cannot capture or destroy structures.
Use them as support in your army or for quick raids.

View File

@ -1,4 +1,4 @@
CARTHAGINIAN SACRED BAND
Champion Spearmen and Champion Cavalry Spearmen for Carthage.
Both are trainable from the Temple, instead of the Fortress like most other champions.
Use the Spearmen as heavy infantry against cavalry. Use the Cavalry as heavy shock against siege weapons and skirmishers.
Champion Spearmen and Champion Cavalry Spearmen for the Carthaginians.
Trainable from the Temple, unlike most other Champions.
Use the Spearmen to counter enemy Cavalry. Use the Cavalry as heavy shock against Siege Weapons and Ranged Infantry.

View File

@ -1,4 +1,4 @@
CARTHAGINIAN NAVAL SHIPYARD
Special dock of the Carthaginians to construct warships.
Garrison ships inside to slowly repair them.
Much stronger than other docks, but also more expensive.
Special Dock of the Carthaginians to construct Warships.
Garrison Ships inside to slowly repair them.
Much stronger than other Docks, but also more expensive.

View File

@ -1,4 +1,4 @@
CATAPULTS
Ranged siege engines that are good against structures.
Expensive and slow.
Long-ranged Siege Engines.
Devastating against structures, but also expensive and slow.
Pack up into carts for movement, and unpack into stationary engines for attack!

View File

@ -1,3 +1,3 @@
CAVALRY STABLE
Trains cavalry units and lets you research cavalry specific technologies.
Trains Cavalry Units and lets you research cavalry-specific technologies.
Units gain experience while garrisoned inside the structure.

View File

@ -1,4 +1,4 @@
CELTIC HEAVY ARROW SHIP
The main warship for the Britons, Gauls, and Iberians.
The main Warship for the Britons, Gauls, and Iberians.
Can transport up to 40 units.
Can be improved with greater health and garrison capacity.
Research special technologies to improve them with greater health and garrison capacity.

View File

@ -1,4 +1,4 @@
CITY WALLS
Strong stone walls that help you protect your city.
When your ranged infantry units are occupying the turrets, they have additional armor and can shoot at the enemy.
Vulnerable to siege weapons like catapults, rams and war elephants.
Occupy the turrets with Ranged Infantry for increased defense and greater vision range.
Knock them down with Siege Engines like Catapults, Battering Rams, or War Elephants.

View File

@ -0,0 +1,4 @@
CIVIC CENTER
The foundation of your new colony.
Claim large tracts of land by building them in previously unclaimed territory.
Trains all Citizens: Female Citizens, Citizen Infantry, and Citizen Cavalry.

View File

@ -1,5 +0,0 @@
CIVIC CENTERS
The foundation of your new colony.
Claim large tracts of territory.
Can be built in friendly and neutral territory.
Train citizens: female citizens, infantry citizen-soldiers, and cavalry citizen-soldiers.

View File

@ -0,0 +1,4 @@
CONTROL GROUPS
Save your current selection to a hotkey by pressing CTRL + a number from 0 to 9 (by default) simultaneously.
After the control group has been created, quickly select them again by pressing the assigned number.
A double click additionally centers the camera to the selection.

View File

@ -1,4 +1,4 @@
DEFAULT FORMATION
Right-click an icon to set the default formation: units that are ordered to walk or patrol will automatically use it.
Can be de-activated by choosing “no formation” as the default.
Can be deactivated by choosing “no formation” as the default.
The “Formation control” option lets you choose whether formations disband for orders other than walking or patrolling.

View File

@ -0,0 +1,4 @@
DEFENSE TOWER
Defend a vulnerable position by building these strong watchtowers.
Has a large vision range and shoots arrows at any enemy in sight.
Garrison Infantry inside to increase its firepower.

View File

@ -1,5 +0,0 @@
DEFENSE TOWERS
Strong watchtowers, which help you defend your position.
They have a large vision range and will shoot arrows at the enemy in sight.
You can garrison more infantry inside them to increase the number of arrows they shoot.

View File

@ -0,0 +1,5 @@
DOCK
Buildable in neutral and allied territory.
Constructs various Ships for economic and military needs.
Also serves as a resource dropsite.
Can be set up as a trade point for both naval and land Traders.

View File

@ -1,3 +1,3 @@
ELEPHANT STABLE
The structure is available to some civilizations to train elephant units.
Units gain experience while garrisoned inside the building.
Available to some civilizations to train Elephants.
Units gain experience while garrisoned inside.

View File

@ -1,3 +1,3 @@
EMBASSIES AND MERCENARY CAMPS
Special structures allowing you to hire mercenaries for your army.
Mercenaries will not gather resources and cost only metal, but they are experienced and strong.
Special structures allowing you to hire Mercenaries for your army.
Mercenaries cannot gather resources, but only cost metal, are trained quickly, and start at Advanced rank.

View File

@ -0,0 +1,5 @@
FIRESHIP
Available to the Britons, Gauls, and Iberians.
Causes fire damage to nearby Ships, but gradually loses health over time as well.
Construct a few, move them to the enemy fleet, then ignite them to set them ablaze.
Very good against Siege Ships.

View File

@ -1,5 +1,4 @@
FISHING
Fish the seas for a bountiful harvest.
Fishing boats carry a large amount of food per trip.
Fishing is faster than gathering food on fields.
Fishing boats can carry a large amount of food and gather faster than Workers on fields.
Careful! Fish are not an infinite resource! Although they do slowly repopulate when left alone.

View File

@ -1,3 +1,3 @@
FORGE
Research structure for all factions.
Research weapon and armor upgrades for your units.
Research structure for all civilizations.
Provides valuable weapon and armor upgrades for your units.

View File

@ -1,3 +1,3 @@
FORTRESS
Usually the strongest structure of a civilization and the place where you can train Heroes.
Usually the strongest structure of a civilization.
Garrison soldiers inside to add more firepower to its defense.

View File

@ -1,4 +1,4 @@
FREEHAND POSITION
Gain an advantage on the battleground by tactically positioning your units!
Therefore select some units, press and hold the right mouse button, draw any line, then release the button.
To do it, select some units, press and hold the right mouse button, draw any line, then release the button.
Your units will now spread out on this line.

View File

@ -1,6 +1,5 @@
RESOURCE GATHERING
Use citizen-soldiers and female citizens to gather resources.
Female citizens gather vegetable resources faster.
Infantry citizen-soldiers are faster gathering minerals.
Cavalry citizen-soldiers are faster gathering meat.
The higher the level of a citizen-soldier (advanced, elite), the better he fights, but the less efficient he is at gathering resources.
Use Citizens to gather resources.
Female citizens are best at gathering fruit and grain.
Citizen Infantry excel at gathering wood, stone, and metal.
Citizen Cavalry can only gather meat, but do so very quickly.

View File

@ -1,5 +0,0 @@
FIRESHIPS
Available to the Britons, Gauls, and Iberians.
Construct them, move them near enemy ships, then ignite them to set them ablaze.
They cause Fire damage to nearby enemy ships and themselves start to lose health.
Very good against Siege Ships.

View File

@ -1,2 +1,3 @@
LIGHTHOUSE
Special Ptolemaic structures to increase your vision range when built on the shore.
Special structure solely available to the Ptolemies.
Increases your vision range when built on the shore.

View File

@ -0,0 +1,2 @@
LOOT
When you kill units or destroy structures, you will gain a certain number of resources, plus what they are carrying.

View File

@ -1,4 +1,3 @@
MAP FLARE
Use this feature to let your team know where on the map something important happens.
They will see the flare on their minimap.
They will also see the flare on their minimap.

View File

@ -0,0 +1,4 @@
MAURYAN WORKER ELEPHANT
Exclusively available to the Mauryas, right from the Village Phase.
Serves as a mobile dropsite, enabling you to efficiently gather resources outside of your territory.
Can also build structures.

View File

@ -1,4 +1,4 @@
PYRAMIDS OF MEROĂ‹
Special structures available for the Kushites.
The small pyramids improve the gathering rate of the workers around them.
Special structures available to the Kushites.
The small pyramids improve the gathering rate of workers around them.
The large pyramids increase the military capabilities of soldiers around them.

View File

@ -0,0 +1,5 @@
NOMAD MODE
Only available for the "Random" map type.
Players will be randomly dropped on the map without a Civic Center.
Requires the "Medium" starting resource setting in order for players to be able to build their first one.
Don't immediately start building the Civic Center, scout for a good location for your base first.

View File

@ -0,0 +1,2 @@
ORDER ONE UNIT
When right-clicking While holding the “Order one unit” hotkey (by default ALT), only one random unit from the current selection will perform the assigned task.

View File

@ -1,4 +1,4 @@
OUTPOSTS
Build in neutral or own territory.
Cheap and quickly built, but weak.
Garrison infantry for extensive vision, and to prevent losing control of the outpost due to territory decay.
Build in neutral or own territory to monitor large areas of the map.
Cheap and quickly built, but weak and easily captured.
Garrison Infantry to extend the vision range, and to prevent losing control over it due to territory decay.

View File

@ -1,3 +1,3 @@
PALISADE WALLS
A quick, cheap wooden wall available to all factions.
Most factions have access to them in Village Phase.
A quick, cheap wooden wall for moderate defense.
Available to most civilizations in Village Phase.

View File

@ -1,5 +1,4 @@
ACHAEMENID ARCHITECTURE
Special technology for the Persians.
Structures +25% health.
Build time lengthened by +20% as a consequence.
Persians also have access to a great number of structural and defensive technologies.
Special technology exclusive to the Persians.
Structures gain +25% health, but their build time lengthened by +20% as a consequence.
Persians also have access to a great number of other structural and defensive technologies.

View File

@ -1,4 +1,4 @@
PIKEMEN
Heavily armored and slow. Low attack.
Used against cavalry or against other melee infantry to pin them in place.
Available to: Kushites, Macedonians, Ptolemies, and Seleucids.
Available to the Kushites, Macedonians, Ptolemies, and Seleucids.
Heavily armored, but low attack damage.
Use against Cavalry or against other Melee Infantry to pin them in place.

View File

@ -0,0 +1,4 @@
QUEUE ORDERS
While holding the “Queue order” hotkey (by default SHIFT), queue multiple tasks for units by right-clicking.
Once a task is done they will automatically execute their next task.
The queue will be reset if the unit receives a manual order.

View File

@ -1,4 +0,0 @@
SIEGE WARSHIP
The heaviest standard warship. Available to: Carthaginians, Ptolemies, Romans, Seleucids, and Han Chinese.
Strong crush damage and long range make them good against Arrow Ships and Buildings near the shore.
Countered by melee ships, such as Ramming Ships and Fire Ships, and other Siege Ships.

View File

@ -0,0 +1,5 @@
RAMMING SHIP
Strong and fast melee ship available to Mediterranean civilizations.
Transports up to 30 troops swiftly across the water.
Good against Siege Ships due to its speed and strong ramming attack.
Countered by Arrow Ships and Defense Towers.

View File

@ -1,5 +0,0 @@
RAMMING SHIPS
A strong and fast melee ship available to Mediterranean civilizations.
Transport up to 30 troops swiftly across the water.
Good against Siege Ships due to speed and strong ramming attack.
Countered by Arrow Ships and Defense Towers.

View File

@ -1,3 +1,4 @@
RESOURCE COUNTER
The resource counter panel shows you how much of each resources you have at the moment.
The number below it shows you how many citizens are currently gathering them.
Located in the top left corner of the screen.
Keep tabs on how much of each resource you've stockpiled in your treasury and how many units are currently gathering them.
Keep an eye on it while playing to avoid running out in crucial moments.

View File

@ -2,4 +2,4 @@ SAVANNA BIOME
Generally flat, with a few watering holes and rocky outcrops.
Chock full of herd animals for plentiful hunting.
Rich in all types of mining.
Wood tends to be sparse, but consists of high-yield Baobab trees.
Trees tend to be sparse, but include high-yield Baobab trees.

View File

@ -0,0 +1,3 @@
SELECT WOUNDED UNITS
While holding the “Select only wounded units” hotkey (by default 0), you can select wounded units.
Customize the threshold in Settings > Game Session.

View File

@ -0,0 +1,4 @@
SIEGE WARSHIP
The heaviest standard warship. Available to the Carthaginians, Ptolemies, Romans, Seleucids, and Han Chinese.
Strong crush damage and long range make it good against Arrow Ships and structures near the shore.
Countered by melee ships, such as Ramming Ships and Fire Ships, and other Siege Ships.

View File

@ -1,4 +1,3 @@
SNAPPING
Structures can be aligned by keeping the snap hotkey pressed during placement.
Aligning structures allows to conserve space for future construction.
Tightly packed groups of structures can also be used for obstructing raiding enemies.
Align structures by keeping the snap hotkey pressed during placement.
Conserves space for future construction, and comes in useful for obstructing raiding enemies.

View File

@ -1,4 +1,4 @@
SPARTIATES
Strongest infantry unit in the game.
Champion Infantry available to the Spartans.
Use them to slaughter enemy cavalry or as a shock force to support your regular infantry.
Champion Infantry Spearmen available to the Spartans.
One of the strongest units in the game.
Use them to slaughter enemy Cavalry or as a shock force to support your regular Infantry.

View File

@ -1,5 +1,5 @@
SPEARMEN
The basic melee infantry for every faction in the game.
Used against cavalry for an attack bonus.
Decent hack attack make them good front line troops.
They are countered by ranged units and swordsmen, so support your spearmen with slingers or cavalry.
The basic Melee Infantry available to every civilization in the game.
Use against Cavalry for an attack bonus.
Decent melee hack damage makes them good front line troops.
Countered by ranged units and Swordsmen, so support your Spearmen with those or Cavalry yourself.

View File

@ -0,0 +1,3 @@
STOREHOUSE
A cheap dropsite for non-food resources (wood, stone, and metal).
Research technologies to improve the gathering rates of your Citizens.

View File

@ -1,3 +0,0 @@
STOREHOUSES
A cheap dropsite for non-food resources (Wood, Stone, Metal).
Research technologies to improve the gathering capabilities of your citizens.

View File

@ -0,0 +1,4 @@
SYNTAGMA
A unique historical formation formed by Macedonian Pikemen.
Forms the men into tight ranks and deep files, allowing a wall of forward-thrusting pikes to pierce any enemy soldier foolish enough launch a frontal assault.
Support them with more flexible units to prevent encirclement.

View File

@ -0,0 +1,6 @@
TEMPLE
Town Phase structure available to all civilizations.
Trains Healers to heal your troops on the battlefield.
Offers a series of helpful healing technologies.
Its aura heals nearby units.
Garrison wounded units inside for even quicker healing.

View File

@ -1,6 +0,0 @@
TEMPLES
Town Phase structure.
Recruit Healers to heal your troops on the battlefield.
Research healing technologies.
Its aura heals nearby units.
Garrison wounded units inside for quicker healing.

View File

@ -1,4 +1,4 @@
TERRITORY DECAY
Decay happens when structures are not connected to an allied Civil Center.
The decay process can be slowed down or reversed by garrisoning some units in the structure.
When the decay is completed, the structure will be given to the most influential neighbor.
Structures too far off an allied territory root (usually a Civic Center) gradually lose capture points.
Slow down or reverse the decay process by garrisoning some units in the structure.
When the decay is completed, the structure will be given to the player owning the closest territory root or Gaia.

View File

@ -0,0 +1,4 @@
TRADING
Train Traders for trading on land at the Market and Merchantmen for seaborne trade at the Dock.
Create a trade route by selecting a Trader or Merchantman and right-clicking on two trade points (Dock or Market). Longer distances yield more profits!
Open the "Barter & Trade" dialog next to the menu in the top right corner to set how much of each resource type you want to trade for.

View File

@ -1,3 +1,3 @@
TREASURES
Collectible chests and bare resources on land and shipwrecks on the shore.
Provide you with a resource boost, so keep an eye out for them as you explore.
Collectible chests, bare resources on land, and shipwrecks on the shore.
Provide you with an instant resource boost, so keep an eye out for them as you explore.

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