Custom Info Sign: Looking for Options
Quote from RomulanPaladin on August 3, 2013, 9:22 pmI am new to using Hammer. This is where I am: I made a test map using PTI and exported it. I've already learned how to make/edit/cleanup indicator lights, add those white symbol signs, and pak video_splitter.nut with my .bsp map to activate the elevator room videos.
I'm stuck on customizing the info sign in the entrance way.
Editing sp_lightboard_icons.txt won't work because it loads on game start, not on map start. The main file would have to be edited making it not elegantly feasible to send to other people.
Making a .pak file doesn't seem to work for me right now: I've read that these files are no longer read from the "addons" folder anymore.
I have found a tutorial: http://forums.thinking.withportals.com/mapping-help/custom-chamber-signs-without-vscripts-t3663.html. However, my knowledge of Hammer is insufficient to translate exactly what I would have to do to make this work. Besides, I would sooner edit the included info sign before making a new one (see below).
When PTI exports a map, it exports an entrance way along with it including an info sign. It seems that particular info sign is part of the whole arrival elevator instance(?) and I can't edit it individually.
If at all possible, I would like to use the entrance way exported by PTI; I like it, don't want to rebuild it, just want to fix the sign.
Recommendations?
I am new to using Hammer. This is where I am: I made a test map using PTI and exported it. I've already learned how to make/edit/cleanup indicator lights, add those white symbol signs, and pak video_splitter.nut with my .bsp map to activate the elevator room videos.
I'm stuck on customizing the info sign in the entrance way.
Editing sp_lightboard_icons.txt won't work because it loads on game start, not on map start. The main file would have to be edited making it not elegantly feasible to send to other people.
Making a .pak file doesn't seem to work for me right now: I've read that these files are no longer read from the "addons" folder anymore.
I have found a tutorial: http://forums.thinking.withportals.com/mapping-help/custom-chamber-signs-without-vscripts-t3663.html. However, my knowledge of Hammer is insufficient to translate exactly what I would have to do to make this work. Besides, I would sooner edit the included info sign before making a new one (see below).
When PTI exports a map, it exports an entrance way along with it including an info sign. It seems that particular info sign is part of the whole arrival elevator instance(?) and I can't edit it individually.
If at all possible, I would like to use the entrance way exported by PTI; I like it, don't want to rebuild it, just want to fix the sign.
Recommendations?

Quote from Gemarakup on August 4, 2013, 12:41 amSave a version of your own instance. There are a few ways to edit signs, but, to make it easier for you, I recommend Omnicoders Test sign maker program. It uses a different method by making a texture instead of a script, so you just need to follow your own tutorial that you linked. Also, pakrat the texture so others can see it. If you want to use the scripting method, don't use VPKs, use pakrat. VPKs are defective. You just need to delete the sign instance and add the appropriate brush or instance.
Save a version of your own instance. There are a few ways to edit signs, but, to make it easier for you, I recommend Omnicoders Test sign maker program. It uses a different method by making a texture instead of a script, so you just need to follow your own tutorial that you linked. Also, pakrat the texture so others can see it. If you want to use the scripting method, don't use VPKs, use pakrat. VPKs are defective. You just need to delete the sign instance and add the appropriate brush or instance.

Quote from josepezdj on August 4, 2013, 3:53 amRomulanPaladin wrote:If at all possible, I would like to use the entrance way exported by PTI; I like it, don't want to rebuild it, just want to fix the sign.Unfortunately, the PTI uses a vgui_screen entity that makes use of a .RES file called sp_progress_sign for the sign layout (it's packed into the pak01_dir.VPK in your Portal 2/portal2 folder), and a .TXT file called sp_lightboard_icons.txt where all the icons for each level are listed (you've got it into your Portal 2/portal2/scripts/vscripts/transitions folder)... and none of these files can be packed into the .BSP because all of them are loaded when you run the game, not when you load a map
The best way to go is that tutorial you linked, I use the same idea since the first map I made. Then as Yishbarr said, use Omnicoder's Signmaker to build your lightboard with the desired icons and stuffs. I'm attaching a basic test map with a custom sign as the one described in that tut, check it out:
- /maps: contains the .BSP, place it into portal 2/portal2/maps
- /materials: contains a custom sign, place the folder "twp" with the 2 files inside into portal 2/portal2/materials
- /sdk_content: contains the .VMF map so you can look into it in the hammer editor.If you feel creative, you don't need to use the standard lightboard looking, but design your own thing
If you need the icons, you can grab them from the pak01_dir.VPK (inside your Portal 2/portal2 folder), it's a file called "p2_lightboard_vgui.vtf" and it's located into materials/vgui/screens/... with a good image editor you can pick any sign you need and put it into your custom sign, maybe put a custom logo and the big number with your own font... Also, you could make your sign with a landscape design instead of the vertical one... up to your wish.
Unfortunately, the PTI uses a vgui_screen entity that makes use of a .RES file called sp_progress_sign for the sign layout (it's packed into the pak01_dir.VPK in your Portal 2/portal2 folder), and a .TXT file called sp_lightboard_icons.txt where all the icons for each level are listed (you've got it into your Portal 2/portal2/scripts/vscripts/transitions folder)... and none of these files can be packed into the .BSP because all of them are loaded when you run the game, not when you load a map
The best way to go is that tutorial you linked, I use the same idea since the first map I made. Then as Yishbarr said, use Omnicoder's Signmaker to build your lightboard with the desired icons and stuffs. I'm attaching a basic test map with a custom sign as the one described in that tut, check it out:
- /maps: contains the .BSP, place it into portal 2/portal2/maps
- /materials: contains a custom sign, place the folder "twp" with the 2 files inside into portal 2/portal2/materials
- /sdk_content: contains the .VMF map so you can look into it in the hammer editor.
If you feel creative, you don't need to use the standard lightboard looking, but design your own thing If you need the icons, you can grab them from the pak01_dir.VPK (inside your Portal 2/portal2 folder), it's a file called "p2_lightboard_vgui.vtf" and it's located into materials/vgui/screens/... with a good image editor you can pick any sign you need and put it into your custom sign, maybe put a custom logo and the big number with your own font... Also, you could make your sign with a landscape design instead of the vertical one... up to your wish.
Quote from RomulanPaladin on August 4, 2013, 7:23 amGood stuff and well written; thanks!
Some questions now:
yishbarr wrote:Save a version of your own instance.This is how I see this working: click on "edit instance," make my changes, save that instance, and then change instance file name on my map to the new instance file name I made. Yes / no?
josepezdj wrote:The best way to go is that tutorial you linkedThat tutorial talks about using some code to make a .vmt file. I'm assuming that would be the sign texture file. Where does that code go / what's all that about? I have not yet encountered that stuff yet.
I'm going to be stubborn about trying to get the PTI entrance way to work at least one more time. Buttons can change the texture of indicator lights. Is there anyway I can make a trigger or somesuch that changes the texture on the PTI entrance sign to a custom one? That may be a round-about way but then I wouldn't have to build new entrance ways or elevators unless I wanted to.
Good stuff and well written; thanks!
Some questions now:
This is how I see this working: click on "edit instance," make my changes, save that instance, and then change instance file name on my map to the new instance file name I made. Yes / no?
That tutorial talks about using some code to make a .vmt file. I'm assuming that would be the sign texture file. Where does that code go / what's all that about? I have not yet encountered that stuff yet.
I'm going to be stubborn about trying to get the PTI entrance way to work at least one more time. Buttons can change the texture of indicator lights. Is there anyway I can make a trigger or somesuch that changes the texture on the PTI entrance sign to a custom one? That may be a round-about way but then I wouldn't have to build new entrance ways or elevators unless I wanted to.

Quote from josepezdj on August 4, 2013, 8:08 amRomulanPaladin wrote:That tutorial talks about using some code to make a .vmt file. I'm assuming that would be the sign texture file. Where does that code go / what's all that about? I have not yet encountered that stuff yet.If you checked those files I posted, into the materials folder there are 2 files:
- my_testchamber_sign.VTF: this is the custom texture itself, the image; and this is the format the game uses.
- my_testchamber_sign.VMT: this is the material file, that code you mentioned is inside this file... it is required for the game to interpret the previous image, what shader to use to render the image, the path where that image is located, if it's portalable or paintable, and other bunch of parameters and/or material proxies...
This is the "code" inside my_testchamber_sign.VMT:
- Code: Select all
"LightmappedGeneric"
{
"$basetexture" "twp/my_testchamber_sign"
"$surfaceprop" "glass"
"$selfillum" 1
"%keywords" "portal2"
}- "LightmappedGeneric" is the shader we want the game to use to render this texture (it's the most common for all textures, like walls, floors, ceilings, etc.)
- "$basetexture" As you can see, it says the "image" (the .VTF) is located into /twp folder... if you want to move the image from that folder or you need to make a material file for your custom texture you should edit the line $basetexture to make it point to the correct path, understand?
- "$surfaceprop" is the type of material this surface will be: wooden, glass, metal ,etc.
- "$selfillum" is to make the image to use the alpha channel to spot the image and make it self-illuminated. A value of "1" is to activate the self-illumination and "0" to deactivate it.
- "%keywords": this allows you to find it easily into your texture browser.
RomulanPaladin wrote:Buttons can change the texture of indicator lights. Is there anyway I can make a trigger or somesuch that changes the texture on the PTI entrance sign to a custom one?This change of texture is possible due to a material proxy called "ToggleTexture", and it only changes the frames inside a texture file (.VTF) that you have previously stored in (this is one of the features that the VTF format has).
For example, this is the "code" inside the indicator_lights you see in the game changing from blue to orange when you activate something:
- Code: Select all
UnlitGeneric
{
$baseTexture "signage/indicator_lights/indicator_lights_floor"
$surfaceprop glass
$translucent 1
"%keywords" portal
$decal 1Proxies
{
ToggleTexture
{
toggleTextureVar $baseTexture
toggleTextureFrameNumVar $frame
toggleTextureShouldWrap 0
}
}
}That part from the word "Proxies" to the bottom is what makes possible that you can change the frames in game with the env_texturetoggle entity.
All in all, believe me, the best way is that tuto, look into those files I posted, open the example map in your hammer editor and take the information from there
If you checked those files I posted, into the materials folder there are 2 files:
- my_testchamber_sign.VTF: this is the custom texture itself, the image; and this is the format the game uses.
- my_testchamber_sign.VMT: this is the material file, that code you mentioned is inside this file... it is required for the game to interpret the previous image, what shader to use to render the image, the path where that image is located, if it's portalable or paintable, and other bunch of parameters and/or material proxies...
This is the "code" inside my_testchamber_sign.VMT:
- Code: Select all
"LightmappedGeneric"
{
"$basetexture" "twp/my_testchamber_sign"
"$surfaceprop" "glass"
"$selfillum" 1
"%keywords" "portal2"
}
- "LightmappedGeneric" is the shader we want the game to use to render this texture (it's the most common for all textures, like walls, floors, ceilings, etc.)
- "$basetexture" As you can see, it says the "image" (the .VTF) is located into /twp folder... if you want to move the image from that folder or you need to make a material file for your custom texture you should edit the line $basetexture to make it point to the correct path, understand?
- "$surfaceprop" is the type of material this surface will be: wooden, glass, metal ,etc.
- "$selfillum" is to make the image to use the alpha channel to spot the image and make it self-illuminated. A value of "1" is to activate the self-illumination and "0" to deactivate it.
- "%keywords": this allows you to find it easily into your texture browser.
This change of texture is possible due to a material proxy called "ToggleTexture", and it only changes the frames inside a texture file (.VTF) that you have previously stored in (this is one of the features that the VTF format has).
For example, this is the "code" inside the indicator_lights you see in the game changing from blue to orange when you activate something:
- Code: Select all
UnlitGeneric
{
$baseTexture "signage/indicator_lights/indicator_lights_floor"
$surfaceprop glass
$translucent 1
"%keywords" portal
$decal 1Proxies
{
ToggleTexture
{
toggleTextureVar $baseTexture
toggleTextureFrameNumVar $frame
toggleTextureShouldWrap 0
}
}
}
That part from the word "Proxies" to the bottom is what makes possible that you can change the frames in game with the env_texturetoggle entity.
All in all, believe me, the best way is that tuto, look into those files I posted, open the example map in your hammer editor and take the information from there
Quote from RomulanPaladin on August 4, 2013, 9:17 amjosepezdj wrote:All in all, believe me, the best way is that tuto, look into those files I posted, open the example map in your hammer editor and take the information from thereVery well. I acquiesce to your wisdom.
Next question:
Can I make a custom sign that reads which texture it should use from a text file or vscript? Not sp_lightboard_icons.txt, of course, but my own custom file.
I'm thinking that I may want to make some kind of custom entrance way instance that I can use in each map where the sign would decide which texture to use based on the map name.

Very well. I acquiesce to your wisdom.
Next question:
Can I make a custom sign that reads which texture it should use from a text file or vscript? Not sp_lightboard_icons.txt, of course, but my own custom file.
I'm thinking that I may want to make some kind of custom entrance way instance that I can use in each map where the sign would decide which texture to use based on the map name.

Quote from josepezdj on August 4, 2013, 10:07 amYou could make a texture with several frames, that is, as many textures as number of maps you make, and change the frame for each map using an env_texturetoggle, but in the end that would be like making all those different textures and place each one into each map
You would need the format of a mod to do what you say (what VALVe does) because remember that you can't pack certain files into the .BSP so they take any effect. If you distribute your mappack as a mod you could add your own sp_lightboard_icons.txt... I don't think there's another way... because making an information panel from scratch is complex and it will require distributing the custom stuff anyway... check this information to know how these panels work.
You could make a texture with several frames, that is, as many textures as number of maps you make, and change the frame for each map using an env_texturetoggle, but in the end that would be like making all those different textures and place each one into each map
You would need the format of a mod to do what you say (what VALVe does) because remember that you can't pack certain files into the .BSP so they take any effect. If you distribute your mappack as a mod you could add your own sp_lightboard_icons.txt... I don't think there's another way... because making an information panel from scratch is complex and it will require distributing the custom stuff anyway... check this information to know how these panels work.
Quote from RomulanPaladin on August 4, 2013, 11:41 amFYI, I've been greedily devouring all this good info that's been thrown at me. I appreciate it. I'm thinking that my info panel education is nearing completion.
Could I feasibly do this:
Make an entrance way with all the bells and whistles for an info screen (triggers, lights, logic relays, etc.) EXCEPT the actual panel object with the custom texture.
Save the entrance way.
Add the entrance way as an instance to any / all of my maps.
Then, in each map, add a panel with a custom texture in the appropriate spot on the wall in the entrance way.
Give the new panel the correct name to be targeted by the entrance-way-triggers and whatnot.
Pak the entrance-way-instance with my maps along with the custom texture stuff etc.
Expect it to actually work?
FYI, I've been greedily devouring all this good info that's been thrown at me. I appreciate it. I'm thinking that my info panel education is nearing completion.
Could I feasibly do this:
Make an entrance way with all the bells and whistles for an info screen (triggers, lights, logic relays, etc.) EXCEPT the actual panel object with the custom texture.
Save the entrance way.
Add the entrance way as an instance to any / all of my maps.
Then, in each map, add a panel with a custom texture in the appropriate spot on the wall in the entrance way.
Give the new panel the correct name to be targeted by the entrance-way-triggers and whatnot.
Pak the entrance-way-instance with my maps along with the custom texture stuff etc.
Expect it to actually work?

Quote from Gemarakup on August 4, 2013, 12:34 pmFor this you should probably reserve hammer maps made from scratch instead of the neurological digging.
For this you should probably reserve hammer maps made from scratch instead of the neurological digging.
Quote from RomulanPaladin on August 4, 2013, 1:04 pmyishbarr wrote:For this you should probably reserve hammer maps made from scratch instead of the neurological digging.If I used Hammer exclusively, I totally would. However, I really like PTI for making the map and Hammer for cleaning it up.
So, I'd like to export my map from PTI but I don't want to make all 50 of the entrance way elements each time. If I could just make it once and then reuse that, it would be great.
I actually have some time now so I'll see if I can make that work...

If I used Hammer exclusively, I totally would. However, I really like PTI for making the map and Hammer for cleaning it up.
So, I'd like to export my map from PTI but I don't want to make all 50 of the entrance way elements each time. If I could just make it once and then reuse that, it would be great.
I actually have some time now so I'll see if I can make that work...