ED Team NineLine Posted January 29, 2014 ED Team Share Posted January 29, 2014 Finally Able to land with new External Model and Collision Model., Now for working gear retraction, Speed brakes and flaps so I dont have to land it like a space shuttle, lol. So you guys somehow "are" working on a F-16 mod. Not really F-16 mod but it is .. Or not? :confused: I think its more of a learning exercise :) Forum Rules • My YouTube • My Discord - NineLine#0440• **How to Report a Bug** Link to comment Share on other sites More sharing options...
Ryback Posted January 29, 2014 Share Posted January 29, 2014 I think its more of a learning exercise :) Looked like SithSpawn :) But now smells like F-16 mod.. I was expecting some no cockpit no new 3d model AFM learning material.Plus really well - knowledged people is involved. So something will eventually come out.Have hope :thumbup: Link to comment Share on other sites More sharing options...
bnepethomas Posted January 29, 2014 Share Posted January 29, 2014 Would this benefit from a KickStarter to support it? I have an f16 pit screaming out for some good DCS treatment. Link to comment Share on other sites More sharing options...
RagnarDa Posted January 29, 2014 Share Posted January 29, 2014 How about open-sourcing it? Like having a common source repository? DCS AJS37 HACKERMAN There will always be bugs. If everything is a priority nothing is. Link to comment Share on other sites More sharing options...
ED Team NineLine Posted January 29, 2014 ED Team Share Posted January 29, 2014 How about open-sourcing it? Like having a common source repository? That could be cool... interesting idea... Forum Rules • My YouTube • My Discord - NineLine#0440• **How to Report a Bug** Link to comment Share on other sites More sharing options...
sotosev Posted January 29, 2014 Share Posted January 29, 2014 Hope this plane find its way to DCS. Good to see this improvements! :) System specs below Case - Antec Three Hundred PSU - Corsair AX750watt Board - MSI Z170A GAMING PRO CPU - Intel i5 6600K 3900MHz Cooler - CoolerMaster Hyper 212 Plus Memory - Kingston HYPERX 16G DDR4 2400Mhz CL15 Graphics - MSI GEFORCE GTX 980 GAMING 4G SSD - Samsung 950 PRO 256GB M.2 NVMe Monitor - Philips 277E 27" 1920x1080 60Hz OS - Windows 10 Home 64bit Flight Controllers - Thrustmaster HOTAS WARTHOG, Saitek COMBAT RUDDER PEDALS, TrackIR 4, Track Clip Pro [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
SkateZilla Posted January 29, 2014 Share Posted January 29, 2014 (edited) Finally Able to land with new External Model and Collision Model., Now for working gear retraction, Speed brakes and flaps so I dont have to land it like a space shuttle, lol. So you guys somehow "are" working on a F-16 mod. Not really F-16 mod but it is .. Or not? :confused: Looked like SithSpawn :) But now smells like F-16 mod.. I was expecting some no cockpit no new 3d model AFM learning material.Plus really well - knowledged people is involved. So something will eventually come out.Have hope :thumbup: Would this benefit from a KickStarter to support it? I have an f16 pit screaming out for some good DCS treatment. It's not a Full blown mod, it's an Advanced Flight Model Demonstration, that's it Edited January 29, 2014 by SkateZilla Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill (F4-3200C16D-16GTZR x2), ASRock X470 Taichi Ultimate, XFX RX6800XT Merc 310 (RX-68XTALFD9) 3x ASUS VS248HP + Oculus HMD, Thrustmaster Warthog HOTAS + MFDs Link to comment Share on other sites More sharing options...
SkateZilla Posted January 29, 2014 Share Posted January 29, 2014 (edited) Wow Skatezilla nice work, glad you are improving on the F-16!!! And it looks great so far. There should be code to model the aeroforces regarding auto-flap scheduling so that should be in there, the airbrake aerodynamics I believe are modeled in there but I'm not sure I ever tied an input to it to control it. In any event very impressed and excited to try out the improvements! Regarding open source, I hoped this would be a community shared learning experience. I would be surprised if SkateZilla did not provide his improvements, he's cool like that. Once I get it Cleaned up and finalized and set correctly I'll post a ZIP with the new EDMs and Stuff. I Might have to re-do animations one by one, I have Working Animations for Canopy, Pilot Head, Elevators, Flaperons (?), Slats, Airbrakes. Maybe the AFM uses different ARG#s, but the flaps dont respond to F key, or roll axis input, and Airbrakes dont respond to the Airbrake key. The most time consuming thing would be Animating the gear again, lol, it's kind of a complex animation, so it'll take several attempts/tweaks. From there it's Getting Gear States and Suspension States integrated into the AFM and to filter out the Elevator Surface Flickering when On the ground. I Obviously figured out what was up with the collision model, I had a few mistakes that I found when I went through the main pieces. Edited January 29, 2014 by SkateZilla Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill (F4-3200C16D-16GTZR x2), ASRock X470 Taichi Ultimate, XFX RX6800XT Merc 310 (RX-68XTALFD9) 3x ASUS VS248HP + Oculus HMD, Thrustmaster Warthog HOTAS + MFDs Link to comment Share on other sites More sharing options...
RagnarDa Posted January 29, 2014 Share Posted January 29, 2014 Responding to key presses (F, B and so on...) involves programming lua-devices. Extending and retracting the gears need to be done within the EFM. When I have more time, hopefully this weekend I can show you/write something up. DCS AJS37 HACKERMAN There will always be bugs. If everything is a priority nothing is. Link to comment Share on other sites More sharing options...
RagnarDa Posted January 29, 2014 Share Posted January 29, 2014 Quick write-up. Lua devices Start with adding a command in Saved games\DCS\Config\Input\YourAirplane\AnyInputDevice\AnyInputDevice.lua. Write a command after "down=" for example iCommandDoMiGSalute. In the file Program Files\Eagle Dynamics\DCS World\mods\aircrafts\YourAirplane\Cockpit\command_defs.lua put a row with the command within the Keys brackets, and a unique number after, like this: Keys = { ... iCommandDoMiGSalute= 1234, ... } Create a device or use an existing. To create a device do the following: - Add a new row in devices.lua, like: devices["PILOTSALUTES"] = counter()--7 - In device_init.lua put a row like this one: creators[devices.PILOTSALUTES] = {"avLuaDevice",LockOn_Options.script_path.."pilot_salutes.lua"} - Create a lua-file with the name like above ("pilot_salutes.lua") in the same folder and use code similar to this: local dev = GetSelf() local update_time_step = 0.1 --- How often the device updates make_default_activity(update_time_step) local sensor_data = get_base_data() --- Lets get some data! local Salute = 1234 --- The number above dev:listen_command(Salute) --- Register that you want to listen to if the command is activated function SetCommand(command,value) --- The function that is activated when the command is triggered if command == Salute then --- Your code goes here --- for example: --- set_aircraft_draw_argument_value(500,1.0) --- Sets draw argument 500 to value 1 --- local YourVar = get_aircraft_draw_argument_value(501) --- Gets value of draw argument 501 end end function update() -- Code that does something every update goes here, end DCS AJS37 HACKERMAN There will always be bugs. If everything is a priority nothing is. Link to comment Share on other sites More sharing options...
S4ndman Posted January 29, 2014 Share Posted January 29, 2014 ... Extending and retracting the gears need to be done within the EFM. Can you elaborate on this please ? I'm having problem with landing gear being extended. I'm using default CptSmiley's F16DCS.edm model where arg#0 is the nose landing gear, Arg# 3 is the right landing gear and Arg# 5 is left landing gear. I'm starting the mission where F-16 is in the air. Whenever I try to use: set_aircraft_draw_argument_value(0,1) set_aircraft_draw_argument_value(3,1) set_aircraft_draw_argument_value(5,1) within landing_gear_system.lua - landing gear flickers. I've suspected that there might be a function to reset the argument back to 0 each frame within the dll file so I've recompiled F16Demo.cpp so the drawargs[0].f is always 1.0 void ed_fm_set_draw_args (EdDrawArgument * drawargs,size_t size) drawargs[0].f = 1.0; drawargs[3].f = 1.0; drawargs[5].f = 1.0; ... but that didn't work - landing gear is retracted. I can make refueling door (drawargs[22].f = 1.0 )to be opened or elevator to stay in one position (drawargs[17].f = 1.0) using this method but not the landing gear. I'm running out of ideas so any help is greatly appreciated. Link to comment Share on other sites More sharing options...
Nealius Posted January 29, 2014 Share Posted January 29, 2014 Finally Able to land with new External Model and Collision Model., Now for working gear retraction, Speed brakes and flaps so I dont have to land it like a space shuttle, lol. I was about to say. Us virtual Viper drivers watching the video were screaming "what the hell kind of landing was that?!" :lol: Link to comment Share on other sites More sharing options...
RagnarDa Posted January 29, 2014 Share Posted January 29, 2014 Can you elaborate on this please ? I'm having problem with landing gear being extended. I'm using default CptSmiley's F16DCS.edm model where arg#0 is the nose landing gear, Arg# 3 is the right landing gear and Arg# 5 is left landing gear. I'm starting the mission where F-16 is in the air. Whenever I try to use: set_aircraft_draw_argument_value(0,1) set_aircraft_draw_argument_value(3,1) set_aircraft_draw_argument_value(5,1) within landing_gear_system.lua - landing gear flickers. I've suspected that there might be a function to reset the argument back to 0 each frame within the dll file so I've recompiled F16Demo.cpp so the drawargs[0].f is always 1.0 void ed_fm_set_draw_args (EdDrawArgument * drawargs,size_t size) drawargs[0].f = 1.0; drawargs[3].f = 1.0; drawargs[5].f = 1.0; ... but that didn't work - landing gear is retracted. I can make refueling door (drawargs[22].f = 1.0 )to be opened or elevator to stay in one position (drawargs[17].f = 1.0) using this method but not the landing gear. I'm running out of ideas so any help is greatly appreciated. Had the exact same problem a few days ago and was tearing my hair out :) http://forums.eagle.ru/showpost.php?p=1976890 Not by my computer so can't check right now, but in latest CustomHumanPhysicsAPI (or something) header file in your DCS install (/API/include folder) you'll find the relevant parameter to set in the "ed_fm_get_param" function (or something similarly named). It seems impossible right now to extend the gears through lua only but on the other hand there are other fun things in the new API like braking of individual wheels, gee I wonder for what airplane that is for? ;) 1 DCS AJS37 HACKERMAN There will always be bugs. If everything is a priority nothing is. Link to comment Share on other sites More sharing options...
Geraki Posted January 29, 2014 Share Posted January 29, 2014 keep doing the good work Avionics reference : Avionics Link to comment Share on other sites More sharing options...
S4ndman Posted January 29, 2014 Share Posted January 29, 2014 Not by my computer so can't check right now, but in latest CustomHumanPhysicsAPI (or something) header file in your DCS install (/API/include folder) you'll find the relevant parameter to set in the "ed_fm_get_param" function (or something similarly named). It seems impossible right now to extend the gears through lua only but on the other hand there are other fun things in the new API like braking of individual wheels, gee I wonder for what airplane that is for? ;) It works. You are the man! Thanks a million! Link to comment Share on other sites More sharing options...
Nealius Posted January 30, 2014 Share Posted January 30, 2014 I also have a Block 50 TO GR1F-16CJ-34-1-1 for more detailed avionics stuff if you guys want/need it. It's a bit dated (1997) but still relevant for the most part. Link to comment Share on other sites More sharing options...
RagnarDa Posted January 30, 2014 Share Posted January 30, 2014 It works. You are the man! Thanks a million! Glad I can help! DCS AJS37 HACKERMAN There will always be bugs. If everything is a priority nothing is. Link to comment Share on other sites More sharing options...
S4ndman Posted January 30, 2014 Share Posted January 30, 2014 Two more questions :) Is this the only way to pass data between DLL and LUA ? --- set_aircraft_draw_argument_value(500,1.0) --- Sets draw argument 500 to value 1 --- local YourVar = get_aircraft_draw_argument_value(501) --- Gets value of draw argument 501 Anyone managed to read key presses directly from DLL ? I have added command to my Input\Keyboard\default.lua {combos = {{key = "G", reformers = {"LShift"}}}, down = iCommandPlaneGearDown, name = "Landing Gear Down", category = "Systems"}, and defined it in command_ defs.lua Keys = { PlaneGearDown = 431, ... but when I try to read it within DLL using ... enum inputCommandsEnum { LandingGearDown = 431, ... void ed_fm_set_command (int command, float value) if(command == LandingGearDown) { F16::geardown = 1.0; } ... nothing happens. Any ideas ? Link to comment Share on other sites More sharing options...
RagnarDa Posted January 30, 2014 Share Posted January 30, 2014 F-16 High Fidelity Flight Dynamics and Tech/Academic Initial Demonstration Yes ed_fm_set_command is for stick, pedals and throttle only it seems. To communicate between dll and lua set unused draw args (>500) on the external model and read them and set them in ed_fm_get_draw or whatever it's called. DCS AJS37 HACKERMAN There will always be bugs. If everything is a priority nothing is. Link to comment Share on other sites More sharing options...
S4ndman Posted January 30, 2014 Share Posted January 30, 2014 Got it - Thank you again. Link to comment Share on other sites More sharing options...
SkateZilla Posted January 30, 2014 Share Posted January 30, 2014 (edited) Just to clarify, I'll Post a Update Package soon (prolly next week) with: Updated /Shapes/ Folder Updated External EDM (Partially Animated, No Lower LODs Yet) Updated Collision EDM Updated Cockpit EDM (Not Animated) Updated /Textures/ Folder (No Individual Liveries Yet, as I May change some Material names/Types) with Pit and New External EDM Textures Not sure if I'm going to Incorporate any AFM Updates, as I've been experimenting with some stuff, but havent really gotten anything to work, or anything beneficial to add to the base AFM. If you have something you want added to the Update package, to help make it easier to manage stuff let me know. That way it will be Base .3000 Demo Install, then just unzip and copy/paste update package to the Aircraft folder. Edited January 30, 2014 by SkateZilla Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill (F4-3200C16D-16GTZR x2), ASRock X470 Taichi Ultimate, XFX RX6800XT Merc 310 (RX-68XTALFD9) 3x ASUS VS248HP + Oculus HMD, Thrustmaster Warthog HOTAS + MFDs Link to comment Share on other sites More sharing options...
ED Team NineLine Posted January 30, 2014 ED Team Share Posted January 30, 2014 SO just a side note question, what level are you guys as far as C++ coding go? Is this something someone could self teach themselves or are you guys trained in some form or another, I want to dive into the EFM, but if its pointless because of my low end coding knowledge I want to know now :) Forum Rules • My YouTube • My Discord - NineLine#0440• **How to Report a Bug** Link to comment Share on other sites More sharing options...
RagnarDa Posted January 30, 2014 Share Posted January 30, 2014 I am 100% self-thaught. Started with C++ a few years ago when I decided one summer to just sit down and learn it. Started first programming in elementary school though :) DCS AJS37 HACKERMAN There will always be bugs. If everything is a priority nothing is. Link to comment Share on other sites More sharing options...
S4ndman Posted January 30, 2014 Share Posted January 30, 2014 (edited) Same here. I used to program with C but that was ages ago. I got interested with this project last week and decided to give it a go. So until last week I knew nothing about lua and had very basic understanding of C++ (still have) - I'd say give it a try. Be cautious though - it is addictive :) Edited January 30, 2014 by S4ndman Link to comment Share on other sites More sharing options...
SilentEagle Posted January 30, 2014 Share Posted January 30, 2014 Two more questions :) Is this the only way to pass data between DLL and LUA ? Anyone managed to read key presses directly from DLL ? ... Any ideas ? This is how I used to pass data before we got access to the SDK. It feels a bit hackish, but it works well. Also, reading key commands is not possible in the AFM API and I only know how to do it in LUA or c++ devices. Unfortunately, you are stuck with LUA unless ED opened the SDK, but that is unlikely. I also knew nothing about C++ before starting 3rd party projects, so don't get discouraged. 1 Link to comment Share on other sites More sharing options...
Recommended Posts