PDA

View Full Version : Gauntlet finale


TIMESUPYO
06-13-2011, 05:37 PM
Hey everyone. I want to make a gauntlet finale for my map. Its a small single map and I want to only have the gauntlet finale. Think survival but have to get from point A to point B to stop the hordes. I figured a gauntlet finale is what I wanted so my question is, Is there a tutorial somewhere that shows how to setup a gauntlet finale? I cant seem to find anything that focuses only on a gauntlet finale. Ive found several for survival and scavenge but no gauntlet. Any ideas?

shotgunefx
06-14-2011, 08:06 AM
I've looked at them here and there, but I'm a bit rusty, you probably want to look at the Parish - Bridge map, the script (director_gauntlet.nut) looks like this

Msg("Initiating Gauntlet\n");

DirectorOptions <-
{
PanicForever = true
PausePanicWhenRelaxing = true

IntensityRelaxThreshold = 0.99
RelaxMinInterval = 25
RelaxMaxInterval = 35
RelaxMaxFlowTravel = 400

LockTempo = 0
SpecialRespawnInterval = 20
PreTankMobMax = 20
ZombieSpawnRange = 3000
ZombieSpawnInFog = true

MobSpawnSize = 5
CommonLimit = 5

GauntletMovementThreshold = 500.0
GauntletMovementTimerLength = 5.0
GauntletMovementBonus = 2.0
GauntletMovementBonusMax = 30.0

// length of bridge to test progress against.
BridgeSpan = 20000

MobSpawnMinTime = 5
MobSpawnMaxTime = 5

MobSpawnSizeMin = 5
MobSpawnSizeMax = 20

minSpeed = 50
maxSpeed = 200

speedPenaltyZAdds = 15

CommonLimitMax = 30

function RecalculateLimits()
{
//Increase common limit based on progress
local progressPct = ( Director.GetFurthestSurvivorFlow() / BridgeSpan )

if ( progressPct < 0.0 ) progressPct = 0.0;
if ( progressPct > 1.0 ) progressPct = 1.0;

MobSpawnSize = MobSpawnSizeMin + progressPct * ( MobSpawnSizeMax - MobSpawnSizeMin )


//Increase common limit based on speed
local speedPct = ( Director.GetAveragedSurvivorSpeed() - minSpeed ) / ( maxSpeed - minSpeed );

if ( speedPct < 0.0 ) speedPct = 0.0;
if ( speedPct > 1.0 ) speedPct = 1.0;

MobSpawnSize = MobSpawnSize + speedPct * ( speedPenaltyZAdds );

CommonLimit = MobSpawnSize * 1.5

if ( CommonLimit > CommonLimitMax ) CommonLimit = CommonLimitMax;


}
}

function Update()
{
DirectorOptions.RecalculateLimits();
}


You'd want to change the BridgeSpan to approximate the length of the travel of your own gauntlet

I'm not sure if there is a reason for it, but they mark the rescue with a info_target named nav_flow_target instead of marking the nav itself. Apparently the game also supports a cordon variant, I can't remember if it's nav_cordon_flow_target or nav_flow_cordon_target.

ThaiGrocer
06-14-2011, 01:35 PM
There isn't a tutorial or example map I'm aware of (it would be great if there was one), but I'm the best source to learn from is what's used in the official map. The only issue is that answers take a bit of mining when it's looking at a decompiled official map. How confusing would it be if you didn't know there was a vscript involved or a info_target laying around in that map?

There seem to be some special things that you tack on once you got a basic gauntlet finale going. For example, if you want a tank to spawn at a specific point, you'll use some kind of entity to output (like trigger_once in Parish 5) to do a special call to the director to bring out a tank. I'm not sure if that is only restricted to gauntlet mode. Then there's the use of the info_target to manipulate the flow. I think some people had their flow going backwards if they didn't add that.

I've always wondered if you can force trigger_finale to load something other than director_gauntlet.nut when you set it to "gauntlet". I noticed that some people have used "custom" instead, but I never asked if it gave the effect that they expected.

I'm not sure if there is a reason for it, but they mark the rescue with a info_target named nav_flow_target instead of marking the nav itself. Apparently the game also supports a cordon variant, I can't remember if it's nav_cordon_flow_target or nav_flow_cordon_target.

Interesting yet confusing! Is there any example of how nav_cordon_flow_target is used officially or community? Does that mean if you have the escape route flowing through a path that you didn't like you put the target somewhere along that "vein" to redirect flow through an alternate path?

shotgunefx
06-14-2011, 02:22 PM
...Then there's the use of the info_target to manipulate the flow. I think some people had their flow going backwards if they didn't add that.

I've always wondered if you can force trigger_finale to load something other than director_gauntlet.nut when you set it to "gauntlet". I noticed that some people have used "custom" instead, but I never asked if it gave the effect that they expected.

Interesting yet confusing! Is there any example of how nav_cordon_flow_target is used officially or community? Does that mean if you have the escape route flowing through a path that you didn't like you put the target somewhere along that "vein" to redirect flow through an alternate path?

I've never seen it in a map, but it's official, found it dumpster diving the game dll's. I'm guessing it's just as unimaginative as it sounds, to allow multiple targets for cordon compiles. I imagine they made a separate entity for the purpose (instead of using multiple nav_flow_target's) so they wouldn't slip up and leave duplicates in there. (Pretty sure nav_flow_target takes precedent), but now that you say that, I'll give it a try (but I doubt it based on the error messages). Would be nice because using a moving flow target, while it works well, borks the distance score.

As far as nav_flow_target's and tanks, I can't speak for gauntlet's, but if your map simply uses a flow target for flow, tanks and witches do spawn without issue. I always use them on my incomplete maps.

TIMESUPYO
06-14-2011, 03:05 PM
So, I hate to sound like a noob, I just started working with Hammer. How exactly would I use these scripts? Also, what would your suggestion be then on my finale, use a gauntlet finale or is there something easier I can use to get from point a to point b like a modified panic event or a different finale?

shotgunefx
06-14-2011, 04:18 PM
So, I hate to sound like a noob, I just started working with Hammer. How exactly would I use these scripts? Also, what would your suggestion be then on my finale, use a gauntlet finale or is there something easier I can use to get from point a to point b like a modified panic event or a different finale?

Place a trigger_finale entity which you'll use to specify the start of the finale (a radio, etc), specify gauntlet as the type. I believe it defaults to director_gauntlet above, but you should be able to specify your own under Scriptfile. You may or may not have to name it mapname_finale.nut, try putting the text above in a text file called scripts/vscripts/myfinale.nut, specifying it in the trigger_finale and see if that works.

http://developer.valvesoftware.com/wiki/Trigger_finale

TIMESUPYO
06-15-2011, 04:24 PM
Oooook. So, I did what you said. Added trigger_finale. Then selected gauntlet finale and put in the script file above in the box below that. Map compiles but will not load, gets about 40% then the L4D2 crashes. I have determined its the trigger_finale itself. Tried SEVERAL different options and its definitely the trigger_finale. So I got mad cause I figured all my work up to that point was lost. Well, I built a smaller version of that map and its happening again. It has something to do with the mesh. What I did on both maps is create the mesh then I added battlefield, finale and jump (because of the nature of the map) attributes to the entire mesh then a player_start attribute to the one section I want to start at. Am I missing something in the mesh? I deleted the mesh and it runs fine with the trigger_finale.

shotgunefx
06-16-2011, 06:26 PM
Oooook. So, I did what you said. Added trigger_finale. Then selected gauntlet finale and put in the script file above in the box below that. Map compiles but will not load, gets about 40% then the L4D2 crashes. I have determined its the trigger_finale itself. Tried SEVERAL different options and its definitely the trigger_finale. So I got mad cause I figured all my work up to that point was lost. Well, I built a smaller version of that map and its happening again. It has something to do with the mesh. What I did on both maps is create the mesh then I added battlefield, finale and jump (because of the nature of the map) attributes to the entire mesh then a player_start attribute to the one section I want to start at. Am I missing something in the mesh? I deleted the mesh and it runs fine with the trigger_finale.

I wonder if it's not a problem loading the script.

Try running the script from the console

script_execute scriptname.nut

You could even do it from another map if you're having load problems, and see if it has any errors.

TIMESUPYO
06-18-2011, 07:54 AM
I was wondering that too. I thought the script wouldn't be loaded until I pressed the button? Also, I did try on a different map with the exact same results. I will try running it from console. Is my mesh setup correctly with all the attributes? I chose finale and battlefield from the survival map tutorials I looked at, figured what I'm doing is about the same.

shotgunefx
06-18-2011, 08:18 PM
I was wondering that too. I thought the script wouldn't be loaded until I pressed the button? Also, I did try on a different map with the exact same results. I will try running it from console. Is my mesh setup correctly with all the attributes? I chose finale and battlefield from the survival map tutorials I looked at, figured what I'm doing is about the same.

I wouldn't be surprised if the script was loaded at map load, but I'm not sure, as far as the mesh stuff, not sure. I'd look at the bridge finale map, and the map with nav_edit 1 and z_debug 1

TIMESUPYO
06-20-2011, 05:15 PM
I think the gauntlet thing is not what I really want. I think a regular finale would do. What all do I need to do a real basic finale? I have a trigger_finale and the director.

shotgunefx
06-20-2011, 05:18 PM
I think the gauntlet thing is not what I really want. I think a regular finale would do. What all do I need to do a real basic finale? I have a trigger_finale and the director.

http://developer.valvesoftware.com/wiki/L4D_Level_Design/Finale_Events_Part_1

TIMESUPYO
06-22-2011, 05:47 AM
At the beginning of this tutorial it mentions a "tutorial_standards map" found in hammer ,"There is also an example of this in the tutorial_standards map. Where can I find this? I looked in the place where the other tut maps are, sdkcontent/mapsrc but its not there. Also, where do I go to access the scripts so I can see what they do and edit them?

shotgunefx
06-22-2011, 11:02 AM
The official scripts are available decrypted here

http://nuclearvelocity.com/barracuda/downloads/left4dead2/scriptsrc.zip

As far as what tutorial maps they are talking about, look at the map under DeadLine2 (l4d_deadline02_coop.vmf)

TIMESUPYO
06-23-2011, 05:15 PM
OK. How exactly would I implement the scripts? Also, I want zombies to spawn at a certain location, can I do that by just mark a spot in the nav as finale? I wanna thank you for your help by the way

shotgunefx
06-23-2011, 06:52 PM
OK. How exactly would I implement the scripts? Also, I want zombies to spawn at a certain location, can I do that by just mark a spot in the nav as finale? I wanna thank you for your help by the way

If you want a custom scripted finale, you turn off smartedit and add the following key to your trigger_finale

ScriptFile

the value should be the name of your script.

For information on writing finale scripts, look here

http://developer.valvesoftware.com/wiki/L4D2_Vscripts#Finale_scripts

You can also add other options such as MobMaxSize, etc to director options.

As far as controlling spawns, during a finale things only spawn in nav areas marked finale. So you can use that and other attributes (empty no_mobs) to control where they spawn from. I wouldn't limit it too much though because if you only have a handful of spawn points, too easy. Another option is to add an commentary_zombie_spawner or info_zombie_spawn to a specific location and spawn things you want to manually at the area you want, and let the director handle the rest