Defense Range v6.12 - Page 2

Defense Range v6.12

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

User avatar
ginekolog
Posts: 837
Joined: 27 Feb 2006, 13:49

Post by ginekolog »

bug: if i only select to see enemy antinukes(default), rings dont show. When i select allys + enemys, both rings show.
User avatar
very_bad_soldier
Posts: 1397
Joined: 20 Feb 2007, 01:10

Post by very_bad_soldier »

ginekolog wrote:bug: if i only select to see enemy antinukes(default), rings dont show. When i select allys + enemys, both rings show.
Thanks for reporting. I just tried it but I was not able to reproduce. Which mod was it and was it version 3.1 of the widget?
User avatar
ginekolog
Posts: 837
Joined: 27 Feb 2006, 13:49

Post by ginekolog »

its ba 5.8 and 3.1 but just rememberd i saw this when watching rep. So ingame might work correctly.

EDIT: i confirm this is working ok and i use this widget every game.
User avatar
NOiZE
Balanced Annihilation Developer
Posts: 3984
Joined: 28 Apr 2005, 19:29

Post by NOiZE »

This widget is broken in the SVN version of Spring, I tested with 4933.
[KnoX]ElementalGizmo
XTA Developer
Posts: 266
Joined: 24 Aug 2006, 01:33

Post by [KnoX]ElementalGizmo »

harsh :<

will this be fixed by the next update? Also any word on this working on xta ? I tryed it out and time to time i see things not working properly :< Which is a shame as this could be a VERY good tool for our community !

Please keep up the work,
Giz
User avatar
very_bad_soldier
Posts: 1397
Joined: 20 Feb 2007, 01:10

Post by very_bad_soldier »

Thanks to you for input and bug report.
I tried to fix it for svn version, it should work now. And the best is: Even XTA seems to work with svn version :-) I dont know why, it seems something has been fixed. I adjusted the damage threshold for XTA and it is worth a test now 8)

BTW, Look at the first page of this thread for changelog...
User avatar
Noruas
XTA Developer
Posts: 1269
Joined: 24 Feb 2005, 02:58

Post by Noruas »

Thats good to know, that will come packed with xta v9.2 disabled by default of course. It will still be there though for those who like those features.
User avatar
NOiZE
Balanced Annihilation Developer
Posts: 3984
Joined: 28 Apr 2005, 19:29

Post by NOiZE »

Thanks for the fix
[KnoX]ElementalGizmo
XTA Developer
Posts: 266
Joined: 24 Aug 2006, 01:33

Post by [KnoX]ElementalGizmo »

Nice one :lol:
[Krogoth86]
Posts: 1176
Joined: 23 Aug 2007, 19:46

Re: Defense Range v3.4 (fixes, fixes, fixes)

Post by [Krogoth86] »

Hi!

After rewriting the Armor.txt for my mod this widget doesn't work for me anymore. When a turret gets built it shuts down and says:
Error in UnitCreated(): [string "LuaUI/Widgets/gui_defenserange.lua"]:510: attempt to perform arithmetic on local 'airDmg' (a nil value)
Removed widget: Defense Range v3.4
I just found out that it miracly works for some single things like the Annihilator or Pitbull. So what do I have to take care of / change on the predefined presets?
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: Defense Range v3.4 (fixes, fixes, fixes)

Post by KDR_11k »

I suppose it's hardcoded to expect certain armor names.
[Krogoth86]
Posts: 1176
Joined: 23 Aug 2007, 19:46

Re: Defense Range v3.4 (fixes, fixes, fixes)

Post by [Krogoth86] »

Well in that case I'd really like to have a config file where you put in the unitname of each unit for the specific categories and maybe also write down their range so there won't be such issues with automatically detecting the right classes and settings...
User avatar
very_bad_soldier
Posts: 1397
Joined: 20 Feb 2007, 01:10

Re: Defense Range v3.4 (fixes, fixes, fixes)

Post by very_bad_soldier »

If you could upload that widget somewhere I will take a look at it. Since I totally relied on UF, I dont have a clean version of it at the moment :(
(Maybe you even have that LuaPack that I made too?)

EDIT:
I looked at the version included in CA, I think its quite hard to make this truly generic (I dont even know if it is possible at all). The best will be to add your mod to the supported mod list and do even more hard coded stuff :D
[Krogoth86]
Posts: 1176
Joined: 23 Aug 2007, 19:46

Re: Defense Range v3.4 (fixes, fixes, fixes)

Post by [Krogoth86] »

I attached the widget I use to this posting. It should be a "clean" version i.e. it doesn't have those modifications that CA has...

Edit:
Well as the error report says it seems to crash on this line:

Code: Select all

local airdps = airDmg / weaponDef.reload
And when looking at that code in general - it really isn't possible to replace that class sorting by looking at dps and at-air-capabilities by something prewritten where you just put in the unitnames? I mean you pretty much have everything you need in there but instead of those "complex" measurings you do you'd just give him a list of how to sort each unit. This also would make some things easier as with a complete third tech level you might get problems with that dps measuring (or it would result in a lot of work to readjust all the damage groups and values just to have that auto-algorithm recognize your units the right way). So if you can think of a way to make me just type in the unitnames into to the specific category that would be awesome (and also makes this widget much more usable for other mods)... :-)
Attachments
gui_defenseRange.rar
Defense Range V3.4
(4.84 KiB) Downloaded 39 times
User avatar
very_bad_soldier
Posts: 1397
Joined: 20 Feb 2007, 01:10

Re: Defense Range v3.4 (fixes, fixes, fixes)

Post by very_bad_soldier »

Thanks for uploading, nice to have it back :)

Your idea isnt bad at all and I already thought about something like this but who would want to create such a unit list for the normal TA mods with its hundreds of units? So it would probably be best if you could use both methods. So mod designers should have the choice to make such a list and give it to the widget which can use the list to determine unit type (ground/air/nuke).

Yeah, I am getting some ideas in this moment. The widget could choose which method to use depending on the mod name. All supported mods so far would use the standard method while you could add your "mod-tag" in the supported mod list along with a filename. So the widget would load your unit list when it detects your mod and use a list-based method to determine unit type instead of the actual method.

Problem is I am short on time at the moment. But I will put it on my todo list and try to implement that.
[Krogoth86]
Posts: 1176
Joined: 23 Aug 2007, 19:46

Re: Defense Range v3.4 (fixes, fixes, fixes)

Post by [Krogoth86] »

Your idea isnt bad at all and I already thought about something like this but who would want to create such a unit list for the normal TA mods with its hundreds of units? So it would probably be best if you could use both methods. So mod designers should have the choice to make such a list and give it to the widget which can use the list to determine unit type (ground/air/nuke).
Well on the one side if you went ahead and do another Armor.txt you'll also take the effort to do this for this widget... :wink:

Besides you don't need such a list of all the units as this is only about the static defenses and that are only few in comparison. That way and with taking BA for example, the Arm T1 entries would look like this:

Code: Select all

Ground Defense List:
armllt
tawf001
armclaw
armhlt
armguard
armdl
armtl
armfhlt

Air Defense List:
armrl
packo
armcir
armfrt
So you see it wouldn't be THAT much work...

And well if it isn't too much work it would be really cool if you could have some influence on that markers for nukes and so on. So when writing that list you kinda make your own "category" and the categorie's name then gets printed on the marker. That way you would get a very flexible system for non-TA mods and mods which don't have nukes only as superweapon...

But that really just would be the cherry on the cake... :wink:
User avatar
very_bad_soldier
Posts: 1397
Joined: 20 Feb 2007, 01:10

Re: Defense Range v3.4 (fixes, fixes, fixes)

Post by very_bad_soldier »

Ok, i tried to hack it in. You can test it if you want. All you have to do is to go to the DetectMod-function and insert a case for your mod. I made an example for your mod assuming you will call it "KROGTA" :D

Then fill the file "gui_defenseRange_units.lua".

I hope I did include enough comments to get it fillled correctly. It was quite a quick hack so please tell me if bugs occur (I am sure they will) or if you need help to get your mod supported.

EDIT:
Damn, you may want to set the line "local debug = true" to false to not see all the debug messages.
Attachments
DefenseRange35b.zip
DefenseRange 3.5 TEST
(6.55 KiB) Downloaded 31 times
User avatar
BlueTemplar
Posts: 314
Joined: 28 Oct 2007, 22:37

Re: Defense Range v3.4 (fixes, fixes, fixes)

Post by BlueTemplar »

BTW, why Juno was removed from the "nuke list"? Doesn't it belongs there, along with the emp missile? Also maybe you could add the Deflector Shield to the "anti-nuke list" (even if it's easy to see when on).
[Krogoth86]
Posts: 1176
Joined: 23 Aug 2007, 19:46

Re: Defense Range v3.4 (fixes, fixes, fixes)

Post by [Krogoth86] »

AWESOME! :-)

I just tried it for some T1 turrets (plus a custom marker tag) and it works like a charm. Now I just have to figure out which line gets read for the mod detection as it didn't work at first try and so I changed all the modinfo entries to my mod-shortname... :wink:

Thanks a lot! :-)

EDIT:
Well it seems that the modname detection is a bit unfortunate as I had to give the same name to the "name" and "version" tag to make it work. Would be nice if it would read the shortname tag (-> reference )...
User avatar
very_bad_soldier
Posts: 1397
Joined: 20 Feb 2007, 01:10

Re: Defense Range v3.4 (fixes, fixes, fixes)

Post by very_bad_soldier »

Nice to hear that :-)

I will try to take over the mod detection from the CA-version. I think they fixed something for the new mod shortnames.
Last edited by very_bad_soldier on 04 Mar 2008, 19:18, edited 1 time in total.
Post Reply

Return to “Lua Scripts”