This is a quick guide on how to use the TTT Weapon Placer tool to place weapon and ammo spawnpoints, appropriately referred to as "rearming", and then play the map with them in TTT. This is useful for making a map ready for balanced gameplay in TTT, when the map was not originally made for the gamemode.
In this guide I will show the basic process by placing some guns and stuff on de_dust. This is of course a CS:S map that does not have any TTT weapons, no ammo, and really boring player spawn locations by default (though TTT includes a rearm script for it). Let's see how we can change that.
The guide may look a bit long, but there's a lot of details that are pretty common sense if you've used the GMod sandbox stuff before, so you can skim over those.
You can grab the tool from the Steam Workshop. Just hit the subscribe button and you'll have it in Garry's Mod as an addon, and you can move on to the next section right away.
Start up Garry's Mod. Open the new game menu, and select the map you want to create spawnpoints on. Make sure the game is set to the "sandbox" gamemode. Start the game in singleplayer.
Once you're on the map in sandbox, you can start placing some spawns. First you should know that any existing weapons (for example on HL2DM maps) will be removed by TTT, so you can either use the Remover to do the same, or just ignore them.
For the most part, you should try not changing anything about the map. If, for example, you push over a barrel, and then place a gun on the lying barrel, things could get weird. When playing the map, the gun will be spawned by TTT in that position, but the barrel won't be lying there. It will be in its original place. You have to act a bit like the world is in a frozen state. In fact, you could freeze physics entities to prevent making mistakes. Using noclip to get around is useful as well.
Anyway, let's move on.
Now when you have the tool gun out and you press the Context Menu key (default C), you should see the menu shown below. The list contains the different entities you can place, and we'll get to the other options later.
For now, just select the deagle as shown on the screenshot. Close the context menu (ie. let go of C) and left click on the ground. You should see the deagle appear there. Now right click once or twice, and deagle ammo will pop up.
Some guns/entities do not have a matching ammo entity, and right click will do nothing for those.
Entities you've placed can be repositioned using the physgun or other tools:
Place some more weapons and ammo if you want. Some entities that could be useful are the random weapon and the random ammo. These will turn into a random gun and ammo box respectively. Place them like any other entity, but make sure there is some room around them. The gun/ammo it turns into might be larger than the dummy model you see.
You can safely freeze the entities, it won't affect the export. Ammo spawned there will just fall to the ground in TTT.
Once you've placed all the weapons/ammo you want, you could just export your script and be done with it. For this guide however, I'm going to place player spawnpoints as well.
There are some extra things to watch out for. There must be enough room around the spawn for a player to spawn there. The dummy entity helps you with that, because it will collide as if it is a big box of just the right size. So you can't place two dummies over each other in a way that will cause telefrags. You should also make sure the dummy stands upright (freezing can be handy). I don't really know what happens when it's lying facedown, but it's probably not good.
I went nuts and placed 32 spawnpoints. Most of them have a bunch of room around them so the game can spawn more players there if necessary. I recommend you put a lot of spawns in, because it's not a lot of effort and can help a lot with larger servers.
You can use the Report counts button to show a short report in your chat of how many of each broad category of entity you have placed, such as primary weapons, grenades, and player spawns. For a more detailed summary you can use the console command report_entities and find the relevant entities in the list, such as "item_ammo_357" for Rifle ammo, to see the exact count.
In your Context Menu, you might notice the Replace existing player spawnpoints checkbox. When enabled, TTT will remove all existing spawnpoint entities before creating the one's you've placed. This lets you completely override the spawnpoints in the map. Sometimes, this is good, for example with CS:S maps that have boring spawns. Sometimes, it's not needed, for example for Zombie Master maps that already have good spawns and only need a couple of extra ones. When the checkbox is unchecked, your spawnpoints will just be added, meaning the map will simply have extra spawn locations besides the ones the mapper made.
169 placements saved to /garrysmod/data/ttt/maps/de_dust_ttt.txtI placed 169 entities. You might have less. As you can see it has exported successfully to a text file. Keep in mind you are subject to Source's entity limits like a mapper is. If you place a thousand shotguns, you will get errors when TTT loads the script.
If there is an existing file with the same name, you will be asked to either confirm the overwriting of it, or put in a different name.
Copy the script to your /garrysmod/maps/ directory. TTT will look there for scripts with a "mapname_ttt.txt" filename when it loads the map and will try to import them.
In Garry's Mod, select TTT as your active gamemode. Select your map, in my case de_dust, and start a game.
Once the map loads, TTT will go into "waiting for players" mode. Open the console and type the following commands:
(You may want to put these in a text file called "listenserver.cfg" in /garrysmod/cfg/ so you don't have to type them every time).
The round will now start, and will not end. As soon as the round starts, all entities should spawn properly and you should spawn as a terrorist. Walk around and see if your weapons came out okay. In the console, you should see something similar to:
Weapon/ammo placement script found, attempting import...
In my case, all 169 entities were imported successfully. Using the command "report_entities", I can verify that there are 32 info_player_deathmatch entities (the imported version of the dummy player spawns), and all the weapon and item entities I placed are there.
WARNING: do *not* save the script with "tabs to spaces" conversion enabled in the editor. The tabs are required for TTT to be able to parse the script. Plain and simple Notepad will never do bad things like this, so it's a safe choice if you're unsure.
An advanced use of editing is to add automatic ammo spawning to random weapons you have placed. The process is pretty straightforward. Find a random weapon line, like this one:
Go to the end of the line, press TAB (again, must be a "real" tab, not a bunch of spaces), and write "auto_ammo 2". That 2 determines how many ammo boxes it should create, so make it 4 if you want four, etc. It should now look like this:
Save the script, load up TTT, and that random weapon will now be spawned with two boxes of the right ammo.