Source Map Analyzer

Let me paint you a word picture: you really love this Half-Life 2 mod with all sorts of original maps that are fun to play. But nobody plays this mod anymore! And for a whole bunch of reasons, you just can't get your friends together to play this dead mod. So what do you do?

You port it to a mod that people do play, of course! I'm working on that - you can see my progress here. At some point in this process, you need to take a map from this dead mod and move it to your living one. You want to know what resources this map uses (so you can copy just those and not the rest of the junk in that folder), and you want to know what entities the map uses that aren't in the mod you're porting it to, so you know what you need to add to be able to play it.

I know this isn't a situation many people find themselves in. It's probably not a situation you've found yourself in. I'm probably one of the few people who have ever had a need for this tool, frankly. But if, at some point, someone out there says "I wish I was able to take maps from this dead mod and move it to another mod," I've got good news for them.

The Source Map Analyzer

Cliperizer

I started work on this a while ago, around the start of the year. Just recently I decided it'd be nice if I put a GUI on it and released it for people to use.

Here's what this tool does: first, you input one or more FGDs that define the mod you're porting to (the "base" FGDs). This could include, for example, the Half-Life 2 multiplayer FGD and the Garry's Mod FGD. Then, you input the VPKs that include all the content that can be mounted in the game you're porting to. This would probably include Half-Life 2, Episode 1 and 2, and maybe Counter-Strike Source. Next, you input the maps you want to process. Last, you input the game FGD (the one you're porting from), and the game directory (of the game you're porting from). This is the directory that includes the "models" and "materials" folders. Click "Process" to start the analyzing.

Once it's done, it'll output a report in the folder containing the exe, the filename of which will be the filename of the map. If you leave the "Package" checkbox checked, it will also copy over whatever content that's used in the map that's not used in the VPK into a folder of the same name. The report it generates looks something like this:

-- RESOURCES USED --
    materials/lostcoast/monastery/monastery_exterior001c
    materials/lostcoast/monastery/monastery_wall001a
    materials/lostcoast/monastery/monastery_wall001b
    materials/lostcoast/monastery/monastery_wall002b
    materials/lostcoast/monastery/monastery_wall002c
    materials/lostcoast/monastery/monastery_wall003a
    materials/lostcoast/monastery/monastery_wall003b
    materials/lostcoast/monastery/monastery_wall003c
    materials/maps/cleanup/ceilingtilea
    materials/maps/seamus/seamussand
    materials/plaster/plasterwall034d_nobump
    materials/tysn/tysn_beksinski_1
    sound/tysn/tysn_ringing_1
    sound/tysn/tysn_weirdface_1_sound
    sound/tysn/tysndoorpound1
-- UNIQUE ENTITIES --
    game_lives_manager
    game_text_quick
    item_box_sniper_rounds
    trigger_multiple_oc
    trigger_once_oc
    weapon_scripted
    weapon_sniperrifle
    weapon_uzi
-- DIFFERENT ENTITIES --
    info_player_start
    npc_fastzombie
    npc_headcrab
    npc_headcrab_black
    npc_headcrab_fast
    npc_poisonzombie
    npc_zombie
    point_teleport
    trigger_hurt

Here, the "unique entities" section contains entities that aren't present in the base FGD, and the "different entities" section contains entities that are present in the base FGD, but have different properties in the game FGD.