Tested your latest v3.2 from Steam which worked fine with vlsodqwe's and my fixes; at least I saw the Shot-at, Suppressed, and finally the Pinned Down debuff on enemies forcing to go prone: Options.lua: https://pastebin.com/wz4VG1ms SuppressionMeter.lua: https://pastebin.com/CYTBC3tB
Last one is the fix to DamageDone() on top of the file to prevent non-unit sources from causing errors (in the log) when someone takes damage.
[LUA ERROR] Attempt to use an undefined global 'CurrentModOptions'
The 1.3 game not only complains about your latest 3.1 mod here. Most other mods have the same problem. Any idea how to fix this? I don't see any difference in Mod.lua that something related to this has changed from 1.2.2 to 1.3. Guess it's time for another official hotfix.
When triggering mines and possibly other traps: [LUA ERROR] Mod/ANKmKG/Code/SuppressionMeter.lua:2: attempt to call a nil value (method 'GetActiveWeapons') Another one continously during a combat but not sure the source: [LUA ERROR] Mod/ANKmKG/Code/SuppressionMeter.lua:2: attempt to index a nil value (local 'attacker')
Happens with the latest on Steam (5 Oct). Had no errors during the previous combats, but these lacked any usage of explosives. The traps, like landmines, seem to be the major cause of errors at least when they blow up. I've also given fuel, cars, and generators suppression values, but no idea how to name traps as these are also not treated like units with active weapons but rather as scripted effect. While no one messes around with rigged fridges during combat, stepping on landmines is still plausible. If traps can't be added, exclude them somehow at beginning of the calculation process. The traproblem is the first local here in SuppressionMeter.lua: function OnMsg.DamageDone(attacker, target, dmg, hit_descr) local weapon = attacker:GetActiveWeapons()
I've added following line in function OnMsg.DamageDone that avoids the error logging: if not IsKindOf(attacker, "Unit") then return end That works at least with the landmines so far until you come with a better solution.
[LUA ERROR] Mod/ANKmKG/Code/SuppressionMeter.lua:569: attempt to call a nil value (method 'GetDist')
Getting this when throwing a grenade, like Barry's shaped charge or Fidel's stick grenade. For testing purpose, I've started a fresh game with only this mod (v1.2 unmodified) installed and activated. Hired someone with a throwable grenade and tossed it right along the beach ahead.
This mod made combat very intense. Especially when I already use Custom Settings mod. That allowed me to increase Enemy Squad Size Multiplier. I like to see if anyone can make melee build works with these.
Is it possible to add some or all these effects to targets of explosion? I mean anyone within proximity of one should be disoriented and lose AP, right?
Love this mod as suppression mechanic seems to work in game but not sure if everything is working as intended due logs\*.log output:
[mod] Error loading Mod/ANKmKG/Code/Options.lua: Mod/ANKmKG/Code/Options.lua:18: attempt to index a nil value (global 'Zulib') [LUA ERROR] Mod/ANKmKG/Code/SuppressionMeter.lua:765: attempt to index a nil value (local 'target') [LUA ERROR] Attempt to create a new global g_weapon [LUA ERROR] Attempt to use an undefined global 'current_suppression' [LUA ERROR] Mod/ANKmKG/Code/SuppressionMeter.lua:480: attempt to perform arithmetic on a nil value (global 'current_suppression')
There are also plenty " "", file not found" errors but these empty lines can be removed in metadata.lua manually. Harmless editor bug.
15 comments
Options.lua: https://pastebin.com/wz4VG1ms
SuppressionMeter.lua: https://pastebin.com/CYTBC3tB
Last one is the fix to DamageDone() on top of the file to prevent non-unit sources from causing errors (in the log) when someone takes damage.
One of my favored mods. Thanks!
The 1.3 game not only complains about your latest 3.1 mod here. Most other mods have the same problem.
Any idea how to fix this? I don't see any difference in Mod.lua that something related to this has changed from 1.2.2 to 1.3.
Guess it's time for another official hotfix.
[LUA ERROR] Mod/ANKmKG/Code/SuppressionMeter.lua:2: attempt to call a nil value (method 'GetActiveWeapons')
Another one continously during a combat but not sure the source:
[LUA ERROR] Mod/ANKmKG/Code/SuppressionMeter.lua:2: attempt to index a nil value (local 'attacker')
Had no errors during the previous combats, but these lacked any usage of explosives.
The traps, like landmines, seem to be the major cause of errors at least when they blow up.
I've also given fuel, cars, and generators suppression values, but no idea how to name traps as these are also not treated like units with active weapons but rather as scripted effect. While no one messes around with rigged fridges during combat, stepping on landmines is still plausible.
If traps can't be added, exclude them somehow at beginning of the calculation process.
The traproblem is the first local here in SuppressionMeter.lua:
function OnMsg.DamageDone(attacker, target, dmg, hit_descr)
local weapon = attacker:GetActiveWeapons()
if not IsKindOf(attacker, "Unit") then return end
That works at least with the landmines so far until you come with a better solution.
Good news is that the steam version 2.0 fixed the mentioned bugs.
Getting this when throwing a grenade, like Barry's shaped charge or Fidel's stick grenade.
For testing purpose, I've started a fresh game with only this mod (v1.2 unmodified) installed and activated.
Hired someone with a throwable grenade and tossed it right along the beach ahead.
I mean anyone within proximity of one should be disoriented and lose AP, right?
[mod] Error loading Mod/ANKmKG/Code/Options.lua: Mod/ANKmKG/Code/Options.lua:18: attempt to index a nil value (global 'Zulib')
[LUA ERROR] Mod/ANKmKG/Code/SuppressionMeter.lua:765: attempt to index a nil value (local 'target')
[LUA ERROR] Attempt to create a new global g_weapon
[LUA ERROR] Attempt to use an undefined global 'current_suppression'
[LUA ERROR] Mod/ANKmKG/Code/SuppressionMeter.lua:480: attempt to perform arithmetic on a nil value (global 'current_suppression')
There are also plenty " "", file not found" errors but these empty lines can be removed in metadata.lua manually. Harmless editor bug.
Still getting this error. Otherwise, still luv this mod!
must load must load