Here is the pertinent information if you want to add either "wave" mode, "control" mode, or "VIP" mode to your map/mod. All of the following makes some basic assumptions; namely, you are familiar with how to add new modes to a previously-created map. Adding wave mode will require intermediate-level scripting knowledge.
4) Create a script for that mode (I use a script with the "_ins" suffix, e.g. "CCR1_ins"). You will need to add your script to your mission.req, you will need to create a .req file for it (in the "data_MODID\common\mission" folder), and you will need to add it to the addme.lua - see tutorials on "how to add a game mode" for more detail.
4.1) If you want to use the _ins suffix, note that this will not immediately localize to "VIP" mode, as the 1.3 patch doesn't support something called "VIP" natively. You are free to use the "dtshell.lvl" from Dark Times II to load in the necessary data (see the 1.3 patch documentation). The code for this in your addme.lua will look like this:
5) In your MODIDera_ins script (e.g. cor1g_ins), make the section above ScriptInit look like this (the whole upper half of the .lua file - this is designed to be extensible, so this part should be easy):
Hidden/Spoiler:
[code]--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--
---------------------------------------------------------------------------
-- FUNCTION: ScriptInit
-- PURPOSE: This function is only run once
-- INPUT:
-- OUTPUT:
-- NOTES: The name, 'ScriptInit' is a chosen convention, and each
-- mission script must contain a version of this function, as
-- it is called from C to start the mission.
---------------------------------------------------------------------------[/code]
A couple notes:
-You are going to need to make sure none of your CPs can be captured (the "SetProperty"s that kill the capture regions do this)
-You will need to load in all your CPs as "VIP CPs" and their spawn paths (as seen above)
-The "ObjectiveVIPSetup" line loads in these parameters: first, the team that will always be the "Defending" team online (no random effects online, offline games are random), second, the number of "Defending" reinforcements (number of times the hero needs to be killed), and third, the number of "Attacking" reinforcements
6) You need to set up your "SetupTeams" section in the script this way:
SetTeamName(3, "all")
--AddUnitClass (4, ControlHeroALL, 1, 1)
SetUnitCount (3, 1)
--first number is numteam, second is numunits
AddAIGoal(3, "Deathmatch", 100)
-- Level Stats
ClearWalkers()
AddWalkerType(0, 0) -- special -> droidekas
AddWalkerType(1, 0) -- 1x2 (1 pair of legs)
AddWalkerType(2, 0) -- 2x2 (2 pairs of legs)
AddWalkerType(3, 0) -- 3x2 (3 pairs of legs)[/code]
A few notes:
-Note the presence of the "defendingunits" variable - this should pretty much always be "25" (that's what the mode is balanced for), but I left the option open to the user to modify this: this is the number of units on the defending team (the number of units on the attacking team is modified in the Objective script, and there are some other things done with it).
-Note that the heroes are not loaded with AddHeroClass(Unit?) - they use the variable "VIPheroTEAM."
1) This is important! Control mode needs to use its own special layer. Download com.zip and extract its contents (the folder "com") directly into your world1 folder. There should now be a "com" folder in your world1 along with your "odf," "msh," etc. folders.
2) Create a layer (see the "adding hunt" tutorial for how to set up a layer appropriately for use in a new mode) called "control." You are going to set up two types of CPs in this layer - team spawn CPs and control CPs.
3) Create a set of regular uncapturable CPs to spawn from (just like in hero assault) - I call them "ctrl_cp#," but you can call them whatever you like. These will be the CPs you choose to spawn from and do not contribute to the control count.
4) Create your control CPs by using either the "com_bldg_controlcp" object or the "com_bldg_controlcp_small" (the latter is for areas where the antenna would clip through geometry). These must follow the following naming conventions! Each of the control CPs should be named "control_#". Each control CP should have a capture region named "controlreg_#".
5) Create the hero spawn paths for the control CPs - these are not spawn paths assigned to the CPs! These are separate, single-node paths named "control_#_spawn" that should be placed very near the control CP object.
6) Save your layer and munge. Remember to load it in the script:
4) Create a script for that mode with the "_ctrl" suffix, e.g. "CCR1_ctrl". You will need to add your script to your mission.req, you will need to create a .req file for it (in the "data_MODID\common\mission" folder), and you will need to add it to the addme.lua - see tutorials on "how to add a game mode" for more detail.
5) In your MODIDera_ctrl script (e.g. cor1g_ctrl), make the section above ScriptInit look like this (the whole upper half of the .lua file - this is designed to be extensible, so this part should be easy):
Hidden/Spoiler:
[code]--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--
---------------------------------------------------------------------------
-- FUNCTION: ScriptInit
-- PURPOSE: This function is only run once
-- INPUT:
-- OUTPUT:
-- NOTES: The name, 'ScriptInit' is a chosen convention, and each
-- mission script must contain a version of this function, as
-- it is called from C to start the mission.
---------------------------------------------------------------------------[/code]
A couple notes:
-You may want to make sure that each team has one control CP when they start(as assigned above - this is your choice)
-The "PlayControl" line loads in the total number of command posts loaded in your "control" layer in ZE.
6) You need to set up your "SetupTeams" section in the script this way:
SetTeamName(3, "imp")
AddUnitClass (3, ControlHeroIMP, 1, 1)
SetUnitCount (3, 1)
--first number is numteam, second is numunits
AddAIGoal(3, "Deathmatch", 100)
SetTeamName(4, "all")
AddUnitClass (4, ControlHeroALL, 1, 1)
SetUnitCount (4, 1)
--first number is numteam, second is numunits
AddAIGoal(4, "Deathmatch", 100)
-- Level Stats
ClearWalkers()
AddWalkerType(0, 0) -- special -> droidekas
AddWalkerType(1, 0) -- 1x2 (1 pair of legs)
AddWalkerType(2, 0) -- 2x2 (2 pairs of legs)
AddWalkerType(3, 0) -- 3x2 (3 pairs of legs)[/code]
A few notes:
-Sorry about all the sloppy code. This was something that I never took the time to optimize as best as possible. It's not really a pain, but it's just a little long.
-Note that the heroes are not loaded with AddHeroClass(Unit?) - they use the variable "ControlHeroTEAM."
1) Download this example of a wave mode (Death Star wave). Be aware that this is not a blank template. This is a soft example - you will have to do a little modification to make your wave mode unique. I used Death Star wave as an example because it is the most "vanilla" of my wave modes - it was the one I used for a template for the rest of them.
2) Create a script for that mode with the "_wav" suffix, e.g. "dea1g_wav". You will need to add your script to your mission.req, you will need to create a .req file for it (in the "data_MODID\common\mission" folder), and you will need to add it to the addme.lua - see tutorials on "how to add a game mode" for more detail.
3) Go to town on the example you have! - Okay, I know there's not a lot of clarification here, so here are a few notes:
-Note that aside from some configuration at the top of the mode (all this will be the stuff from ScriptPostLoad, really), wave mode is constructed of sequential timer functions.
-Note at the end how conditional victory conditions exist - this has the "hidden" seventh wave shown, and how to add in that kind of option.
-There may be a lot of commented-out code. This was a testbed when I created it, so feel free to ignore all that stuff.
-Caveat emptor! Remember, you should only be making my version of wave mode if you're comfortable with scripting things.
Enjoy, guys. Let me know if you have any questions. Please try to avoid questions that are more fundamental in nature (like "how do I make a new layer, etc.). Tutorials exist for these in other places. If you have a bug you can't see - log file and script. Thanks!
Just as a matter of CYA, please do not substantially modify and then redistribute these. You're welcome to use these as learning examples or as additions to your map/mod. I just ask that you'd make sure to let me know - I always enjoy seeing people use something I've worked on.
That's awesome, glad to see how it works, makes perfect sense too.
While I am sure you are fine with us using these modes for non DT2 modes, like for my TCW mod, I think I will only use them for maps that I add DT2 too, like I did with Ryloth. I feel its more respectful that way. Although, Wave will be so awesome, I may want to make an exception to that rule. With your permission.