Puzzle Creator Tech Info, Hacks, and Laughs

Avatar
msleeper
4,095 Posts
Member
Posted May 10, 2012
Replied 3 minutes later

SpAM_CAN wrote:
Hang on a second folks... the maps are still built in VBSP, VVIS and VRAD, right? Well how does it compile them on Mac systems...? Have they ported the compilers or just been lazy and used some kind of WINE wrapper?

I don't think the compile tools were ever an issue, it's the Hammer GUI editor itself that has Windows dependencies.

Advertisement
Registered users don't see ads! Register now!
Avatar
Mr. Happy
61 Posts
Posted May 10, 2012
Replied 2 hours later
Please please please post anything you find. Would love for some cool custom

Szieve wrote:
Seems as if the devtest.p2c file is the basic building block of the pti base map...

I thought the same thing, although for me editing the file had no effect, unless I just did something stupid like save it under a new name.

spongylover123 wrote:
HMW wrote:

Looks like it's not that hard to change the puzzle maker to include custom testing elements!
Check out this file:
steamapps\common\portal 2\portal2_dlc2\scripts\editoritems.txt

It's a keyvalues-formatted file that defines the behaviour of all of the stuff you can add in the editor. Model name, positioning rules, location on the parts list, names of instances to insert into the VMF, it's all there.

The only thing you can't do (as far as I can tell) is add more rows or columns to the parts list. But that's no huge deal, as you can free up 10 slots by removing redundant entries[...]

I've only just started messing with this file so I don't fully understand it yet, but it looks very promising!

Yes, but all the elements are hard coded into the client's base, so I don't know how you'll be able to edit the panel without some form of adjustment to the code.

The elements are hard coded eh? What does the "hard coding" do that this file doesn't? I'm gonna try some edits too tonight.

When I was looking through I noticed alot of information about how the items attach to voxels. That might be difficult to figure out how to use with custom instances. Hopefully we can get stuff in there. I'll document this structure soon, one interesting thing is that it lists the .3ds files as the in-editor models...there is also a props_map_editor folder in the vpk's with traditional .mdl files.

Avatar
Nacimota
345 Posts
Posted May 10, 2012
Replied 1 hour later

msleeper wrote:
SpAM_CAN wrote:

Hang on a second folks... the maps are still built in VBSP, VVIS and VRAD, right? Well how does it compile them on Mac systems...? Have they ported the compilers or just been lazy and used some kind of WINE wrapper?

I don't think the compile tools were ever an issue, it's the Hammer GUI editor itself that has Windows dependencies.

Pretty much this. The compile tools are just command-line applications that don't - to the best of my knowledge - really leverage any significant Windows-specific resources. Hammer itself is written using MFC, which is essentially a C++ wrapper over the Windows API (essentially, it is a precursor to the .Net Framework); I think it has some other Windows specific dependancies outside of MFC as well, but I haven't really investigated.

Avatar
Szieve
158 Posts
Posted May 10, 2012
Replied 1 minutes later

HMW wrote:
Looks like it's not that hard to change the puzzle maker to include custom testing elements!
Check out this file:
steamapps\common\portal 2\portal2_dlc2\scripts\editoritems.txt

It's a keyvalues-formatted file that defines the behaviour of all of the stuff you can add in the editor. Model name, positioning rules, location on the parts list, names of instances to insert into the VMF, it's all there.

The only thing you can't do (as far as I can tell) is add more rows or columns to the parts list. But that's no huge deal, as you can free up 10 slots by removing redundant entries for the different buttons, cubes, fizzlers and gels. (And some things wouldn't even need their own slot. LP's death-fizzler, for example, could just be an extra option on the normal fizzler.)

I've only just started messing with this file so I don't fully understand it yet, but it looks very promising!

YOU ROCK!!!

Avatar
Hari
4 Posts
Posted May 10, 2012
Replied 57 minutes later
I created a map with the puzzle creator then decompiled it and opened it in hammer. While yes, the textures and objects can be edited to some degree, don't even consider it possible to work with the triggers or I/O operations as every operation is run through several logic gates and proxies and its just overall a real shitstorm that nobody in their right mind would want to try and deal with. Its no wonder puzzle creator maps perform so poorly. There are so many textures being rendered that are unused by the maps and so many triggers and proxies that literally use the most roundabout way possible to perform even the most simple operations. In conjunction with hammer, the puzzle creator can be useful for prototyping ideas and maybe just setting up the general textural layout, but even with that theres more crap to clean out than really makes it worth it....
Avatar
msleeper
4,095 Posts
Member
Posted May 10, 2012
Replied 15 minutes later
... Why would you decompile it? The puzzle creator gives you a raw VMF to work with.
Avatar
Shane
243 Posts
Posted May 10, 2012
Replied 1 minutes later
Has anyone encountered a way to overcome the limit on the number of items you can place in a level yet? Lighting bigger and more complex levels is a pain in the butt with the limit they have placed on the number of items
Avatar
Hari
4 Posts
Posted May 10, 2012
Replied 12 minutes later

msleeper wrote:
... Why would you decompile it? The puzzle creator gives you a raw VMF to work with.

because I'm kind of an idiot xD

Avatar
Aus_Karlos
2 Posts
Posted May 12, 2012
Replied 1 day later
So my puzzle had a massive bug in a water hazard. It seems if you have another water hazard directly below (less than 4096 units down) the trigger_hurts merge with each other.. Nice bug to have considering the limited space you can work with.
Anyway i fixed it up in the preview.vmf in hammer. Now how would i go about inserting the edited vmf back into portal to compile?
Because if i were to override the existing preview file it will be again overriden by the p2c file portal uses to store the map in-game.
Avatar
HMW
806 Posts
Posted May 12, 2012
Replied 5 hours later
Just hit F9 in Hammer with your map open. (Same as in the puzzle creator.)
It will show a small window where you can set some options for compiling. Enable the "HDR" option and leave the others at their defaults. (To keep it simple. You can mess with the other options later if you want.)
Then click "OK" to compile and run your map.

On an entirely unrelated note: I've spent some time with the editoritems.txt file and found out a lot more about it.

Edit 13 May 2012: Yesterday I typed some rather depressing bit of text here about not being able to save user-created elements in a p2c. Turns out to be not true. Further info forthcoming.

Avatar
MrLate
159 Posts
Posted May 12, 2012
Replied 2 minutes later
You should go to advanced mode and pick Final mode for the best lighting effects.
Avatar
Aus_Karlos
2 Posts
Posted May 12, 2012
Replied 6 hours later
I know how to compile a map, i want to know how i could go about re-inserting my edited preview.vmf back into portal so i can publish the map.
Avatar
UsCobra11
272 Posts
Posted May 12, 2012
Replied 39 minutes later

Aus_Karlos wrote:
I know how to compile a map, i want to know how i could go about re-inserting my edited preview.vmf back into portal so i can publish the map.

It is not possible to put it back in the new editor. Go to portal 2/bin and run p2map_publish.

Avatar
Lpfreaky90
2,842 Posts
Posted May 12, 2012
Replied 9 minutes later
Actually you can't move a hammer map back to the easy map maker.
If you export it you need to use portal 2/bin/p2map_publish.exe
Avatar
lesderid
1 Posts
Posted May 13, 2012
Replied 5 hours later

Mr. Happy wrote:
..../puzzles/ : contains a single devtest.p2c file. I haven't figured out how to open this yet.

It's a test map used by Valve to test the PeTI. It has pretty much all the objects: droppers, paint, a turret, deadly goo, ...

Just place the p2c file in steamapps/common/portal2/puzzles/SteamID/ and you should be able to open it from the PeTI editor. It appears in the list as a testing chamber without a name.

Avatar
HMW
806 Posts
Posted May 14, 2012
Replied 1 day later
I just saw this in another thread:

Bluntman wrote:
1.Open your map in the puzzle maker.
2.Open the console and type the following:
puzzlemaker_export name (obviously you can enter any other name)
3.The resulting .vmf file will be saved in:
steam/steamapps/common/portal 2/sdk_content\maps
Then just open the .vmf file in the Authoring Tools and feel free to edit it.
Hope this helped.

Very useful to export a vmf without having to do a complete compile!
Anyone else been hunting for new console commands yet?

Avatar
Blaizer
45 Posts
Posted May 17, 2012
Replied 2 days later

HMW wrote:
I just saw this in another thread:

Bluntman wrote:

1.Open your map in the puzzle maker.
2.Open the console and type the following:
puzzlemaker_export name (obviously you can enter any other name)
3.The resulting .vmf file will be saved in:
steam/steamapps/common/portal 2/sdk_content\maps
Then just open the .vmf file in the Authoring Tools and feel free to edit it.
Hope this helped.

Very useful to export a vmf without having to do a complete compile!
Anyone else been hunting for new console commands yet?

Another way to do it is to publish your Puzzle Maker map (you'll probably want to do it as hidden). After that you'll have a file in your portal 2\sdk_content\maps folder called something like 1336560975.vmf. Open up a copy of it in Hammer and you're good to go. These two different methods of exporting the map don't give the same output... I'm not sure which is better...

Avatar
HMW
806 Posts
Posted May 17, 2012
Replied 12 hours later
The main difference is that the elevator and entrance airlock instances have a variable "$no_player_start" set to 1 (when published) or 0 (when exported with F9 or puzzlemaker_export).
This controls the playtest vs. release behaviour. When it's set to 0, you start at the door instead of in the elevator, and the map will loop back to the beginning when you complete it.

The other changes you see is just because it selects different templates for the entry and exit airlocks each time you export the map.

Avatar
kariko
32 Posts
Posted May 19, 2012
Replied 2 days later

With all of this information plus this link:

http://forums.steampowered.com/forums/s ... ?t=2706176

We can add new instances to the Editor! If you follow that tutorial, you can basically make it so that cameras are in the PTI Editor, replacing frankencubes. We have enough slots for four new instances (replacing companion cube, sphere, franken, and relfective). Can you modders/mappers toy with this? Also, a quick note: If you screw up the editoritems.txt, just verify cache and it'll fix itself.

Advertisement
Registered users don't see ads! Register now!
Avatar
FelixGriffin
2,680 Posts
Posted May 19, 2012
Replied 2 hours later
Nice tutorial! I'll have to start playing with that...