Please or Register to create posts and topics.

Adding New Cubes

Page 1 of 4Next

Hello, I'm not normally one to start off topics but here I go. I would like to know how exactly to get new cubes into the game, skin them, and whatever else is needed for it to work 100%.

For example, the cube I'm wanting to add is in all ways the exact same as the fizzless cube from the mod "Blue Portals" (I'm sure most of you have played it) I want this cube to stand out form other cubes by changing it's skin to something that resembles the very same cube from the mod.

I know I need photoshop (or some other texturing program) to edit the original cube skin, I already have that so I'd like to know what program would I need to export the cube's model from Portal 2's files and add it back in with a different model name and get the new skin to register to that model.

P.S. I'm sorry if this has already been asked before but I couldn't find a thread to it anywhere. :/

Thanks in advance for your help. :)
Sincerly,
Justin S.

"...those who would break the rules and laws are reguarded as scum, but those who would abandon even one of their friends, are worse than scum." -Obito Uchiha
Youtube Channel My Workshop
My Maps/Projects:

[spoiler]Maps:
RBC 1 RBC 2
Blue Walls
Converting Propulsion
One Week Creation
Secondary Fire
Flings Speed Patience
Ongoing Projects:
Alive & Kicking: Chamber 18 Secondary Fire[/spoiler]

currently, you need to extract the metal_box.mdl from portal2's pak01_dir.vpk from gcfscape.

Decompile them with studiocompiler.
go into metal_box.smd and change the line metal_box.tga to some other name fizzler_box.tga.
add the texture in the qc.
then compile them.
then use it in game.
probably use the portal button method.

Hey Justin!

After I read your thread, I rememberd another thread written by Skotty about some problems encountered with some decompiling programs and such, and I sticked to it because I also want to change the cubes for my mod... I think it's interesting and you should give it a look (apart from considering that good comment by spongylover):

http://forums.thinking.withportals.com/mapping-help/how-to-decompile-portal-2-models-t6068.html

(Also it's very recent... it's dated in April)

ImageImageImageImageImageuseful tools and stuff here on TWP :thumbup:
[spoiler]ImageImageImageImageImage[/spoiler]

I once tried to make newly skinned cubes for the Penrose maps...

I stopped trying (after searching for a loooong time) when I found out the only way to do this is by making the cube and button setup with models and triggers. :( Not ideal... Maybe it might work when making a mod, but this goes beyond my knowledge or finding skills. At first I had good hope, but it turned out I was looking at a Portal 1 thread back then. :cry:

I do sincerely hope you'll find some way to get this working though, I'd be back here in an instant.

ImageImageImageImageImageImage
Maps in Development:
[spoiler]- Penrose 04 (on hold)[/spoiler]

Perhaps it's a better idea to override one of the existing skins. That way you don't need to change the model in any way.
The process would be something like this:

  1. Extract one of the cube textures from the vpk files, open it in vtfedit, export the image and edit it. Make a new vtf file from the result.
  2. Find a cube texture in the vpk that you want to replace. Name your texture file (.vtf) the same, and put it in the same relative folder.
  3. Configure your cube so it uses the texture you replaced. (Ignore the fact that it does not show up yet.)
  4. Embed (PackBSP) the vtf file in your map, so it overrides the built-in one.

This is the most simple setup I can think of. The only drawback is that you don't see the texture while testing, unless you find some way to automate the packing process after each compile.

Sendificate series: Sendificate | A Beam Too Far | Airtime | 302
Other Portal 2 maps: Medusa Glare
Portal 1 maps: Try Anything Twice | Manic Mechanic
HMW wrote:
    ... 3. Configure your cube so it uses the texture you replaced. (Ignore the fact that it does not show up yet.)
    ... 4. Embed (PackBSP) the vtf file in your map, so it overrides the built-in one.

This is the most simple setup I can think of. The only drawback is that you don't see the texture while testing, unless you find some way to automate the packing process after each compile.

Wait, so you're telling me that by using pakrat (or any other packing tool) the cube will in fact be replaced, even though it doesn't show when you play the map with the files in your folders?

No foolin'? Oh my, I'll have to get back to work on that. Thank you, HMW!

ImageImageImageImageImageImage
Maps in Development:
[spoiler]- Penrose 04 (on hold)[/spoiler]

You don't need to use prop_dynamic Portal 1-style buttons if you have a custom cube model. Just make a prop_physics for the cube, put a trigger_multiple around it (parented to it), set to filter only the normal an cube button entities. OnStartTouch->!activator->Press; OnEndTouch->!activator->UnPress. Maybe change skin there too if you want.

Falsi sumus crusto!

Would it be possible to add a NEW skin for the cube model (or whatever other model)? this way it would be great to simply choose in hammer how would you like the cube to look like: we could choose "skin 4" and that one would be our custom look previously designed... Without erasing any of the existing skins...

ImageImageImageImageImageuseful tools and stuff here on TWP :thumbup:
[spoiler]ImageImageImageImageImage[/spoiler]

Unfortunately, the Portal 2 one uses hardcoded model names with indices instead of skins. Each cube's skin only holds activated/deactivated lights and paint colors.

Falsi sumus crusto!

You may do a prop_physics whith the appearance of your customised cube. Then, you have to do some little trigger scripting on buttons in order to make them fully functional.

Page 1 of 4Next