Limiting Civ's when a Civ Mod is selected

DavDarkelf

Chieftain
Joined
Nov 28, 2016
Messages
76
Does anyone know if it might be possible for a Civilization Mod to limit another one from being selected. I know there is the ability to stop Duplicate leaders in the advanced setup. What I'd like to do is to have a Civ Mod I'm working on stop another, inbuilt, Civ from being selected by the game.

If anyone can point me in the direction of where in the game this happens, even in LUA, I can have a look at it.
 
Not sure if this will work in a game that is not using a custom map or a 'scenario', but you can try this code
Code:
<GameInfo>
	<RulesetUnsupportedValues>
		<!-- Unwanted Major PLayers -->
		<Row Ruleset="RULESET_STANDARD" Domain="StandardPlayers" Value="LEADER_MVEMBA" />
	</RulesetUnsupportedValues>
</GameInfo>
The file where this is placed needs to be setup in the modinfo file as:
Code:
	<Files>
		<File>YourFileName.xml</File>
	</Files>
	<Settings>
		<Custom id="Civs_Removes">
			<Items>
				<File>YourFileName.xml</File>
			</Items>
		</Custom>
	</Settings>
The actual "name" you use for id="Civs_Removes" will not matter. The game just likes to see one.
 
SQL won't give you any ability that is not already in the game's database and usable via XML.

You can add new columns to existing tables using SQL, for example, but without an lua file as a minimum to implement the effects of the new column, it will just be text sitting useless within the game's database.

You could try deleting CivX from table Civilizations when your mod is active. But deleting stuff from the database may or may not work in this particular case (the game may actually be expecting to see CivX in slot #4, for example, and might CTD if it does not). If it works at all it shouldn't matter whether you do it from XML or SQL.
 
Not sure why you are saying that did not work. I just dropped that code into one of my mods and it makes MVEMBA unselectable as a leader, either as an AI leader or a human leader in the Advanced Setup Menu and in the standard leader selection menu.

It has to be done by leader, not by civilization.
 
Ok I'm an idiot. I added the file in the wrong section of my modinfo :(
Got it working now! I probably won't finish my Great Britain civ until I'm back from holiday in a weeks time. The Redcoats will then be a proper unit in my Civ not the historical inaccurate version that is in the English one at the moment!

I'm largely learning as I'm going so the help's really appreciated. :) I'm sure that this will help other people as well. I can already imagine a European Map with only European Leaders!
 
just as a reference if anyone else is doing this for scenario creation you can do this;

Code:
<GameInfo>
   <Players>
       <Delete/>
   </Players>
   <Players>
       <Row CivilizationType="CIVILIZATION_AMERICA"    LeaderType="LEADER_LINCOLN" CivilizationName="LOC_CIVILIZATION_AMERICA_NAME"    CivilizationIcon="ICON_CIVILIZATION_AMERICA"    LeaderName="LOC_CIVILIZATION_AMERICA_NAME"    LeaderIcon="ICON_CIVILIZATION_AMERICA"    CivilizationAbilityName="LOC_TRAIT_CIVILIZATION_FOUNDING_FATHERS_NAME" CivilizationAbilityDescription="LOC_TRAIT_CIVILIZATION_FOUNDING_FATHERS_DESCRIPTION" CivilizationAbilityIcon="ICON_CIVILIZATION_AMERICA" LeaderAbilityName="LOC_TRAIT_LEADER_ROOSEVELT_COROLLARY_NAME" LeaderAbilityDescription="LOC_TRAIT_LEADER_ROOSEVELT_COROLLARY_DESCRIPTION" LeaderAbilityIcon="ICON_LEADER_T_ROOSEVELT"/>
       <Row CivilizationType="CIVILIZATION_FRANCE"    LeaderType="LEADER_LOUISXIV"    CivilizationName="LOC_CIVILIZATION_FRANCE_NAME"    CivilizationIcon="ICON_CIVILIZATION_FRANCE"    LeaderName="LOC_CIVILIZATION_FRANCE_NAME"    LeaderIcon="ICON_CIVILIZATION_FRANCE"    CivilizationAbilityName="LOC_TRAIT_CIVILIZATION_WONDER_TOURISM_NAME" CivilizationAbilityDescription="LOC_TRAIT_CIVILIZATION_WONDER_TOURISM_DESCRIPTION" CivilizationAbilityIcon="ICON_CIVILIZATION_FRANCE" LeaderAbilityName="LOC_TRAIT_LEADER_FLYING_SQUADRON_NAME" LeaderAbilityDescription="LOC_TRAIT_LEADER_FLYING_SQUADRON_DESCRIPTION" LeaderAbilityIcon="ICON_LEADER_CATHERINE_DE_MEDICI"/>
   </Players>
</GameInfo>

the part at the top removes all leaders, then just add the few back in that you want, for scenario creation.
 
Last edited:
Back
Top Bottom