Naval Redux 2.1
1 Greatly streamline the tech tree after some criticism it was too lengthy.
2 Move Scout ship to Village Phase
3 Tweak some ship costs
4 Implement some ideas from @Real_T_S
5 Acquiesce to all of @Real's demands
Their return values (undefined) were unused since 2cccd9825d, which is why they
didn't break anything. But due to the latest GetGUIObjectByName API
changes, they triggered some errors. They can be fully removed safely
now.
Fixes#8340
The size is now float number, because of this code calculates the
required size, we should always ceiling the value to the next int to
remove any error or unwanted behavior in images or subpixel
calculations.
When not provided, the number of players on autostart was set to 2,
which is incorrect for skirmishes and scenarios. This commit makes this
parameter ignored for non-random maps, as well as the other parameters
specific to random maps.
Furthermore, 2 is already set as a default number of players for random
maps (in the `PlayerCount` gamesettings attribute), setting it in
autostart code is redundant.
Fixes#8325
Refs #7269
The issue was that the rright value was 100%.
That's why the buttons would always extend across the full width of the
screen.
Replacing the value right in the XML would result in an invalid size, so
we can remove it from there and create a full, separate size in the code
each time (Object.assign just edits it), since the top and bottom values
specified in the XML were overwritten anyway.
And since the left margin of 3 is fixed, we better move it to the parent
object to avoid a constant like that in the code.
Fixes#8322
The gendered civilian change made this unit native to its civil center,
but inherited templates in the proof-of-concept strategic map were not
adapted.
Fixes#8337
`groupedDistance` is the "distance between neighboring players" but it
was used as the radius.
Then there was a special case when the team size is big and the
`groupedDistance` was to small.
With this commit the `groupedDistance` is actually used as
"distance between neighboring players" and removes the special casing.
Change the stronghold placement.
Preqiously the angle between the center of the strongholds where equal.
Now the distance between strongholds is equal.
This is done so that big teams have more space.
Tooltips for map sizes were introduced in 8cfd494b88 when 'Giant'
received the same sentence as 'Very Large'.
This commit fixes the tooltip for Giant Maps by giving them a proper
sentence, which might avoid confusion.
Adds a randomly male and female Civilian unit which replaces the old "Female Citizen" for each civ.
New actors, new portraits, some new body textures, but the same stats as the old Female Citizen.
Updates maps, technologies, skirmish templates, et al. including the Tutorials.
Co-Authored By: Itms
Reviewed By: Vantha
There is a call to `warn` in this function. That caused infinite
recursion.
Everywhere the function is imported it's aliased as `aiWarn`. So just
export it with that name and remove the aliasing.
Introduced in: #8255
We do not see benefit in enabling cheats for certain players but not for the rest.
The AI cheats irrespective of the CheatsEnable property.
This patch uses InitAttributes to check if cheats are enabled making it
slightly harder to workaround it from js.
See SetLosRevealAll in CCmpAIManager and PETRA.Config.prototype.Cheat.
refs 996a32125c / #879 (AI reveal los);
refs 202a02568b / #1555 (cheat codes, cheatsEnable for AI);
refs 25293ce0cc (AIDiff GatherRateMultiplier),
refs f6e0c4c5a4 / #2019 (no more cheatsEnable for AI),
refs 3246b02cda (SetTradeRateMultiplier)
refs de72510c60 / #6302 (move from InitGame.js to petra/config.js)
Fix ERROR: JavaScript error where 'difficulty' is not defined on line
247 of config.js.
The bug was introduced in commit 062be89694 where two issues occurred:
this.difficulty was incorrectly set to the entire difficultyLevel module
instead of the difficulty parameter value.
Later comparisons used undefined difficulty variable instead of the
imported difficultyLevel module
GetGUIObjectByName was previously made stricter, logging an
error if it doesn't find the target object.
This commit deals with the resulting error-causing (invalid) calls,
by deleting them if they're unnecessary or converting them to the new
TryGetGUIObjectByName (which doesn't log any errors).
The addition of seagulls made fish selection boxes large, leading to clumbsiness when trying to select fish. Using the footprint for the selection box makes for a more intuitive selection.
Modules don't expose global symbols. Because of that not all functions
have to be cramed in to one class. The functions can now be split in a
more readable way.
Ref: #8081
With stronghold each team is placed on a hill.
With stronghold placement the hills are bigger. On tiny maps the ramps
might overlap and enemies might not be reachable. To prevent that the
ramps are shortened and the angle is changed to point more towards the
center of the map.
Refs: #7717
Units which are able to build can't reach the center, to build the
placed foundation and the collectors can't build.
This might help Petra a bit and avoid players placing foundations that
cannot be built.
Naval Ballistae cannot be researched by the Kushites, who don't have
access to siege ships. Hence their unique Flaming Projectiles technology
cannot depend upon Naval Ballistae.
This removes the dependency and increases the cost of the unique tech.
Fixes: #8046
Patch-By: rene
Reviewed-By: Itms
Reviewed-At: https://gitea.wildfiregames.com/0ad/0ad/pulls/8056
Only maps where `minDist` and `maxDist` differ get changed by this
commit. That is only "Deep Forest".
This has been around since `placePlayerBaseBerries` got introduced in
921850cdef.