FAQFAQ   Ban ListBan List   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 NewsNews   DownloadsDownloads   Wiki & TutorialsWiki & Tutorials   IRC ChatIRC Chat 

Bonus Map Scripts and You

 
Post new topic   Reply to topic    ThinkingWithPortals.com Forum Index -> Maps and Mapping
View previous topic :: View next topic  
Author Message
msleeper

digital entertainment design


Joined: 26 Sep 2007
Posts: 1809
Location: Atlanta, Jawjuh
Warnings : 2Warnings : 2

PostPosted: Fri Oct 19, 2007 5:42 pm    Post subject: Bonus Map Scripts and You Reply with quote

Bonus Map Scripts and You
What They Are And Why You Should Be Using Them


In a nutshell, a Bonus Map Script is what tells Portal to allow your map to be loaded via the nifty Import Maps option, and also to have a Challenge versions of your map available. Creating and editing these files is very simple, and should become a standard for Portal map releases.

Links And Useful Information
Valve Developer Wiki Article
Link: http://developer.valvesoftware.com/wiki/Portal_Challenge_Script
This explains the general concept of what the BMS format is and how to use them, and has some links to other relevant information.

BNS script generator by S.SkillZ
Link: Release Thread
THIS IS INVALUABLE!! Use this to create your own BMS files, atleast until someone comes along and does it better! This is an endlessly handy tool.

TWP Wiki Article on Bonus Map Scripts
Link: Wiki Article
Currently in-progress at the time of this update, but currently explains a lot of the concepts and inner workings of the scripts. Also explains how to get your maps working with them. Check back often!

Old Shit, Being Depreciated Into The Wiki
Step 1 - Directory Structure
I will make a screenshot of this if I need to, or some sort of graphical version that is better than the text. But your folder layout should be like this:

-- /SteamApps/(Username)/Portal/portal/
-- -- /maps/(Username) **Create a directory with your name, your script files will go here**
-- -- /VGUI **You will put your VMTs and VTFs in here, for the preview screenshot**

In short, you need to create a directory under the /portal/maps directory where you will store your files. You should probably name it after your nickname, so people know how to group the files together. You will place your map files, the relevant script files, and a file called folderinfo.bns which will contain your personal contact information for your maps.

Step 2 - folderinfo.bns
Here is an example folderinfo.bns. Feel free to copy and edit this for your own uses.

Code:

// Info describing the folder must be in folderinfo.txt!
// The image shown for the folder is assumed to be foldericon.tga if none is specified!

"msleeper PORTAL maps"
{
   "image"      "msleeper"
   "comment"   "contact: msleeper@msleeper.com"
}


Note that image is the name of the VTF in the /VGUI directory. So for example, I should have a file called /VGUI/msleeper.vtf and /VGUI/msleeper.vmt in order for my custom image to work.

Step 3 - Map Script File
Removed, check the Wiki.

Step 4 - Wrap-Up and Test
Remember to put your map file, map script file, and folderinfo.bns into the /portal/maps/(your name) directory.

Remember to put your personal icon, as well as your map screenshots in /VGUI.

Note: This is not 100%! If you run into errors, or have useful input, please post it!

Notes
You might be able to create a /VGUI/(your name) directory to store your VMT/VTFs into, which will clean your directory structure up significantly. If anyone can confirm this, please do!

_________________


Last edited by msleeper on Thu Jan 03, 2008 8:46 pm; edited 6 times in total
Back to top
View user's profile Send private message Visit poster's website
msleeper

digital entertainment design


Joined: 26 Sep 2007
Posts: 1809
Location: Atlanta, Jawjuh
Warnings : 2Warnings : 2

PostPosted: Fri Oct 19, 2007 10:26 pm    Post subject: Reply with quote

Okay, finished the quick how-to. Anyone who can test this please do, I know I will.
_________________
Back to top
View user's profile Send private message Visit poster's website
espen180

Loves Cake


Joined: 15 Oct 2007
Posts: 370


PostPosted: Sat Oct 20, 2007 3:40 am    Post subject: Reply with quote

i want to know if this makes the finish window appear when the map is done.
_________________
http://www.dpgames.co.uk/

Sanity is not statistical.
Back to top
View user's profile Send private message
SSkillZ
New Employee


Joined: 17 Oct 2007
Posts: 8


PostPosted: Sat Oct 20, 2007 3:54 pm    Post subject: Reply with quote

I would recommend puting the maps files in the maps folder and not in a sub folder (which will work just fine), as renaming the folder (Username) or moving it to another sub folder will make the "map" parameter invaild.

If the map was in maps folder, renaming the folder or moving it wont make the maps that show in bonus menu not to work, as the map parameter will stay "mapname" and the map is in maps folder and hasnt move, and vaild.

Because the script can be moved without any editing, but the .bsp if moved has to be edited in all the relevent .bns scripts.

Just as portal dudes did, just their folder (Username) are in the script folder which is not recommended.
Back to top
View user's profile Send private message
msleeper

digital entertainment design


Joined: 26 Sep 2007
Posts: 1809
Location: Atlanta, Jawjuh
Warnings : 2Warnings : 2

PostPosted: Sun Oct 21, 2007 12:44 am    Post subject: Reply with quote

Ah very good to note. Thanks Skillz!
_________________
Back to top
View user's profile Send private message Visit poster's website
youme
GLaDOS Module


Joined: 18 Oct 2007
Posts: 906
Location: Suffolk, Uk

PostPosted: Mon Oct 22, 2007 7:42 pm    Post subject: Reply with quote

Do you know if you can have multiple maps in one bonus map? by this i mean you only have one button to play it but when you reach the end of the first map it loads the next automatically?
Back to top
View user's profile Send private message Visit poster's website
Grudge

Buenoman?


Joined: 29 Sep 2007
Posts: 369


PostPosted: Tue Oct 23, 2007 7:55 am    Post subject: Reply with quote

If you mean in general, sure!

Use of level transitions (trigger_leveltransition I think) and some info landmarks, look around for some tut's.

_________________
Life is like a pipe, it's hard to get through and you're not always guaranteed a happy ending.

Back to top
View user's profile Send private message MSN Messenger
youme
GLaDOS Module


Joined: 18 Oct 2007
Posts: 906
Location: Suffolk, Uk

PostPosted: Sat Nov 24, 2007 9:14 am    Post subject: Reply with quote

It seems I can't put muliple maps into one bonus map, I've set up the driectory stucture all correct and the level transitions are working fine.
But when i run the maps using the bonus map script the first map runs fine and when i get to the level transition I get this error:
Code:
Level transition ERROR
Can't find connection to TS13\testc_06 from TS13/testc_07


I know the slashes are different directions but hammer won't let me put a \ in, It changes it to a / as soon as I hit apply.

Any advice?

Edit: I did a bit of looking at the differences in the console stuff between running it using "map TS13/testc_06" and running it via the bonus level stuff and it seems that the bonus level stuff uses \ whilst everything else uses /. Even if my bns files use /
Help!

Edit 2: I've fixed it, I resorted to making a bns for each map and making the player pick the next map after each map finished, But then the level transitions worked, it turns out it doesn't load the map file, it loads bns assosiated with that map. Its a bit annoying to have to make more than one bns but at least it works now Very Happy

_________________

Fear the tampon gun!!
Back to top
View user's profile Send private message Visit poster's website
msleeper

digital entertainment design


Joined: 26 Sep 2007
Posts: 1809
Location: Atlanta, Jawjuh
Warnings : 2Warnings : 2

PostPosted: Sat Nov 24, 2007 1:47 pm    Post subject: Reply with quote

Try opening the VMF after you save and close hammer, and change the \ marks back to /, then compile your map via a batch compiler. This might not work at all, but it's worth a shot.
_________________
Back to top
View user's profile Send private message Visit poster's website
youme
GLaDOS Module


Joined: 18 Oct 2007
Posts: 906
Location: Suffolk, Uk

PostPosted: Sat Nov 24, 2007 2:45 pm    Post subject: Reply with quote

youme wrote:
Edit 2: I've fixed it, I resorted to making a bns for each map and making the player pick the next map after each map finished, But then the level transitions worked, it turns out it doesn't load the map file, it loads bns assosiated with that map. Its a bit annoying to have to make more than one bns but at least it works now Very Happy

_________________

Fear the tampon gun!!
Back to top
View user's profile Send private message Visit poster's website
youme
GLaDOS Module


Joined: 18 Oct 2007
Posts: 906
Location: Suffolk, Uk

PostPosted: Tue Nov 27, 2007 5:13 pm    Post subject: Reply with quote

How do you unlock the next map when you finish a level?
_________________

Fear the tampon gun!!
Back to top
View user's profile Send private message Visit poster's website
MrTwoVideoCards

Loves Cake


Joined: 23 Nov 2007
Posts: 444
Location: Lancaster, CA

PostPosted: Tue Nov 27, 2007 7:23 pm    Post subject: Reply with quote

youme wrote:
It seems I can't put muliple maps into one bonus map, I've set up the driectory stucture all correct and the level transitions are working fine.
But when i run the maps using the bonus map script the first map runs fine and when i get to the level transition I get this error:
Code:
Level transition ERROR
Can't find connection to TS13\testc_06 from TS13/testc_07


I know the slashes are different directions but hammer won't let me put a \ in, It changes it to a / as soon as I hit apply.

Any advice?

Edit: I did a bit of looking at the differences in the console stuff between running it using "map TS13/testc_06" and running it via the bonus level stuff and it seems that the bonus level stuff uses \ whilst everything else uses /. Even if my bns files use /
Help!

Edit 2: I've fixed it, I resorted to making a bns for each map and making the player pick the next map after each map finished, But then the level transitions worked, it turns out it doesn't load the map file, it loads bns assosiated with that map. Its a bit annoying to have to make more than one bns but at least it works now Very Happy


Also instead use"_" better, as that helps the system organize files, and vmf's and the like.

_________________

Released Stuff:
Back to top
View user's profile Send private message
MrTwoVideoCards

Loves Cake


Joined: 23 Nov 2007
Posts: 444
Location: Lancaster, CA

PostPosted: Tue Nov 27, 2007 7:24 pm    Post subject: Reply with quote

youme wrote:
How do you unlock the next map when you finish a level?


Via a console command, thats the best way, using a point_client_command in your map.

_________________

Released Stuff:
Back to top
View user's profile Send private message
msleeper

digital entertainment design


Joined: 26 Sep 2007
Posts: 1809
Location: Atlanta, Jawjuh
Warnings : 2Warnings : 2

PostPosted: Mon Dec 03, 2007 10:11 pm    Post subject: Reply with quote

Updated for clarity, added links, and just generally made the first post better.
_________________
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    ThinkingWithPortals.com Forum Index -> Maps and Mapping All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group