Now it looks like this:
Code: Select all
unitList["cordoomsday"] = { markerText = nil, weapons = { 1,1,1 } }
unitList["armamd"] = { markerText = "AntiNook" }
unitList["armhlt"] = { markerText = "An HLT!", weapons = { 1 } }
Moderator: Moderators
Code: Select all
unitList["cordoomsday"] = { markerText = nil, weapons = { 1,1,1 } }
unitList["armamd"] = { markerText = "AntiNook" }
unitList["armhlt"] = { markerText = "An HLT!", weapons = { 1 } }
Code: Select all
Error in UnitEnteredLos(): [string "LuaUI/Widgets/gui_defenserange.lua"]:892: attempt to perform arithmetic on local 'damage' (a nil value)
Code: Select all
function getModAirTag()
local tag = "vtol"
if ( curModID == "XTA" ) then
tag = "group_landair"
elseif ( curModID == "CA" ) then
tag = "planes"
elseif ( curModID == "EVO) then
tag = "evoair"
end
return tag
end
lawlvery_bad_soldier wrote:(line 718)
Can you give any instructions on what actually happens in those armor and weapondetect definitions and what actually gets defined there? I think the problem has to be in that part...[ 340] Loading: LuaUI/Widgets/gui_defenserange.lua
[ 340] <DefenseRange> Using unit file instead of generic method!
[ 340] <DefenseRange> Generic Mode. ModName: Maximum Annihilation V1.2 Alpha 1 Detected Mod: MA
[ 646] false
[ 646] Error in UnitCreated(): [string "LuaUI/Widgets/gui_defenserange.lua"]:913: attempt to perform arithmetic on local 'damage' (a nil value)
[ 646] Removed widget: Defense Range v4.13
Code: Select all
armorTags["MA"]["ground"] = "tanks"
armorTags["MA"]["air"] = "vtols"
Indeed that did the trick. The funny thing is that I actually thought it might be case-sensitive to what I wrote in the armor.txt where I wrote it in upper case letters...To your problem: Your armor classes are case-sensitive, changing your definitions like this made it work (tested against MA10):
I didn't want to sound rude about that but it's just that this extension doesn't make that much sense to me. Imo there is no real need for colors depending on the dps. I mean on the one side it's technically about impossible to do that as this measurement just uses one armor type and so even for BA it won't always be correct while for games with an extensive use of armors it's a complete waste - you might even want to turn that part off entirely in that case to just have circles for the range. The other side is that it imo isn't really needed either. I mean when you get a circle, you'll also know the unit which caused it and so you know the damage it does (especially in games like BA where stronger weapons usually are combined with longer ranges)...My knowledge of internal mod structures is very limited (cause I made exactly 0 mods) but I still dont think it totally fails.
No problem. Ok sure, the color is not correct for all units, but its still true for most units. I think this is sufficient since you do not get absolute DPS values anyway. The colors just give rough and relative estimations for damage. They just say "I DO A LOT OF DAMAGE" or "i do only little damage", not more. So this will be even true for special armor classes unless the damage modificators are real strong.I didn't want to sound rude about that but it's just that this extension doesn't make that much sense to me. Imo there is no real need for colors depending on the dps. I mean on the one side it's technically about impossible to do that as this measurement just uses one armor type and so even for BA it won't always be correct while for games with an extensive use of armors it's a complete waste - you might even want to turn that part off entirely in that case to just have circles for the range. The other side is that it imo isn't really needed either.
Frankly, in heavy battles when there are lots of turrets and lots of circles I would have real problems to identify the most dangerous ones.I mean when you get a circle, you'll also know the unit which caused it and so you know the damage it does (especially in games like BA where stronger weapons usually are combined with longer ranges)...
Well the question is of how much use that is, how easy it's to "read" and where you can apply it. Imo it has no real advantage for all these points. The main advantage of your widget is the fantastic ability to see ranges and handle your units in a more efficent way (although this of course takes away a bit of what makes the difference between a experienced player who has learned about ranges and a not so good player who has not). Having colors for dps now is no big advantage for this as you still have to look up from which buildings those circles may be spawned and so you don't really safe lots of time or provide some precious info...very_bad_soldier wrote:No problem. Ok sure, the color is not correct for all units, but its still true for most units. I think this is sufficient since you do not get absolute DPS values anyway. The colors just give rough and relative estimations for damage. They just say "I DO A LOT OF DAMAGE" or "i do only little damage", not more. So this will be even true for special armor classes unless the damage modificators are real strong.
And addionally: I really like the colors.Its a nice way to add additional information to the circles IMO.
...hm this is already the way its done. Ground weapons cycle from red to yellow while air stuff from green to blue. I guess I didnt mention this anywhere[Krogoth86] wrote: At the same time this adds up to something you mentioned yourself: There are going to be lots of circles. But how should I distinguish now between circles of anti-ground and AA stuff? I can't at all and so there's little use of paying attention to the circle colors as I won't know Jack about which circles are going to affect which units. That might be changed by either using certain colors for each type (like dark red to bright red for ground stuff and dark green to light green stuff for air stuff)
Agreed, really different armor types will break it. The point is the grouping to ground,air and nuke. For such mods you would have to either make a more complex grouping or make a totally different approach.[Krogoth86] wrote: Finally there is that point about this solution being of no use for games with "real" armor types. Let's face it - most TA mods actually don't use "armors" at all but define something like that to apply extra damage to certain units. That's why this method doesn't totally fail for them although it of course even for them isn't always correct. That totally changes for something like NOTA where you actually have at least some kinds of real armor types where weapons are designed with specific weaknesses / advantages against certain types which just can't be shown in simple circles (and also shouldn't be shown as it would be visual and info overkill)...
Hm, no. Never heard of it. DPS is calculated as simple as (damage/reloadTime). But sounds interesting, maybe you could tell me more about it (or maybe just a link to more infos).[Krogoth86] wrote: Oh and btw a short question: Do you also mind things like burst tags for weapons? I for example wondered why especially some AA things have pretty much the same color for their circles although there is quite a dps gap (although I don't know if it's just too small in order to make a noticeable difference in color)...
Well giving a weapon a burst means you want to create a weapon that fires for multiple times and then needs to reload to fire the same amount of projectiles again...very_bad_soldier wrote:Hm, no. Never heard of it. DPS is calculated as simple as (damage/reloadTime). But sounds interesting, maybe you could tell me more about it (or maybe just a link to more infos).