AI restrictions via Global uniques (with AI civFilter)#15236
Open
Fanfblrik wants to merge 4 commits into
Open
Conversation
Contributor
Author
|
Replacement for #15224 (closed while rewriting the branch). Implements the review feedback: Global uniques + |
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Prevents AI civilizations from training city-founder units when enabled under Advanced Settings, useful for multiplayer games with AI fillers. Co-authored-by: Cursor <cursoragent@cursor.com>
Extend Advanced Settings with AI limits for peace, liberation, congress, trades, religion, coups, wonders, settlers, and XP. Co-authored-by: Cursor <cursoragent@cursor.com>
Replace GameParameters checkboxes with ModOptions UniqueTypes so mods can enable Lekmod-style AI limits without new game options. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Fanfblrik
force-pushed
the
feature/no-ai-settlers
branch
from
July 22, 2026 14:15
37333a4 to
06b88f5
Compare
|
Conflicts have been resolved. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Reworks AI restriction uniques per review: they are now Global uniques (typically used with
<for [AI player] Civilizations>), not ModOptions toggles.Existing uniques (no new types)
Use in
GlobalUniques.json:Cannot build [Settler] units <for [AI player] Civilizations>Cannot build [World Wonder] buildings <for [AI player] Civilizations>New Global uniques
Always accepts white peace<for [AI player] Civilizations>Cities cannot be liberated<for [AI player] Civilizations>Cannot vote in World Congress<for [AI player] Civilizations>Cannot trade with [civFilter] CivilizationsCannot trade with [Human player] Civilizations <for [AI player] Civilizations>(peace still allowed)May not found a religion<for [AI player] Civilizations>Cannot spread religion to [civFilter] Civilizations[City-States]/[Human player]+ AI conditionalCannot coup [civFilter] CivilizationsCannot coup [City-States] Civilizations <for [AI player] Civilizations>No XP from fighting [civFilter] CivilizationsNo XP from fighting [AI player] CivilizationsExample
jsons/GlobalUniques.json{ "name": "Global Uniques", "uniques": [ "Always accepts white peace <for [AI player] Civilizations>", "Cities cannot be liberated <for [AI player] Civilizations>", "Cannot vote in World Congress <for [AI player] Civilizations>", "Cannot trade with [Human player] Civilizations <for [AI player] Civilizations>", "May not found a religion <for [AI player] Civilizations>", "Cannot spread religion to [City-States] Civilizations <for [AI player] Civilizations>", "Cannot spread religion to [Human player] Civilizations <for [AI player] Civilizations>", "Cannot coup [City-States] Civilizations <for [AI player] Civilizations>", "Cannot build [World Wonder] buildings <for [AI player] Civilizations>", "Cannot build [Settler] units <for [AI player] Civilizations>", "No XP from fighting [AI player] Civilizations" ] }Motivation
As reviewed: most restrictions generalize via existing Global uniques + AI civFilter conditionals. The two parameterized types that did not exist (
Cannot spread religion to [civFilter],No XP from fighting [civFilter]) are added as Global uniques, along with a few parallel Global forms for diplomacy/religion.ModOptions cannot carry conditionals and are not merged into
getGlobalUniques(), so these belong inGlobalUniques.json.Test plan
GlobalUniques.jsonas above