Jump to content

DonCalzone

Members
  • Posts

    37
  • Joined

  • Last visited

Personal Information

  • Flight Simulators
    X-Plane 11
  • Location
    Germany
  • Occupation
    Finance

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Will this issue ever be fixed? This thread is already 2 years old and I assume it has been a problem since release...
  2. Would be nice to have aerial smoke curtains in game. I have no idea how often they where used and how long the smoke was lasting but it certainly looks awesome.
  3. I really like the Liberation Dynamic Campaign and since it works more or less fluently on my budget rig (only 3GB VRA and, 3GHz CPU), I'm pretty sure they don't have to reduce computing resources of anything to make it happen. 2 random dudes basically made it happen. They could just pay them some Rubels and integrade their code into DCS. It would probably be less work than coding everything on their own but who am I to judge?
  4. Thanks a ton, Grimes! I ended up with following code, which works in general but I'm experiencing some performance drops. Gonna have to do some further testing with Eventhandlers. shotcount = 0 hitcount = 0 rounds1 = 665 count1 = 0 count2 = 0 count3 = 0 _rounds_count = {} _rounds_count[1] = {} _rounds_count[2] = {} _rounds_count[3] = {} function calculate_accuracy() local _unit1 = world.getPlayer() if _unit1:getAmmo() then local _rounds_count = _unit1:getAmmo() if _rounds_count[1] and _rounds_count[1].count then if _rounds_count[1].desc and _rounds_count[1].desc.category == 0 then count1 = _rounds_count[1].count end else count2 = count2 * 0 end if _rounds_count[2] and _rounds_count[2].count then if _rounds_count[2].desc and _rounds_count[2].desc.category == 0 then count2 = _rounds_count[2].count end else count2 = count2 * 0 end if _rounds_count[3] and _rounds_count[3].count then if _rounds_count[3].desc and _rounds_count[3].desc.category == 0 then count3 = _rounds_count[3].count end else count3 = count3 * 0 end shotcount = rounds1 - count1 - count2 - count3 accuracy1 = hitcount/shotcount*100 padded_accuracy = string.format("%02d", accuracy1) else count1 = count1 * 0 count2 = count2 * 0 count3 = count3 * 0 shotcount = rounds1 - count1 - count2 - count3 accuracy1 = hitcount/shotcount*100 padded_accuracy = string.format("%02d", accuracy1) end end
  5. The A-20 is still behaving like a fighter, too. Regarding the sniper gunners, when placing huge box formations it becomes somewhat obvious that the B-17 gunners are not only to accurate, but also shooting way to many bullets in situations where they shouldn't fire at all. When I'm doing a slashing attack on the left wing, the gunners from the far right try to get a few hits on me, sometimes even hitting their friendlies. The B-17 carried aprox 7000 rounds for Browning MG, so every gunner should've had around 875 rounds (tail gunner and ball turret had probably more than the others) and when they would fire continously, like they currently do ingame, they would've been out of ammo in less than 2 minutes of combat. Wouldn't it be more realistic if the gunners would be using fire bursts from time to time?
  6. +1 I'd be happy with the NATO phonetic alphabet but adding country specific call signs would be icing on the top. The germans where using following spelling alphabet (would be nice for german warbirds but all pilots are talking english with a german accent anyway :doh:) The phonetic alphabet used by the allies during ww2 also has some nice callsigns IMO
  7. Thanks for the explanation, I deleted the for i = x part and wrote a seperate line for every index. It works like a charme but only until one of the guns has no rounds left. I tried to implement a simple check if an index returns nil or an empty table but I'm still getting an error about indexing a nil value when hitting 0. I also observed that sometimes the MG131 ammo is added up within the first index, but most of the time it's splitted the way you mentioned, the HEI shells in index 1, and APT in Index 2. When using env.info they will always be added up in the first line printed to the log. I suspect this has something to do with the SHOOTING_END eventhandler being fired twice because of the two guns but this shouldn't be an issue. The final code will be moved to an KILL eventhandler anyway. rounds1 = 680 count1 = 0 count2 = 0 count3 = 0 _rounds_count = {} -- probably obsolete, tried to apply code from a stackoverflow [url="https://stackoverflow.com/questions/50157721/assigning-subtables-to-unknown-indices-in-lua"]post[/url] _rounds_count[1] = {} _rounds_count[2] = {} _rounds_count[3] = {} if _unit == _unit1 then local _rounds_count = _unit1:getAmmo() if _rounds_count[1].count == nil or _rounds_count[1].count == '' then count1 = count1 * 0 else if _rounds_count[1].desc and _rounds_count[1].desc.category == 0 then count1 = _rounds_count[1].count end end if _rounds_count[2].count == nil or _rounds_count[2].count == '' then [b]-- Line 116[/b] count2 = count2 * 0 else if _rounds_count[2].desc and _rounds_count[2].desc.category == 0 then count2 = _rounds_count[2].count end end if _rounds_count[3].count == nil or _rounds_count[3].count == '' then [b]-- Line 125[/b] count3 = count3 * 0 else if _rounds_count[3].desc and _rounds_count[3].desc.category == 0 then count3 = _rounds_count[3].count end end trigger.action.outText("MG131 left: "..count1.. " rounds",10,false) trigger.action.outText("MG131 right: "..count2.. " rounds",10,false) trigger.action.outText("MK108: "..count3.. " rounds",10,false) end 2020-07-17 13:54:26.990 ERROR SCRIPTING: Error while handling event [string "C:\Users\Kirschi\AppData\Local\Temp\DCS\/~mis000005ED.lua"]:125: attempt to index field '?' (a nil value) 2020-07-17 13:54:51.422 WARNING LOG: 6 duplicate message(s) skipped. 2020-07-17 13:54:51.422 ERROR SCRIPTING: Error while handling event [string "C:\Users\Kirschi\AppData\Local\Temp\DCS\/~mis000005ED.lua"]:116: attempt to index field '?' (a nil value)
  8. Thanks a lot for your reply! Yes, I think the count value should be stored as numbers. I tried your code and it gives me some strange values like -226, -648, -1234 etc. the more i fire. I think I should've mentioned that I call this code through an eventhandler S_EVENT_SHOOTING_END. Anyway I tried to modify your code and went a step back, so to say, by trying to display the current ammo of every gun. I'm testing the code with a Bf-109 so it has the MG131 main guns and the MK108 cannon. When running the following code, it will display the ammo of the Mk108 in both lines instead of the MG131 ammo in the second line. So basically the problem remains that I don't know how to access the second value of "_rounds_count.count". local _rounds_count = _unit1:getAmmo() for i = 1, #_rounds_count do if _rounds_count[i].desc and _rounds_count[i].desc.category == 0 then count1 = _rounds_count[i].count end end for j = 2, #_rounds_count do if _rounds_count[j].desc and _rounds_count[j].desc.category == 0 then count2 = _rounds_count[j].count end end trigger.action.outText("Shotcount1: "..count1,10,false) trigger.action.outText("Shotcount2: "..count2,10,false) end i also tried various numbers like _rounds_count[j].desc.category = 1 but no success. Again, thanks for taking the time I really appreciate it.
  9. Here's an example mission for a carpet bombing setup which still works in 2.5.6. My only issue is that when I'm setting up bigger boxes with 48+ B17s, every group tends to leave the formation as soon as their box leader is dead. Not always but most of the time. Anyone else having this issue?
  10. Hey, I'm trying to use the Unit.getAmmo() function to check how many rounds a certain unit has fired. I was able to return the ammo count but it's two values for every gun seperately (see log below). I tried to wrap the output of "_rounds_count.count" into a table and then access the two variables but it doesn't seem to store the second value. Does anyone have an idea what I'm doing wrong? Any help would be greatly appreciated! shotcount = 0 rounds1 = 665 local _rounds_count = _unit1:getAmmo() for i = 1, #_rounds_count do rounds_test = env.info(_rounds_count[i].count) -- obsolete t = {(_rounds_count[i].count)} rounds_x = t[1] rounds_y = t[2] shotcount = (rounds1-rounds_x-rounds_y) trigger.action.outText("Shotcount: "..shotcount,10,false) end 2020-07-16 17:12:33.342 INFO SCRIPTING: 60 2020-07-16 17:12:33.342 INFO SCRIPTING: 263 2020-07-16 17:12:33.342 ERROR SCRIPTING: Error while handling event [string "C:\Users\Kirschi\AppData\Local\Temp\DCS\/~mis00003F44.lua"]:101: attempt to perform arithmetic on global 'rounds_y' (a nil value)
  11. Not exactly an answer to your question but I'm using Reshade/ SweetFX to make things more visible in night ops. Also I'm always picking a date during full moon
  12. Do you really think that every server you are playing on would implement it? It's most likely that nothing would affect your experience at all. How many servers are using infinite ammo or easier avionics? Probably 0
×
×
  • Create New...