Firstly, copy your map into the steam/steamapps/sourcemods/modularcombat/maps folder, and load up that map in a local game. There are several types of node you need to place for a map to work properly in modular combat, and while the method of placement for each is the same, clearly the decisions for where to place them are not. Multiple players can share in the task of node placement simultaneously, but they will only be able to place the same type of node as each other - the map can only be in one node placement mode at a time.
Node placement mode operation
Once you're in a node placement mode, there are just a few commands that you will need. I suggest you bind them to keys, as you will be using them a lot:
- addnode - this creates a node at your feet.
- undonode - this removes the last placed node. If multiple players present, it may remove other player's nodes! In a multiple-player environment, you're better off using
- delnearestnode - this removes the nearest node, even if it wasn't the last one placed. Useful for reworking problem areas of a node graph.
- savenodes - when you're finished, this saves the nodes to the script file and exits node placement mode. You'll have to reload the map for this to have an effect
One more thing before before we go - you do not have to do all of this at once! If you've had enough, save your changes with savenodes, quit the game, and come back to it later - everything will still be there!
While all node placement modes use the same commands once you're in them, starting each mode uses a different command. To enter a node placement mode, cheats must be enabled, so enter sv_cheats 1 in the console and you're ready to begin:
NPC spawn points
You won't be able to enter PVM or FFA modes on your map until NPC spawn points are in place, so getting these in should be your first priority. Likewise, you won't be able test your nodegraphs without npcs! Unless you wish to limit them to particular areas, NPC spawn points should be placed throughout the map, and not too close to walls and obstacles. Remember that hunters and antlions are going to be spawning on these. Generally, if you're even just a short distance away from the wall when you're placing it, you should be ok - test the map out after placing some spawn nodes to make sure that your NPCs don't get stuck when spawning.
To be able to navigate a map, npcs need a node graph. For a general idea of how these should be placed, see the node placement section of the source developer wiki article on nodegraphs. Graphing for MC while in-game, you don't have all the options discussed in other parts of the article: you must ensure that its possible for NPCs to walk everywhere in the map just by travelling directly between visible nodes. Beyond that, test the game out and see how they manage. NPCs that can jump (antlions, fast zombies, hunters) do so using the nodegraph as well - so make sure that your nodes are near the edges of higher areas if you want NPCs to be able to jump on/off.
The ai_show_connect command - once you've saved your nodes and restarted - will allow you to see what nodes are connected up, and what routes are blocked off for the various sizes of NPC. There are several commands related to it that allow you to see jump node connections, flying nodes, and see the connections for different sizes of NPC - these are discussed in the linked article.
Aerial node graph
This one works just like the ground-based node graph, but for flying NPCs such as manhacks. Going into noclip mode while placing these is strongly recommended. You probably don't have to go into as much detail as for ground nodes - generally, if its possible to fly around the entire map, just by moving directly between visible nodes, then you have enough nodes.
Teleport blockers can be one of the most time consuming aspects of preparing a map for MC. A map without them will almost certainly have areas that can be teleported into that shouldn't be. Not some cool, secret hidden rooms, but some "out of the map and completely stuck in a broken place" areas. Teleport blockers stop these areas from being accessible, but one must be placed manually in every unintended area. The simplest way to place these is to buy teleport and max recharge (addexp 100000 helps!), and then try to teleport through every wall, floor, and ceiling in the game.
A point is considered "blocked" if it is in line-of-sight of a teleport blocker. For an L-shaped area, placing one blocker in the corner will block off the entire area, if it is small enough. This "line of sight" effect applies to areas the player can move through only - invisible walls and the likes don't count. One place that is often overlooked in placing blockers is underneath displacement surfaces - in some cases, there is enough space for the player to fit in. On dm_runoff, around 100 blockers were needed to seal off all areas under the canal bed displacement surface... placing teleport blockers is no small feat!
'Large' NPC spawn points
This command was added specifically for the antlion guard, as it requires a lot of space. If you don't want guards spawning on your map, just don't place any of these - but if you do, be sure to put them in an area where they'll have lots of room to run around in, and there's not too much in the way of stairs, tunnels, confusing corners & the like ... antlion guards aren't very smart! These should also be placed quite far away from walls and any other obstacles.
The end... but still more to do!
Once you've placed all of those, you'll want to debug them ... by playing your map! If there's certain areas that the NPCs get really confused, or have difficulty navigating, consider adjusting your node graph. Try teleporting everywhere on your map, up against all the outer walls, and for any gap that can be got into that shouldn't be, add a teleport blocker. If NPC spawn locations are too predictable, add more. Lastly, get other people to play your newly-configured map, trying to teleport everywhere that they shouldn't - chances are, they'll find some spots where you need more blockers.