Portal Challenge Script: Difference between revisions
No edit summary |
m (minor tidy & categorized) |
||
Line 1: | Line 1: | ||
''For more info on Bonus Maps, BNS files, and BMZ files see [[Bonus Maps]]'' | ''For more info on Bonus Maps, BNS files, and BMZ files see [[Bonus Maps]]'' | ||
==First | |||
== First step == | |||
{{note|You will need to obtain [[GCFScape]] for this step.}} | {{note|You will need to obtain [[GCFScape]] for this step.}} | ||
* Launch GCFScape and open < | * Launch GCFScape and open <code>portal content.gcf</code> in your SteamApps folder. | ||
* Extract < | * Extract <code>scripts/challenges/challenges.bns</code> to <code>Steam/SteamApps/USERNAME/portal/portal/scripts/challenges</code> | ||
* Now, open the bns file with your favorite text editor. | * Now, open the bns file with your favorite text editor. | ||
==Inside the file== | |||
* When you open the < | == Inside the file == | ||
* When you open the <code>challenges.bns</code> file you can see scripts similar to this one: | |||
<pre>"#Bonus_Map_TC13Challenges" | <pre>"#Bonus_Map_TC13Challenges" | ||
Line 45: | Line 47: | ||
}</pre> | }</pre> | ||
==="#Bonus_Map_TC13Challenges"=== | === "#Bonus_Map_TC13Challenges" === | ||
This piece of code denotes the name of the map. This is linked to the < | This piece of code denotes the name of the map. This is linked to the <code>portal_LANGUAGE.txt</code> file in the game's resources folder. {{note|This feature is language specific, and unless you plan to make your map multilingual, you can simply insert text instead of <code>"#Bonus_Map_TC13Challenges"</code>.}} | ||
===map=== | === map === | ||
This is the name of the map without the bsp extension, the one which you put in the game's maps folder. | This is the name of the map without the bsp extension, the one which you put in the game's maps folder. | ||
===chapter=== | === chapter === | ||
This line refers to the chapter the map belongs to. You can find these chapter files in your GCF file. Simply create a new chapter with any name and a cfg extension. Add a line for each map in your chapter in to the file in this format: | This line refers to the chapter the map belongs to. You can find these chapter files in your GCF file. Simply create a new chapter with any name and a cfg extension. Add a line for each map in your chapter in to the file in this format: | ||
map your_map_name | map your_map_name | ||
Now, put this cfg file into the < | Now, put this cfg file into the <code>steam\steamapps\USERNAME\portal\portal\cfg</code> folder. | ||
===image=== | === image === | ||
This is the thumbnail of the map, which is in fact a [[material]]. The root path for this is < | This is the thumbnail of the map, which is in fact a [[material]]. The root path for this is <code>steam\steamapps\USERNAME\portal\portal\materials\VGUI</code>. | ||
===comment=== | === comment === | ||
A language based description of your map. Again, unless you want to make the map multilingual, just replace it with text. | A language based description of your map. Again, unless you want to make the map multilingual, just replace it with text. | ||
===lock=== | === lock === | ||
A [[boolean]] variable, which specifies if the map is locked or not until you complete the game. | A [[boolean]] variable, which specifies if the map is locked or not until you complete the game. | ||
==Challenge types== | == Challenge types == | ||
You will also have to set the criteria of your map for | You will also have to set the criteria of your map for | ||
* Portals | * Portals | ||
Line 86: | Line 88: | ||
The following three lines specify the amount of Portals, Steps, or Time needed for each medal. | The following three lines specify the amount of Portals, Steps, or Time needed for each medal. | ||
==Adding your own challenge== | == Adding your own challenge == | ||
Adding your own challenge is an easy, 3-to-4-step task. | Adding your own challenge is an easy, 3-to-4-step task. | ||
* Make your map(s) and put them in < | * Make your map(s) and put them in <code>Steam/SteamApps/USERNAME/portal/portal/maps</code> | ||
* Create a cfg file containing a line for each map which reads < | * Create a cfg file containing a line for each map which reads <code>map map_name</code> and put the file into the <code>Steam/SteamApps/USERNAME/portal/portal/cfg</code> directory. | ||
* This is an optional step as you can reuse an old image, or create your own. If you created your own image, put it into the < | * This is an optional step as you can reuse an old image, or create your own. If you created your own image, put it into the <code>Steam/SteamApps/USERNAME/portal/portal/materials/VGUI</code> directory or one of its subdirectories (recommended). | ||
* Finally, create a new .bns file in the < | * Finally, create a new .bns file in the <code>Steam/SteamApps/USERNAME/portal/portal/scripts/challenges</code> folder and edit it with or without the help of this tutorial. | ||
== See also == | |||
* [[Portal Level Creation]] | |||
[[Category:Modding]] |
Revision as of 15:31, 24 February 2008
For more info on Bonus Maps, BNS files, and BMZ files see Bonus Maps
First step

- Launch GCFScape and open
portal content.gcf
in your SteamApps folder. - Extract
scripts/challenges/challenges.bns
toSteam/SteamApps/USERNAME/portal/portal/scripts/challenges
- Now, open the bns file with your favorite text editor.
Inside the file
- When you open the
challenges.bns
file you can see scripts similar to this one:
"#Bonus_Map_TC13Challenges" { "map" "testchmb_a_08" "chapter" "chapter5.cfg" [$X360] "image" "bonusmaps/testchmb_a_08_challenges" "comment" "#Bonus_Map_ChallengesComment" "lock" "1" "challenges" { "#Bonus_Map_ChallengePortals" { "comment" "#Bonus_Map_LeastPortalsComment" "bronze" "9" "silver" "5" "gold" "4" } "#Bonus_Map_ChallengeSteps" { "comment" "#Bonus_Map_LeastStepsComment" "bronze" "30" "silver" "20" "gold" "10" } "#Bonus_Map_ChallengeTime" { "comment" "#Bonus_Map_LeastTimeComment" "bronze" "40" "silver" "30" "gold" "19" } } }
"#Bonus_Map_TC13Challenges"
This piece of code denotes the name of the map. This is linked to the portal_LANGUAGE.txt
file in the game's resources folder.

"#Bonus_Map_TC13Challenges"
.map
This is the name of the map without the bsp extension, the one which you put in the game's maps folder.
chapter
This line refers to the chapter the map belongs to. You can find these chapter files in your GCF file. Simply create a new chapter with any name and a cfg extension. Add a line for each map in your chapter in to the file in this format:
map your_map_name
Now, put this cfg file into the steam\steamapps\USERNAME\portal\portal\cfg
folder.
image
This is the thumbnail of the map, which is in fact a material. The root path for this is steam\steamapps\USERNAME\portal\portal\materials\VGUI
.
comment
A language based description of your map. Again, unless you want to make the map multilingual, just replace it with text.
lock
A boolean variable, which specifies if the map is locked or not until you complete the game.
Challenge types
You will also have to set the criteria of your map for
- Portals
- Steps
- Time
There are three similar sections at the end of each map. This one below is for portals. For steps or time, replace the "Portals" in each string with Steps or Time, accordingly.
"#Bonus_Map_ChallengePortals" { "comment" "#Bonus_Map_LeastPortalsComment" "bronze" "9" "silver" "5" "gold" "4" }
The first line, again, is a language-based string variable. You don't have to change it here. The following three lines specify the amount of Portals, Steps, or Time needed for each medal.
Adding your own challenge
Adding your own challenge is an easy, 3-to-4-step task.
- Make your map(s) and put them in
Steam/SteamApps/USERNAME/portal/portal/maps
- Create a cfg file containing a line for each map which reads
map map_name
and put the file into theSteam/SteamApps/USERNAME/portal/portal/cfg
directory. - This is an optional step as you can reuse an old image, or create your own. If you created your own image, put it into the
Steam/SteamApps/USERNAME/portal/portal/materials/VGUI
directory or one of its subdirectories (recommended). - Finally, create a new .bns file in the
Steam/SteamApps/USERNAME/portal/portal/scripts/challenges
folder and edit it with or without the help of this tutorial.