Zh/Decompiling Maps

From Valve Developer Community
< Zh
Revision as of 20:08, 18 September 2015 by ThE mApPer Zc (talk | contribs) (Created page with "{{otherlang2 |en = Decompiling Maps }} Decompiling is the process of taking a compiled level and generating a source that can be opened in a map editor. Decompiled levels mimi...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Template:Otherlang2 Decompiling is the process of taking a compiled level and generating a source that can be opened in a map editor. Decompiled levels mimic the original source, they are not exact reproductions. This makes them useful for learning, measurement, and inspection, but not direct recompilation. The original source is ideal for reproductions or modifications.

Releasing reproductions, modifications, or approximations of another's work without permission nor credit is frowned upon and may be considered as a copyright violation.

Tools

Getting Dirty

The latest decompiler is called BSPSource and is written in Java. You need an updated version of the Java Runtime Environment (JRE), which can be downloaded from Sun to run BSPSource. Once installed, you are ready to decompile your first map.

Extracting Valve maps

(Note: This tutorial assumes that you have opted into the SteamPipe beta for any Orange Box titles. Games released after 2007 or games that are multiplayer titles will have already stashed their content in \steamapps\common\.)

  1. Install GCFScape.
  2. After you install GCFScape, go to File >> Open.
    • For 反恐精英:全球攻势Counter-Strike: Global Offensive maps, open \steamapps\common\Counter-Strike Global Offensive\csgo\pak01_dir.vpk
    • For 反恐精英:起源Counter-Strike: Source maps, open \steamapps\common\counter-strike source\cstrike\strike_pak_dir.vpk
    • For 胜利之日:起源Day of Defeat: Source maps, open \steamapps\common\Day of Defeat Source\dod\dod_pak_dir.vpk
    • For 半衰期2Half-Life 2 maps, open \steamapps\common\half-life 2\hl2\hl2_misc_dir.vpk
    • For 半衰期2Half-Life 2: Deathmatch maps, open \steamapps\common\half-life 2 deathmatch\hl2mp\hl2mp_pak_dir.vpk
    • For 半衰期2:第一章Half-Life 2: Episode One maps, open \steamapps\common\half-life 2\episodic\ep1_pak_dir.vpk
    • For 半衰期2:第二章Half-Life 2: Episode Two maps, open \steamapps\common\half-life 2\ep2\ep2_pak_dir.vpk
    • For 传送门Portal maps, open \steamapps\common\portal\portal\portal_pak_dir.vpk
    • For 传送门2Portal 2 maps, open steamapps\common\portal 2\portal2\pak01_dir.vpk
    • For 军团要塞2Team Fortress 2 maps, open \steamapps\common\Team Fortress 2\tf\tf2_misc_dir.vpk
    • For 求生之路Left 4 Dead maps, open steamapps\common\left 4 dead\l4d\pak01_dir.vpk
    • For 求生之路2Left 4 Dead 2 maps, open steamapps\common\left 4 dead 2\l4d2\pak01_dir.vpk
Note.png注意:Left 4 Dead, Left 4 Dead 2, and Portal 2 also have other folders for DLCs, for examples: steamapps\common\portal2\portal2_dlc1\pak01_dir.vpk and steamapps\common\left 4 dead\l4d_dlc1\pak01_dir.vpk .

3. Browse the directory until you find a \maps\ folder. Each location varies per game.
4. Right-click on the BSP file you want, then click Extract or drag the file from the GCF into a folder.

Before You Go

Before you take this jump to run off and decompile a map take a second or two to think, "What am I trying to learn/do?". Read the included TXT files, you may just find the creator's e-mail, and that could be more helpful than you imagine.

Some mappers will offer up help and advice, they may even go so far as to provide perfect examples of what you were trying to "borrow" from the map.