Skip to content


“Map includes” for various mods

For PackBsp 2.0.2, I'm working on a configuration system for various "map includes", or things which various mods need which are directly affected by the name of the map. For example, consider internationalized map descriptions. As a general rule, they follow the form of maps/%m_%l.txt, where %m is the map's name without the trailing .bsp extension, and %l is one of many different language codes.

I need help to make sure that this system has good default values that will work for most people. The plan is that it will first look at the name of the game (ex. Team Fortress 2) and also at the engine code (ex. orangebox). Using those it will find the different include patterns that are necessary for that particular game.

The problem is that without having mapped for each game, I don't really know what each one needs in terms of these includes. Here's what I have so far, in the user-editable configuration file:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<mapIncludes>
    <include id="soundscape"
             path="scripts/soundscapes_%m.txt" type="soundscape"/>
    <include id="particlemanifest"
             path="maps/%m_particles.txt" type="particles"/>
    <include id="ain"
             path="maps/graphs/%m.ain" type="plain"/>
    <include id="nav"
             path="maps/%m.nav" type="plain"/>
    <include id="description"
             path="maps/%m.txt" type="plain"/>
    <include id="international_description"
             path="maps/%m_%l.txt" type="plain"/>
    <include id="photos"
             path="materials/vgui/maps/menu_photos_%m.vmt" type="material"/>
    <include id="overview"
             path="materials/overviews/%m.vmt" type="material"/>
    <include id="overview_text"
             path="resource/overviews/%m.txt" type="plain"/>
    <include id="radar"
             path="materials/overviews/%m_radar.vmt" type="material"/>


    <game name=":base">
        <includeIds>description international_description</includeIds>
    </game>

    <game name="engine:ep1" parent=":base">
        <includeIds></includeIds>
    </game>

    <game name="engine:source2007" parent="engine:ep1">
        <includeIds>soundscape</includeIds>
    </game>

    <game name="engine:orangebox" parent="engine:source2007">
        <includeIds>soundscape particlemanifest </includeIds>
    </game>

    <game name="game:Team Fortress 2" parent="engine:orangebox">
        <includeIds>nav photos</includeIds>
    </game>
    
    <game name="game:Counter-Strike: Source" parent="engine:orangebox">
        <includeIds>nav ain overview overview_text radar</includeIds>
    </game>

    <game name="game:Day of Defeat: Source" parent="engine:orangebox">
        <includeIds>nav ain overview overview_text</includeIds>
    </game>
</mapIncludes>

Actually getting the content of this right is the main thing holding back 2.0.2 right now. What do I put for HL2, HL2:Ep1, HL2:Ep2, etc? Which things are specific to games, versus generally applied to all games on the same engine?

Posted in Programming.

Tagged with .


2 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. Jason says

    Go to see that you will soon be supporting custom map overviews/radars.

  2. Darien says

    I may just go ahead and release this (or something very close to it) as 2.0.2 and just accept that this list is incomplete and will be an ongoing thing to maintain as people report whatever it misses.

    Bonus: People working with a custom mod can add their own stuff.