Page 7 of 8

Re: Defense Range v5.0

Posted: 15 Feb 2009, 16:50
by very_bad_soldier
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?

Re: Defense Range v5.0

Posted: 15 Feb 2009, 18:24
by very_bad_soldier
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:

Code: Select all

gl.TexEnv( GL.TEXTURE_ENV, 34184, 34167 )	--GL_SOURCE0_ALPHA_ARB			GL_PRIMARY_COLOR_ARB
Maybe someone could please test with an ATI-card? No clue if it works for ATI at all... Thanks!

Re: Defense Range v5.0

Posted: 15 Feb 2009, 20:10
by [Krogoth86]
Yup - works fine now (on ATI)! :-)

Re: Defense Range v5.1

Posted: 21 Feb 2009, 15:28
by very_bad_soldier
...new version

Re: Defense Range v5.1

Posted: 22 Feb 2009, 02:43
by el_matarife
very_bad_soldier wrote: -added: displays blast radius when placing buildings
Brilliant, now it should be much easier to setup arrays of fusions, metal makers, and anything else that tends to chain explode.

Re: Defense Range v5.1

Posted: 22 Feb 2009, 04:11
by Pxtl
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.

Re: Defense Range v5.1

Posted: 22 Feb 2009, 12:50
by TheFatController
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.

Re: Defense Range v5.1

Posted: 22 Feb 2009, 16:31
by very_bad_soldier
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?

Re: Defense Range v5.11

Posted: 24 Feb 2009, 20:36
by very_bad_soldier
BOTA support added.

Please tell me if something is wrong.

EDIT: Oops, Debug outputs still enabled... Please set "debug" to "false" in line 22...

Re: Defense Range v5.11

Posted: 13 Apr 2009, 23:50
by BlueTemplar
I tried changing unit_marker.inc to the following, but it didn't work.

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
]]
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.

Re: Defense Range v5.11

Posted: 14 Apr 2009, 00:02
by [Krogoth86]
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 } }

Re: Defense Range v5.11

Posted: 14 Apr 2009, 00:42
by very_bad_soldier
BlueTemplar wrote: What did I do wrong?
You probably just have to put your code outside the comments :-)

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" }
Besides that I have reworked this widget completely. I have split it up into four individual widgets so each function goes into its own file. So for your case there is a unitMarker-widget (I think I posted an early version in this thread some months ago).
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.

Re: Defense Range v5.11

Posted: 14 Apr 2009, 01:14
by BlueTemplar
Thank you! (I didn't knew --[[ ... --]] was for comments :P )

Re: Defense Range v5.11

Posted: 14 Apr 2009, 18:47
by very_bad_soldier
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.

Re: Defense Range v5.11

Posted: 14 Apr 2009, 18:51
by very_bad_soldier
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 :o You have to manually disable and re-enable after the game has started since obviously changing team colors in widget:Initialize doesnt work.

Re: Defense Range v5.11

Posted: 14 Apr 2009, 19:10
by manolo_
could u release another defense range widget which include all the old functions (i dont want to have too much widgets in the list)

Re: Defense Range v5.11

Posted: 14 Apr 2009, 19:58
by BlueTemplar
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...

Re: Defense Range v5.11

Posted: 14 Apr 2009, 20:45
by manolo_
u could enable/disable them with ctrl+f11 (would be nice)

Re: Defense Range v5.11

Posted: 14 Apr 2009, 20:52
by el_matarife
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.

Re: Defense Range v5.11

Posted: 14 Apr 2009, 21:23
by BlueTemplar
NVM