Skip to content

Setting up basic SF2 maps Part II (The entities)

Mentrillum edited this page Aug 24, 2020 · 1 revision

Now that we covered what the rules are for getting basic SF2 maps are, its time we actually start executing some of these rules, techniques, and tips. Keep in mind its a follow up to the first map tutorial on SF2, so if you haven't read that yet, take a look from this link here.

First Entities

We've got a lot to cover on the entities, and an entire list of entities can be found on this page, but these key notes should be taken into consideration. One, any # you see are considered to be integer values, so no decimals and no negative values, and some of these entities don't work if the value is 0. Two, sf2_nav_interface is really inconsistent at times, so make sure you know how to use that entity otherwise bosses will break the server down. Three, applying multiple mini gamemode entities will break the map entirely. Lets go over the basics. We'll show pictures of the entity you'll need to use.

Mainly Required Entities

sf2_maxpages_# (info_target)

This is the first entity you should generally put down, this entity will determine how many collectibles a map will contain. All collectible values must be set to greater than 0, if you end up setting the max collectible count to 0 or less, the map will be impossible to beat. To use this entity properly, create an info_target and name it sf2_maxpages_#, you replace the # with however many collectibles you want. It is a ok to make the map have only one collectible as long as you're going for a survival map.

pagecount

sf2_page_model (prop_dynamic)

(No entity image available)

The second or the third entity you should put down, this prop_dynamic determines all of the models of the collectibles on the map, if the model supports skins, then the gamemode will randomly pick model skins for each collectible, things like the team colored gas cans or the Underground cables. Everything but Name and World Model should not be changed. Period. If this entity doesn't exist, it'll use the stock page model.

sf2_page_spawnpoint (info_target)

This should be the entity you should put down after you completed the layout of your map. What this entity does is determine where each of the collectibles will randomly generate. If there are less spawnpoints than max collectibles, the map will be impossible to beat. If you add a underscore followed by a unique name, you create a collectible group. This is useful for adventure maps like Swarm and Mountain Complex as we talked about in the previous tutorial.

groups

sf2_time_gain_from_page_# (info_target)

The second or third entity you should place. This entity determines how many seconds are added every time a collectible is added. Please don't go too crazy with this value.

time

sf2_time_limit_# (info_target)

The third or fourth entity you should place. This determines how long each round lasts during the page phase in seconds. So 60 seconds are per minute, grab those calculators if you need to determine how long you want each round lasts by default.

clock

sf2_maxplayers_# (info_target)

This entity determines how many players should be on RED at maximum. Now this entity is based on how the map is by both difficulty and length, if the map is a shorter length page collecting map, the max players should be lower, if the map is pretty big and the difficulty is pretty high, the max players should be higher. This one will make or break most rounds, so consider this a balancing stage entity.

players

sf2_escape_trigger (trigger_multiple)

(No entity image available)

This trigger makes players escape when they touch it. This entity only takes effect if its both active and if the round is on the escape phase. This should generally be placed right after the layout of the map is done. You are allowed to keep this trigger disabled for X number of seconds and then re-enable it after X seconds, just make sure to leave it enabled at one point or the map will be impossible to beat.

sf2_escape_spawnpoint (info_target)

Absolutely put this anywhere away from RED, and you can use multiple spawn points. If none of these entities are present, RED players will be able to exploit the bosses by rapidly stunning them if enabled or body block and get the bosses stuck on rare occasion. You generally want to put these entities where the BLU players are.

sf2_escape_time_limit_# (info_target)

Similarly to sf2_time_limit_, this determines how long the escape phase lasts. This entity is determined in seconds, so get a calculator if you need to if you want a specific time on the clock.

Cosmetic Entities

sf2_page_sound (ambient_generic)

This entity determines what the sound should be when you pick up a collectible, so instead of the stock page grab sound, you use this entity. Fill in the Sound Name with the sound you want to play when a collectible gets collected.

sf2_page_message (game_text)

This entity will determine the message whenever someone grabs a collectible. By default it will use %d/%d, %d is the Sourcemod format of a integer to a decimal. You absolutely must use at least 2 %d format specifiers, if you don't use at least 2 %d format specifiers, Sourcemod will print an error saying that the function that goes into formatting isn't used properly. The first %d means how many collectibles were found, while the second one means out of however many collectibles are remaining.

pages

sf2_page_music_#-# (ambient_generic)

This entity is a little bit tricky to work with. So the first number is what page you want to start the music at, and the second number is when you want the music to change. So if you want to have music on the first page for 2 pages, you use sf2_page_music_1-2. Then if you want music to start at the third page and end at the 5th page, you use sf2_page_music_2-5. If you have trouble thinking about this one, don't worry, I have trouble as well.

pagemusic

sf2_intro_fade (env_fade)

So the fade and hold times I have yet to figure out, but understanding from the source code, hold time is the duration of the intro, and duration is how long the fade lasts. Color is supported, so crazy if you want. Experiment with the values if you have to.

sf2_intro_text_# (game_text)

To start off, intro text 1 should be blank. Hold Time is how long each text is displayed for, fading is up to you, and colors are up to you. The text doesn't even have to be on the center of the screen, they can be at the bottom or the top. Go crazy with the intro text.

sf2_intro_message (game_text)

This is the message that appears right after the intro sequence finishes and the REDs start to move around. Generally this should instruct players what to do for the map.

sf2_intro_music (ambient_generic)

Whenever the intro first starts, this entity is called. Just like sf2_page_sound, only the sound path should be filled in.

As for the remaining entities, you can take a look at them from the link at the top of the tutorial, but there is one entity I need to explain a bit deeply, more than the entity list.

sf2_nav_interface (tf_point_nav_interface)

This entity is the most inconsistent to work with and requires lots of experiments. Using this entity properly is always different from map to map, not just in SF2, but in general. For example, mvm_rottenburg uses this entity, but it only calls two seconds after the wooden barriers are broken by the tanks. For simple openings like that or doors, its safe to call the entity two seconds after the door opens. Calling this entity multiple times is critically inconsistent, so make sure you don't use this entity often. To use this entity, create an output that is needed for an event, like "OnUser1", set the target entity to sf2_nav_interface, set the input to "RecomputeBlockers", and set the delay to 2 seconds, or if you want to be safe, call this 5 times in 1 second intervals. Its best to plug this in a logic_relay and call that logic_relay whenever you need to. Examples of situations you use sf2_nav_interface are the floodgates in Underground, doors that opens when X number of pages are open or after a delay, a door opens after a switch is flipped, a breakable brush is broken, basically anything that doesn't involve doors with triggers.

This tutorial is set to be expanded a bit in the future...