Instead of expanding the existing 'requires building' unique to units and adding limiters, it's both easier and more generalizable to add conditionals for cities with and without certain buildings to replace the uniques entirely
* 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
Co-authored-by: itanasi <spellman23@gmail.com>
- "Resources" in city-state diplomacy screen
- "When Friends"/"When Allies" in same
- "Enhance religion"
- "Choose a Religion" in religion screen
- Religion name in religion screen
- Translated drilldown items in city screen
- "null for wheat" in improvement Civilopedia entry
- "Type" and others in city-state civilopedia entry
- Requires more population
- Religious
- "Requires" in Policy civilopedia text
- "for" in improvement civilopedia text
- Untranslated conditionals in battle table (listed as "when fighting in [tileFilter] tiles")
* Unified "X is only available under Y conditions" into a single unique
There were a few problems with existing uniques - they weren't really composable, the offered things they didn't keep, etc
For example, "Incompatible with [policy/tech/promotion]", UniqueTarget.Policy, UniqueTarget.Tech, UniqueTarget.Promotion. In fact, promotions only checked promotion incompatibility, promotions - promotion incompat, etc
Additionally, with a few more changes, this could cover several other uniques - "Hidden until [amount] social policy branches have been completed", "Requires at least [amount] population", perhaps others
I have to say I think conditionals are the best thing ever and they make amazing composability possible :)
* Autoupdate correctly recognizes parameters
Updated ruleset jsons
* Deprecation texts should be allowed to forward to other deprecated uniques so we only need to change the leaves when introducing new uniques, not go through the whole tree
* Arbitrary conditionals can become timed conditionals!
triggerCivwideUniques is activated in 3 situations:
- Tech complete
- Policy adopted
- Building complete
So for each of the unique containers for these I added a catch saying 'if this unique is a temporary unique then don't save it yourself
This has been lying around in todos for a while and generalizes one of the nasty hardcoded messes that I hate about Civ V. Why would you introduce ONE timed effect in the whole game?! You can use them all the time like Humankind or never use them like Civ IV, but why have just one whyyy
One more thing in this PR, that needed to be solved by the by, is allowing parameters to have a '2' on the end so we can autoreplace multiple parameters of the same type.
Using a regex is slightly more inefficient, but since this is A. only used once per UniqueType.kt, and B. allows us to have as many 'amount's as we want which is important if we have a lot of conditionals, I feel this is justified.
* Fixed comments from PR
* Big update for French.properties (#6112)
* Big update for French.properties
- Try as much as possible to match Civ 5 french translation
- Modify some translations to better fit the UI
- Modify some translations to improve some original Civ 5 french entries which were poorly translated
- Make translations consistent through all the file
- Fix all broken translations due to bad word/key ordering
- Some quotes are now real quotes from french books (when available) rather than translated from english quotes
- Fix many typos
* Fix translation error
* Translatión: Actualización del Español (#6109)
Also deleted the extra resource icons I originally put 'xD
* Update Korean.properties (#6108)
* Update Korean.properties
* Update Korean.properties
* Update Korean.properties
* Update Korean.properties
* Update Korean.properties
* Update Korean.properties
* Update Korean.properties
* Update Korean.properties
* Update Japanese.properties (#6107)
* Update Indonesian.properties (#6103)
* Update Indonesian.properties
* Update Indonesian.properties
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: ArchDuque-Pancake <78449553+ArchDuque-Pancake@users.noreply.github.com>
Co-authored-by: Samsaek the Calico <saud2410@naver.com>
Co-authored-by: yuracla <89312848+yuracla@users.noreply.github.com>
Co-authored-by: kensvin <63847755+Kensvin28@users.noreply.github.com>
* Find all replaceable uniques, generate replacement text, check for compatibility, and replace!
All of the work up until now has lead up to this point - since we already know what's out and what to replace it with, we can do 90%+ of the work ourselves and spare the sanity of our modders
For an example run:
- Download your favorite mod
- Check its deprecated uniques in the options menu
- Run the autoupdater from the same menu
- See how they disappear
- Bask in the glory
* A few unreplaced uniques raised problems in some of the replacement texts
* Old unusable deprecated uniques are suddenly important again, because they can help autoupdate mods!
I'm wondering if to remove outdated mods entirely from the uniques.md, since they're going to keep accumulating
* Padding for the 'autoupdate' button
* Only display autoupdate button if there are unique to update
Also, fixed some of the revived deprecated unique's replacement text thanks to fancy new tests :)
Tech uniques autoupdate!
* Toast now pops correctly, added translation entries
* Added unique to convert terrain to other terrain if adjacent to something
Terrain converting to other terrain when adjacent to rivers was using hardcoded stuff, so I un-hardcoded it
I thought I could use this to replace the 'coast' hardcoding, and if it wasn't for the maxCoastExtension then I could.
Modders CAN therefore add their own coast (Lava tiles and Ash tiles I dunno) but it will only be for directly close terrains.
This enables Deciv Redux to spawn huge maps.
* Also for Vanilla, which apparently had a different number of tabs than G&K for no apparent reason.
* Apparently terrain name wasn't a uniquetype yet
(cherry picked from commit 593fc257b5)
* Update Spanish.properties (#6082)
* Update Spanish.properties
the only thing i didn't translate were the names of the cities if you have any problem contact me on discord like: lostxxxxx
* Update Spanish.properties
problem solved
* Update Japanese translation (#6075)
* Update Japanese.properties
* Update Japanese.properties
* Update Italian.properties (#6074)
Co-authored-by: Hello200000 <98656089+Hello200000@users.noreply.github.com>
Co-authored-by: yuracla <89312848+yuracla@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
* 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
* Update Italian.properties (#6029)
* more word change (#6010)
* more word change
* Added that space
Co-authored-by: Xander Lenstra <71121390+xlenstra@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
Co-authored-by: fab144 <58261459+fab144@users.noreply.github.com>
Co-authored-by: Xander Lenstra <71121390+xlenstra@users.noreply.github.com>
* Typed some uniques, etc.
* Missed a few square braces
* Missed a parameter
* Missed another parameter
* Made a conditional, spelling, added check to `isStatRelated`
Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
* Typified some building uniques
I noticed that the code allows "[stats] from every [buildingFilter]" but the UniqueType was limited to "[stats] from every [buildingName]", so now that that's available we don't actually need the "[stats] from every Wonder" unique :)
* buildings-only unique moved to buildings section
* Make unknown nation placeholder translatable.
* Make MultiplayerScreen help button clearer and translatable.
* Use `Constants.spectator` more.
* Make random/unknown nation icon translatable.