Results 1 to 3 of 3

Thread: BOB Files 101

  1. #1

    Default BOB Files 101

    I don't know about you, but the first time I tried to create a pack file with BOB, it ended up being 600mb! So after a bit of research and testing with the rules.bob file, I've come to a decent understanding of how to use them to create your basic mod, and I thought I ought to share it with the rest of you.

    OK, so basic format:
    Code:
    [Pack]
        <Files> = -*.pack
        PackFile = <retail>/data/mod.pack
        PackType = mod
    This is the rules.bob that comes with the Assembly Kit, it tells BOB to put everything but *.pack files in working_data into mod.pack, including all the ESF, animations, etc that exist in working_data already. So the first question, is how to point it to a specific folder, say the 'db\' folder that will contain all the binary files converted from the XML raw_data. The following entry should be placed in the 'working_data\rules.bob' file.

    Code:
    [Pack]
        <Files> = db/*/*, text/db/*.loc
        PackFile = <retail>/data/JMod.pack
        PackType = mod
    This entry will take all files located in the 'db' folder, plus 1 directory down (e.g. db\unit\units.binaryfile), as well as all localization files from 'text\db' and pack them into JMod.pack; and I do mean ALL of them, if you have a foo.txt in your 'working_data\db\units\' folder, it too will go into the pack file, useful for adding in tables with a custom name to a pack file directory, but still, be careful.

    Note, rules.bob can have multiple of these entries in the file, example:

    Code:
    [Pack]
        <Files> = -*.pack
        PackFile = <retail>/data/mod.pack
        PackType = mod
    
    [Pack]
        <Files> = db/*/*
        PackFile = <retail>/data/JMod.pack
        PackType = mod
        
    [Pack]
        <Files> = text/db/*.loc
        PackFile = <retail>/data/JMod_local_en.pack
        PackType = mod
    Pasting the above into a rules.bob file will tell BOB to add all files in the 'db' folder to JMod.pack, and all .loc files to JMod_local_en.pack. Now that you can setup your rules.bob file, you can simply tick the mod pack you wish to build in the 3rd pane of Bob, 'Retail' and will go build build that pack file. Next up, poking at BasePath to see if we can setup our own folder directories within working_data.

    Finally, I link to the Official BOB File documentation.
    Last edited by Jinarik; October 06, 2012 at 12:46 PM.

  2. #2

    Default Re: BOB Files 101

    Quote Originally Posted by Jinarik View Post
    Code:
    [Pack]
        <Files> = -*.pack
        PackFile = <retail>/data/mod.pack
        PackType = mod
    tells BOB to put everything in working_data into mod.pack
    I found this a weird syntax, but it's worth noting that <Files> is more used to exclude files than to include them. The
    Code:
    -*.pack
    Actually means: all files (by default), but not ("-") pack files ("*.pack").

    Code:
         <Files> = text/db/*.loc     PackFile = <retail>/data/JMod_local_en.pack
    Pasting the above into a rules.bob file will tell BOB to add [...] all .loc files to JMod_local_en.pack.
    Note that each directory in working_data has its own rules.bob file... might be easier to edit working_data/text/db/rules.bob and add
    Code:
    <Files> = *.loc
    there. Saves you from maintaining your whole file structure in one file.

    Now that you can setup your rules.bob file, you can simply tick the mod pack you wish to build in the 3rd pane of Bob, 'Retail' and will go build build that pack file.
    Oh, you're saying the rules.bob file decides which checkboxes get ticked on their own when selecting that pack? That would be great, because I never knew what was going on with all the automatic selections.
    Tools: PFM 4.1 - EditSF 1.2.0
    (Download PFM - Download EditSF)
    Warscape Modding Guide
    Join the PFM User Group on Steam to receive PackFileManager update notifications.

    Respecto Patronum

  3. #3

    Default Re: BOB Files 101

    Quote Originally Posted by daniu View Post
    I found this a weird syntax, but it's worth noting that <Files> is more used to exclude files than to include them.
    So did I, I think that pointing to folders is what BasePath and multiple rules.bob's are used for, I just have to figure out the correct syntax.

    Quote Originally Posted by daniu View Post
    Note that each directory in working_data has its own rules.bob file...
    Yea, you can have a rules.bob file for every folder, and in the case of text\db it works well, but it doesn't work so well for the db\ folder that has a sub folder for each table type, since a rules.bob in db\ doesn't seem to apply to subfolders, unless I got my syntax wrong which is a definite possibility. I have to do more in-depth testing of how multiple rules.bob interact to get a better picture.

    Quote Originally Posted by daniu View Post
    Oh, you're saying the rules.bob file decides which checkboxes get ticked on their own when selecting that pack? That would be great, because I never knew what was going on with all the automatic selections
    Yep, if you right-click an entry in either of the BOB lists it will list all actions and rules, the top half for 'Provider' actions (Unknown atm for Raw data Pane, XML -> binary for Working Data Pane, Create Pack for Retail Pane), the bottom for 'Consumer' actions (XML -> Binary for Raw data pane, Create Pack for Working data Pane). Checking the packing entry will build the entire pack file and 'light up' everything that falls under that [Pack] entry in rules.bob.

    Interesting note, per localization files, if you right-click -> View Actions on say achievements.xml in the EmpireDesignData folder on the far left pane, there will be 2 different Consumer Actions, a Database Export to binary, and Localisation to .txt and .loc files.

    ***Update: So, I found through windows search that there are multiple rules.bob files scattered around both working_data and raw_data, some have types other than [Pack], so I generated a list of all rules.bob types, and what files had them.
    Last edited by Jinarik; October 06, 2012 at 04:04 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •