-
Posts
37 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by DonCalzone
-
Pilot head movement in the cockpit
DonCalzone replied to amazingme's topic in DCS: Bf 109 K-4 Kurfürst
Will this issue ever be fixed? This thread is already 2 years old and I assume it has been a problem since release... -
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.
-
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?
-
Return multiple results in lua - Unit.getAmmo()
DonCalzone replied to DonCalzone's topic in Mission Editor
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 -
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?
-
+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
-
Return multiple results in lua - Unit.getAmmo()
DonCalzone replied to DonCalzone's topic in Mission Editor
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) -
Return multiple results in lua - Unit.getAmmo()
DonCalzone replied to DonCalzone's topic in Mission Editor
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. -
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?
-
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)
-
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
-
Love it!
-
+1
-
PLease add a fast refueling/rearming cheat
DonCalzone replied to NASA Pilot's topic in DCS Core Wish List
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 -
PLease add a fast refueling/rearming cheat
DonCalzone replied to NASA Pilot's topic in DCS Core Wish List
Even tho I didn't mention that my wish would be easy to implement, I'm certain that wrapping already existsing code into a function wouldn't stop ED from creating new modules. Exactly. That's why all these options where implemented so everyone can play this game the way they want. Again, nobody would be forced to use it (unless you play on a server with such option of course) so nothing would be cut out. They implemented infinite ammo/fuel without cutting out the ground service, right? I guess that's a rhetorical question why I don't play Ace Combat but I'll still answer it. I spent a fortune on modules and enjoy DCS for (IMHO) being the best flight sim out there while still giving me the oppurtinity to take more of an arcade or sandbox approach with all these available trigger functions and options. I wouldn't even consider it an issue that the function doesn't exist. It would be more of a nice to have. Just checked out what Ace Combat has to offer regarding warbirds and I gotta say it looks even worse than Warthunder. You really must've been joking. Not quite sure if I'm skipping something important but after ground service I always take off immediately. I think the Bf-109 doesn't have a gyro. Anyway if the phrase 'not having time' bothers you that much I'll rephrase it to 'I don't want to spend my time doing nothing but waiting while playing a game'. When I know that I have very limited time for a session, I'm definetly the latter. I generally like to play fast paced games but do enjoy the simulation aspects like the flight- or damage model. Those stunning graphics are also a big factor. I'm not trying to get your sympathy, I'm requesting the implementation of a new trigger function. -
PLease add a fast refueling/rearming cheat
DonCalzone replied to NASA Pilot's topic in DCS Core Wish List
Why are you complaining, SharpeXB? There's already dozens of options that make it possible to play this game in arcade style, yet nobody is forcing you to use these. Time is limited for a lot of us and some would still like the game to be immersive to some degree. Yes, I can accelerate time in SP or hop into another slot in MP, but these are temporary solutions. Like you said, it's already unrealistic how fast the ground service is, an option to change the duration would certainly not hurt the game. -
PLease add a fast refueling/rearming cheat
DonCalzone replied to NASA Pilot's topic in DCS Core Wish List
Just reviving this thread in hopes that someone from ED stumbles upon it. In Arma 3 you can use the following commands in the ME to refuel and rearm an aircraft. unit setFuel 1 unit setAmmo 1 -- 1 = full ammo/fuel, 0 would be empty It would be awesome if you could add a similar lua function to DCS so mission creators could achieve what OP suggested or do some further scripting like adding sounds and ground staff. Please make these functions accessible. -
Hey, I'm trying to change the ranks of the third reich and add troops and awards by modding the db_countries.lua file but I can't seem to make it work. db_countries.lua Path: ...\Saved Games\DCS\Scripts\Database NaziGermany.lua Path: ...\Saved Games\DCS\Scripts\Database\troops The needed png files are placed at ...\Saved Games\DCS\MissionEditor\data\images\Countries\Third Reich\Awards and ...\Saved Games\DCS\MissionEditor\data\images\Countries\Third Reich\Troops When I'm replacing the core file, I can see the custom troops in the logbook but I'm getting the manifest check error which breaks the logbook (debriefing.lua will not be overwritten when there's a securitycontrol error) so I don't know if the awards and ranks work. SECURITYCONTROL: Manifest check failed for file './Scripts/Database/db_countries.lua' When I'm placing the file at ...\Saved Games\DCS\Scripts\Database, DCS seems to ignore it. There's no error whatsoever in the log. I digged through the forum and this gave me hope that it should be possible. Someone stated that he's using the USAF logbook mod so I downloaded it and compared the file structure because it's also adding british ranks via db_countries.lua but I'm unable to find the error. Am I missing something? Log file (when trying to add it via ...\Saved Games\DCS\...)
-
Oops, I didn't realized that there's another forum for ME, sorry! Is it possible to move threads to another section? Thanks a lot for the fast reply tho, I think this is exactly what I was looking for! I'm going to test it immediately when I get home.
-
Hey, I wrote a scipt that plays a radio transmission via the comms menu, giving information about the location of the base. Everything works fine but I'm certain that my code could be 300+ lines shorter. Currently I'm using following code. bearing2_display is calculated by another function that I won't add to keep the initial post clear. I'll add it as answer if anybody wants to know the syntax. local function digit_0() trigger.action.radioTransmission("l10n/DEFAULT/BASE_digits_0.ogg", trigger.misc.getZone("ATC1").point, radio.modulation.AM, false, 39600000, 420, "ATC1") end local function digit_1() trigger.action.radioTransmission("l10n/DEFAULT/BASE_digits_1.ogg", trigger.misc.getZone("ATC1").point, radio.modulation.AM, false, 39600000, 420, "ATC1") end local function digit_2() trigger.action.radioTransmission("l10n/DEFAULT/BASE_digits_2.ogg", trigger.misc.getZone("ATC1").point, radio.modulation.AM, false, 39600000, 420, "ATC1") end ... ... local function digit_9() trigger.action.radioTransmission("l10n/DEFAULT/BASE_digits_9.ogg", trigger.misc.getZone("ATC1").point, radio.modulation.AM, false, 39600000, 420, "ATC1") end if bearing2_display == 000 then timer.scheduleFunction(digit_0, {}, timer.getTime() + 5.8) timer.scheduleFunction(digit_0, {}, timer.getTime() + 6.4) timer.scheduleFunction(digit_0, {}, timer.getTime() + 7.0) timer.scheduleFunction(Base_Distance_voice(), timer.getTime() + 7.9) end if bearing2_display == 001 then timer.scheduleFunction(digit_0, {}, timer.getTime() + 5.8) timer.scheduleFunction(digit_0, {}, timer.getTime() + 6.4) timer.scheduleFunction(digit_1, {}, timer.getTime() + 7.0) timer.scheduleFunction(Base_Distance_voice(), timer.getTime() + 7.9) end if bearing2_display == 002 then timer.scheduleFunction(digit_0, {}, timer.getTime() + 5.8) timer.scheduleFunction(digit_0, {}, timer.getTime() + 6.4) timer.scheduleFunction(digit_2, {}, timer.getTime() + 7.0) timer.scheduleFunction(Base_Distance_voice(), timer.getTime() + 7.9) end if bearing2_display == 003 then timer.scheduleFunction(digit_0, {}, timer.getTime() + 5.8) timer.scheduleFunction(digit_0, {}, timer.getTime() + 6.4) timer.scheduleFunction(digit_3, {}, timer.getTime() + 7.0) timer.scheduleFunction(Base_Distance_voice(), timer.getTime() + 7.9) end if bearing2_display == 004 then timer.scheduleFunction(digit_0, {}, timer.getTime() + 5.8) timer.scheduleFunction(digit_0, {}, timer.getTime() + 6.4) timer.scheduleFunction(digit_4, {}, timer.getTime() + 7.0) timer.scheduleFunction(Base_Distance_voice(), timer.getTime() + 7.9) end if bearing2_display == 005 then timer.scheduleFunction(digit_0, {}, timer.getTime() + 5.8) timer.scheduleFunction(digit_0, {}, timer.getTime() + 6.4) timer.scheduleFunction(digit_5, {}, timer.getTime() + 7.0) timer.scheduleFunction(Base_Distance_voice(), timer.getTime() + 7.9) end if bearing2_display == 006 then timer.scheduleFunction(digit_0, {}, timer.getTime() + 5.8) timer.scheduleFunction(digit_0, {}, timer.getTime() + 6.4) timer.scheduleFunction(digit_6, {}, timer.getTime() + 7.0) timer.scheduleFunction(Base_Distance_voice(), timer.getTime() + 7.9) end if bearing2_display == 007 then timer.scheduleFunction(digit_0, {}, timer.getTime() + 5.8) timer.scheduleFunction(digit_0, {}, timer.getTime() + 6.4) timer.scheduleFunction(digit_7, {}, timer.getTime() + 7.0) timer.scheduleFunction(Base_Distance_voice(), timer.getTime() + 7.9) end if bearing2_display == 008 then timer.scheduleFunction(digit_0, {}, timer.getTime() + 5.8) timer.scheduleFunction(digit_0, {}, timer.getTime() + 6.4) timer.scheduleFunction(digit_8, {}, timer.getTime() + 7.0) timer.scheduleFunction(Base_Distance_voice(), timer.getTime() + 7.9) end if bearing2_display == 009 then timer.scheduleFunction(digit_0, {}, timer.getTime() + 5.8) timer.scheduleFunction(digit_0, {}, timer.getTime() + 6.4) timer.scheduleFunction(digit_9, {}, timer.getTime() + 7.0) timer.scheduleFunction(Base_Distance_voice(), timer.getTime() + 7.9) end ... ... ... if bearing2_display == 360 then timer.scheduleFunction(digit_3, {}, timer.getTime() + 5.8) timer.scheduleFunction(digit_6, {}, timer.getTime() + 6.4) timer.scheduleFunction(digit_0, {}, timer.getTime() + 7.0) timer.scheduleFunction(Base_Distance_voice(), timer.getTime() + 7.9) end I'm pretty sure that this is not too good for the perfomance to run 360 if/else functions at the same time. Please correct me if I'm wrong. That'd be awesome because I could leave my script as it is. So I have a number variable that always has 3 digits (bearing2_display) and I want to get every digit as seperate variable This pseudocode is what I'm looking for in lua (I'm no coder so I hope this is understable) a(xyz)= (x=a[1],(y=a[2],(z=a[3] I think I want to merge the digits into a table (or string?) but I'm not sure. Does anyone know how I could achieve that? Edit: typos
-
When looking for a squadron, not a crowded server
-
thanks for that link but I searched for every one of them that uses mainly the bf-109 (google and forum) and can't find anything. Like I said none of them seems to be recruiting atm.
-
When looking for a squadron it kind of feels dead. The few I've found either play IL2 now or aren't recruiting atm.
-
If you'd fly german warbirds it would actually be historically correct.