Add multiple actions quickly on ModBuddy?

Luke Lee

Chieftain
Joined
Apr 3, 2020
Messages
1
Totally novice here.

I am trying to make a mod that adds a few technologies, after getting all xml files sorted out I found the process of adding them to OnModActiviated was quite tedious.
The only way I know is Properties->Add->OnModActivated->UpdateDatabase->Select the file, which involves a lot of clicking when there's a lot of files. After 20 minutes I had only added a small proportion of the file.
Is there any easier way like copy/paste the loading codes or something similar to that?

Any help would be appreciated
modbuddy.PNG
 
Save your work, exit ModBuddy, using File Explorer navigate into "C:\Users\MyUserName\Documents\Firaxis ModBuddy\MyModName\MyModName", TAKE A COPY OF THE FILE "MyModName.civ5proj" and then edit it (change MyUserName and MyModName to something appropriate!) using a PLAIN TEXT editor (eg NotePad, NotePad++, etc - DO NOT USE WordPad or anything like that!)

Search for an existing xml file with an existing OnModActivated entry - eg AIGreatPeopleChoices.xml - you'll find TWO entries for it
Code:
    <Content Include="XML\AIGreatPeopleChoices.xml">
      <SubType>Lua</SubType>
      <ImportIntoVFS>False</ImportIntoVFS>
    </Content>
and
Code:
      <Action xmlns="">
        <Set>OnModActivated</Set>
        <Type>UpdateDatabase</Type>
        <FileName>XML/AIGreatPeopleChoices.xml</FileName>
      </Action>
The first is in an <ItemGroup> section, the second in a <ModActions> section.

Assuming all your XML files are already in the project, you don't need to do anything about the first entry type. You just need to copy/paste the second entry type for each XML file you want to set as OnModActivated and then change the FileName

Save the .civ5proj file, quit the plain text editor, restart ModBuddy, reload the project and all the XML files should now have OnModActivated entries. If not, restore your backup .civ5proj file and try again!

NOTE: Yes, the xml files are marked as Content SubType Lua, leave them like that!
 
Back
Top Bottom