Page 6 of 8
Re: Defense Range v4.13
Posted: 04 Oct 2008, 14:05
by SteelSide
Thanks for this,i love it.
Any chance to have radar added to it (if there is no other such widget? I haven't found any..)
Re: Defense Range v4.13
Posted: 04 Oct 2008, 16:32
by manolo_
hi, there is already one its called
gui_los_colors.lua (dunno the dec of it), then u have to add these 4 lines into the cmdcolors.txt (in mainfolder):
alwayscolor 0.5 0.5 0.5 0.7
loscolor 0 0 0 0.1
radarcolor 0.25 0 0 1
jamcolor -0.1 0 0.25 1
u could change the colors as u want them, with my settings is the radar red and jammer blue. to enable it, activate the lua and press "L" ingame, but it needs to much cpu, maybe somebody could make it better
Re: Defense Range v4.13
Posted: 19 Oct 2008, 00:33
by el_matarife
I'm attempting to modify an old unit defs file to get it to overlay the unit definitions included in BA 6.5 so that more units get marked automatically. I've written a unit list file and placed it in /LuaUi/Widgets but I'm not getting any results. I've tried it with the mod's built in version and a stand alone version too. Is there something wrong with the defs file I wrote, or is something else the problem?
Code: Select all
--[[
Fill this list with your units:
Follow the given examples, fill this fields:
"markerText" -> unit gets marked with this text, nil = no marking
"weapons" -> a table that gives the types for the different weapons, the order of the types has to match the order in the unitDefinition
First column is the type:
1 Ground
2 Air
3 AntiNuke
4 Ground + Air capable
example entries for including with a mod:
unitList["cordoomsday"] = { markerText = nil, weapons = { 1,1,1 } }
unitList["armamd"] = { markerText = "AntiNook" }
unitList["armhlt"] = { markerText = "An HLT!", weapons = { 1 } }
In the same way you can define units but for certain mods. In this case use the table unitListTable with the mod tag as you see below.
I dont know what this could be good for since if you include df in a mod, you know already which mod you will have, but with this method I hardcoded
the BA cormav and armclaw in the main widget. There is probably no use for you in this method though.
unitListTable["BA"] = { armclaw = { markerText = nil, weapons = { 1 } },
cormaw = { markerText = nil, weapons = { 1 } }
}
]]
unitList["cortron"] = { markerText = "Core TacNuke Launcher" , weapons = { 1 } }
unitList["coreyes"] = { markerText = "Core Eye" }
unitList["coravp"] = { markerText = "Core T2 Veh Lab" }
unitList["corasy"] = { markerText = "Core T2 Ship Lab" }
unitList["coralab"] = { markerText = "Core T2 KBot Lab" }
unitList["coraap"] = { markerText = "Core T2 Air Lab" }
unitList["armeyes"] = { markerText = "Arm Eye" }
unitList["armalab"] = { markerText = "Arm T2 KBot Lab" }
unitList["armaap"] = { markerText = "Arm T2 Air Lab" }
unitList["armasy"] = { markerText = "Arm T2 Ship Lab"}
unitList["armavp"] = { markerText = "Arm T2 Veh Lab"}
unitList["armamb"] = { markerText = "Arm T2 Plasma"}
unitList["corspy"] = { markerText = "Core Spy"}
unitList["armspy"] = { markerText = "Arm Spy"}
unitList["armbanth"] = { markerText = "Bantha"}
unitList["armamd"] = { markerText = "Arm AntiNuke"}
unitList["armcom"] = { markerText = "Arm Comm"}
unitList["armdecom"] = { markerText = "Arm Decoy Comm"}
unitList["armsilo"] = { markerText = "Arm Nuke"}
unitList["armbrtha"] = { markerText = "Arm LRPC" , weapons = { 1 } }
unitList["armemp"] = { markerText = "Arm EMP Launcher" , weapons = { 1 } }
unitList["armsilo"] = { markerText = "Arm Nuke"}
unitList["armguard"] = { markerText = "Arm T1 Plasma" , weapons = { 1 } }
unitList["armshltx"] = { markerText = "Arm Gantry"}
unitList["armscab"] = { markerText = "Arm Mobile AntiNuke"}
unitList["armvulc"] = { markerText = "Arm Vulcan" , weapons = { 1 } }
unitList["aafus"] = { markerText = "Arm Adv Fusion"}
unitList["corsilo"] = { markerText = "Core Nuke"}
unitList["corint"] = { markerText = "Core LRPC" , weapons = { 1 } }
unitList["corsilo"] = { markerText = "Core Nuke"}
unitList["corpun"] = { markerText = "Core T1 Plasma" , weapons = { 1 } }
unitList["corgant"] = { markerText = "Core Gantry"}
unitList["cormabm"] = { markerText = "Core Mobile AntiNuke"}
unitList["corbuzz"] = { markerText = "Core Buzzsaw" , weapons = { 1 } }
unitList["cafus"] = { markerText = "Core Adv Fusion"}
unitList["cortoast"] = { markerText = "Core T2 Plasma" , weapons = { 1 } }
unitList["corfmd"] = { markerText ="Core AntiNuke"}
unitList["gorg"] = { markerText = "Juggernaut"}
unitList["corkrog"] = { markerText = "Krogoth"}
unitList["corcom"] = { markerText = "Core Comm"}
unitList["cordecom"] = { markerText = "Core Decoy Comm"}
unitList["corgate"] = { markerText = "Core Plasma Shield" , weapons = { 1 } }
unitList["armgate"] = { markerText = "Arm Plasma Shield" , weapons = { 1 } }
Re: Defense Range v4.13
Posted: 19 Oct 2008, 02:24
by jK
defrange's readme wrote:DefenseRange 3.7
================
There are two ways to use this mod:
useUnitFile == false : Generic Mode: The widget tries to detect weapon types depending on supported mods (BA,CA,XTA), air damage and weapon ranges.
Only nukes and antiNukes get marked. Use this mode by just copying the file gui_defenseRange.lua to your widgets folder.
useUnitFile == true : UnitFile Mode: A static unit list is used to determine weapon types. This mode is meant to be used if the widget is included in a mod.
Re: Defense Range v4.13
Posted: 19 Oct 2008, 02:24
by very_bad_soldier
Hm, first thought: Did you change line 20 in the gui_defenseRange.lua to
Re: Defense Range v4.13
Posted: 27 Oct 2008, 01:31
by el_matarife
Yes, I've changed that variable and now it is pinging anything I've specified with a weapon, but not the regular stuff in my list like the factories and advanced fusion. I'm going to try adding dummy weapons to everything next I guess.
Re: Defense Range v4.13
Posted: 27 Oct 2008, 18:57
by very_bad_soldier
el_matarife wrote:Yes, I've changed that variable and now it is pinging anything I've specified with a weapon, but not the regular stuff in my list like the factories and advanced fusion. I'm going to try adding dummy weapons to everything next I guess.
This looks indeed like a bug. Will get fixed soon.
EDIT:
Have a try with this please.
Re: Defense Range v4.13
Posted: 28 Oct 2008, 06:48
by el_matarife
This fixes pinging of stuff with no weapons, but I can't get it to ping mobile units with weapons like Commanders, Krogoths, Juggernauts, Banthas. Dragon's Eyes and Spies both ping fine. I haven't specified weapons on any of those units.
Re: Defense Range v4.13
Posted: 28 Oct 2008, 18:45
by very_bad_soldier
Hm yeah, mobile units are not taken into account. Maybe it would be better to use a dedicated Marker-widget for more detailed control since the marker stuff was more a "spin-off" product from the defenseRange. I dont think it would be wise to boost the functionality even more inside the defenseRange-widget.
Re: Defense Range v4.13
Posted: 29 Oct 2008, 00:45
by el_matarife
A dedicated "markers only" build of your widget would be pretty awesome, since people could use it in addition to mod's built in defense range with their own custom unit list very easily if you made it read from a file in the /widgets/ directory by default.
Re: Defense Range v4.13
Posted: 29 Oct 2008, 19:52
by very_bad_soldier
I cant promise at the moment but I will try to do something like that. Should not be too much work.
Re: Defense Range v4.13
Posted: 14 Dec 2008, 22:35
by el_matarife
very_bad_soldier wrote:Hm yeah, mobile units are not taken into account.
Next question, why did mobile units actually work at one point in time?
http://pastebin.com/f1bc8a799 http://pastebin.com/f5259e55d
This modded defense range widget 3.6 seems to work just fine with commanders and a few other mobile units.
(If anyone's interested in actually using this version all you have to do is save the Lua file as gui_defenseRange_MODDED.lua and the units file as gui_defenseRange_units_MODDED.inc)
Re: Defense Range v4.13
Posted: 15 Dec 2008, 18:28
by very_bad_soldier
If youre still interested in the marker-stuff, I did a simple marker-widget in the meantime but was too lazy to write markerlists for certain mods (and I didnt think anyone would be interested in it). Maybe have a try with it... Should work with all types of units, but its barely tested though...
Re: Defense Range v4.13
Posted: 16 Dec 2008, 19:15
by ZellSF
--this one receives lua msgs from allied players. the player with the lowest id sets the marker first
--the others discard their markers when receiving a message from a lower player id
Does the defence range widget do this too? it really should...
Re: Defense Range v4.13
Posted: 16 Dec 2008, 22:45
by very_bad_soldier
Yes, it does, but I am not entirely sure whether this is working currently. Something is buggy in the current spring version with those Lua-messages.
Re: Defense Range v4.13
Posted: 18 Dec 2008, 02:36
by el_matarife
Here's a bug entry for the range rings for plasma and laser weaponry being displayed wrong when they are built on hills:
http://spring.clan-sy.com/mantis/view.php?id=1225 Care to comment?
Re: Defense Range v4.13
Posted: 19 Dec 2008, 01:10
by very_bad_soldier
Yes, I know. Defense Range draws the circle in a fixed distance on a plane instead of intersecting a sphere with the terrain. So hills and stuff doesnt matter at the moment.
I am hoping to fix it some day...

Re: Defense Range v4.13
Posted: 19 Dec 2008, 10:39
by ginekolog
very_bad_soldier wrote:If youre still interested in the marker-stuff, I did a simple marker-widget in the meantime but was too lazy to write markerlists for certain mods (and I didnt think anyone would be interested in it). Maybe have a try with it... Should work with all types of units, but its barely tested though...
I would love that defense range widget could mark units i put in widget(list) (i would like it to mark enemy com and mobile antinukes).
Will try this unitmarker for now :)
Re: Defense Range v5.0
Posted: 18 Jan 2009, 15:57
by very_bad_soldier
*new version*
...barely tested
Re: Defense Range v5.0
Posted: 15 Feb 2009, 14:54
by [Krogoth86]
Does the feature visibility need to be activated somewhere? At least I couldn't see DTs built by an enemy after losing sight on it...