Modoptions
Posted: 20 Jan 2013, 18:26
Hi guys,
I've been looking at adding a couple of modoptions to a game, but I can't get my options to show up in the lobby.
For example:
Say I wanted an option to vary the commander's sight range.
This is what I'd put in the mod options.
Then, to implement this, I'd have to go and edit commoption.lua
and add something like:
inside of the function spawnStartUnit(teamID) block
my problem is nothing is showing up in the lobby. Is there another file I need to edit?
I've been looking at adding a couple of modoptions to a game, but I can't get my options to show up in the lobby.
For example:
Say I wanted an option to vary the commander's sight range.
This is what I'd put in the mod options.
Code: Select all
{
key = "los",
name = "Line of Sight",
desc = "varies the line of sight of commander",
type = "number",
section= "StartingResourses",
def = "4000",
min = "2000",
max = "10000",
step = 100,
},
and add something like:
Code: Select all
if (los and tonumber(los) ~= 0) then
Spring.SetUnitSensorRadius(commanderID, "los", los)
end
my problem is nothing is showing up in the lobby. Is there another file I need to edit?