12045 Commits

Author SHA1 Message Date
EmperorPinguin
648b0998c0
AI: better utilization of promoted units (#13737)
* AI: better utilization of promoted units

This won 54.5% in a duel of 400 games, not sure if that's significant enough. https://discord.com/channels/586194543280390151/1306726293102006453/1399500567021096960

* Update NextTurnAutomation.kt
2025-07-29 16:16:55 +03:00
EmperorPinguin
ce07a68dc8
AI: lower treshold for minimum acceptable newcity tile (#13730)
https://discord.com/channels/586194543280390151/1306726293102006453/1399334242009219123
2025-07-29 16:16:45 +03:00
EmperorPinguin
869e874ff5
Update Automation.kt (#13725) 2025-07-29 16:16:36 +03:00
Rob Loach
a645e2d010
Add unit action icons for triggerables (#13719)
* Add unit action icons for triggerables

* Apply suggestion from @RobLoach

* Apply suggestion from @RobLoach

* Add Technology icons

* Avoid the use of magic numbers

* Pass the icon size through

* Add stat icons
2025-07-29 16:16:26 +03:00
yairm210
1ef77b5e47 Fix crash when opening victory screen on the first turn 2025-07-29 15:06:28 +03:00
yairm210
697183f83f modding(validation): Add misspelling corrections to incorrect unique parameters in mod checker 2025-07-28 00:00:59 +03:00
yairm210
26624a0af5 chore(purity): Expression parsing 2025-07-27 17:40:07 +03:00
yairm210
5decf312e9 chore(purity): IConstruction 2 2025-07-27 15:10:46 +03:00
yairm210
7eaf2b587e chore(purity): IConstruction, Building, etc 2025-07-27 14:58:35 +03:00
yairm210
39c84571ed Resolves #13687 - Fix unit icon disappearing on right-click of unit's tile - by SomeTroglodyte 2025-07-27 09:02:57 +03:00
yairm210
e0182a2c2c 4.17.9-patch1 4.17.9-patch1 2025-07-25 14:07:36 +00:00
Yair Morgenstern
2744c3a578
Fix improvement queue - hotfix (#13718) 2025-07-25 17:07:26 +03:00
yairm210
5fe09c3291 Fix autoplay+tutorials softlock - by SomeTroglodyte
Resolves #13688
2025-07-25 13:20:53 +03:00
yairm210
326f768e65 4.17.9 4.17.9 2025-07-25 13:17:22 +03:00
Yair Morgenstern
37ea5f8118
Version rollout (#13714)
* Bump version and create initial changelog entry

* Update Indonesian.properties (#13713)

* Update French.properties (#13697)

* Update Italian.properties (#13694)

* Update Spanish.properties (#13643)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: X2003 <158255876+Xenia2003@users.noreply.github.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
Co-authored-by: Nahuel Geno <142752140+NahuelGeno@users.noreply.github.com>
2025-07-25 13:15:52 +03:00
EmperorPinguin
56f0008644
Simulation: update map seed between games (#13690)
* Update Simulation.kt

* Update Simulation.kt
2025-07-25 13:06:55 +03:00
EmperorPinguin
63aa8b8a21
AI: update explore logic (#13658)
* Update UnitAutomation.kt

* Update

* Update MapUnit.kt
2025-07-25 13:06:23 +03:00
Rob Loach
9002464c15
Add 'on [difficulty] or higher' conditional (#13700) 2025-07-25 13:06:11 +03:00
metablaster
602cd985db
Show religion display name when enhancement is made (#13696)
* notification for when religion is founded

* fix typo with space

* notification for pantheon and enhancement

* actions and notifications don't reveal info

* fix typo with space again

* shorten code

* an unknown civilization!

* show religion displayname when enhancing
2025-07-25 13:06:02 +03:00
EmperorPinguin
c50a12a2de
AI: reduce food weight for small cities (#13704) 2025-07-25 13:05:55 +03:00
EmperorPinguin
81cf6f949a
AI: able too choose instant heal promotions again (#13708)
* AI: able too choose instant heal promotions again

* Update UnitAutomation.kt
2025-07-25 13:05:45 +03:00
EmperorPinguin
9723aed2bb
AI: don't annex cities if it causes severe unhappiness (#13712)
AI annexing cities doesn't seem to have a check for happiness weirdly enough, potentially bring the AI into crippling unhappiness.
2025-07-25 13:05:35 +03:00
EmperorPinguin
80c08a2b8e
Cleanup: Update ConstructionAutomation.kt (#13706)
* Update ConstructionAutomation.kt

* Update ConstructionAutomation.kt
2025-07-25 13:05:21 +03:00
metablaster
79d237e373
Fix for null pointer in embassy trade (#13707)
* G&K feature - Embassy

* fix spotted errors

* add icon and gameplay test

* fix invalid trade logic

* make embassies work for G&K only

* remove introduced bug

* trade evaluation and decline embassy

* update civilopedia for embassies

* cleanup

* diplomatic modifiers

* fix embassies unique

* make embassies unique global and bugfix

* fix AI can not trade with cs

* add embassies unique for mods

* mods require uniques to enable embassies

* fix mods require uniques to enable embassies

* update uniques.md

* apply reviewed changes

* apply reviewed change 2

* bugfix and cleanup

* remove obsolete import

* null pointer bugfix

* remove toList() and function rename

* fix for null pointer

* fix for null pointer 2
2025-07-25 13:05:12 +03:00
EmperorPinguin
1a04a7764a
Update UseGoldAutomation.kt (#13695) 2025-07-25 13:04:35 +03:00
yairm210
ed84e89927 chore(purity): Update to @Cache version 2025-07-25 12:33:17 +03:00
yairm210
25b7e37cee chore(purity): TileResource and friends, cloning functions 2025-07-24 23:01:23 +03:00
yairm210
69dffade55 4.17.8-patch1 4.17.8-patch1 2025-07-24 06:47:02 +00:00
metablaster
1e4ecab1c3
Fix for null pointer in embassy trade (#13699)
* G&K feature - Embassy

* fix spotted errors

* add icon and gameplay test

* fix invalid trade logic

* make embassies work for G&K only

* remove introduced bug

* trade evaluation and decline embassy

* update civilopedia for embassies

* cleanup

* diplomatic modifiers

* fix embassies unique

* make embassies unique global and bugfix

* fix AI can not trade with cs

* add embassies unique for mods

* mods require uniques to enable embassies

* fix mods require uniques to enable embassies

* update uniques.md

* apply reviewed changes

* apply reviewed change 2

* bugfix and cleanup

* remove obsolete import

* null pointer bugfix

* remove toList() and function rename

* fix for null pointer
2025-07-24 09:46:52 +03:00
yairm210
be6216d2fb chore(purity): MapUnit 2025-07-23 23:39:27 +03:00
yairm210
5fe0517c81 Remove irrelevant counteroffer notifications when the trade request is invalid 2025-07-23 23:28:10 +03:00
yairm210
574856d3c9 4.17.8 2025-07-23 23:04:36 +03:00
Yair Morgenstern
55df838658
Version rollout (#13693)
* Bump version and create initial changelog entry

* Update French.properties (#13685)

* update croatian translation (#13680)

* Update Italian.properties (#13679)

* Update Italian.properties

* Update Italian.properties

* Update Brazilian_Portuguese.properties (#13671)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: metablaster <44481081+metablaster@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
4.17.8
2025-07-23 22:54:38 +03:00
yairm210
6f0e39e686 chore(purity): Buncha stuff 2025-07-23 22:53:42 +03:00
yairm210
43b8b12131 Fixed crash on unloadable sounds 2025-07-23 22:53:41 +03:00
yairm210
2f92bedb52 chore(purity): CityResources 2025-07-23 22:53:41 +03:00
yairm210
6856c85981 chore(purity): cleanup suppressions 2025-07-23 22:53:41 +03:00
yairm210
8e59f9a8f9 chore(purity): resource modifiers 2025-07-23 22:53:41 +03:00
yairm210
11de0ae4a3 chore(purity): MultiFilter 2025-07-23 22:53:40 +03:00
yairm210
1620a4c231 chore(purity): Update to ensure new collections/sequences functions are ok 2025-07-23 22:53:40 +03:00
EmperorPinguin
4e766464a7
Perf: remove AI personality for citizen assignment (#13676) 2025-07-23 22:22:52 +03:00
SomeTroglodyte
5b6e86126c
Minor UI fix: Don't display the WLTK fireworks over the detailed stats popup (#13677)
* Patch CityScreen to hide WLTK fireworks while DetailedStatsPopup is open

* Linting
2025-07-23 22:22:40 +03:00
EmperorPinguin
7925f71602
AI: Update city construction evaluation of buildings + workboats (#13675)
* Update ConstructionAutomation.kt

* Update ConstructionAutomation.kt
2025-07-23 22:22:31 +03:00
EmperorPinguin
84608b441c
Bugfix: Update WorkerAutomation.kt (#13674)
Courtesy of @metablaster
2025-07-23 22:22:20 +03:00
Rob Loach
2250011d09
Civilopedia: Add Revealed By on Tile Resource screen (#13672)
* Civilopedia: Add Revealed By on Tile Resource screen

* Include the : in the translatable text for 'Revealed by:'
2025-07-23 22:22:10 +03:00
SomeTroglodyte
479dd558f2
Enable the "triggers global alert" unique for most uniques (#13560)
* Linting

* Move OneTimeGlobalAlert from PolicyManager to actual trigger

* Doc-Description for OneTimeGlobalAlert

* Adopt #13606 changes

* Minor improvements - efficiency and notification newline
2025-07-23 22:21:39 +03:00
Md. Touhidur Rahman
fdc7733054
Multiplayer Chat Support (#13599)
* basic chat ui

* improve chat infustructure

* implement websockets

* fix TODO crash

* delkt fixes & minor refactoring

* refactor civColor lookup

* set `ChatPopup` `Scrollability` to `None`

* refactor `chatLabel`

* move `ChatButton` update actions to its own file and refactor `WorldScreen`

* refactor `ChatPopup` - make it simple

* add `ChatPopup` layout explaination

* make `CloseButton` an `ImageButton`

* update .gitignore, try to ensure correct civName, close previous session on reconnect

* better `Message.Join()` usage

* update .gitignore entry for lasterror.txt

* improve chat message handling and color visibility

* refactor chat auth header handling and event filtering

* connection reliability improvements

* global messages for System and Server messages

* set `chatTable` cell defaults

* make flow work. remove internal keywords. fix chain job cancellation bug. extensively tested.

Made flow work, SomeHow.
Remove `internal` keywords, problematic.

One reconnect cancels another. This cancellation triggers another reconnect. Thus we get stuck in an infinite reconnect loop.

This was fixed by the force flag.

* added `Color.coerceLightnessAtLeast` and many comments

* faster `Color.coerceLightnessAtLeast`

* wait for `session` in `ChatWebSocketManager.requestMessageSend()`

* refactor some imports and simplify `ChatButton.updatePosition`

* move `Color.coerceLightnessAtLeast` with other `Color` extension functions

* remove `Event` suffix from event names and move events and files to better locations

* refactor multiplayer event handling and move event classes

Moved ServerUrlChanged, UserIdChanged, and PasswordChanged event classes from multiplayer/storage to models/metadata. Updated event dispatch logic for userId, server URL, and password changes to be handled within GameSettingsMultiplayer. Introduced ServerFeatureSetChanged event for feature set updates. Refactored usages and imports across chat, UI, and multiplayer modules to reflect these changes and removed redundant event dispatches.

* move `ServerFeatureSetChanged` to `ServerFeatureSet.kt`

* add chat and send icons, update atlas and chat ui elements

* make `Enter` key press work

* remove `yield()` calls

* refactor `WebSocket` error handling conditional branches

* remove unnecessary `ChatMessageSendRequested` event

* remove flow and reintroduce `yeild()`

* add translatable lines to `English.properties` and call `tr()`

* increase first session waiting time to `RECONNECT_TIME_MS * 2`

* add dynamically translatable global messages

* handle errors on `GlobalScope.launch`

* refactor `chatUrl` to `getChatUrl()` and remove the `yeild()` call after `delay()`

* add `ChatRestartException`

* implemented exponential backoff

* refactor chat error logging in `handleWebSocketThrowables`

* refactor `globalMessages` and revert unnecessary changes

* mark global messages as one time

* mark global messages that I forgot about as one time

* remove unnecessary event usage

* some necessary refactorings

1. start / stop chat based on `ChatButton` visibilty
2. fix `restart()` calls with `force = true` where needed
3. remove `try-catch` block from `restart()`

* fix websocket reconnection issues

* fix missing `}`

* fix problems for real

* fix import

* use `maxOf()`

* minor refactorings

* add support for `UncivServer.jar`

* get rid of `EventBus`

* rename and increase value to `60%` for `CIVNAME_COLOR_MIN_LIGHTNESS`

* get rid of setters

* fix 1

* fix `checkServerStatus()` not calling `setServer()`

* fix some issues

* fix crashes and remove redundant `ChatMessageReceived` data class

* fix some reviews

* remove `re-established` notification

* set type for `globalMessages` to `Queue`

* improve stability of `UncivServer.jar`
2025-07-23 22:20:41 +03:00
metablaster
1aa7272dc6
Update ruleset stats (#13673)
* fix automated ranged units not heading to enemy city

* fix distance from city typo

* Address points made in PR

* priotirize tiles without retaliation

* remove dangerous tiles logic

* resolve review with alternative approach

* faster exit if no sight

* automated units auto upgrade if enabled

* simplified condition

* fix incorrect building stats

* update stats for policies and buildings

* update wonder stats

* palace cost is 0

* aqueduct cost is 100 in vanilla

* update bank and stock exchange for vanilla
2025-07-23 22:07:15 +03:00
yairm210
3f78218033 4.17.7 4.17.7 2025-07-21 23:47:17 +03:00
Yair Morgenstern
db874e5ef3
Version rollout (#13668)
* Bump version and create initial changelog entry

* Update Brazilian_Portuguese.properties (#13666)

Translation of some words in the context of Civ V, spelling correction of accentuation and correction for word aesthetics (for example: Nuclear physics --> Nuclear Physics).

* Vietnamese patch #4 (#13650)

* Update Vietnamese.properties

- done the few first part of the translation ( I can't continue for now due to the tight schedule, will do it later )

* Update Vietnamese.properties

- I guess I did overlook that [amount] part ( it was not have the ( ] ) in it so my bad ).
- Done more translatation.

* Update Vietnamese.properties

* Update Vietnamese.properties

- I decided to go and check my eyes on the next week...

* Update Vietnamese.properties

* Update Vietnamese.properties

* Update Vietnamese.properties

* Update Vietnamese.properties

* Update #4 Vietnamese.properties

- I need the translation checked before I continue. 
+ I don't know what to do with Chinese city names for now. Most of the names for now are OK, though.   
+ Hellenic League and Greek in Vietnamese have the same meaning. The same thing goes to Armory and Arsenal. 
+ Founder, Believer and Enhancer: I genuinely have no idea how to translate these. Sorry. 
+ Mud Pyramid Mosque: the same as above, but I decided to put it with a generic translation for now. 
+ And some other stuffs too

* Update Vietnamese.properties

* Update Vietnamese.properties

* Update Vietnamese.properties

* Update Russian.properties (#13647)

* Update Japanese.properties (#13644)

* Update Indonesian.properties (#13642)

Just a few corrections.

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: ace9999 <106280936+4C39999@users.noreply.github.com>
Co-authored-by: perfectoast <duynamdo000@gmail.com>
Co-authored-by: LevPM <98984098+LevPM@users.noreply.github.com>
Co-authored-by: cknight828 <128895471+cknight828@users.noreply.github.com>
Co-authored-by: X2003 <158255876+Xenia2003@users.noreply.github.com>
2025-07-21 23:45:43 +03:00