Commit graph

16749 commits

Author SHA1 Message Date
wowgetoffyourcellphone
5be2d7d9ed Naval Redux 2.1
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
2025-09-17 05:48:38 +02:00
Vantha
2fd624260f Remove some invalid GetGUIObjectByName calls
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
2025-09-16 08:52:11 +02:00
Jonny McCullagh
b4ad152df3 escape opening square bracket in quotes.txt 2025-09-15 22:59:54 +02:00
wowgetoffyourcellphone
3413969b4c 3 new/updated structure portraits 2025-09-13 20:07:50 +02:00
trompetin17
93f4c5cf22
Fix resizing GUI object to use ceiling values for width and height
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.
2025-09-13 09:58:27 -05:00
Jonny McCullagh
5d8debe676 Add more tips 2025-09-13 15:18:30 +02:00
Itms
7c51013ef0 Remove incorrect default for autostart-players
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
2025-09-10 10:34:45 +02:00
Vantha
a5b5331fa4 Fix chat line button sizing
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
2025-09-10 08:55:02 +02:00
real_tabasco_sauce
eac96dbcbd Add Germans Civilization 2025-09-08 22:20:13 +02:00
Itms
24b47b0e3a
Fix strategic campaign city templates
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
2025-09-08 17:24:20 +02:00
phosit
760ad169fe Steadily increase strongholds size with team size
`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.
2025-09-07 16:29:17 +02:00
phosit
94a0dde58a Equalize space between stronghold
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.
2025-09-07 16:29:17 +02:00
real_tabasco_sauce
89f4fc7e99 correct civilian train time after #8062 2025-09-06 11:31:39 -07:00
obelix
c963711667 Fix the tooltip of Giant maps
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.
2025-09-06 14:43:49 +02:00
wowgetoffyourcellphone
3592814aa8 Gendered Civilians
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
2025-09-02 10:23:44 +02:00
wowgetoffyourcellphone
18818fd31c Create 24x24 obstructors for #8304
@phosit
2025-08-30 00:40:02 -04:00
phosit
8abe9f6cea Rename warn to aiWarn in utils.js
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
2025-08-25 21:44:32 +02:00
elexis
8b11f6a151
Delete redundant per player CheatsEnable property
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)
2025-08-25 20:41:31 +02:00
phosit
ac25071a2e Fix typo in "Headquaters" introduced in 4da78788c8
There is another usage which was wrongly spelled. It was spelled
differently so it wasn't found in 835f59a604.

Fixes: #8291
2025-08-24 16:28:56 +02:00
phosit
835f59a604 Fix typo in "Headquaters" introduced in 4da78788c8
Fixes: #8291
2025-08-24 07:32:24 +02:00
elexis
2413d13483 Place bigger placeblock on survival of the fittest
This reverts 50b76acdd5 As it places to many entities on giant maps
2025-08-23 20:08:37 +02:00
Vantha
4dace890cf Fix some 'Failed to get GUI object by name' errors
Fixes #8297
2025-08-22 10:50:28 +02:00
trompetin17
ecfa5be686
Fix undefined difficulty reference in 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
2025-08-15 01:39:39 -05:00
Vantha
2026a5fece Clean up Engine.GetGUIObjectByName calls
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).
2025-08-14 10:22:56 +02:00
phosit
062be89694 Move enums to own files in ai
This way they don't accidentally get mutated.
2025-08-13 14:04:16 +02:00
phosit
0a2bd6a5a4 Use proper js-modules for ai common-api
The common-api already used a coding pattern which was called modules.
That is replaced with native js-modules.

Refs: #8081
2025-08-13 14:04:16 +02:00
phosit
4da78788c8 Use proper js-modules for petra
Petra already used a coding pattern which was called modules. That is
replaced with native js-modules.

Refs: #8081
Fixes: #1024
2025-08-13 14:04:16 +02:00
real_tabasco_sauce
55c17a905d Use footprint for fish selection box
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.
2025-08-10 13:00:51 +02:00
Stan
0dc9477109
Fix missing this call
Reported by: @trompetin17
Pull Request: #8265
Fixes: e35fce8524
2025-08-09 16:32:09 +02:00
Jonny McCullagh
aee2aa4cfd Add new historical quotes 2025-08-05 22:27:12 +02:00
Kate
96ab6ecb41 Rename "Join game" to "Connect by IP" in main menu 2025-08-05 22:04:13 +02:00
phosit
b1196fc94f Use promises to update the colormixer
Callbacks introduce indirections which are harder to understand.
2025-08-05 19:15:01 +02:00
phosit
17338daaaa Groupe a chanels in the collor-mixer
It's easyier to construct and iterate chanel by chanel instead of
iterating three arrays at once.
2025-08-05 19:15:01 +02:00
phosit
6c481d4811 Make the colormixer a module
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
2025-08-05 19:15:01 +02:00
trompetin17
251f6bfc86
Enhance language selection by applying CJK font styles 2025-08-04 09:35:46 -05:00
trompetin17
47454a592e
Fix casing for debug box configuration keys in default.cfg and TextRenderer.cpp 2025-08-04 07:44:12 -05:00
phosit
9f15df2831 Calculate baseResourceConstraint only once
`baseResourceConstraint` was calculated for every resource.
2025-08-03 21:05:14 +02:00
phosit
0cf1697594 Allow maps to not specify BaseResourceClass
There was already a check to handle no `BaseResourceClass` but it's
handled in a way that could lead to errors later on.
2025-08-03 21:05:14 +02:00
phosit
0c96ef7906 Add stronghold placement to Cantabrian Highlands
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
2025-08-03 19:08:04 +02:00
phosit
ecb2db1dcd Return objects from placement-functions
An alternative to 6a43f91630 which doesn't restrict
`playerPlacementByPattern` to return exactly two values.
2025-08-03 19:08:04 +02:00
phosit
50b76acdd5 Restrict foundations on survival of the fittest
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.
2025-08-03 16:50:43 +02:00
rene
35db768ae5 Remove incorrect tech requirement for Kushites
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
2025-08-03 00:29:51 +02:00
phosit
07309450fc Make also dap respect 'no-useless-assignment'
Forgotten in #8163 due to rebase.
2025-08-01 15:57:27 +02:00
phosit
582541ea80 Enable eslint rule 'no-useless-assignment'
Enable rule 'no-useless-assignment' [1] and fix violations.

[1] https://eslint.org/docs/latest/rules/no-useless-assignment
2025-08-01 11:26:40 +02:00
Stan
e35fce8524
Move globals to the PopCapManager prototype. 2025-07-27 19:00:04 +02:00
phosit
e03b6ae657 Remove isNomad in unknown.js
`isNomad` got removed in 6bb7f3fd39 this use was missed.

It wasn't called. So it always evaluated to true.
2025-07-21 11:07:57 +02:00
trompetin17
b32b018769
Fix chat session incorrect width calc
Refs: #8188
2025-07-17 09:46:31 -05:00
trompetin17
ffdf527d90
Fix label resizing in Map Browser
Refs: #8188
2025-07-17 09:46:18 -05:00
trompetin17
01d2481f55
Fix Structure Tree misplaced phase icons
Refs: #8188
2025-07-17 09:45:35 -05:00
phosit
8f9c92f30c Utilize minDist in placePlayerBaseBerries
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.
2025-07-13 20:29:54 +02:00