How to make a ruleset work with ModBuddy?

pokiehl

Moderator
Moderator
Joined
Mar 5, 2017
Messages
4,115
Trying to activate my expanded eras mod via ruleset. My ruleset XML is this.

Code:
<GameInfo>
    <Rulesets>
        <Row>
            <RulesetType>RULESET_EXTENDEDEDERAS</RulesetType>
            <Name>Extended Eras - Historical Speed</Name>
            <Description>Standard production speed with longer research times.</Description>
        </Row>
    </Rulesets>
    <RulesetSupportedValues>
        <Row Ruleset="RULESET_EXTENDEDEDERAS" Domain="StandardEras" Value="ERA_ANCIENT"/>
        <Row Ruleset="RULESET_EXTENDEDEDERAS" Domain="StandardGameSpeeds" Value="GAMESPEED_STANDARD"/>
    </RulesetSupportedValues>
</GameInfo>

The Ruleset.xml is in FrontEnd Actions (Update Database). The actual mod SQL is in In-Game actions (Update Database). This isn't right - the ruleset shows up, but the mod is always active. What do I need to do to make the mod only active with the ruleset?
 
you haven't told the game to associate your sql file with your ruleset. This is how Rob does it with Anno Domini
Code:
	<Components>
		<UpdateDatabase id="ANNODOMINI_COMPONENT">
			<Properties>
				<RuleSet>RULESET_ANNODOMINI</RuleSet>
			</Properties>
			<Items>
				<File>AnnoDomini_Technologies.xml</File>
				<File>AnnoDomini_Buildings.xml</File>
				<File>AnnoDomini_Civilizations.xml</File>
				<File>AnnoDomini_Colours.xml</File>
				<File>AnnoDomini_Districts.xml</File>
				<File>AnnoDomini_Improvements.xml</File>
				<File>AnnoDomini_Leaders.xml</File>
				<File>AnnoDomini_PlayerColours.xml</File>
				<File>AnnoDomini_Projects.xml</File>
				<File>AnnoDomini_Religions.xml</File>
				<File>AnnoDomini_Resources.xml</File>
				<File>AnnoDomini_Units.xml</File>
			</Items>
		</UpdateDatabase>
    ....etc......
RULESET_ANNODOMINI is defined in his <Settings> files.

Rob is using the older manual method of making mods in this example, so <Settings> == <FrontEndActions> and <Components> == <InGameActions>.

Using Modbuddy in the <InGameActions> "action" you are calling <UpdateDatabase id="ExtendedEras"> I think you need to click on "Custom Properties" for the action. Use the "Add" button to add a custom property. For "Name" I think you will need "RuleSet" and for "Value" you will need "RULESET_EXTENDEDEDERAS"

-----------------------------------------------------------------------------------

When I do this in Modbuddy
Spoiler :
zHNAOI9.png
I get this in my modinfo file, as an example:
Code:
  <InGameActions>
    <UpdateDatabase id="NewAction">
      <Properties>
        <LoadOrder>100</LoadOrder>
      </Properties>
      <File>GameData1.xml</File>
    </UpdateDatabase>
  </InGameActions>
 
Last edited:
Thanks a lot for your help LeeS. Unfortunately that still doesn't work, but I'll do more testing. I also tried to use Criteria - I saw in another thread here that you should use the Criteria box to set up a RuleSetInUse criteria but no matter how much I fiddled with that it wouldn't work. I guess for now the only option is to manually edit the modinfo.
 
This seems to be working exactly as you want it to to me.

You have to go to the advanced set-up menu and select the ruleset from the ruleset dropdown. I altered the Science/Pop to "10" to ensure I was seeing the change. With your Ruleset selected the science/pop is 10%, and without your rulset selected (ie, standard ruleset applied) I get the usual science/pop is 70%.

You have to start a new game, also. If you do not select your ruleset when you start a new game the mod is still enabled in the Additional Content menu but the mod does not show in the in-game list of active mods. The only thing I did not check is that saving a game with your rulseet active and then reloading that saved game operates correctly to reload your ruleset into the saved game once everything is reloaded.
 

Attachments

UGH! Silly me - I mispelled "EXTENDEDERAS" in the ruleset XML but spelled it properly in the Custom Properties - THAT'S why it didn't work. I just corrected everything and you're right - it's all set. I didn't notice it until I checked the file you uploaded. Thank you SO much, LeeS. I would never have figured out the Custom Properties thing, and I really appreciate you clarifying that Settings = FrontEndActions and Components=InGameActions (I had a hard time understanding the older mods!). You are really helpful man. Thank you.
 
Back
Top Bottom