Commit Graph

80 Commits

Author SHA1 Message Date
Ouaz
7283c647d6
Fix missing brackets (#12219)
Fix some missing brackets in #12192
2024-09-16 01:11:34 +03:00
EmperorPinguin
83dac35a14
Update tutorials (#12192)
* AI behaviour changes

* Update Automation.kt

* Update Automation.kt

* Update Automation.kt

* Update Automation.kt

* Update Automation.kt

* Update ConstructionAutomation.kt

* Update Automation.kt

* Reverting some changes

* Changes

* revert changes

* revert changes

* revert changes

* revert changes

* Update CityLocationTileRanker.kt

* Citizen assignment for stat conversion

* Update CityLocationTileRanker.kt

* Reduce AI settling

* Avoid AI building units when in negative Supply

* Update CityLocationTileRanker.kt

* Update CityLocationTileRanker.kt

* Update CityLocationTileRanker.kt

* Update ConstructionAutomation.kt

* Update build.gradle.kts

* Update gradle-wrapper.properties

* Update CityLocationTileRanker.kt

* Update CityLocationTileRanker.kt

* Update ConstructionAutomation.kt

* Update CityLocationTileRanker.kt

* AI changes for humans

* Fix puppet focus

* Update Automation.kt

* Puppet focus

* Update Automation.kt

* Update Automation.kt

* Update Automation.kt

* Update Automation.kt

* Update Automation.kt

* Update Automation.kt

* Update Automation.kt

* Update Automation.kt

* Update Automation.kt

* Update Stats.kt

* Update CityTurnManager.kt

* Remove specialist science modifier

* Update ReligionAutomation.kt

* Update ReligionAutomation.kt

* Update ReligionAutomation.kt

* Update CivilianUnitAutomation.kt

* Update ReligionAutomation.kt

* Worker prioritization

Workers are valuable in expand cities.

* Update ConstructionAutomation.kt

Food always important, it's rarely good to skip e.g. granary if we're on 6 pop.

* Update ConstructionAutomation.kt

Should achieve about the same with less lines of code.

* Update Automation.kt

* Update ConstructionAutomation.kt

* Update Policies.json

* Update Policies.json

* Update Policies.json

* Update ConstructionAutomation.kt

* Update Policies.json

* Update ReligionAutomation.kt

* Update ReligionAutomation.kt

* Update ReligionAutomation.kt

* Update ReligionAutomation.kt

* Rename Crop Yield to Growth

* Update worker usage

* Update UnitAutomation.kt

* Tutorials update

* Update Tutorials.json

* Fix spelling error

* Update Tutorials.json

* Update Tutorials.json

* Update Tutorials.json

* Update Tutorials.json

* Update Tutorials.json

* Update Tutorials.json

* Update Tutorials.json

* Update Tutorials.json
2024-09-15 17:51:40 +03:00
itanasi
f19fea3d01
Civilopedia Entries: Food, Production, Science, and Gold (#12043)
* More entries

* Fix sorting by symbol
2024-08-03 23:18:46 +03:00
itanasi
569394efdd
Civilopedia Updates: Trade Routes and Air Combat (#11997)
* Updating and expanding on some Civilopedia Articles for common questions

* Fixing Air Sweep link
2024-07-21 10:01:23 +03:00
Yair Morgenstern
5967f56f6d typo: rigg -> rig
Resolves #11748
2024-06-15 22:31:40 +03:00
Oskar Niesen
ba56374ee2
Added the Espionage civilopedia entry (#11597)
* Added the Espionage civilopedia entry

* Spelling and grammar fixes

* Update Espionage cyclopedia entry to use newer format
2024-05-27 12:31:56 +03:00
SomeTroglodyte
b78f887124
Some minor behind-the-scenes UI architecture changes (#11639)
* Some UI architecture changes

* Some UI architecture changes - merge Kdoc update from another PR

* Remove experimental status of the key bindings UI

* Minor update to keyboard tutorials

* Minor readability linting: A few color names instead of hex codes

* Fix links from Options not working when called from MainMenuScreen
2024-05-27 12:30:34 +03:00
SomeTroglodyte
a485510faf
Resource Overview: Info on unavailable strategic and unimproved by allies (#11571)
* Resource Overview: Info on unavailable strategic and unimproved by allies

* Update tutorial
2024-05-11 21:36:17 +03:00
SomeTroglodyte
c75861af25
Prettier Events - that now respect 'hidden from users' (#11474)
* Expand Events to allow civilopediaText, fixing hidden uniques as side effect

* Fix ConditionalChance save scumming

* Fix ExtraImages not working within mods

* Missing documentation of the changes to Events

* Kdoc to clarify why helper returns nullable

* Lint getJavaClassByName: fix compiler warning and re-sort when

* FormattedLine now throws on problems with extraImage loading

* Fix Tutorial extraImage by removing auto and making it explicit

* Revert "FormattedLine now throws on problems with extraImage loading"

This reverts commit b5ab4084ee.

* Partially revert the revert, so bad extraImage fields are console-logged
2024-04-21 15:30:41 +03:00
Ouaz
069427e9d7
UI Tips article additions (#11365) 2024-04-01 12:01:36 +03:00
SomeTroglodyte
4a138478f6
Right-click/longpress for World screen city buttons (#10771)
* City buttons support right-click / long-press to enter CityScreen directly

* City r-click: Rename helper and UI tips

* City capitalization follows getCurrentTutorialTask precedent

* City capitalization change applied to existing translation keys

* Revert "City capitalization change applied to existing translation keys"

This reverts commit c3638a0daf.

* Revert "City capitalization follows getCurrentTutorialTask precedent"

This reverts commit b618f4cae3.

* City capitalization in new text follows getCurrentTutorialTask precedent
2024-02-24 22:42:31 +02:00
SomeTroglodyte
7d17b9296d
External links: Right-click and some housecleaning (#11155)
* Right-click external links to copy url

* Add hint about right-clicking links to UI Tips tutorial

* Add wiki link to about and centralize repo/wiki external link bases
2024-02-20 23:24:54 +02:00
SomeTroglodyte
a24f9d7716
Civilopedia key bindings (#10723)
* Move CivilopediaImageGetters object to own file

* Keyboard bindings for Civilopedia

* Better default key choices

* Change default Key Binding Tab visibility to ON
2023-12-13 22:36:29 +02:00
Ouaz
4a570bcd4f
Add "UI tips" civilopedia article (#10625)
* Add an "UI tips" civilopedia article

* Improve UI Tips article

Credits to @SomeTroglodyte and Yairm

* More improvements to UI Tips article

Credits to SomeTroglodyte
2023-12-07 09:14:51 +02:00
Oskar Niesen
4b261a9257
Initial AutoPlay implementation (#10315)
* AutoPlay initial hack

* Removed extra changes

* Added canceling AutoPlay and its own button

* Victory screen showing up stops AutoPlay

* Removed AutomateTurn for the spectator

* Right Clicking AutoPlay Button starts AutoPlay immediately

* Renamed NextTurnMenu to AutoPlayMenu

* AutoPlay can now only begin on the players turn

* Added specific unit actions AutoPlay

* AutoPlay stops on VictoryScreen and GreatPersonPickerScreen

* AutoPlay now stops when loading a new game

* Hovering the mouse over the AutoPlayStatusButton now stops AutoPlay

* Removed temporary right click NextTurnButton functionality

* Removed multi-turn AutoPlay from multiplayer games

* Loading a multiplayer game now stops AutoPlay

* AutoPlayStatusButton persists over reloading WorldScreen

* Victory popup now stops autoplay

* AutoPlay now automatically picks great person

* Full AutoPlay now captures cities

* Added settings.isAutoPlaying and fixed bug with closing game in the middle of AutoPlaying a turn

* AutoPlay now correctly stops when a victory screen is shown

* AutoPlay now automates city constructions without autoAssignCityProduction being on

* Reordered NextTurnAction

* Removed extra condition for displaying AutoPlay text on next turn button

* Moved AutoPlay settings to new tab

* Changed AutoPlay slider

* Refactored Settings to have AutoPlay to be in a new subclass

* Added an show AutoPlay button setting, commented out unimplemented settings

* Opening the exit game window stops autoPlay

* Made cyclopedia entry

* Added translations

* AutoPlayStatusButton now ends with a new line

* Commented out extra code and removed extra import statements

* Fixed UncivSlider Change

* Fixed merge conflicts

* Settlers no longer stuck in endless loops wanting to found cities on tiles they can't reach @tuvus

* Support for Leader voices (#10395)

* Prepare Leader Voices: Framework

* Leader Voices: Hooks and corresponding text field comments

* Leader Voices: wiki

* Leader Voices: oops, comments

* Decouple voice play calls to make global modification easier

* Move voices to own folder and give them a separate volume setting

* Oops, template needed too

* Oops, wiki needed too

* Resolved #10366 - City centers don't provide resources you don't have tech to extract

* Add a TriggerUponDiscoveringTile unique type (#10523)

* Add a TriggerUponDiscoveringTile unique type

* Add a check for trigger presence

* Add gain stat modified by speed and improvement speed by filter uniques (#10443)

* Add gain stat modified by speed and improvement speed by filter uniques

* Fix rulesets

* Remove nonfunctional leftover resource text

* Reword improvement unqiue as suggested

* Add the SellBuilding Unique (#10514)

* Restored the SellBuilding Unique

* Rephrased SellBuilding unique

* Version rollout (#10530)

* Bump version and create initial changelog entry

* Update Brazilian_Portuguese.properties (#10528)

* Update French.properties (#10524)

* Update Italian.properties (#10522)

* Update Polish.properties (#10521)

* Update Polish.properties

* Added Fastlane_short_description

* Update Malay.properties (#10520)

Translated line 33 to line 325.
Not at all finished.
This time though I didn't mess up.

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@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: Lesiakower <125187776+Lesiakower@users.noreply.github.com>
Co-authored-by: Mikhail <151419244+MetaFBMI@users.noreply.github.com>

* Better performance for 'best tile to found city' (minimized canReach calls) @tuvus

* 4.9.0

* [Translation] Add back "general" unit types (#10526)

* Add back "general" unit types

These entries have been removed from translation files, making them untranslated in-game (in Civilopedia articles)

* Revert changes in template.properties

* Fix missing unit type translations

Fix by @SomeTroglodyte

* Changed some parts of GameSettings back to master.

* Changed right clicking to call startAutoPlay instead of setting it itself

* Fixed some !isHuman() conditions to also include full AutoPlay and refactored some other AutoPlay code

---------

Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
Co-authored-by: SomeTroglodyte <63000004+SomeTroglodyte@users.noreply.github.com>
Co-authored-by: Sergey <serdav74@inbox.ru>
Co-authored-by: SeventhM <127357473+SeventhM@users.noreply.github.com>
Co-authored-by: PLynx <pawelrys2011@gmail.com>
Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@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: Lesiakower <125187776+Lesiakower@users.noreply.github.com>
Co-authored-by: Mikhail <151419244+MetaFBMI@users.noreply.github.com>
2023-11-28 14:37:21 +02:00
SomeTroglodyte
815df1bcc4
Some religion stuff (#10242)
* Enable HiddenWithoutReligion to work directly on a Tutorial

* Remove religious units from Vanilla

* Fix limited uses of Missionary and Prophet
2023-10-05 10:23:25 +03:00
Oskar Niesen
df5ecf83a1
Changed defensive pact description (#9985) 2023-08-28 09:02:41 +03:00
Oskar Niesen
548b536818
Add Defensive pact (#9900)
* Defensive Pacts can now be offered.

* Signing a defensive pact now makes the Civs join all defensive wars. Any future defensive wars will force the other civ to join.

* Removed Popup Alert Defensive Pact.

* Defensive pact and Research pact now are only on the trade screen.

* AI now offers defensive pacts.

* Added AI evaluating sending and receiving Defensive Pact offers.

* Reverted some temporary changes

* Reduced the chance an AI offers a defensive pact

* Starting an offensive war now cancels all Defensive Pacts with other civilisations.

* Removed extra requirements before an AI will sign or offer a defensive pact.

* Added Defensive Pacts to the Civilopedia.

* Fixed the AI counter offering with treaties.

* Fixed a test using the old method of checking if a civ is at war.

* Fixed a previous refactor error.

* Deleted commented out Research Agreement button code.

* Fixed some spelling errors and remnant debugging code.

* Removed signing a defensive pact brings both Civ's into each others previous defensive wars.

* Refactored setFriendshipBasedModifier to look better

* Starting an offensive war now removes the defensive pact form both sides.

* Reverted changes to DiplomaticStatus

* Removed extra technology check to sign a defensive pact.

* Removed DiplomacyManager.isAtWar() completely.

* Moved setting defensivePact flags from  TradeLogic.transferTrade() to DiplomacyManager.signDefensivePact.

* Changed diplomatic modifiers related to Defensive Pacts to be less extreme.

* Fixed canceling Defensive Pacts when declaring war and notifying other Civs.

* Updated the Defensive Pact entry in the Civilopedia and fixed some spelling.

* Fixed Defensive Pact behavior while attacking and defending.

* Changed a variable to a more readable name.

* Improved readability of setFriendshipBasedModifier().

* Moved the important onWarDeclared functionality to their own functions.

* Added a notification for the attacking Civ when a Civ joins war through a Defensive Pact.

* Refactored setDefensivePactBasedModifier() to be more readable.

* Increased DeclinedDefensivePact time.

* Deleted old commented code that removed the research agreement button.

* Fixed having reverting changes errors in UnitMovementTests.

* Refactored breaking treaties when declaring war.

* Removed unnecessary semicolons.
2023-08-16 17:59:41 +03:00
SomeTroglodyte
d666c44697
Keyboard bindings - collision check (#9580) 2023-06-13 07:31:02 +03:00
SomeTroglodyte
45d66f0580
Civilopedia Welcome, moddable (#8940) 2023-03-31 14:58:07 +03:00
SomeTroglodyte
ba15c9c91f
Key binding simpler widget (#8946)
* Keyboard Bindings: Simpler Widget

* Keyboard Bindings: Reset binding

* Keyboard Bindings: Reset binding - patch

* Keyboard Bindings: Simpler Widget - revert opening feature

* Keyboard Bindings: Simpler Widget - improved
2023-03-21 14:08:03 +02:00
SomeTroglodyte
aab975a61b
Key bindings Step 3 - Better UI (#8891)
* Configurable key bindings - better Widget step 2

* Configurable key bindings - step 2 updated help
2023-03-15 09:05:50 +02:00
SomeTroglodyte
10caf8e93e
Key bindings Step 2 (#8872)
* Configurable key bindings - Enable via Hidden debug-option

* Configurable key bindings - better Help

* Configurable key bindings - better Widget step 1
2023-03-12 22:45:06 +02:00
vegeta1k95
a8a458ab48
Blockade mechanics (#8654)
* Fix centering of unit HP bar

* Blockade mechanics: land tiles

* Blockade mechanics: water tiles

* Don't blockade water tile if it has friendly military unit

* Blockade mechanics: cities

* Added tile/city blockade tutorials. Added city blockade status icon.

---------

Co-authored-by: vegeta1k95 <vfylfhby>
2023-02-14 22:13:25 +02:00
Yair Morgenstern
a233cbc43a Resolve #8322 - fix Faith tutorial text 2023-01-07 21:13:15 +02:00
letstalkaboutdune
8d0acd0647
Added keyboard shortcut to toggle World Screen UI elements (#8211)
* AbsoluteUnits - Mongolian Uniques

* Added keyboard shortcut to toggle World Screen UI elements

Ctrl+U to toggle

* Update WorldScreen.kt

* Added a pesky space

* Remove "Experimental" warning text

* Revert "Remove "Experimental" warning text"

This reverts commit 3c8456db95.
2022-12-24 19:41:35 +02:00
Yair Morgenstern
0b864cd2d2 Resolved #8016 - fixed civilopedia text that says city-states don't conquer other cities 2022-11-16 17:53:00 +02:00
Yair Morgenstern
8fec196db1 Got rid of uppercase C in Unciv in ALL places! 2022-09-12 23:26:28 +03:00
Ouaz
c5c0f24a5f
Add "Wait" command in "Idle Units" tutorial (#7672)
* Add "Wait" command in "Idle Units" tutorial

* Improve wording for "Wait" command tutorial
2022-08-18 16:16:13 +03:00
itanasi
69e6093e2e
Update Damage Notifications (#7623)
* Minor Compile change

* Update to -[amount] HP for battle notifications
Update Unseen Interceptor Notification

* Update to -[amount] HP for battle notifications
Update Unseen Interceptor Notification

* Revert "Update to -[amount] HP for battle notifications"

This reverts commit 63961029da.

* Rename variables

* Even if you can't see the Interceptor Tile, still get full info if not killed
2022-08-06 13:23:42 -04:00
Xander Lenstra
01cc67cee4
Reworded a tutorial, deleted unused line (#7594)
* Reworded a tutorial, deleted unused line

* Fixed faith symbol
2022-08-03 20:22:29 +03:00
xk730
ebafe97e67
Updated the interface introduction content in the Encyclopedia of civilization (#7586)
* Add files via upload

* Upload the World_Screen.png

This will match the latest presentation

* Upload the World_Screen.png

because it is so old

* Update Tutorials.json

The Tutorials.json add the :
㉑: The Multiplayer Button - Here will help you easily check your current multiplayer game",
This will match the latest presentation
and
ⓗ: Here you will see what you currently have ☮Faith quantity, of course, if you don't open it ☮Faith Before starts the game, this will be ‘Off’
2022-08-03 17:33:37 +03:00
itanasi
af6ab8e4e5
Add Air Sweep (#7484)
* Add Air Sweep Unique
Enable Dogfighting Promotion
Add Air Sweep mode button and crosshair overlay

* Adding Air Sweep Battle Table

* Add airSweep to Battle
Remove double XP
While in AirSweep can't select other units on tile

* initial airsweep code

* Implement airSweep

* BattleTable indicates tile you're AirSweeping

* some notifications

* Clean up notifications.
Add icons

* Revert game.atlas and game.png

* Fix selection properly

* Update Vanilla UnitPromotions.json

* Better handling of movement use
comment cleanup

* missing credit

* Proper code so that Seas units also deal no damage
Adding Tutorials!

* Remove Intercept Bonus Damage/Protection

* Remove chance of Interceptor missing

* Battle Table a bit more consistent

* Defender also gets Air Sweep Modifiers

* Defender doesn't get bonus

* Remove unused getInterceptBonus
Combine logic

* Show damage in notifications for Air Sweep

* Randomize intercepting Civ and prioritize Air Units

* Remove debug code

* Updated atlas

* Clean up Uniques

* Object-ify DamageDealt for ease of reference

* code clean up

Co-authored-by: itanasi <spellman23@gmail.com>
2022-07-27 22:16:53 +03:00
Ouaz
0f3fb48ebe
Remove all in-game mentions of 1.5x unhappiness for puppeted cities (#7420)
* Update Tutorials.json

Remove mention in the "After conquering" tutorial of 1.5x unhappiness for puppeted cities (according 87aa5bc)

* Update template.properties

Remove mention when conquering a city of 1.5x unhappiness for puppeted cities (according 87aa5bc)

* Remove mention of unhappiness for puppeted cities

* Modify "After Conquering" tutorial

Remove mention of unhappiness for puppeted cities
2022-07-11 21:44:29 -04:00
SomeTroglodyte
64ab79faf3
Moddable prettier Tutorials - Step 1 (#7326)
* Moddable prettier Tutorials - Step 1

* Moddable prettier Tutorials - TranslationFileWriter

* Moddable prettier Tutorials - Kdoc

* Moddable prettier Tutorials - UX for open options task
2022-07-01 09:36:11 +03:00
Yair Morgenstern
120c41dd15 Revert "Moddable prettier Tutorials - Step 1 (#7064)"
This reverts commit e91c0ff212.
2022-06-06 09:59:21 +03:00
SomeTroglodyte
e91c0ff212
Moddable prettier Tutorials - Step 1 (#7064) 2022-06-06 09:32:23 +03:00
OptimizedForDensity
afce951724
Pillaging certain improvements may loot gold or other stat resources (#6993)
* Pillaging loots gold on certain improvements

* Add warning if improvement pillageGold > 0 and has UniqueType.Unpillagable

* Pillage yields as a UniqueType

* Forgot to undo demonstration

* Remove unused line

* Eliminate some redundancy

* Reword unique text

* Slight cleanup and add notification for pillage victim

* Reviews

* Made pillaging notifications more consistent with other hostile action notifications

* Missed a line
2022-06-01 19:13:04 +02:00
Ouaz
822ce5e041
Update healing values in "Injured Units" article (#6704)
- Based on merged commit "Healing parity" (c8be00b)
2022-05-05 21:07:11 +02:00
SomeTroglodyte
fe82f773da
Make Icons clickable in religions per city display (#6497)
* Make Icons clickable in religions per city display

* Add tutorial mention of the religious icon click feature

* Fix merge import mistakes
2022-04-09 22:18:19 +03:00
itanasi
f360eda047
Align (reduce) Embarked Defense Strength per Era (#6231)
* Change Embarked Defending Strength per era. Update Tutorial a little

* Use JSON implementation of EmbarkDefense

Co-authored-by: itanasi <spellman23@gmail.com>
2022-02-28 19:41:13 +02:00
itanasi
ae77ff0f16
Updating Embarking Tutorial with more details (#6205)
* Add Amphibious penalty to Land attacking into Water and vice versa

* Replace Landing with Amphibious in all translation files

* Fix trailing whitespace

* Revert translation files

* Change working of Amphibious
Set penalty to Landing and Boarding

* Type-ify Unique and add Depreciated
Add Promotion to Melee Naval
Add exception that Landing penalty is NOT against cities

* Fix Vanilla

* Rename to Landing Party
Icon doesn't work

* Properly regenerated game.atlas/game.png

* Fox naval unit Landind penalty is for attacking on to land

* Only Land unit should have Boarding penalty

* Unbreak logic

* Adding more information to the Embarking Tutorial

* More info

Co-authored-by: itanasi <spellman23@gmail.com>
2022-02-22 11:30:10 +02:00
Xander Lenstra
f6cb2bd0d7
Made unhappiness effects moddable by adding a global uniques json; added revolts when < -20 happiness (#5932)
* Added a json file for unhappiness effects

* Change existing code to handle these effects

* Made a weird and unexpendable way to add unhappiness effects to the civilopedia

* Add the default unhappinesseffects to mods without the json

* Added revolts when at very low happiness

* Renamed a few often-used functions

* Added a file for uniques that are always active

* Fixed tests

* Nullifies [Food] -> Nullifies Growth
2022-01-24 17:19:51 +00:00
will-ca
f68c41e369
Explain when cities can't be razed. (#5976)
* Explain when cities can't be razed.

* Light refactoring and reword.

* Add update notice in translation strings.
2022-01-16 18:43:33 +02:00
yairm210
a2f5941927 chore - Minor improvements to science and culture tutorial capitalization 2022-01-15 22:09:33 +02:00
yairm210
8311e65120 Victory types capitalized 2022-01-14 12:21:53 +02:00
yairm210
e7042d24ea City state permutations normalized to "City-State"
#5963
2022-01-14 12:16:16 +02:00
SimonCeder
10686d1d8f
We Love The King Day (#5705)
* we love the king day

* AI improvements

* Don't break old saves

* unused import

* tutorial

* proper growth when unhappy

* reviews
2021-11-27 19:59:19 +02:00
yairm210
bc0db35077 Resolved #5571 - text-fix to "four victory types" 2021-10-27 21:16:38 +03:00
Xander Lenstra
33956673f5
Added information on the changed victory types (#5568) 2021-10-26 18:31:12 +03:00