Mapping Features for Alien Swarm
This article describes the intricacies you should be aware of when creating levels for Alien Swarm . This article is suitable for those who already know how to create maps using the Hammer from the Source SDK or have an idea of how to create primitive objects in this editor.
Alien Swarm SDK is available for free download via Steam in the Library -> Tools menu. After downloading and installing, you can start the Hammer World Editor and get started.
The SDK is installed in the following path:
C: \ Program Files (x86) \ Steam \ SteamApps \ common \ alien swarm \
All subsequent paths will be relative to this common folder or folder
- A few examples come with the SDK: alien swarm \ sdk_content \ mapsrc
Warning! In the sources of official cards ASI-Jac1-LandingBay_01, etc. You will not see all entities, since some of these entities are located in separate VMF files in the instances folder.
- Using the programs GCFScape and BSPSource decompile any card you like. And see how things are done there.
- I recommend decompiling the official campaign and studying it first. Custom campaigns by Lana's Escape, Tears of Tarnor, City17, Paranoia, Reduction, Extermination are also very useful.
For your addon \ campaign \ map you will need a separate folder on the disk. Let's say your campaign is called Bug Hunt.
- Create a folder D: \ BugHunt
- Create a basic structure of subfolders and files: maps, materials, resource ... see "alien swarm \ swarm \ addons \ ExampleAddon"
Attention! Do not use the default file and folder names CustomCampaignCredits.txt, ExampleCampaign.txt, example_map_1.txt otherwise there will be conflicts. Rename these files immediately to your BughuntCredits.txt, resource \ campaigns \ bughunt.txt, resource \ overviews \ bughut01.txt, etc. addoninfo.txt do not rename.
- Open the file alien swarm \ swarm \ gameinfo.txt and add the path to your folder:
After you have added your path to the end of the list, all the subfolders and files of your path are as if mounted in the “alien swarm \ swarm” folder. Your campaign is visible in the game, your textures and sounds are visible in Hammer and in the game. Now you do not need to create a VPK every time if you want to test your campaign. You no longer need to contaminate the game folder with user files, textures, models, scripts. You keep everything separately in your folder.
Hammer stores source maps in VMF format. This is a text file with a description of all entities, brushes, etc. in your card.
At Alien Swarm, everything counts as campaigns. Even if you have one card, it’s a campaign. Name your campaign, for example Extermination. Name the VMF file something like “extermination01road” or just “extermination01”. You can add underscore "_" to the file name if you are comfortable. This name allows players who can use the Google or Yandex search engine to find your campaign on the Internet and download it. The fact is that when a player looks at a list of dedicated servers, he sees only the names of BSP files, not campaigns. And if there is something like myfirrstlevel.bsp then he is unlikely to find such a campaign on the Internet. And in the search for "alien swarm extermination campaign" is likely to find. It is also advised to add the words moddb swarmarmory fpsbanana to the search engine as these are 3 sites on which add-ons for Sworm are posted.
Attention! After compilation, do not rename the BSP file, the file will not be valid.
You need to:
- Create a brush with a visible texture. This will be the "ground" on which the player walks.
- Create an info_player_start entity on the top of the brush. Wiki recommends placing 8 of these entities on each card. Although the players in the game can be a maximum of 5.
- Create a brush with a nolight texture which is much larger than the entire map in all sizes. He envelops the map and does not allow the light to go beyond the world.
- Make this brush empty: right-click in any 2D window - Make Hollow, 32 can be left by default.
- Ctrl + T or right click Tie to Entity, enter func_brush in the field for the class name and Enter. We changed our brush class to func_brush.
- Now we give it a name in the Name: structure_seal and Enter field.
By following these steps, you can compile your map to F9 and run it in the game. If there are no light sources in the card, then everything in it will be 100% lit, fullbright.
Two entities: logic_auto and env_tonemap_controller. I advise you to copy them from ready-made cards or sample levels that come with the SDK. You can play around with the parameters. They affect the amount of bloom. If these entities are not in your card, then the colors will be very bright, cutting eyes.
To compile maps, I advise you to immediately switch from Normal mode to Expert mode by clicking on the corresponding button.
Here you have more options and options. You avoid strange behavior in which the card cannot automatically open in the game after compilation. During the development of the map, I use the Fast option and only when I need to see the shadows and how beautifully the light goes, I use Full. To release the card, you naturally need to use the Full option.
- Compile it with Full settings and open it in the game
- Open the console and register
stringabledictionary
buildcubemaps
nav_generate
After buildcubemaps the game will restart the level, just like after nav_generate. buildcubemaps creates technical files and writes them to a BSP file in the swarm / maps folder. nav_generate creates a navigation mesh and creates a NAV file next to the BSP. It is advisable to include a NAV file in the delivery of your card (VPK), so that after half a year folk craftsmen would not supply it separately in the addon NavMesh.vpk
- Go over the level with
sv_cheats 1
asw_god 1
asw_marine_speedscale_hard 6
and check that everything works and you can give it to people .
- Everything is ready, you can begin to pack your card. Your result is in the swarm \ maps folder
Attention! After compilation, do not rename the BSP file, the file will not be valid.
VPK is a file format created by Valve. User-created add-ons for games Left 4 Dead, Alien Swarm, etc. distributed by files in this format. Valve herself uses it to store the media data of her games: textures and materials, scripts, etc.
Think of VPK as an archive with files and folders inside it. Think that during the start of the game, it in memory extracts all files from VPK files to the “alien swarm \ swarm” folder and overwrites everything in it. Thus, if you put in your VPK some existing file in the swarm folder, then the game will use your file, not the original one. Thus, you can change all the files of the game using the VPK file.
Using the GCFScape program.
You can create this file by dragging the folder onto the shortcut for VPK.EXE. Create a shortcut for the file "alien swarm \ bin \ vpk.exe". Drag the folder onto this shortcut and your VPK file will appear next to the dragged folder.
- With each public release of your campaign, you should change the version in the files addoninfo.txt, resource \ overviews \ bughunt01.txt. It is also important that these files contain a working and permanent link to a web page where you can download your map. These are the addonversion and addonURL0 fields in the addoninfo.txt file, version and website in the bughunt01.txt file. I advise you to use sites.google.com, create your own page there for a stable link to your map.
So you compiled your map and you now have 3 files: in swarm \ maps: BSP, NAV. In the swarm \ maps \ graphs: AIN folder.
- Move these files to your D: \ BugHunt directory given the paths.
- Change the version of addoninfo.txt and in all the descriptions of your maps in the resource \ overviews folder
- Create a VPK
-
Archive the VPK using 7z - Upload the archive to the permanent storage. I advise drive.google.com, www.moddb.com/games/alien-swarm/addons , gamebanana.com. Unfortunately, Swarmarmory.com is increasingly offline.
- Post this news on the game forums , in the game hub , in the Steam group of mods and campaigns
First, if you want to play often on your map, do not make a survival map. A lot of them. Nobody plays them. Make a simple, but a passing card.
Second, don’t try to “invent the wheel”, you can spend a lot of time. Use ready-made solutions as often as possible by looking at them on other people's cards and especially on official cards. To open a foreign card in the Hammer editor, you need two programs to decompile GCFScape and BSPSource, later you will also need pakrat to append or extract files from BSP files. GCFScape opens VPK files, as well as GCF, NCF, BSP, etc. The BSPSource program is able to almost perfectly decompile any card for Sworm, so you get the source of any card and can see how the things you need are done.
developer.valvesoftware.com/wiki/Alien_Swarm_Level_Creation
developer.valvesoftware.com/wiki/GCFScape
developer.valvesoftware.com/wiki/Pakrat
developer.valvesoftware.com/wiki/BSPSource
Alien Swarm SDK is available for free download via Steam in the Library -> Tools menu. After downloading and installing, you can start the Hammer World Editor and get started.
The SDK is installed in the following path:
C: \ Program Files (x86) \ Steam \ SteamApps \ common \ alien swarm \
All subsequent paths will be relative to this common folder or folder
Where can I find sample maps?
- A few examples come with the SDK: alien swarm \ sdk_content \ mapsrc
Warning! In the sources of official cards ASI-Jac1-LandingBay_01, etc. You will not see all entities, since some of these entities are located in separate VMF files in the instances folder.
- Using the programs GCFScape and BSPSource decompile any card you like. And see how things are done there.
- I recommend decompiling the official campaign and studying it first. Custom campaigns by Lana's Escape, Tears of Tarnor, City17, Paranoia, Reduction, Extermination are also very useful.
How to set up the environment for convenient work?
For your addon \ campaign \ map you will need a separate folder on the disk. Let's say your campaign is called Bug Hunt.
- Create a folder D: \ BugHunt
- Create a basic structure of subfolders and files: maps, materials, resource ... see "alien swarm \ swarm \ addons \ ExampleAddon"
Attention! Do not use the default file and folder names CustomCampaignCredits.txt, ExampleCampaign.txt, example_map_1.txt otherwise there will be conflicts. Rename these files immediately to your BughuntCredits.txt, resource \ campaigns \ bughunt.txt, resource \ overviews \ bughut01.txt, etc. addoninfo.txt do not rename.
- Open the file alien swarm \ swarm \ gameinfo.txt and add the path to your folder:
"SearchPaths"
{
"Game" "|gameinfo_path|."
"Game" "swarm_base"
"Game" "platform"
"Game" "D:\BugHunt"
}
After you have added your path to the end of the list, all the subfolders and files of your path are as if mounted in the “alien swarm \ swarm” folder. Your campaign is visible in the game, your textures and sounds are visible in Hammer and in the game. Now you do not need to create a VPK every time if you want to test your campaign. You no longer need to contaminate the game folder with user files, textures, models, scripts. You keep everything separately in your folder.
What is a VMF file?
Hammer stores source maps in VMF format. This is a text file with a description of all entities, brushes, etc. in your card.
What to call VMF and BSP files?
At Alien Swarm, everything counts as campaigns. Even if you have one card, it’s a campaign. Name your campaign, for example Extermination. Name the VMF file something like “extermination01road” or just “extermination01”. You can add underscore "_" to the file name if you are comfortable. This name allows players who can use the Google or Yandex search engine to find your campaign on the Internet and download it. The fact is that when a player looks at a list of dedicated servers, he sees only the names of BSP files, not campaigns. And if there is something like myfirrstlevel.bsp then he is unlikely to find such a campaign on the Internet. And in the search for "alien swarm extermination campaign" is likely to find. It is also advised to add the words moddb swarmarmory fpsbanana to the search engine as these are 3 sites on which add-ons for Sworm are posted.
Attention! After compilation, do not rename the BSP file, the file will not be valid.
How to create the simplest level \ map?
You need to:
- Create a brush with a visible texture. This will be the "ground" on which the player walks.
- Create an info_player_start entity on the top of the brush. Wiki recommends placing 8 of these entities on each card. Although the players in the game can be a maximum of 5.
- Create a brush with a nolight texture which is much larger than the entire map in all sizes. He envelops the map and does not allow the light to go beyond the world.
- Make this brush empty: right-click in any 2D window - Make Hollow, 32 can be left by default.
- Ctrl + T or right click Tie to Entity, enter func_brush in the field for the class name and Enter. We changed our brush class to func_brush.
- Now we give it a name in the Name: structure_seal and Enter field.
By following these steps, you can compile your map to F9 and run it in the game. If there are no light sources in the card, then everything in it will be 100% lit, fullbright.
What should be present in any card for Alien Swarm?
Two entities: logic_auto and env_tonemap_controller. I advise you to copy them from ready-made cards or sample levels that come with the SDK. You can play around with the parameters. They affect the amount of bloom. If these entities are not in your card, then the colors will be very bright, cutting eyes.
How to compile?
To compile maps, I advise you to immediately switch from Normal mode to Expert mode by clicking on the corresponding button.
Here you have more options and options. You avoid strange behavior in which the card cannot automatically open in the game after compilation. During the development of the map, I use the Fast option and only when I need to see the shadows and how beautifully the light goes, I use Full. To release the card, you naturally need to use the Full option.
How to prepare a card for release?
- Compile it with Full settings and open it in the game
- Open the console and register
stringabledictionary
buildcubemaps
nav_generate
After buildcubemaps the game will restart the level, just like after nav_generate. buildcubemaps creates technical files and writes them to a BSP file in the swarm / maps folder. nav_generate creates a navigation mesh and creates a NAV file next to the BSP. It is advisable to include a NAV file in the delivery of your card (VPK), so that after half a year folk craftsmen would not supply it separately in the addon NavMesh.vpk
- Go over the level with
sv_cheats 1
asw_god 1
asw_marine_speedscale_hard 6
and check that everything works and you can give it to people .
- Everything is ready, you can begin to pack your card. Your result is in the swarm \ maps folder
Attention! After compilation, do not rename the BSP file, the file will not be valid.
What is VPK and how to handle it?
VPK is a file format created by Valve. User-created add-ons for games Left 4 Dead, Alien Swarm, etc. distributed by files in this format. Valve herself uses it to store the media data of her games: textures and materials, scripts, etc.
Think of VPK as an archive with files and folders inside it. Think that during the start of the game, it in memory extracts all files from VPK files to the “alien swarm \ swarm” folder and overwrites everything in it. Thus, if you put in your VPK some existing file in the swarm folder, then the game will use your file, not the original one. Thus, you can change all the files of the game using the VPK file.
How to open a VPK file?
Using the GCFScape program.
How to create a VPK file?
You can create this file by dragging the folder onto the shortcut for VPK.EXE. Create a shortcut for the file "alien swarm \ bin \ vpk.exe". Drag the folder onto this shortcut and your VPK file will appear next to the dragged folder.
How to configure TXT campaign files?
- With each public release of your campaign, you should change the version in the files addoninfo.txt, resource \ overviews \ bughunt01.txt. It is also important that these files contain a working and permanent link to a web page where you can download your map. These are the addonversion and addonURL0 fields in the addoninfo.txt file, version and website in the bughunt01.txt file. I advise you to use sites.google.com, create your own page there for a stable link to your map.
How to release a new version of the map?
So you compiled your map and you now have 3 files: in swarm \ maps: BSP, NAV. In the swarm \ maps \ graphs: AIN folder.
- Move these files to your D: \ BugHunt directory given the paths.
- Change the version of addoninfo.txt and in all the descriptions of your maps in the resource \ overviews folder
- Create a VPK
-
Archive the VPK using 7z - Upload the archive to the permanent storage. I advise drive.google.com, www.moddb.com/games/alien-swarm/addons , gamebanana.com. Unfortunately, Swarmarmory.com is increasingly offline.
- Post this news on the game forums , in the game hub , in the Steam group of mods and campaigns
Few parting words
First, if you want to play often on your map, do not make a survival map. A lot of them. Nobody plays them. Make a simple, but a passing card.
Second, don’t try to “invent the wheel”, you can spend a lot of time. Use ready-made solutions as often as possible by looking at them on other people's cards and especially on official cards. To open a foreign card in the Hammer editor, you need two programs to decompile GCFScape and BSPSource, later you will also need pakrat to append or extract files from BSP files. GCFScape opens VPK files, as well as GCF, NCF, BSP, etc. The BSPSource program is able to almost perfectly decompile any card for Sworm, so you get the source of any card and can see how the things you need are done.
useful links
developer.valvesoftware.com/wiki/Alien_Swarm_Level_Creation
developer.valvesoftware.com/wiki/GCFScape
developer.valvesoftware.com/wiki/Pakrat
developer.valvesoftware.com/wiki/BSPSource