How custom mission cycles can be used in TF2

CS:S, TF2, DOD:S, etc.
Post Reply
User avatar
Edge100x
Founder
Founder
Posts: 12023
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

How custom mission cycles can be used in TF2

Post by Edge100x » Wed Oct 10, 2012 9:58 am

A Valve employee posted the following about how tf_mvm_missioncycle.res works today.
First we have a Con Command that will let you specify your own mission cycle file "tf_mvm_missioncyclefile myfile.res"
where the default .res file is tf_mvm_missioncycle.res that is located in the tf directory.
You can use this con command to set custom missioncycle files for each server instance.

For how a mission cycle file works

Example contents of missioncycle.res file

-------------------------

"tf_mvm_missioncycle.res"
{
"categories" "2"

"1"
{
"count" "3"

"1"
{
"map" "mvm_decoy"
"popfile" "mvm_decoy"
}
"2"
{
"map" "mvm_coaltown"
"popfile" "mvm_coaltown"
}
"3"
{
"map" "mvm_mannworks"
"popfile" "mvm_mannworks"
}
}

"2"
{
"count" "3"

"1"
{
"map" "mvm_decoy"
"popfile" "mvm_decoy_expert1"
}
"2"
{
"map" "mvm_coaltown"
"popfile" "mvm_coaltown_expert1"
}
"3"
{
"map" "mvm_mannworks"
"popfile" "mvm_mannworks_expert1"
}
}
}

-------------------------
format of the file:
"file name" - Name of the res file
{
"categories" "Number" - Number of Categories, by default this corresponds to the number of difficulties
"Category Index" - Numerical Index of this category, numbered in order starting at 1
{
"Mission Count" "Number" - Number of missions in this category
"Mission Index" - Numerical Index of this mission, numbered in order starting at 1
{
"map" "mapname" - Name of the mvm map without the extension
"popfile" "popfilename" - Name of the popfile without the extension
}
}
}

When a mission is completed the game looks at the missioncycle file and looks for the current map / mission pair.
If it's found it then loads the next mission in that category, cycling back to the first one if it's the last one in that category.

If the map / mission is not found, it simply restarts the current mission. This behavior at the end is probably what’s causing some bizarre issues with custom aps and popfiles. If a custom map is loaded and does not contain a default popfile [Ie playing map mvm_decoy.bsp the game expects to load a popfile of mvm_decoy.pop] the previous popfile will remain loaded. Finishing this mission will just simply restart this “bad” combination. Similarly if a custom popfile is loaded (via con commands or vote) the server will seemingly be stuck on that particular combination until a vote or server command is issued.

This default behavior seems undesirable and we’ll change it to load the next well known mission from the missioncycle file

- Mike Lee

Post Reply