How do I make a new ruleset?

luei333

Warlord
Joined
May 25, 2014
Messages
185
I've been beating my head at this for a couple days now, and I have no idea what I'm doing wrong. The idea is, I want to make a custom RuleSet that's pretty much identical in every way to the R&F ruleset, except that it only allows my mod's leaders. Here's my file so far:

Code:
<GameInfo>
   <RuleSets>
       <Row>
           <RuleSetType>RULESET_LUEI_SUPER_CIVS_EXPANSION_1</RuleSetType>
           <Name>LOC_LUEI_SUPER_CIVS_EXPANSION_1_NAME</Name>
           <Description>LOC_LUEI_SUPER_CIVS_EXPANSION_1_DESCRIPTION</Description>
           <GameCore>Expansion1</GameCore>
           <SupportsMultiPlayer>1</SupportsMultiPlayer>
       </Row>
   </RuleSets>
   <RulesetDomainOverrides>
       <Row Ruleset="RULESET_LUEI_SUPER_CIVS_EXPANSION_1" ParameterId="Map" Domain="Maps:Expansion1Maps" />
       <Row Ruleset="RULESET_LUEI_SUPER_CIVS_EXPANSION_1" ParameterId="PlayerLeader" Domain="SuperCivsE1_Players"/>
   </RulesetDomainOverrides>
   <Parameters>
       <Row Key1="Ruleset" Key2="RULESET_LUEI_SUPER_CIVS_EXPANSION_1" ParameterId="NoGoodyHuts" Name="LOC_GAME_NO_GOODY_HUTS" Description="" Domain="bool" DefaultValue="0" ConfigurationGroup="Game" ConfigurationId="GAME_NO_GOODY_HUTS" GroupId="AdvancedOptions" SortIndex="2010"/>
       <Row Key1="Ruleset" Key2="RULESET_LUEI_SUPER_CIVS_EXPANSION_1" ParameterId="NoBarbarians" Name="LOC_GAME_NO_BARBARIANS" Description="" Domain="bool" DefaultValue="0" ConfigurationGroup="Game" ConfigurationId="GAME_NO_BARBARIANS" GroupId="AdvancedOptions" SortIndex="2010"/>
       <Row Key1="Ruleset" Key2="RULESET_LUEI_SUPER_CIVS_EXPANSION_1" ParameterId="AlliesShareVisibility" Name="LOC_GAME_ALLIES_SHARE_VISIBILITY" Description="LOC_GAME_ALLIES_SHARE_VISIBILITY_DESCRIPTION" Domain="bool" DefaultValue="1" ConfigurationGroup="Game" ConfigurationId="GAME_ALLIES_SHARE_VISIBILITY" GroupId="AdvancedOptions" SortIndex="2010"/>
   </Parameters>
   <ConfigurationUpdates>
       <Row SourceGroup="Game" SourceId="RULESET" SourceValue="RULESET_LUEI_SUPER_CIVS_EXPANSION_1" TargetGroup="Game" TargetId="GAME_START_ERA" TargetValue="ERA_ANCIENT" Hash="1" />
       <Row SourceGroup="Game" SourceId="RULESET" SourceValue="RULESET_LUEI_SUPER_CIVS_EXPANSION_1" TargetGroup="Game" TargetId="GAME_SPEED_TYPE" TargetValue="GAMESPEED_STANDARD" Hash="1" />
       <Row SourceGroup="Game" SourceId="RULESET" SourceValue="RULESET_LUEI_SUPER_CIVS_EXPANSION_1" TargetGroup="Game" TargetId="GAME_TURN_LIMIT" TargetValue="TURNLIMIT_GAMESPEED" Hash="1" />
   </ConfigurationUpdates>
   <DomainValues>
       <Row Domain="SuperCivsE1_Players" Value="RANDOM" Name="LOC_RANDOM_LEADER" Description="LOC_RANDOM_LEADER" SortIndex="1"/>
   </DomainValues>
</GameInfo>

And in my modinfo:
Code:
  <FrontEndActions>
    <UpdateDatabase id="UpdateDatabase">
(snip)
      <File priority="-5">Rulesets.xml</File>
    </UpdateDatabase>
    <UpdateText id="UpdateText">
(snip)
      <File priority="-6">Rulesets_Text.xml</File>
    </UpdateText>
(snip)
  </FrontEndActions>

And each of my leaders' Players and PlayerInfo tables have entries with the domain <Domain>SuperCivsE1_Players</Domain>

For some reason I can't for the life of me figure out, nothing works. The code above does nothing; no new rulesets appear in the dropdown, no errors are thrown into any of the logs, nada. I've tried using both GameInfo and GameData tags. I've tried literally copy/pasting working code from other mods, and that also doesn't work, which leads me to believe there's a problem outside of the xml file I'm working with, but try as I might, I can't find anything else in other mods that have working custom rulesets. Other mods don't require R&F like mine does, but I've tried removing the GameCore line, to no avail, and I've copied their code into my file wholesale, again to no avail, but their mods, once activated WITH R&F active still add their rulesets.

I'm so friggin lost here. There's probably one little thing I missed, or one little thing I didn't know I had to do. If anyone knows, to add a custom ruleset from scratch, what all do you need to do??
 
Last edited:
What in the world is <FrontEndActionData> in your modinfo file ?

You should look at Rob's Annp Domini for R&F anhd his config and modinfo files. Anno Domini does exactly what you want to do by introducing a new ruleset that only his special Anno Domini civs can play under. His modinfo file has nothing called <FrontEndActionData>.

He also has this which I think you will not need since you are not trying to rename the game's eras:
Code:
	<RulesetDomainOverrides>
		<Row Ruleset="RULESET_ANNODOMINI" ParameterId="GameStartEra" Domain="AnnoDominiEras"/>
	</RulesetDomainOverrides>
	<Eras>
		<Row Domain="AnnoDominiEras" EraType="ERA_ANCIENT" Name="LOC_ANNO_ERA_ANCIENT_NAME" Description="LOC_ERA_ANCIENT_DESCRIPTION" SortIndex="10" />
		<Row Domain="AnnoDominiEras" EraType="ERA_CLASSICAL" Name="LOC_ANNO_ERA_CLASSICAL_NAME" Description="LOC_ERA_CLASSICAL_DESCRIPTION" SortIndex="20" />
		<Row Domain="AnnoDominiEras" EraType="ERA_MEDIEVAL" Name="LOC_ANNO_ERA_MEDIEVAL_NAME" Description="LOC_ERA_MEDIEVAL_DESCRIPTION" SortIndex="30" />
		<Row Domain="AnnoDominiEras" EraType="ERA_RENAISSANCE" Name="LOC_ANNO_ERA_RENAISSANCE_NAME" Description="LOC_ERA_RENAISSANCE_DESCRIPTION" SortIndex="40" />
		<Row Domain="AnnoDominiEras" EraType="ERA_INDUSTRIAL" Name="LOC_ANNO_ERA_INDUSTRIAL_NAME" Description="LOC_ERA_INDUSTRIAL_DESCRIPTION" SortIndex="50" />
		<Row Domain="AnnoDominiEras" EraType="ERA_MODERN" Name="LOC_ANNO_ERA_MODERN_NAME" Description="LOC_ERA_MODERN_DESCRIPTION" SortIndex="60" />
		<Row Domain="AnnoDominiEras" EraType="ERA_ATOMIC" Name="LOC_ANNO_ERA_ATOMIC_NAME" Description="LOC_ERA_ATOMIC_DESCRIPTION" SortIndex="70" />
		<Row Domain="AnnoDominiEras" EraType="ERA_INFORMATION" Name="LOC_ANNO_ERA_INFORMATION_NAME" Description="LOC_ERA_INFORMATION_DESCRIPTION" SortIndex="80" />
	</Eras>
 
What in the world is <FrontEndActionData> in your modinfo file ?
I'm not sure, it's just what ModBuddy did to set up the file! I haven't messed with it really, and up to this point it's been working. I'll try messing around with the modinfo, see if that does anything. And thanks for pointing me to Anno Domini.

EDIT: I was actually looking at the project file used by modbuddy. I'm gonna update the first post with the actual modinfo lines.
 
Last edited:
Son of a..... So I figured it out, and it turned out to be just a weird problem. When I set the dependency for Rise and Fall, I named it 'Rise and Fall' in the dependency window. BUT, I had to instead put it as 'Expansion1' and then the rulesets worked like a friggin charm. What the actual hell?? In the Expansion1_Config.xml file, it has:
Code:
   <GameCores>
       <Row GameCore="Expansion1" PackageId="1B28771A-C749-434B-9053-D1380C553DE9" DllPrefix="GameCore_XP1" />
   </GameCores>

So why would I need to name the dependency 'Expansion1' when the GameCore uses its mod id!?!?

I'm just... angry and glad at the same time. Also, looking at the Anno Domini modinfo, it has an action criteria set for the custom ruleset, but I can't find anywhere in modbuddy to set that. And when I add one to my own mod, it doesn't seem to do anything? I'm curious what ActionCriteria are supposed to be...

And thanks LeeS for the help.
 
Top Bottom