Hotfixing your custom maps for GameBanana

A Tutorial for Portal

Portal first released on the 10th of October, 2007, and its existence spawned a cultural phenomena like no other. It is also still a well-respected singleplayer game, and is still played by some for being so simple yet diverse in its execution. Modding for Portal is also very easy, and many large-scale mods have been created out of love for the game. However, the presentation of maps and mapsets that do not belong in mods has always been rather inconsistent. This guide aims to solve this issue, teaching all of the necessary steps to make custom maps for Portal properly and efficiently load into the Bonus Maps section, instead of simply relying on the developer console.

1. Map or Mapset?

Uploading a single map to GameBanana as one submission is different to uploading multiple maps in the same submission. The latter is referred to as a mapset. Mapsets have different file locations to single maps. It is acceptable for a submission containing only one map to be a mapset if other similar submissions by the same person use the same folders and mapset information. An example of this is if a person wants to use a self-titled folder to contain all of their maps. Avoid creating a mapset containing only one visible map at all costs.

2. Map Files

If posting a single map that is not tied to a mapset, the .bsp file should be situated directly inside the maps folder.
However, if posting a mapset, all of the relevant .bsp files should be inserted into a sub-folder inside the root maps folder, which bears the title of the mapset. No other folders are needed.

2.1. Aside: Changing Levels

If your mapset involves changing levels using a trigger_changelevel for example, it is important to consider that the Source engine has a character limit regarding the filepath of maps, approximately 31 characters to be exact, including the sub-folder. As such, "psychological_instability/psychological_instability" is cut down to "psychological_instability/psych" and thus results in a console error and no level change occurs. Design your mapset and map names so this character limit is never reached.
On another note, trigger_changelevel is preferred over point_clientcommand for changing levels, since trigger_changelevel displays "LOADING" on the screen, but point_clientcommand does not. point_clientcommand can still be used for ending a map or mapset with the disconnect command.

3. Thumbnails

Thumbnails are used by the Bonus Maps section to display generalised pictures of both maps and mapsets. Creating a thumbnail for a bonus map involves making a 180x100 .tga picture or illustration of the map or mapset with your favourite image editor. The image's size should then be changed to 256x128. Make sure to keep the original contents of the thumbnail in the top-left 180x100 space while everything else is pure white. After this, the .tga must be imported into VTFEdit with Normal Format set to DXT1, then saved as a .vtf. This .vtf file should be moved to materials/vgui/bonusmaps.
If the image belongs to a single map, name it the same as the map in question.
If the image belongs to a mapset or maps inside a mapset, create a sub-folder with the same name as the mapset's folder. Next, name the .vtf "foldericon" if it belongs to the mapset itself, or the name of one of the maps in the mapset if it does not. You will also need to create a .vmt file for each .vtf (by creating a .txt file and changing the file extension), which must be named identically and should read as follows:
"UnlitGeneric"
{
"$baseTexture" "vgui/bonusmaps/<INSERT FOLDERS AND FILENAME WITHOUT FILE EXTENSION HERE>"
"$vertexalpha" 1
}
This method is preferable over simply using the original .tga file (as some bonus maps tend to do) as the .vtf and .vmt combined are roughly half the size of the .tga.

4. Bonus Files

Bonus files are crucial for making mapsets and maps appear in the Bonus Maps section. Note that mapsets (folders) always appear after the default Portal bonus maps and before single bonus maps. Bonus files are simple .txt files with their extension changed to .bns.
In the case of a single map or map within a mapset, the .bns file should sit directly beside it with the same name, and contain the following (note that if the map is inside a mapset, you should put "./" directly before the filename inside the quotation marks):
"<INSERT MAP NAME PROPERLY CAPITALISED AND SPACED HERE>"
{
"map" "<INSERT FILENAME WITHOUT FILE EXTENSION HERE>"
"image" "bonusmaps/<INSERT FOLDERS AND FILENAME WITHOUT FILE EXTENSION HERE>"
"comment "<INSERT MAP INFORMATION AND/OR AUTHOR CREDITS HERE>"
"lock" "0"
}
Mapsets, on the other hand, require a folderinfo.bns inside their respective sub-folder with the following information:
"<INSERT MAPSET NAME PROPERLY CAPITALISED AND SPACED HERE>"
{
"image" "bonusmaps/<INSERT FOLDERS HERE>/foldericon"
"comment" "<INSERT MAPSET INFORMATION AND/OR AUTHOR CREDITS HERE>"
"lock" "0"
}
Note that it is possible to have a single .bns file contain multiple maps (not mapsets). This is done by copying the first example above into a single file multiple times, and using different information for each copy. In this case, the .bns should use the name of the mapset. Do not do this if the mapset is spread out across multiple submissions. In such case, you can use a .bns file to address multiple versions of one specific map, such as Advanced and Challenge versions.

4.1. Aside: Challenges

If challenge support exists on a map, a second entry of the same map should be made within the same .bns file with the following inserted directly after '"lock" "0"':
"challenges"
{
"#Bonus_Map_ChallengePortals"
{
"comment" "#Bonus_Map_LeastPortalsComment"
"bronze" "<INSERT VALUE HERE>"
"silver" "<INSERT VALUE HERE>"
"gold" "<INSERT VALUE HERE>"
}
"#Bonus_Map_ChallengeSteps"
{
"comment" "#Bonus_Map_LeastStepsComment"
"bronze" "<INSERT VALUE HERE>"
"silver" "<INSERT VALUE HERE>"
"gold" "<INSERT VALUE HERE>"
}
"#Bonus_Map_ChallengeTime"
{
"comment" "#Bonus_Map_LeastTimeComment"
"bronze" "<INSERT VALUE HERE>"
"silver" "<INSERT VALUE HERE>"
"gold" "<INSERT VALUE HERE>"
}
}
While there does exist a variable "type" that supports values 0, 1 and 2 for each type of challenge, it is completely unnecessary so long as the challenges are in the correct order.

5. Bonus Map Zipping and Submission

Creating a .bmz file is a way of containing your map or mapset within one file. This procedure is not only convoluted, but also conceals the file structure from people downloading the submission and introduces an unnecessary step that end users must perform. Also, using this method requires the use of .tga files since .bmz imports load directly into the maps folder. As such, you should not zip your bonus maps like this.
The most acceptable practice is to simply compress the required files into a .zip or .rar file. The first level of the compressed file should contain the necessary folders within steamapps/common/Portal/portal, such as maps, materials, models, sounds, etcetera. In an ideal situation, only the maps (for .bsp and .bns files) and materials (for thumbnails) folders should be needed, since all other content would have been packaged into each map using a tool such as VIDE. Once all this is done, the submission can be published or updated without issues.

Posts

Embed

Share banner
Image URL:
HTML embed code:
BB embed code:
Markdown embed code:

Credits

Key Authors
jack5gamebanana avatar
jack5gamebanana username pic Joined 4y ago
NPMO Manager ARMAD Manager osul Manager SMBX Manager PRTL Manager
Offline
2,628 points Ranked 1946th
24 medals 5 rare
  • Became a Game Pioneer Medal icon
  • Submitted 20 Maps Medal icon
  • Achieved Game Manager clearance Medal icon
  • Returned 1000 times Medal icon
  • Thanked 50 submitters Medal icon
  • Became a Studio Leader Medal icon

Submitter

jack5gamebanana avatar
jack5gamebanana username pic Joined 4y ago
NPMO Manager ARMAD Manager osul Manager SMBX Manager PRTL Manager
DEAD
2,628 points Ranked 1946th
24 medals 5 rare
  • Became a Game Pioneer Medal icon
  • Submitted 20 Maps Medal icon
  • Achieved Game Manager clearance Medal icon
  • Returned 1000 times Medal icon
  • Thanked 50 submitters Medal icon
  • Became a Studio Leader Medal icon

jack5gamebanana avatar
jack5gamebanana

Creator
Sign up to access this!
Sign up to access this!
Sign up to access this!
  • Paypal Donate

Game

Sign up to access this!

Category

Details

Difficulty Level
Intermediate

Attributes

Share

  • Share on Reddit
  • Share on Twitter
  • Share on Facebook
  • Share on Google+

Stats

  • 458 Views
  • 2 Posts
  • 3mo Submitted
  • 3mo Modified

Scores

  • Not yet rated
Sign up to access this!

More from Submitter

bcp.crwdcntrl.net tracking pixel