I'd woud be very nice if someone can spend some time in explaining this for a noob

Thanks
Moderator: Moderators
hiho,iph8x wrote:I'am a complety Noob with these Widgets, and i'd like to make some widgets for Example the Defence Range Widget working for a not Supported mod also an example Complete Anaihalion Advanced.
I'd woud be very nice if someone can spend some time in explaining this for a noob.
Thanks
Code: Select all
local modConfig = {}
-- BA
--to support other mods
--table initialized and unitList is needed!
Code: Select all
modConfig["BA"] = {}
modConfig["BA"]["unitList"] =
{
armclaw = { weapons = { 1 } },
cormaw = { weapons = { 1 } },
armllt = { weapons = { 1 } },
tawf001 = { weapons = { 1 } },
armhlt = { weapons = { 1 } },
armguard = { weapons = { 1, 1 } },
armrl = { weapons = { 2 } }, --light aa
packo = { weapons = { 2 } },
armcir = { weapons = { 2 } }, --chainsaw
armdl = { weapons = { 1 } }, --depthcharge
ajuno = { weapons = { 1 } },
armtl = { weapons = { 1 } }, --torp launcher
armfhlt = { weapons = { 1 } }, --floating hlt
armfrt = { weapons = { 2 } }, --floating rocket laucher
armamb = { weapons = { 1,1 } }, --ambusher
armpb = { weapons = { 1 } }, --pitbull
armanni = { weapons = { 1 } },
armflak = { weapons = { 2 } },
mercury = { weapons = { 2 } },
armemp = { weapons = { 1 } },
armamd = { weapons = { 3 } }, --antinuke
armbrtha = { weapons = { 1 } },
armvulc = { weapons = { 1 } },
--CORE
corexp = { weapons = { 1 } },
cormaw = { weapons = { 1 } },
corllt = { weapons = { 1 } },
hllt = { weapons = { 1 } },
corhlt = { weapons = { 1 } },
corpun = { weapons = { 1, 1 } },
corrl = { weapons = { 2 } },
madsam = { weapons = { 2 } },
corerad = { weapons = { 2 } },
cordl = { weapons = { 1 } },
cjuno = { weapons = { 1 } },
corfhlt = { weapons = { 1 } }, --floating hlt
cortl = { weapons = { 1 } }, --torp launcher
corfrt = { weapons = { 2 } }, --floating rocket laucher
cortoast = { weapons = { 1 } },
corvipe = { weapons = { 1 } },
cordoom = { weapons = { 1 } },
corflak = { weapons = { 2 } },
screamer = { weapons = { 2 } },
cortron = { weapons = { 1 } },
corfmd = { weapons = { 3 } },
corint = { weapons = { 1 } },
corbuzz = { weapons = { 1 } }
}
--implement this if you want dps-depending ring-colors
--colors will be interpolated by dps scores between min and max values. values outside range will be set to nearest value in range -> min or max
modConfig["BA"]["armorTags"] = {}
modConfig["BA"]["armorTags"]["air"] = "vtol"
modConfig["BA"]["armorTags"]["ground"] = "else"
modConfig["BA"]["dps"] = {}
modConfig["BA"]["dps"]["ground"] = {}
modConfig["BA"]["dps"]["air"] = {}
modConfig["BA"]["dps"]["ground"]["min"] = 50
modConfig["BA"]["dps"]["ground"]["max"] = 500
modConfig["BA"]["dps"]["air"]["min"] = 80
modConfig["BA"]["dps"]["air"]["max"] = 500
--end of dps-colors
--implement this if you want custom colors - we dont want it for BA
--[[
modConfig["BA"]["color"] = {}
modConfig["BA"]["color"]["enemy"] = {}
modConfig["BA"]["color"]["enemy"]["ground"] = {}
modConfig["BA"]["color"]["enemy"]["air"] = {}
modConfig["BA"]["color"]["enemy"]["nuke"] = {}
modConfig["BA"]["color"]["enemy"]["ground"]["min"] = { 1.0, 0.0, 0.0 }
modConfig["BA"]["color"]["enemy"]["ground"]["max"] = { 1.0, 1.0, 0.0 }
modConfig["BA"]["color"]["enemy"]["air"]["min"] = { 0.0, 1.0, 0.0 }
modConfig["BA"]["color"]["enemy"]["air"]["max"] = { 0.0, 0.0, 1.0 }
modConfig["BA"]["color"]["enemy"]["nuke"] = { 1.0, 1.0, 1.0 }
modConfig["BA"]["color"]["ally"] = modConfig["BA"]["color"]["enemy"]
--]]
--end of custom colors
--end of BA
Are you confusing it with Attack-AoE maybe?Forboding Angel wrote:And if you read the description in the widget database, it tells you to use an older version for mods that aren't BA.
yes he is.very_bad_soldier wrote:Are you confusing it with Attack-AoE maybe?Forboding Angel wrote:And if you read the description in the widget database, it tells you to use an older version for mods that aren't BA.
You could include all static, armed units then have a mod specific blacklist. I guess that doesn't help with antiground/air though.very_bad_soldier wrote:It did once but I changed it. You have not enough control over which units are considered static defenses. There are static defenses you would not want to show up. And you cant reliable say if its antiground/antiair or even both.
Cmon its just 15-20 mins of work which you do once for a mod and you have full control over the whole result.
ive to agree, the work was done pretty fast (but xta is on modua.., so its was easier)very_bad_soldier wrote:It did once but I changed it. You have not enough control over which units are considered static defenses. There are static defenses you would not want to show up. And you cant reliable say if its antiground/antiair or even both.
Cmon its just 15-20 mins of work which you do once for a mod and you have full control over the whole result.