Custom sp_lightboard_icons.txt in a map

Avatar
FourthReaper
356 Posts
Posted Mar 03, 2012
I've searched in vain for a way to overwrite a text file in the bsp of a map.

You see, I've looked into making my own testchamber signs today, and have no problem with editing sp_lightboard_icons.txt to the desired outcome. But ofcourse only I would see my edited text file, so I want to add it into my bsp. Problem is, I don't know how to add a txt into the bsp with Pakrat as I would do with textures and models. As in, I could add the file but it will have the same name as the original text file, and I'm pretty sure people won't like it if I ask to overwrite their Portal 2 files...

So how does one change which txt to use instead of sp_lightboard_icons.txt?

I hope I've succeeded in conveying the problem well enough, sorry if this is unclear. Any help is appreciated.
Also, I've looked for this long enough, also on TWP, but I just can't find the same issue. Seems most people would just rather make a VPK...

Advertisement
Registered users don’t see ads! Register now!
Avatar
spongylover123
944 Posts
Posted Mar 04, 2012
Replied 9 hours later
What are you asking?
How to not overidde the original sp_lightboard_icons?

If it is,
1)Try using the (#include "scriptname") string
If that doesn't work.
2)Try to copy everything from the original txt into your txt and add you map in it.
If that doesn't work,
3)Try changing the name by adding a prefix and test it.

Avatar
ChickenMobile
2,460 Posts
Posted Mar 04, 2012
Replied 34 minutes later
All custom content is added through the bsp starting at the portal 2/portal2 directory and the sp_lightboard_icons are located in: portal 2\portal2\scripts\vscripts\transitions. So you will need to add the file with the path relative to scripts\vscripts\transitions.

(pakrat)

Avatar
FourthReaper
356 Posts
Posted Mar 04, 2012
Replied 5 hours later
Thanks for your responses, both of you. However:

spongylover123 wrote:
1)Try using the (#include "scriptname") string
2)Try to copy everything from the original txt into your txt and add you map in it.

chickenmobile wrote:
All custom content is added through the bsp starting at the portal 2/portal2 directory and the sp_lightboard_icons are located in: portal 2\portal2\scripts\vscripts\transitions. So you will need to add the file with the path relative to scripts\vscripts\transitions. (pakrat)

I know where the script are located and I can edit them without screwing thing up for myself. I can also add them (through Pakrat, yes), but if I add in sp_lightboard_icons.txt it won't use anything new, it'll use whatever file players have in vscripts\transitions with that name on their computer (I've tried adding it and then changing the name). I need a file with another name, for instance sp_lightboard_icons_fr.txt or something like that. But then how do I make the game use that text file instead (and just in this bsp)?

spongylover123 wrote:
3)Try changing the name by adding a prefix and test it.

I don't quite get what you mean here. How do I add a prefix to the script (without affecting if it's used)?

I'm thinking I need to use a function to set wich text file to replace with what. I just don't know if that's possible. I've looked at the list of functions on the VDC, without result. I'm no good at programming, really...

Avatar
spongylover123
944 Posts
Posted Mar 04, 2012
Replied 7 hours later
you could always make a pak01_dir.vpk in a portal2_dlc4 folder.
Avatar
FourthReaper
356 Posts
Posted Mar 04, 2012
Replied 2 hours later

spongylover123 wrote:
you could always make a pak01_dir.vpk in a portal2_dlc4 folder.

Hmmm, I don't really like vpk's. Gets rid of all the simplicity of a simple bsp... If there's really no other way then I think I'll pass on the whole thing...
Thanks anyway. I'll just go :notwant: ...

Avatar
Bayleaf
19 Posts
Posted Mar 04, 2012
Replied 25 minutes later
There's some lightboard sign generators out there, you could try using that.
Avatar
CamBen
973 Posts
Posted Mar 04, 2012
Replied 1 hour later
I always edit the pak01_dir.vpk in the "updates" folder
Avatar
FourthReaper
356 Posts
Posted Mar 07, 2012
Replied 2 days later

Bayleaf wrote:
There's some lightboard sign generators out there, you could try using that.

I guess I can, indeed.

CamBen wrote:
I always edit the pak01_dir.vpk in the "updates" folder

Eeh, that is in a vpk though, right? I prefer not to use those... Simplicity to the users and all that...

Avatar
HMW
806 Posts
Posted Mar 10, 2012
Replied 2 days later
Packing a sp_lightboard_icons.txt into your bsp file won't work, unfortunately. It is processed before any maps are loaded, so your modifications won't be seen by the game.

Does anyone know where the actual coding for the lightboard is? (I.e. the code that reads the data in sp_lightboard_icons.txt and assembles the sign layout.) If it's in a .nut script, then there might be some hacking opportunities there, but if it's hardcoded into the game, then I'm afraid we're fucked.
(Short of messing with the VPK files, but I'm also not a big fan of that.)

Avatar
ChickenMobile
2,460 Posts
Posted Mar 10, 2012
Replied 52 minutes later
@HMW I've had an epic look at this and unfortunately I believe it is hard-coded into the game. Same with the multiplayer coop lightboard.

Valve had to make it a little more complicated with this vpk set-up didn't they? In HL2 you could just add any custom material and it would override the original.

Avatar
FourthReaper
356 Posts
Posted Mar 10, 2012
Replied 44 minutes later

chickenmobile wrote:
Valve had to make it a little more complicated with this vpk set-up didn't they? In HL2 you could just add any custom material and it would override the original.

Yeah, those were the good old days. (Not that I tried anything like this back then, but still...)
Ahh, it's a grimm day for science, indeed. :cry:

Avatar
Lpfreaky90
2,842 Posts
Posted Mar 10, 2012
Replied 31 minutes later
Just a quick thought: what about changing the instance for lighboard;
Go to the vgui_screen in the bottom left and change Panel Name to something like sp_progress_sign_fr then go to scripts/vscripts/transitions, copy sp_progress_sign and rename it to sp_progress_sign_fr and add your custom levels? That way you don't overwrite a custom script because you are referig to a new one :smile:

Don't know if it works, haven't tried it yet and I cannot test it atm, but it's worth a shot! :smile:
~Lp

Avatar
ChickenMobile
2,460 Posts
Posted Mar 10, 2012
Replied 12 hours later

lpfreaky90 wrote:
Just a quick thought: what about changing the instance for lighboard;
Go to the vgui_screen in the bottom left and change Panel Name to something like sp_progress_sign_fr then go to scripts/vscripts/transitions, copy sp_progress_sign and rename it to sp_progress_sign_fr and add your custom levels? That way you don't overwrite a custom script because you are referig to a new one :smile:

Don't know if it works, haven't tried it yet and I cannot test it atm, but it's worth a shot! :smile:
~Lp

Hrmm... interesting. But will it actually change the (text/number) values in the vgui?

EDIT: I can't get anything to happen at all, the fact that code is a major factor to display vgui's is important (not just a .res file which sets the layout for the vgui). See: https://developer.valvesoftware.com/wik ... ng_a_panel

Avatar
Lpfreaky90
2,842 Posts
Posted Mar 11, 2012
Replied 7 hours later

chickenmobile wrote:
Hrmm... interesting. But will it actually change the (text/number) values in the vgui?

EDIT: I can't get anything to happen at all, the fact that code is a major factor to display vgui's is important (not just a .res file which sets the layout for the vgui). See: https://developer.valvesoftware.com/wik ... ng_a_panel

It was just a simple idea, which turned out not to work, because again the file was a .txt again.
So yea, maybe just copying the .res file and changing a name could work but I'm not sure.
Other idea, try to get the VGUI2 code (possibly from portal 1 if it's easier) and create a custom one. But to be honest I think that is getting a bit hard :lol:

Avatar
josepezdj
2,386 Posts
Posted Mar 13, 2012
Replied 2 days later
@Fourthreaper:

The easiest way by far without messing around so much with scripting and changing much stuff is to use Omnicoder's chamber sign maker tool (http://forums.thinking.withportals.com/downloads.php?view=detail&df_id=514), embed the texture files into the bsp as you already do with your custom stuff, and make a completely custom sign panel as shown here:

qUb6fN_Bh64

Taken from this thread: http://forums.thinking.withportals.com/mapping-help/custom-chamber-signs-without-scripts-t3663.html

I've made one myself for my mappack and looks awesome. I haven't use the traditional chamber panel look, but a custom one though.

Avatar
FourthReaper
356 Posts
Posted Mar 13, 2012
Replied 6 hours later

josepezdj wrote:
Omnicoder's chamber sign maker tool

Yeah, I'll just use that. It seems so makeshift that I hoped for a better solution, but I guess this is the best way. Thanks a bunch! :wink:

Also, once again I've not been that active online for a couple days, but I'll work on this...

Avatar
ChickenMobile
2,460 Posts
Posted Mar 14, 2012
Replied 9 hours later

josepezdj wrote:
@Fourthreaper:

The easiest way by far without messing around so much with scripting and changing much stuff is to make a mod so you can change and add any files you want.

Fixed that for you.

Avatar
iWork925
1,080 Posts
Posted Mar 14, 2012
Replied 3 minutes later

chickenmobile wrote:
josepezdj wrote:

@Fourthreaper:

The easiest way by far without messing around so much with scripting and changing much stuff is to make a mod so you can change and add any files you want.

Fixed that for you.

Make a whole mod for a single map release. Are you crazy?

Advertisement
Registered users don’t see ads! Register now!
Avatar
FourthReaper
356 Posts
Posted Mar 14, 2012
Replied 8 hours later

chickenmobile wrote:
make a mod so you can change and add any files you want

Not eh,... not really my ambition to make a mod for such a such few maps as I have now. Might make one someday, and yes, that would be easier, but yeah... Not gonna' do that for now.

iWork925 wrote:
Make a whole mod for a single map release. Are you crazy?

Apparently so. :confused:

I've decided to go with josepezdj here, using Omnicoder's chamber sign maker tool.