Custom Info Sign: Looking for Options

Avatar
RomulanPaladin
11 Posts
Posted Aug 03, 2013
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?

Advertisement
Registered users don’t see ads! Register now!
Avatar
Gemarakup
1,183 Posts
Posted Aug 04, 2013
Replied 3 hours later
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.
Avatar
josepezdj
2,386 Posts
Posted Aug 04, 2013
Replied 3 hours later

RomulanPaladin 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 :wink:

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 :wink: 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.

Attachments
jose_lightboard_test.7z
0.21 MB 36 downloads
Avatar
RomulanPaladin
11 Posts
Posted Aug 04, 2013
Replied 3 hours later
Good 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 linked

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.

Avatar
josepezdj
2,386 Posts
Posted Aug 04, 2013
Replied 45 minutes later

RomulanPaladin 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:

"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:

UnlitGeneric
{
$baseTexture "signage/indicator_lights/indicator_lights_floor"
$surfaceprop glass
$translucent 1
"%keywords" portal
$decal 1

Proxies
{
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 :wink:

Avatar
RomulanPaladin
11 Posts
Posted Aug 04, 2013
Replied 1 hour later

josepezdj 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 there :wink:

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.

Avatar
josepezdj
2,386 Posts
Posted Aug 04, 2013
Replied 50 minutes later
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 :biggrin:

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.

Avatar
RomulanPaladin
11 Posts
Posted Aug 04, 2013
Replied 1 hour later
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?

Avatar
Gemarakup
1,183 Posts
Posted Aug 04, 2013
Replied 52 minutes later
For this you should probably reserve hammer maps made from scratch instead of the neurological digging. :eek:
Avatar
RomulanPaladin
11 Posts
Posted Aug 04, 2013
Replied 30 minutes later

yishbarr wrote:
For this you should probably reserve hammer maps made from scratch instead of the neurological digging. :eek:

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...

Avatar
josepezdj
2,386 Posts
Posted Aug 04, 2013
Replied 31 minutes later
Of course you can have your own "common" stuffs to place them in all your maps without the need of re-creating them. Apart from copy/paste :biggrin: you can use 2 options:

  • An Instance: check out this tutorial to know the basics of creating an instance from scratch. Instances are placed into your maps by adding a func_instance entity and make it point to your stored instance.

  • A Prefab: once in hammer just select everything that for you make a working group of elements that you want to repeat in every map, then hit the button "Create Prefab" at the bottom of the right part of your hammer editor, then choose a location in your drive to save it.

About all that you described, it's ok, but let me tell you that you only need to pack the custom things, such as custom textures and materials (or models or whatever) but NOT instances or prefabs that you made with the already existing stuff, ok? because all of us already have all of those elements, therefore we will be able to see them all in game.

Avatar
Gemarakup
1,183 Posts
Posted Aug 04, 2013
Replied 18 minutes later

RomulanPaladin wrote:
yishbarr wrote:

For this you should probably reserve hammer maps made from scratch instead of the neurological digging. :eek:

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...

You should understand that it's a bad idea to export PTI maps unless you know how to optimize. (Lots of 128 brushes textured on all sides without func_detail). Making it from scratch will save you all that. You use instances or prefabs for prefabrications and make your own but that shouldn't be hard to do. Unless I misunderstood.

Advertisement
Registered users don’t see ads! Register now!
Avatar
RomulanPaladin
11 Posts
Posted Aug 04, 2013
Replied 1 hour later
Thanks guys; you've saved me untold hours of research and guesswork. If I have any problems learning about prefabs, instances, or optimization, I'll make another thread. Looks like the only thing between me and what I want to do right now is homework. :thumbup:

josepezdj wrote:
...let me tell you that you only need to pack the custom things, such as custom textures and materials (or models or whatever) but NOT instances or prefabs that you made with the already existing stuff, ok?

yishbarr wrote:
You should understand that it's a bad idea to export PTI maps unless you know how to optimize.

Good call, I'll avoid releasing unoptimized maps and paking unnecessary things. No more bad mistakes like that from here on in, I promise.
Hey, what does this "vertex tool" do...

EDIT: I've puttered with it and everything works great. I made a prefab with my entrance way complete with sign (thanks to you guys); all I have to do in each map is ungroup the prefab and edit the sign texture. It still keeps all the lovely triggers and stuff that I liked from the PTI entrance way. All I have to do now is decide what I have more patience for: optimizing a PTI map or learning how to do every little thing in Hammer.