Packing custom content into a BSP
Quote from CoolDudeClem on September 11, 2013, 8:34 pmI'll just cut straight to the chase here, I made a map in Hammer with some custom items in it. It has the Sendificator, Portal 1 doors and the High Energy Pellet. The map works absolutely perfect, so I decided to pack all the custom stuff into the BSP and upload it to the workshop, I loaded the map into packrat, pressed the auto button, it loaded the custom files and said it had added them to the pack, so I saved it and published it, but to my horror I got a comment back saying that the custom stuff was missing! The only custom thing that did work is a sound effect I made, I think packrat did NOT pack all the files that are needed, so what did I do wrong?
I tried doing the same thing with Map Analyst, but it shows TONS of files that are missing, and when I look for them, I can't find them on my hard-drive ANYWHERE, so how come that map works perfectly on my computer if there are missing files?
Of course I tried out the map on my other computer and sure enough there are missing textures everywhere, and the sendificator does not work at all.
I've also done a video witch goes into more detail on this problem (excuse my voice & my reflection in the screen), it's a little long winded as I had a lot to say, but I do show how I did it so you can see whatever it was I did wrong. So any help at all would really be appreciated.
I'll just cut straight to the chase here, I made a map in Hammer with some custom items in it. It has the Sendificator, Portal 1 doors and the High Energy Pellet. The map works absolutely perfect, so I decided to pack all the custom stuff into the BSP and upload it to the workshop, I loaded the map into packrat, pressed the auto button, it loaded the custom files and said it had added them to the pack, so I saved it and published it, but to my horror I got a comment back saying that the custom stuff was missing! The only custom thing that did work is a sound effect I made, I think packrat did NOT pack all the files that are needed, so what did I do wrong?
I tried doing the same thing with Map Analyst, but it shows TONS of files that are missing, and when I look for them, I can't find them on my hard-drive ANYWHERE, so how come that map works perfectly on my computer if there are missing files?
Of course I tried out the map on my other computer and sure enough there are missing textures everywhere, and the sendificator does not work at all.
I've also done a video witch goes into more detail on this problem (excuse my voice & my reflection in the screen), it's a little long winded as I had a lot to say, but I do show how I did it so you can see whatever it was I did wrong. So any help at all would really be appreciated.

Quote from TeamSpen210 on September 11, 2013, 8:48 pmThe auto button on Packrat doesn't catch all the files. They should be inside the portal2/, portal2_dlc1/ or portal2_dlc2/ folders. The sendificator uses a script that's stored inside the scripts/vscripts folder.
The auto button on Packrat doesn't catch all the files. They should be inside the portal2/, portal2_dlc1/ or portal2_dlc2/ folders. The sendificator uses a script that's stored inside the scripts/vscripts folder.
[spoiler]- BEE2 Addons | (BEE2)
- Hammer Addons
Maps:
- Crushed Gel
- Gel is Not Always Helpful[/spoiler]
Quote from Tmast98 on September 11, 2013, 10:15 pmHey,
So, I'm going to do my best explaining why each thing didn't work.
First off the models being white:
I'm suspicious that the materials for the models weren't paked, but the model files were. Check the portal2/materials folder and look around for any files that relate to the custom models. Pak them into the bsp (use control to select multiple at once). This should fix those white models with no textures.
As for the sendificator not working, I believe a script is used to operate it. Try checking in scripts, or vscripts. You may need to change pakrat to show all files, and not just all valid pak files. This would be located in portal2/scripts.
Lastly, for the combine ball, I'm pretty sure the material didn't get paked in either. Try looking in portal2/materials for this as well.
Hopefully this helps you out. If anything still doesn't work or is not clear to you, post right away and I'll try to help further.
Goodluck!
Hey,
So, I'm going to do my best explaining why each thing didn't work.
First off the models being white:
I'm suspicious that the materials for the models weren't paked, but the model files were. Check the portal2/materials folder and look around for any files that relate to the custom models. Pak them into the bsp (use control to select multiple at once). This should fix those white models with no textures.
As for the sendificator not working, I believe a script is used to operate it. Try checking in scripts, or vscripts. You may need to change pakrat to show all files, and not just all valid pak files. This would be located in portal2/scripts.
Lastly, for the combine ball, I'm pretty sure the material didn't get paked in either. Try looking in portal2/materials for this as well.
Hopefully this helps you out. If anything still doesn't work or is not clear to you, post right away and I'll try to help further.
Goodluck!
Quote from LuckyRJ on September 12, 2013, 12:55 amI had the same problem a few days ago, and Lpfreaky90 gave me this simple solution
1st create a folder in the steam/steamapps/common/portal 2/ File Here (name it portal2_dlc3),
Second - make a second copy of all the custom files you are using and put them into that portal2_dlc3 folder, then when pakrat doesn't find certain vmt and vtf texture files - in pakrat you can just then click add and click that portal2_dlc3 folder, it saves time adding each file manually.
So this was not really my solution Lpfreaky90 takes the credit
LuckyRJ
I had the same problem a few days ago, and Lpfreaky90 gave me this simple solution
1st create a folder in the steam/steamapps/common/portal 2/ File Here (name it portal2_dlc3),
Second - make a second copy of all the custom files you are using and put them into that portal2_dlc3 folder, then when pakrat doesn't find certain vmt and vtf texture files - in pakrat you can just then click add and click that portal2_dlc3 folder, it saves time adding each file manually.
So this was not really my solution Lpfreaky90 takes the credit
LuckyRJ
Quote from Ultiman9711 on September 12, 2013, 12:59 amTmast98 wrote:Hey,I'm suspicious that the materials for the models weren't paked
I had an issue a few weeks ago with the same thing. Turns out Pakrat didn't pak the lightwarp and exponent texture files. That caused some funky whitish models when I gave it to someone for playtesting. You'll have to hunt them down manually, unfortunately. The filenames should be just [modelname]_exponent or something along those lines.
I'm suspicious that the materials for the models weren't paked
I had an issue a few weeks ago with the same thing. Turns out Pakrat didn't pak the lightwarp and exponent texture files. That caused some funky whitish models when I gave it to someone for playtesting. You'll have to hunt them down manually, unfortunately. The filenames should be just [modelname]_exponent or something along those lines.
Quote from FelixGriffin on September 12, 2013, 8:20 amIt sounds like the ones you'd want are in materials/models/props/clean.
It sounds like the ones you'd want are in materials/models/props/clean.

Quote from josepezdj on September 12, 2013, 9:20 am@CooldudeClem: It is known that pakrat can't pack it all automatically... as said above, some files need to be packed manually. Mainly the models' textures and scripts; as Tmast98 said, those are the missing files that yourr video shows
First of all, make sure you have your pakrat properly set-up:
- File > Preferences > Game Root directory = you need to locate here your Portal 2 game directory (...portal 2portal2).
- Scan = when you hit the button 'Scan' you also need to locate your game main directory.This way you'll make sure that the custom content that pakrat automatically finds will be all the content that it can automatically pack.
Secondly, I recommend you to use the View > As a Tree (Ctrl+T) feature because it will be more clear what's in and what's not.
Also I'd recommend you to use the 'Scan' feature instead of just 'Auto', because you will see immediately what is about to be packed instead of letting pakrat just pack it automatically. After the scan, all the files that appear in a red-ish colour are the ones yet to be packed and they are marked as "In-Disk". All of them will be already selected by default to be packed in. Just hit the button 'Add Selected', and when it asks you to "Automatically fix-up the path of those files" you need to say "Yes to all".
After the automatically packed files, if you are viewing the inside of your .BSP file as a tree, you'll see that pakrat packed all models files, but if you go to "/materials", surely you won't see any "/models" folder in, meaning that you need to pack the material textures files for your models (pakrat could detect some textures if they are v7.2 or lower though, but many of Portal2's models use v7.5 texture files). For example, the sendificator model has all its textures by default into "materialsmodelshmwprops"... You'll need to pack them manually: just click on 'Add' button and locate them with the browser. If you are unsure about what textures do your models use, use a hex editor and open the .MDL file to watch inside it (scroll down to the bottom part of the window and there, you'll find the textures the model is using and the paths)
But, again as Tmast98 correctly said, the Sendificator uses a script called "sendificator.nut" (located into "portal 2portal2scriptsvscriptshmw"), so if you don't pack it it won't ever work. You also need to pack scripts manually, but for scripts, after hitting the 'Add' button, you'll need to select as file type "All files" instead of "All Valid Pak Files" that will appear by default. Then locate the script.
@CooldudeClem: It is known that pakrat can't pack it all automatically... as said above, some files need to be packed manually. Mainly the models' textures and scripts; as Tmast98 said, those are the missing files that yourr video shows
First of all, make sure you have your pakrat properly set-up:
- File > Preferences > Game Root directory = you need to locate here your Portal 2 game directory (...portal 2portal2).
- Scan = when you hit the button 'Scan' you also need to locate your game main directory.
This way you'll make sure that the custom content that pakrat automatically finds will be all the content that it can automatically pack.
Secondly, I recommend you to use the View > As a Tree (Ctrl+T) feature because it will be more clear what's in and what's not.
Also I'd recommend you to use the 'Scan' feature instead of just 'Auto', because you will see immediately what is about to be packed instead of letting pakrat just pack it automatically. After the scan, all the files that appear in a red-ish colour are the ones yet to be packed and they are marked as "In-Disk". All of them will be already selected by default to be packed in. Just hit the button 'Add Selected', and when it asks you to "Automatically fix-up the path of those files" you need to say "Yes to all".
After the automatically packed files, if you are viewing the inside of your .BSP file as a tree, you'll see that pakrat packed all models files, but if you go to "/materials", surely you won't see any "/models" folder in, meaning that you need to pack the material textures files for your models (pakrat could detect some textures if they are v7.2 or lower though, but many of Portal2's models use v7.5 texture files). For example, the sendificator model has all its textures by default into "materialsmodelshmwprops"... You'll need to pack them manually: just click on 'Add' button and locate them with the browser. If you are unsure about what textures do your models use, use a hex editor and open the .MDL file to watch inside it (scroll down to the bottom part of the window and there, you'll find the textures the model is using and the paths)
But, again as Tmast98 correctly said, the Sendificator uses a script called "sendificator.nut" (located into "portal 2portal2scriptsvscriptshmw"), so if you don't pack it it won't ever work. You also need to pack scripts manually, but for scripts, after hitting the 'Add' button, you'll need to select as file type "All files" instead of "All Valid Pak Files" that will appear by default. Then locate the script.
Quote from CoolDudeClem on September 12, 2013, 4:40 pmWell thanks everyone for your advice, but I still can't get it to work. No matter WHAT I try, every time I load the map onto my other computer, it's as if I hadn't done anything at all, all the custom stuff is STILL white. I packed EVERY file I could find that looks as if it's associated with those items, the BSP is now about 32MB instead of just 4MB, I even remembered to pack the sendificator script file, but it still won't work. When I look in pakrats's tree veiw, I can see what needs to be packed, for instance, the "combine_ball_catcher.mdl" needs a phy, sw.vtx, dx80, dx90, and a vvd file with same name, but I can't find them all, I've done a thorough search of my hard drive, I did find the vvd and the dx90 file, but as for the phy, sw.vtx, and dx80, they're just simply not there.
I'm just about ready to give up with this.
Well thanks everyone for your advice, but I still can't get it to work. No matter WHAT I try, every time I load the map onto my other computer, it's as if I hadn't done anything at all, all the custom stuff is STILL white. I packed EVERY file I could find that looks as if it's associated with those items, the BSP is now about 32MB instead of just 4MB, I even remembered to pack the sendificator script file, but it still won't work. When I look in pakrats's tree veiw, I can see what needs to be packed, for instance, the "combine_ball_catcher.mdl" needs a phy, sw.vtx, dx80, dx90, and a vvd file with same name, but I can't find them all, I've done a thorough search of my hard drive, I did find the vvd and the dx90 file, but as for the phy, sw.vtx, and dx80, they're just simply not there.
I'm just about ready to give up with this.

Quote from Gemarakup on September 12, 2013, 11:30 pmDid you update the map on steam workshop?
EDIT: No, you didn't, according to the change notes, but you need to. Of course it's not working for you, because the other computer is playing the outdated version.
Did you update the map on steam workshop?
EDIT: No, you didn't, according to the change notes, but you need to. Of course it's not working for you, because the other computer is playing the outdated version.

Quote from josepezdj on September 13, 2013, 1:28 am@CoolDudeClem: please pm me your map and the custom files you have. I've got already the energy pellet stuff and the sendificator, do not send. Let me do a test for you
@CoolDudeClem: please pm me your map and the custom files you have. I've got already the energy pellet stuff and the sendificator, do not send. Let me do a test for you