[WIP] Hexen II Mapping Mini Tutorials

Discussion related to Hexen II mapping. If you are currently working on a new map this is the perfect place to share your progress.
Post Reply
Shanjaq
Posts: 34
Joined: Wed Feb 27, 2019 11:03 am

[WIP] Hexen II Mapping Mini Tutorials

Post by Shanjaq »

This thread is to document the bits of mapping that are unique to Hexen II.

Mapping Resources

Entity Definitions FGD (TrenchBroom) by @Razumen
https://hexenworld.org/downloads/hexen2 ... n2_fgd.zip

Texture Wad
https://hexenworld.org/downloads/wads/hex2full.zip



Tutorial 1: Basic Puzzles

Puzzle Pieces are detected by trigger_multiple/trigger_once or directly by func_door brush entities. Here we'll create a door that opens when the player crosses a trigger_once brush with the Air Element, and removes it from inventory.
  • Spawn a puzzle piece into the map with these fields set:
    classname: puzzle_piece
    puzzle_id: air
    netname: Air Element
  • Next create a Door with these fields set:
    classname: func_door
    spawnflags: 8 (Toggle)
    targetname: puzzled_door
    if the func_door has a targetname set, it will not open from players touching it.
  • Now create a Trigger brush with these fields set:
    classname: trigger_once
    puzzle_piece_1: air
    no_puzzle_msg: 334 (line 334 from strings.txt: "You need the Element of Air")
    target: puzzled_door
    spawnflags: 16 (removes puzzle pieces when triggered)
    Though TrenchBroom will show the puzzle-related fields and spawnflags on trigger_multiple, trigger_once is probably the right one to use because it checks the player for all needed puzzle pieces every frame while touched, and if the player has all necessary pieces it'll trigger its target once then despawn.
  • To display the puzzle piece as used/placed by the player, create a puzzle static entity somewhere near the door and trigger with these fields set:
    classname: puzzle_static_piece
    puzzle_id: air
    targetname: puzzled_door

Now when you load up the map you will see the Air Element where you placed the puzzle_piece, and until you pick it up the trigger brush will not respond, the door staying closed. After picking up the puzzle_piece and touching the trigger_once brush, the Air Element will appear to float where you placed the puzzle_static_piece, and the door will open. It seems the puzzle_id and puzzle_piece_1 fields will load "puzzle/<filename>" without .mdl extension, and exploring the puzzle folder under the .pak files will show all available puzzle pieces. You can assign up to puzzle_piece_8 to combine multiple puzzle pieces into the check corresponding with the player's maximum puzzle piece inventory slots, though there can be more than 8 puzzle definitions in the game since they are keyed off the model/icon name.




Tutorial 2: Fence Textures

Fence Textures allow you to create holey surfaces in brushes enabling decorations like moss/vines, gratings and banners. Due to the released Hexen II Palette having the exact same color values [252, 252, 252] for both indices 31 and 255, Wally will get confused and save your images with the lowest index to the color which will not display correctly in-game. To use the transparency color in Hexen II, load up "uhexen2\utils\texutils\palette\palette.lmp" from the uHexen Repo in a texture editor like Wally (View->Options, "Use this palette" for Quake 1 / Default in the "Palettes" tab before opening the wad then Colors->Load Palette menu after opening one of the textures for editing if necessary) and ensure the transparent areas have color index 255, then save it to your custom map texture wad with a filename starting in "{", e.g.: "{mtex436".

Place a func_illusionary in the map with this texture and it should have transparency in-game and in map editors that support it like TrenchBroom.

Fence Textures are covered in the last part of this tutorial from @dumptruck_ds:
Last edited by Shanjaq on Sat Nov 16, 2019 6:58 am, edited 1 time in total.
Post Reply