Defense Range v6.12
Moderator: Moderators
- very_bad_soldier
- Posts: 1397
- Joined: 20 Feb 2007, 01:10
Re: Defense Range v5.0
Hm, thanks for the hint... I did some tests on it and its quite strange: You have to enable shadows once. You can disable them again right away. When they were enabled once or are actually enabled the feature drawing works correctly.
Something seems to happen when you enable shadows. This doesnt get reverted even when you disable them again. But I have no clue what. Any ideas?
Something seems to happen when you enable shadows. This doesnt get reverted even when you disable them again. But I have no clue what. Any ideas?
- very_bad_soldier
- Posts: 1397
- Joined: 20 Feb 2007, 01:10
Re: Defense Range v5.0
Hm, I messed around with the OpenGL-States. It now works for me (without enabling shadows) on nvidiaGPU when I set this texture state manually:
Maybe someone could please test with an ATI-card? No clue if it works for ATI at all... Thanks!
Code: Select all
gl.TexEnv( GL.TEXTURE_ENV, 34184, 34167 ) --GL_SOURCE0_ALPHA_ARB GL_PRIMARY_COLOR_ARB
- Attachments
-
- gui_defenseRange.lua
- DR 5.01
ghost feature fix - (44.58 KiB) Downloaded 131 times
-
- Posts: 1176
- Joined: 23 Aug 2007, 19:46
Re: Defense Range v5.0
Yup - works fine now (on ATI)! 

-
- Posts: 933
- Joined: 27 Feb 2006, 02:04
Re: Defense Range v5.1
Brilliant, now it should be much easier to setup arrays of fusions, metal makers, and anything else that tends to chain explode.very_bad_soldier wrote: -added: displays blast radius when placing buildings
Re: Defense Range v5.1
Yay! I wanted that feature so bad. I suck at the "spam mohomakers and fusions" stage of economy, so that kind of thing is a big help.
- TheFatController
- Balanced Annihilation Developer
- Posts: 1177
- Joined: 10 Dec 2006, 18:46
Re: Defense Range v5.1
Imo the 'EXPLOSION' text is unneeded, it's pretty clear from the flashing circle what it indicates, if text was going to be used i'd prefer to know how much damage the death explosion did.
- very_bad_soldier
- Posts: 1397
- Joined: 20 Feb 2007, 01:10
Re: Defense Range v5.1
Yes, agreed.
After playing some games I have to admit that it is highly annoying to get this explosion range for each and every building you place. So I changed it so you have to press the META-key (Space) when placing buildings to see the blast range. I hope it does not interfer with other keyboard/UI commands.
What do you think?
After playing some games I have to admit that it is highly annoying to get this explosion range for each and every building you place. So I changed it so you have to press the META-key (Space) when placing buildings to see the blast range. I hope it does not interfer with other keyboard/UI commands.
What do you think?
- Attachments
-
- gui_defenseRange.lua
- DR 5.11
-EXPLOSION-text replaced by explosion's default damage
-press meta (space) to see blast range when placing buildings - (49.51 KiB) Downloaded 141 times
- very_bad_soldier
- Posts: 1397
- Joined: 20 Feb 2007, 01:10
Re: Defense Range v5.11
BOTA support added.
Please tell me if something is wrong.
EDIT: Oops, Debug outputs still enabled... Please set "debug" to "false" in line 22...
Please tell me if something is wrong.
EDIT: Oops, Debug outputs still enabled... Please set "debug" to "false" in line 22...
- Attachments
-
- gui_defenseRange.lua
- DR 5.2
-BOTA support - (49.96 KiB) Downloaded 120 times
- BlueTemplar
- Posts: 314
- Joined: 28 Oct 2007, 22:37
Re: Defense Range v5.11
I tried changing unit_marker.inc to the following, but it didn't work.
What did I do wrong?
(Yes I know this might result in marker spam, I actually would really like to have a widget that underlines the enemy radars, jammers, and minefields when you select a Juno, but I know squat about lua coding.)
BTW, some people made widgets that mark Dragon's Eyes. I think it's a bit problematic, because the greatness of dragon's eyes is that they are hard to spot, even when de-cloaked.
Code: Select all
--[[1.0
Fill this list with your units:
Follow the given examples, fill this fields:
"markerText" -> unit gets marked with this text, nil = no marking
example entries:
unitList["BA"] = {} --initialize table
unitList["BA"]["armrad"] = { markerText = "Radar" }
unitList["BA"]["armjamt"] = { markerText = "Jammer" }
unitList["BA"]["armarad"] = { markerText = "AdvRadar" }
unitList["BA"]["armveil"] = { markerText = "AdvJammer" }
unitList["BA"]["corrad"] = { markerText = "Radar" }
unitList["BA"]["corjamt"] = { markerText = "Jammer" }
unitList["BA"]["corarad"] = { markerText = "AdvRadar" }
unitList["BA"]["corshroud"] = { markerText = "AdvJammer" }
unitList["CA"] = {} --initialize table
]]
(Yes I know this might result in marker spam, I actually would really like to have a widget that underlines the enemy radars, jammers, and minefields when you select a Juno, but I know squat about lua coding.)
BTW, some people made widgets that mark Dragon's Eyes. I think it's a bit problematic, because the greatness of dragon's eyes is that they are hard to spot, even when de-cloaked.
-
- Posts: 1176
- Joined: 23 Aug 2007, 19:46
Re: Defense Range v5.11
I guess you need to give it an additional tag for the weapons. At least all the entries I have provide this and look like this:
Code: Select all
unitList["armguard"] = { markerText = nil, weapons = { 1 } }
- very_bad_soldier
- Posts: 1397
- Joined: 20 Feb 2007, 01:10
Re: Defense Range v5.11
You probably just have to put your code outside the commentsBlueTemplar wrote: What did I do wrong?

Code: Select all
--[[1.0
Fill this list with your units:
Follow the given examples, fill this fields:
"markerText" -> unit gets marked with this text, nil = no marking
example entries:
--]]
unitList["BA"] = {} --initialize table
unitList["BA"]["armrad"] = { markerText = "Radar" }
unitList["BA"]["armjamt"] = { markerText = "Jammer" }
unitList["BA"]["armarad"] = { markerText = "AdvRadar" }
unitList["BA"]["armveil"] = { markerText = "AdvJammer" }
unitList["BA"]["corrad"] = { markerText = "Radar" }
unitList["BA"]["corjamt"] = { markerText = "Jammer" }
unitList["BA"]["corarad"] = { markerText = "AdvRadar" }
unitList["BA"]["corshroud"] = { markerText = "AdvJammer" }
Defense Range itself will only support static unit lists then, no more auto-detection cause it just fails if it comes to supporting different mods.
Im going to bed now I will post them tomorrow, its barely tested but you can have a try with it.
- BlueTemplar
- Posts: 314
- Joined: 28 Oct 2007, 22:37
Re: Defense Range v5.11
Thank you! (I didn't knew --[[ ... --]] was for comments
)

- very_bad_soldier
- Posts: 1397
- Joined: 20 Feb 2007, 01:10
Re: Defense Range v5.11
Here they are. I dont know when I will have time to test them but if someone has the patience to use them I would be happy to hear about bugs and problems and suggestions.
- Attachments
-
- gui_blastRadius.lua
- Blast Radius
-displays blast radius of select units (META+X) and while placing buildings (META) - (9.04 KiB) Downloaded 124 times
-
- unit_ghostSite.lua
- Ghost Site
-displays ghosted buildings in progress (in green) and features (DragonTeeth/Walls whatever) - (7.56 KiB) Downloaded 113 times
-
- unit_marker.lua
- Unit Marker 1.1
-currently only CA and BA Nukes and AntiNukes get marked. Others can be added easily within the file
-multiple mod support (currently CA & BA. They can be added/tweaked easily)
-no multiple markers if multiple players use it - (5.18 KiB) Downloaded 127 times
- very_bad_soldier
- Posts: 1397
- Joined: 20 Feb 2007, 01:10
Re: Defense Range v5.11
While we are at it: I played around with a widget for local team recoloring (idea from another thread): You can put a list of player names and colors inside the widget and it will recolor these players as desired. If another player has that color already the colors will be swapped. This is even less tested
You have to manually disable and re-enable after the game has started since obviously changing team colors in widget:Initialize doesnt work.

- Attachments
-
- unit_localTeamColors.lua
- Local Team Colors
Updated! Now probably even working! - (5.22 KiB) Downloaded 128 times
-
- gui_defenseRange.lua
- Defense Range 6
-only static unit lists supported (currently just BA, others to add)
-all other functions besides range drawing have gone to own files
-combo-units (air and ground) do correctly drawn with two circles - (33.84 KiB) Downloaded 121 times
Last edited by very_bad_soldier on 15 Apr 2009, 20:02, edited 1 time in total.
Re: Defense Range v5.11
could u release another defense range widget which include all the old functions (i dont want to have too much widgets in the list)
- BlueTemplar
- Posts: 314
- Joined: 28 Oct 2007, 22:37
Re: Defense Range v5.11
IMHO it's best to keep the widgets separate, so that you can de-activate some of them if you wish, but we do need to be able to separate them in different categories, a bit like in Ice UI.
BTW, did you fix the spec problem with the unit marker? (Specs are adding automatic markers too)
It might be interesting to keep it for some units, to show the specs when a player is building something that will change the game, like a t2 fac, a nuke, a big bertha/vulcan...
BTW, did you fix the spec problem with the unit marker? (Specs are adding automatic markers too)
It might be interesting to keep it for some units, to show the specs when a player is building something that will change the game, like a t2 fac, a nuke, a big bertha/vulcan...
Re: Defense Range v5.11
u could enable/disable them with ctrl+f11 (would be nice)
-
- Posts: 933
- Joined: 27 Feb 2006, 02:04
Re: Defense Range v5.11
Any way to make the blast radius toggle on and off with a button like you've got for ground defense, air defense, and anti-nukes on Defense Range widget? I'm thinking 3 buttons, one for showing the blast radius of enemy buildings, one for showing the blast radius of your buildings under construction, and one for showing the blast radius of all your buildings and friendlies buildings.
- BlueTemplar
- Posts: 314
- Joined: 28 Oct 2007, 22:37
Re: Defense Range v5.11
NVM
Last edited by BlueTemplar on 15 Apr 2009, 00:02, edited 1 time in total.