Custom skin and Wheatley looking at player help
First off, how do I change the skin of Wheatley so I can use another core eye for a mod pack? If I do re-skin him,
how will I make others be able to play my mod pack with the least effort of downloading textures? I've already created the two files (one the text and one the image) for the skin.
Second, how do I make the core turn to face the player on its management rail, like in the intro to the game. I'm using three prop_dynamics (the core, the attacher, and the stick that fits in the rail.)
Any help is appreciated.
-
In order to make ppl watch your custom skins you should pack the 2 files for your texture into the .BSP before publishing the map. I don't know how you customize your model, if hexing it or decompiling-recompiling, but you should surely pack the model too.
In order to do so, you need pakrat. there are MANY topics here about this little app, use the Search feature (locate the button on the middle top of this page). However if you encounter problems with it, just post them and we'll help you out. -
To achieve the core facing to the player, you can parent your prop_dynamic core to a brush entity called func_tank (then parent the func_tank to your other prop_dynamics that follow the rail...), then fire an output via a logic_auto like so:
- OnMapSpawn > [func_tank name] > SetTargetEntity > !player
Good luck!
The easiest way to fix that would be to hex the model. This is a little more complex, but if you're sure you want to do it I can give you instructions.
FelixGriffin wrote:
Josepezdj is almost right on, but be careful paking the skin: it won't show up if it replaces an existing texture. It's a "feature" in games using the VPK system.
Well, as I mentioned, I'm asumming either a hexing or a decompile-recompile, to make the model point to custom folders and textures... that is why you normally use of one these methods 
Also, with the skin, i'm not that good at doing stuff like that. Pretty much, I'm going to make a mod pack not on the workshop but as a whole separate game. Kind of like what you see on modDB, with the own main menus and maps and stuff. Anyways, just thought you should know that. I don't know what you mean by pack the files into the .bsp. I know what the files are, and I know what the .bsp is, but I don't know what you mean by pack them in. I don't even know how to install them. :/
Anyways, thank you so much for the quick replies. This website is really helpful.
!player
To pack a texture into a map with packrat, all you really need to do is open the .bsp in pakrat, click the add button, and add the .vtf, and the .vmf that you created for the custom texture.
I hope this helps. If anything is unclear, I can try to clearify for you. If you already tried what I'm suggesting, then I doubt I can be the one to help you.
Anyways, I'm attaching a working example, please take a look.
Thank you so much! Wheatley follows the player's movements perfectly! You're a really big help.
Now that that works, I still ca't figure out custom skins. I have the .vmt and the .vtf created, and they're names are personality_sphere_skin01.vmt and personality_sphere_skin01.vtf
Here is what's in the .vmt file:
VertexlitGeneric
{
$basetexture "models\npcs\personality_sphere\personality_sphere_skin01"
"!gameconsole?$phong" 1
"!gameconsole?$phongboost" 1
"!gameconsole?$halflambert" 0
"!gameconsole?$phongDisableHalfLambert" 1
"!gameconsole?$phongexponent" 12
"!gameconsole?$phongfresnelranges" "[.6 1 2]"
"!gameconsole?$basemapalphaphongmask" 1
"!gameconsole?$rimlightexponent" "0.2"
"!gameconsole?$rimlightboost" 3
"!gameconsole?$phongalbedotint" 1
}
Regarding the custom skins, well, if you are developing a mod, and you know what you're doing, you'll know that you only need to put your custom textures inside your custom pak01_dir.vpk file... do you know that?
- You need to make a folder somewhere in your computer called pak01_dir and inside that one, create the folder /materials... and there, your model's textures folders tree as you see them into the .VMT file:
models\npcs\personality_sphere
-
Now put inside the 2 custom files, personality_sphere_skin01.VMT and personality_sphere_skin01.VTF
-
You need to make the folder pak01_dir a "packed" .VPK file. For this, you need to click on this folder and to drag it on top of the program vpk.exe that you have inside the folder "portal 2/bin":
Right in the moment you drop your folder pak01_dir on top of that executable file, a .VPK file called pak01_dir.VPK will be created (and you'll find it in the same directory where you had your folder pak01_dir)
Anyways, thanks for the great help.
It worked much better for me.
@Arachnaphob: OK, first off. I think there's a misunderstanding here about concepts
When you said "mod pack" I eventually thought you were making an actual mod, with the mod format and so on. Let me explain:
-
Mods are located in separate folders than your game, meaning that you won't ever replace any of the game files, ok? There is a folder called sourcemods, and in there, you can create a new folder with your mod's name and put your mod files in. But this is not a simple task, there is a whole process behind and you still need some important files from the original game, ok? (like the pak01_dir.VPK file we talked about before) This is the guide you can follow up to make your own mod (even though it warns you that it's no longer valid since the DLCs release, it only needs some extra tweaks to work, but it works... just let me know that this is what you want to make and I'll help you with it). But I don't think you need this!
-
If you are not interested in developing a whole mod, but only in having some custom models and textures, this is much easier to achieve, and you don't need to distribute any "mod pack" for ppl to be able to see your custom stuff apart from your .BSP map file itself, becasue all of that can be pack into the .BSP as I already told you. the way to go about that is this:
-
First you need "a copy" of the model you want to use, but one that loads your custom textures. This can be made by at least 2 ways, and the simplest one is hexing* the model. As Yishbarr said, there's an awesome tuto by Skotty, you can take a look to it... HOWEVER this model is a complex model, and it is composed by several other models (5 or 6 models I think), so it would be necessary to check out carefully which one to change and if changing only that one will be enough
I can see there is one called "personality_sphere_skins.MDL"*, and looking into it with a hex editor I think this is the one that take the skin files, so maybe just hexing this one would be enough... but maybe not! maybe you'll nee to hex all of those 5-6 models. Check out:
I'll need to check that out later at home.
-
OK, imagining we have all the above sorted out already, the next step is to embed or pack ALL the custom files into your .BSP map file. 'ALL' means both, your model files and your customer textures files, ok? This can be made using pakrat, and as I told you there are many threads about it already here, use the Search feature of these forums (check on top of this page). Here you have a quick tuto for your reference.
-
Once you finish with pakrat you'll have a .BSP file of your map but with your custom content IN. You'll only need to publish this .BSP file and ppl will see your custom content

Anyways, whenever I try to load the file it gives me:
Error reading personality_sphere_skins.mdl error 2: File not found
Damnit, XV132, it is there, okay?
Anyways, since i now have a sudden feel that i'm not giving enough information, here is what i'm trying to do.
For my custom story, there is a character named Thompson that you meet part way in. Because he is a separate core from Wheatley or the other 3 corrupted cores, he has a different eye. Originally, I thought that I could just replace the eye texture in pak01_dir, and that would work. But now I can easily see it is much more complex. Back to current time, in that tutorial on the model, I didn't see any reference or path to personality_sphere_skin01. I dodn't read much I Spy books either, so maybe that's the problem. In the file, it says a bunch about the personality_sphere_lights models, and maybe those are the ones I want. Anyways, my brain is imploding right about now, and again thank you for being really helpful.
sorry! You call a "modpack" what I think I simply described as a mod, meaning what you put into the sourcemods folder, right? I understand that you prefer not to do this.
Now you mention a "pack version so people don't have to subscribe to a bunch of maps"... hmmm... do you mean that you want to make a big map instead of several ones? if this is it, good, because this way you'll only have to pack your custom stuff into 1 single .BSP.
Regarding that error on loading the model, forget about that one, just pick personality_sphere.MDL instead. But this model uses the following textures, so you'll have to edit these and the easiest thing would be to keep their names too:
If this is so hard for you, let's do this: send me a pm with your custom textures; and if the map is already finished, send it to me as well, just the .BSP file is fine.
I'll do the thing for you, and then I'll post a description of the process I followed step by step so you and anyone else can take a look in the case he wants to do a similar customization 
EDIT
Ok, let's see if that error you have with the model is caused by a bad hexing or any other step in the process. Let me put an example hexing the personality_sphere.MDL model with XVI32, and changin only the folder where the model searches for its texture files: from the folder models/npcs/personality_sphere/ to the new folder models/npcs/arachnaphob_sphere/ 
- First of all, you need to extract the desired model from the file pak01_dir.VPK you have into your folder portal 2/portal2. You'll need GFCScape. With this program you'll be able to see inside the .VPKs and extract (right click > Extract) whatever file. You'll need these 5 files for the model personality_sphere.MDL:
(As you can see, they are located into models/npcs/personality_sphere)
Extract them all into this previously created folder: portal 2/portal2/models/npcs/arachnaphob_sphere. And I mean an external folder in your hard drive, ok? not inside the .VPK file, but into your game folder. You must know that your game reads whatever inside the pak01_dir.VPK files and whatever into the game folders, so for models, whatever under portal 2/portal2/models/ "real" folder 
-
Now open the .MDL file using XVI32 and remember this: you can edit whatever path or name into the model file but you must remember to always keep the same number of characters than you had before, and do not edit any of the weird characters you see! In this example, as I mentioned in the point above, I'll only change 1 folder...
-
This is the top part of the file after you open it with the hex editor (I underlined the part that you can edit):
This is the path where the model is located, and the model name

NOTE: as it can be seen, it is understood here the first part of the path: portal 2/portal2/models/
- This is the bottom part of the file before the edition (again I underlined the part that you can edit):
This is the path where the textures that the model *"reads" are located and their names

NOTE: as it can be seen, it is understood here the first part of the path: portal 2/portal2/materials/*
- This is how it should look like after you edit it on TOP part:
- This is how it should look like after you edit it on BOTTOM part:
- Do not forget to 'Save' the model file (Ctrl+S) after your changes!

So now you've got a hexed model that must be located in your folder models/npcs/arachnaphob_sphere/ so that your game can load it correctly, and this hexed model will read its textures from inside the folder materials/npcs/arachnaphob_sphere/, ok?
-
Now the textures... If you take a close look to the picture above where I showed the bottom part of the model file, you'll see some clearly recognizable texture names and paths. After the hex edition, the model will look into materials/models/npcs/arachnaphob_sphere/, and these are the textures it will need:
-
personality_sphere.VMT
- personality_sphere.VTF
- personality_sphere_glass.VMT
- personality_sphere_glass.VTF
- personality_sphere_light_damaged.VMT
- personality_sphere_light_damaged.VTF
- personality_sphere_clean.VMT
- personality_sphere_clean.VTF
- personality_sphere_lights.VMT
- personality_sphere_lights.VTF
Well, those are the textures we need to extract now and those are the texture that you can edit to your wish... So we need to use again the GFCScape and extract them from the pak01_dir.VPK:
(As you can see, now we need to go to materials/models/npcs/personnality_sphere/ folder)
- Now Extract them to your physical folder previously created: materials/models/npcs/arachnaphob_sphere/. And remember to correct the paths inside the .VMT in the parameter $baseTexture from "models/npcs/personality_sphere/personality_sphere" to "models/npcs/arachnaphob_sphere/personality_sphere".
If you did everything as explained here, you should be able to have your model in the game without problems. Let me know if you did this way and if it works...
Anyways, This is a lot more complex than I thought. I also do know what a modpack is. The reason there may be some confusion is because originally I wanted a workshop and modpack version, but now I think i'll still do both but substitute the space core for the custom core in the workshop version.
So when I tried extracting the .mdl file for the first time, I saw that it referenced a file called personality_sphere_lights or something instead of the original filename I was using. Anyways, still pretty confused on how to use the hex editor program (Sorry I forgot yet another name.) I followed the tutorial exactly and still could not get it to work
Also, I feel because of the confusion that's going on, I'll provide all of the information that I think would be necessary. I am trying to create a custom eye for a core named Thompson. I don't care if it replaces my in game eye for Wheatley, I just want to get there to be a custom eye for him.
By the way, josepezdj, I looked at some of your maps and they are incredible.
...and I was wondering if you could join my friend and I in the building of our modpack. Send me a PM on the forums if you want. I would be real grateful if you joined our little crew. We both suck at making puzzles too, so it would be nice having someone who was good at it. I"ll send you a few sample maps if you want to just check it out first. Thanks for being a really great help. ![]()






