Map Creation - artvin01/TF2-Zombie-Riot GitHub Wiki

Creating the map

General guidelines to follow:

-Make sure any corridor is atleast 160 units high and 70 units wide minimum, if you can, make it 25% extra then that, this is due to giants.

-NPC clips will block npcs

-Player clips block players and red npcs

-If theres any stuckspot the plugin doesnt auto detect, please mark them with a func trigger hurt with DROWn dmg, forgivenes and 20 -> 2000 dmg

-dont make any anti npc trigger hurts, but if you do: no forgiveness, 9999999 dmg slash make sure to filter for only npcs regarding this.

-Make sure any and all places where players can go, you can WALK to, npcs cant jump automatically, they can jump if you use nav_jump (See nav instructions below)

-make sure your map has atleast 4-32 spawnpoints, depending on mapsize, the plugin will see what spawn is closest and spawns npcs there.

-make sure maps spawnpoints are outside playable map space, see pumpkinfarm for a good example.

-Adding custom music should be done via the plugin/configs, not map

-Make sure your map is not cramped and a corridor shooter to make it interresting, it is recommended to have atleast 2 viable camping spots.

-If your map is multistage, make sure to mark any areas where players arent supposed to be with a trigger hurt, this makes sure random spawn npcs wont go there.

Navmesh creation

nav_walk

this is coded in so that the npcs wont do their avoud obstacle code, beware that wit WILL make them get stuck on ledges so be really carefull where you use this.

nav_avoid

This is coded in a way where it prevents the villager or any building type of npcs to go there or settle there, good for spawns if not marked with trigger kills

nav_no_hostages

It prevents creep such as the deep sea one

nav_dont_hide

Marks the spot as a stuckspot, being on it immediently triggers the servers anti stuck. usually combined with nav_avoid

nav_jump

Make 2 navs that connect to eachother with nav_jumps, npcs will jump between them if neccecary. their Jump are not 100% accurate, however.

If you nav a map and notice npcs getting stuck on corners, follow this video for guidance: https://github.com/user-attachments/assets/2e9a9b37-217a-4c85-a2c7-63a677cf9b0c

Naving done easy:

Before generating a navmesh, set nav_max_view_distance 1 Next up, Anywhere where its walkable mark it with nav_walkable Then use nav_generate_incremental At the end make sure to use this vscript and call it, it makes it auto detect any non walkable spots!

Vscript Disconnect Auto

warning, using this will reset nav_jumps.

Triggers

Hurt Triggers: out of bounds/falling off map Use a dmg_drown trigger for either player or npc or both Set its damage to 1000000+ or higher This will down players and just damage npcs and teleport them back to their last valid position And others can be set to a drown dmg number of 200 or smth, my plugin handles the damage part.

zr_anti_stair_abuse This trigger is used incase of stairs where npcs can walk up, on long ones its recommended to place this so players are unable to abuse the stairs. It is highly recommended to use nav_walk in the nav where the stairs are, so npcs can walk up on them.

Having a logic_relay named zr_setuptime will be triggered every time setup occurs (or every 5 waves in Raid Rush)

Having a logic_relay named zr_wavedone will be triggered every time a wave ends

Having a logic_relay named zr_waveselected will be OnUser1/2/3/4 depending on the difficulty when the voting is done (OUTDATED.)

Having a logic_relay named zr_victory will be triggered when players won the last wave

Having a logic_relay named zr_lasthuman will be triggered when last man occurs

Having a logic_relay named zr_gamelost will be triggered when players lost the game

Triggering a logic_relay named nav_reloader will update the nav mesh with the current func_nav_blocker settings

Triggering a logic_relay named zr_wavefinish_wave_X X stands for wave the wave that just got completed. This does not trigger in freeplay.

When any new brush opens up, please call nav_reloader, its needed as some navs are marked as blocked by the game, and removing the brushes doesnt automatically unblock those navs. do it with a 1 second delay.

Make sure to pack the map with the nav when uploading it to the workshop.

Heres a video guide aswell! https://youtu.be/qy0u5KbGwKM