《求生之路:纳粹僵尸部队》与Hammer(++),特殊技巧和窍门

0 点赞
No More Room in Hell
转载

I've been bored and at work tweaking and testing little things in this game to produce the best results possible, so I decided to document some of the fancy little things I manage to utilise in the maps I've worked on. I'm sure there's way better and more tricks out there, but I'm just putting it in a more convenient spot related to the game. Hopefully something here helps. item_inventory_box (AKA The Supply Box) Originally, mappers would consider passing a commands to make these non-solid objects, as to prevent creating safe spots for players to tower over zombies. Now, this is no longer needed in recent versions of NMRIH, as it now exists as a KeyValue you can easily toggle on and off! You can still use the passing command method to do it, if needed, but otherwise it's a simple set and forget now. random_spawner This entity allows you to set a random selection of gear, either by pre-made category or hand picking weapons, explosives, ammo, items and tools, and their percent chances to spawn. You do not need to explicitly make the values calculate to 100 across all modified variables, but it helps keep things clear and easier to understand. Having cumulative values below 100% will leave a chance for a location to be empty, which can promote a scarcity in items that appear. A related entity also exists, called random_spawner_controller, which allows a mapper to set a max value to the amount of objects that spawn. As long as the values are set to a sensible degree, you will see most of the available random_spawner locations be filled with varied gear with reduced repeating, which can prevent ammo and weapons from being one sided in type. func_zombie_spawn Many times when I investigate maps, people set custom "Spawn Density" and "Spawn Regeneration Target" values in the provided KeyValues, but neglect to toggle on "Allow Spawn Density Override" and "Allow Regen Target Override", meaning these values have no effect! Additionally, the input "InputInstantSpawn" requires you to pass a numerical value in the parameter override to succeed, otherwise the game will do nothing and spit an error in console. This allows you rapidly occupy a zone, without using npc_template and npc_maker to force spawn. Ignore Visibility is an important KeyValue, which allows zombies to spawn without care for what the player sees. At times, based on how a level may be setup, this might be the only option which will ensure fresh zombies come in. Ideally, you build a concealed area and set the func_zombie_spawn in there instead. These zombies will count towards a level's cap, so be wary that if they're not killed off or despawned, later zones will have minimal to no zombies. nmrih_barricade This entity tells the game where you can place Barricade Boards in a map, with a few caveats on getting blocked by entities and such. The only variable present is angles, controlling the pitch yaw and roll of the board. While you can set these boards up to be a pathway you can manually construct with boards, instead of being a wall to hold back the undead, I have a small optimisation that can be used. Turn SmartEdit off, and add "targetname" with a custom name, like many other entities you can name. By adding a targetname, you can now pass Input/Output commands to it. In maps where the barricade point may be inaccessible due to path RNG, it could be good to bind a Kill Input to them, deleting them from the current round and freeing up potential edicts. (max 2048 networked, 2048 non-networked (client side and server side.)) func_clip_vphysics This brush entity allows you to define a wall that will prevent objects from passing through, like thrown weapons, ammunition and objective items. You can select multiple brushes at once before converting them into a func_clip_vphysics, and the collision will be treated mostly the same, while consuming significantly less edicts! I can't ensure a huge area covered in a single assortment of func_clip_vphysics will work perfectly fine, but in my current experimentation it works just fine. (compiling 60+ brushes into one across a large open area.) func_nav_blocker This brush entity is one of my favourites to employ in stages when I update/overhaul them! This allows you to state that a path is blocked to the Zombies in a stage, and they will take a smarter path to you (when applicable!!!) rather than gaggling around some areas that would otherwise let them through. While you could do a fair amount of what this does with just smarter navmesh creation, I use it to specify breakable walls, windows and more. This usually will funnel them through the normal doors and openings, until otherwise available to them. A caveat of this, is that if you oversize it or put it in the wrong place, it may block more mesh than intended. You also need to pass Enable/Disable in a logic_auto to ensure that the blockers are active from the start of a round. You can also further control them with Input/Output on other entities. This one's very handy, and great to utilise despite the edict cost. You don't need to overuse it either, just when other solutions may not be so clean. func_viscluster Another disgustingly powerful brush entity, which when used incorrectly WILL wreck your performance ingame. The main use of this is to tell the visleaf calculation system that all leaves in this brush entity can see one another, which at times can simplify rendering and accelerate compile times. There's a lot of guides and information online for this one, and it's very up to situational applications. At least one or two spots in most maps could benefit from them, after other forms of optimisation like func_detail and more have been applied. logic_case (AKA How I love RNG) This entity is very common, and not super required unless you want to cause some random selections within a stage. I recommend using it to augment areas within survival, as this entity is not required within the objective mode for modifying the level's objectives or geometry. It's a bit of a headache to wrap around, but other guides explain it better. With suitable rng of side, optional areas not directly linked to items/weapons, but rather layout of some objects, Survival could be made significantly more varied with enough planning. This entity is also used to set a code for keypads when multiple options are present to try, but only one works. Got tips? Got any tips? I'm always willing to post more that I find, though your mileage may vary in actually utilising them. Share your own in the comments if you wish. Hopefully with a little bit of care and effort, maps can be the best they can be. Either way, thanks for reading, and have a good rest of your day. tool textures (Block LOS, and others) Block LOS is a immensely powerful tool to help give the players a degree of stealth against zombies, if such an effect is desired. Since Zombies can be set to go towards a target, as well as hear gunshots, you can build an area with models that you'd like zombies to not see through, create a box enveloping the area with this texture, and the zombies won't see through it. The same effect can be achieved in models themselves, if the appropriate flag is set in the .qc file. Most models in NMRIH, do not feature this. Likely to avoid zombies getting lost or not spotting the player.