First off, let me explain it a bit:
Control Points are spread throughout the map. The points can be captured by simply moving units into the circle. It’s very similar to how Dawn of War or Battlefield control points works. Probably more similar to Battlefield. You and your opponent(s) start with a maximum score (by default right now it is 3500). For each Control Point that your opponent controls, you will lose that many points from your score every second. There are x points on each map that can be captured. This causes you to need to move out as quickly as possible, and you will find that you constantly are fighting over control points. When a player reaches a score of 0, that player’s units will explode. This makes for some very intense and exciting games, and in testing we have had a ton of fun with them.
Additionally, there are 3 Control Victory modes:
- Countdown
Tug of War
Domination
Tug of war causes the points to be transferred from one player to another but with a small catch… Point values are doubled (by default... can be changed via modoption), meaning that if you own 7 points, you will receive 14 score points from your opponent every second.
Domination requires that you own all of the Control Points for 30 seconds. If you accomplish this then you score 1000 points, at which point all of the Control Points capture status is reset (in other words all points go neutral after a score). First player to 3500 points wins!
All of the parameters are highly configurable from the lobby via modoptions, and you can change nearly everything about the gameplay with these configuration options.
----
The gadget itself has a LOT of documentation directly inside of it as well.
Code: Select all
--[[
-------------------
Before implementing this gadget, read this!!!
This gadget relies on three parts:
• control point config file which is located in luarules/configs/controlpoints/ , and it must have a filename of cv_<mapname>.lua. So, in the case of a map named "Iammas Prime -" with a version of "v01", then the name of my file would be "cv_Iammas Prime - v01.lua".
PLEASE NOTE: If the map config file is not found and a capture mode is selected, the gadget will generate 7 points in a circle on the map automagically.
• config placed in luarules/configs/ called cv_nonCapturingUnits.lua
• config placed in luarules/configs/ called cv_buildableUnits.lua
• modoptions
The control point config is structured like this (cv_Iammas Prime - v01.lua):
////
return {
points = {
[1] = {x = 4608, y = 0, z = 3048},
[2] = {x = 4265, y = 0, z = 1350},
[3] = {x = 4950, y = 0, z = 4786},
[4] = {x = 6641, y = 0, z = 858},
[5] = {x = 2574, y = 0, z = 5271},
[6] = {x = 2219, y = 0, z = 498},
[7] = {x = 6993, y = 0, z = 5616},
},
}
////
The nonCapturingUnits.lua config file is structured like this:
These are units that are not allowed to capture points.
////
local nonCapturingUnits = {
"eairengineer",
"efighter",
"egunship2",
"etransport",
"edrone",
"ebomber",
}
return nonCapturingUnits
////
The buildableUnits.lua config file is structured like this:
These are units that are allowed to be built within control points.
////
local buildableUnits = {
"armamex",
"armmex",
"armmoho",
"armuwmex",
"armuwmme",
"corexp",
"cormex",
"cormexp",
"cormoho",
"coruwmex",
"coruwmme",
}
return buildableUnits
////
Here are all of the modoptions in a neat copy pastable form... Place these modoptions in modoptions.lua in your base game folder:
////
-- Control Victory Options
{
key = 'controlvictoryoptions',
name = 'Control Victory Options',
desc = 'Allows you to control at a granular level the individual options for Control Point Victory',
type = 'section',
},
{
key="scoremode",
name="Scoring Mode (Control Victory Points)",
desc="Defines how the game is played",
type="list",
def="countdown",
section="controlvictoryoptions",
items={
{key="disabled", name="Disabled", desc="Disable Control Points as a victory condition."},
{key="countdown", name="Countdown", desc="A Control Point decreases all opponents' scores, zero means defeat."},
{key="tugofwar", name="Tug of War", desc="A Control Point steals enemy score, zero means defeat."},
{key="domination", name="Domination", desc="Holding all Control Points will grant 1000 score, first to reach the score limit wins."},
}
},
{
key = 'limitscore',
name = 'Total Score',
desc = 'Total score amount available.',
type = 'number',
section= 'controlvictoryoptions',
def = 2750,
min = 500,
max = 5000,
step = 1, -- quantization is aligned to the def value
-- (step <= 0) means that there is no quantization
},
{
key = 'captureradius',
name = 'Capture Radius',
desc = 'Radius around a point in which to capture it.',
type = 'number',
section= 'controlvictoryoptions',
def = 500,
min = 100,
max = 1000,
step = 25, -- quantization is aligned to the def value
-- (step <= 0) means that there is no quantization
},
{
key = 'capturetime',
name = 'Capture Time',
desc = 'Time to capture a point.',
type = 'number',
section= 'controlvictoryoptions',
def = 30,
min = 1,
max = 60,
step = 1, -- quantization is aligned to the def value
-- (step <= 0) means that there is no quantization
},
{
key = 'capturebonus',
name = 'Capture Bonus',
desc = 'How much faster capture takes place by adding more units.',
type = 'number',
section= 'controlvictoryoptions',
def = 0.5,
min = 0,
max = 10,
step = 0.1, -- quantization is aligned to the def value
-- (step <= 0) means that there is no quantization
},
{
key = 'decapspeed',
name = 'De-Cap Speed',
desc = 'Speed multiplier for neutralizing an enemy point.',
type = 'number',
section= 'controlvictoryoptions',
def = 3,
min = 0.1,
max = 10,
step = 0.1, -- quantization is aligned to the def value
-- (step <= 0) means that there is no quantization
},
{
key = 'starttime',
name = 'Start Time',
desc = 'The time when capturing can start.',
type = 'number',
section= 'controlvictoryoptions',
def = 0,
min = 0,
max = 300,
step = 1, -- quantization is aligned to the def value
-- (step <= 0) means that there is no quantization
},
{
key = 'metalperpoint',
name = 'Metal given to each player per captured point',
desc = 'Each player on an allyteam that has captured a point will receive this amount of resources per point captured per second',
type = 'number',
section= 'controlvictoryoptions',
def = 0,
min = 0,
max = 20,
step = 1, -- quantization is aligned to the def value
-- (step <= 0) means that there is no quantization
},
{
key = 'energyperpoint',
name = 'Energy given to each player per captured point',
desc = 'Each player on an allyteam that has captured a point will receive this amount of resources per point captured per second',
type = 'number',
section= 'controlvictoryoptions',
def = 0,
min = 0,
max = 20,
step = 1, -- quantization is aligned to the def value
-- (step <= 0) means that there is no quantization
},
{
key = 'dominationscoretime',
name = 'Domination Score Time',
desc = 'Time needed holding all points to score in multi domination.',
type = 'number',
section= 'controlvictoryoptions',
def = 30,
min = 1,
max = 60,
step = 1, -- quantization is aligned to the def value
-- (step <= 0) means that there is no quantization
},
{
key = 'tugofwarmodifier',
name = 'Tug of War Modifier',
desc = 'The amount of score transfered between opponents when points are captured is multiplied by this amount.',
type = 'number',
section= 'controlvictoryoptions',
def = 2,
min = 0,
max = 6,
step = 1, -- quantization is aligned to the def value
-- (step <= 0) means that there is no quantization
},
-- End Control Victory Options
////
That's all folks!!!
-------------------
]]--
When you are playing a team game with this, the gadget looks at your ally team, chooses the first player on that team, grabs that player's color and uses it for the teamcolor on the scoreboard. This means that the points captured by that ally team and the scoreboard will reflect that one person's color.
It's a lot harder to explain it than for you to simply see it. It makes perfect sense when you see it first hand.
The best part about this gadget is that it is completely standalone and can be implemented easily into any game for extra gameplay goodness, so, enjoy!!! It only took the better part of 6 months to get it into any kind of shape for public consumption
Gadget Repo:
https://github.com/Spring-Helper-Projec ... rolVictory