1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

'preload.xtbl' file

Discussion in 'Modding Patch Beta' started by Fan of Saints, Jan 12, 2016.

  1. Fan of Saints

    Fan of Saints Modding patch tester

    How should this file look like, exactly? I can't find it in my install folder so I assume I have to create it myself... But I have no idea what I should write. :confused:
    I'd love to preload models, textures and visual effects from missions.
     
    flow754 likes this.
  2. flow754

    flow754 Modding patch tester

    I second this post. Also, where's the difference between using this and say an items_preload_containers.asm_pc file?
     
  3. [V] Knobby

    [V] Knobby Volition Staff

    Testing on this has been light(read: hasn't happened), but it should look something like this:

    <root>
    <Table>
    <Preload>
    <Name>preload_this_container</Name>
    </Preload>
    </Table>
    </root>

    Please drop a mod on the workshop that preloads something(anything really) and I will get it and verify things are working as expected.
     
    Last edited: Jan 14, 2016
  4. [V] Knobby

    [V] Knobby Volition Staff

    The thought was to get things like GOTR on the workshop we'll need to preload some animations. There are existing ways to preload things like textures and items, but this will load anything.
     
  5. flow754

    flow754 Modding patch tester

    Ahh, makes sense.
    On it!
     
  6. [V] Knobby

    [V] Knobby Volition Staff

    Ok, so I'm going to edit the first post here with some more correct information about the table file. Also, I'd like to point out that this load containers, not files. So, for example, if you wanted to load the high res baseball bat all the time you could have the following preload.xtbl in your mod:

    <root>
    <Table>
    <Preload>
    <Name>baseball_bat_high</Name>
    </Preload>
    </Table>
    </root>

    Should I change the name from filename to name or container_name or something?
     
    Last edited: Jan 14, 2016
  7. flow754

    flow754 Modding patch tester

    Well, other *.xtbl files reference container names with a simple 'Name' tag. Also tag names tend to start with capital letters (except for 'root'), so you might want to change 'preload' to 'Preload' if you're going for consistency.
     
  8. Fan of Saints

    Fan of Saints Modding patch tester

    So I tried to pack up some models/textures/visual effects from M06.str2_pc and M09.str2_pc into separate STR2_PC packs and created following 'preload.xtbl' file:
    Code (Text):
    <root>
        <Table>
            <preload>
                <filename>cybersmg_lg_d</filename>
            </preload>
            <preload>
                <filename>cyberspace_smg</filename>
            </preload>
            <preload>
                <filename>ladle</filename>
            </preload>
            <preload>
                <filename>vfx_joe_ladle_hitfx</filename>
            </preload>
            <preload>
                <filename>vfx_megacan_laserhit</filename>
            </preload>
            <preload>
                <filename>vfx_megacan_lasers</filename>
            </preload>
        </Table>
    </root>
    But absolutely nothing changed - it's like the game didn't recognise this at all. Here are my files, have I done something wrong? Or does this method still require you to create ASM_PC files?
     

    Attached Files:

  9. flow754

    flow754 Modding patch tester

    AFAIK you might as well put all of them together in a single container.
    Using the preload.xtbl file doesn't work quite right at the moment, probably due to a bug with how memory is stored. I *think* you still have to specify your container(s) in an ASM_PC file, but it doesn't have to be one that's meant for preloading assets.
     
    Last edited: Jan 14, 2016
  10. [V] Knobby

    [V] Knobby Volition Staff

    Your problem is that none of these names exist as containers at mod load time(main menu). I'm not sure if it is that these don't ever exist or just don't exist at this point, but since they don't resolve to real containers the game can't load them.