-
Posts
381 -
Joined
-
Last visited
Personal Information
-
Flight Simulators
DCS World, IL-2 BoX
-
Location
Montreal, Canada
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
Finding new functionality in Lua aircraft mods
Jack McCoy replied to gyrovague's topic in How To Mod for DCS World
I think function dump (name, value, saved, result) should be function dump (name, value, seen, result) -
Basic EFM template (mod + source code)
Jack McCoy replied to Sérvalpilot's topic in Utility/Program Mods for DCS World
To display force component vectors in MT version, see solution:- 44 replies
-
- 1
-
-
- flight model
- efm
-
(and 1 more)
Tagged with:
-
EFM: ed_fm_enable_debug_info() not working in multithread
Jack McCoy replied to Jack McCoy's topic in General Bugs
@Flappie For the vectors to display, this is required: Saved Games\DCS\Config\autoexec.cfg : drawDebugGeometry = true -
EFM: ed_fm_enable_debug_info() not working in multithread
Jack McCoy replied to Jack McCoy's topic in General Bugs
Hi Flappie. The issue is not related to any mission and I wouldn't know how to enable via lua script (if even possible!). This is related to development of my External Flight Model (EFM), in file ED_FM_Template.cpp. The thread you found mentions the vectors not being displayed even when: //ED_FM_Template.cpp bool ed_fm_enable_debug_info() { return showVectors; /* When set to true, DCS draws lines on the aircraft. The blue box is the center of mass, green line is net force vector, pink line is the velocity vector. */ } This worked in single-thread and doesn't work in multi-thread. I think the following is a related issue: //ED_FM_Template.cpp size_t ed_fm_debug_watch(int level, char *buffer, size_t maxlen) { return sprintf_s(buffer, maxlen, "ENGINE RPM %f.0", engine.rpm); } In multi-thread, it does not display "ENGINE RPM NNNN" in the "extended" screen, i.e. pressing RCtrl-Pause twice. Am I looking in the right place? I never tried in single-thread. -
Did you mean 0.9 ?
-
Mike Force Team started following Jack McCoy
-
Feedback Thread - F-4E Phantom II Release Hotfix, June 5th 2024
Jack McCoy replied to IronMike's topic in DCS: F-4E Phantom
@IronMike Mods\aircraft\F-4E\Sounds\sdef\Jester\Contacts (F-4E with a dash) -
Basic EFM template (mod + source code)
Jack McCoy replied to Sérvalpilot's topic in Utility/Program Mods for DCS World
I started with the Eagle Dynamics API a few years back, not your project. My statement was more general but since this is the only topic in the English forums to discuss ed_fm_enable_debug_info(), I just wanted to share a clue for when things don't work as expected.- 44 replies
-
- flight model
- efm
-
(and 1 more)
Tagged with:
-
Basic EFM template (mod + source code)
Jack McCoy replied to Sérvalpilot's topic in Utility/Program Mods for DCS World
Technically, the API is in C. But since we use a C++ compiler, we can write our extensions using classes and stuff but it is not mandatory.- 44 replies
-
- 1
-
-
- flight model
- efm
-
(and 1 more)
Tagged with:
-
Basic EFM template (mod + source code)
Jack McCoy replied to Sérvalpilot's topic in Utility/Program Mods for DCS World
If any of your ed_fm_* functions are not called, make sure they are decared in ED_FM_Template.h. They weren't in my version which caused me a lot of frustration (i.e. modding fun!). ED_FM_TEMPLATE_API void ed_fm_on_damage(int Element, double element_integrity_factor); ED_FM_TEMPLATE_API bool ed_fm_enable_debug_info(); This ensures the functions are visible to be called by DCS.- 44 replies
-
- 1
-
-
- flight model
- efm
-
(and 1 more)
Tagged with:
-
Jack McCoy started following 2-blade propellers show four blurred blades , Propeller not turning and Custom radio setup is a nightmare
-
DCS-MT version 2.9.4.53627 . This issue probably affects propellers with any number of blades but is most noticeable with 2-blade propellers. Steps to reproduce: - Start DCS MT in VR - Look at a running Yak-52 (2-blade model) from the front, outside - Pause the simulator - Close one eye, then the other, and notice the propeller in the two views are 90 degrees out of phase. This is very confusing for the brain, simulation paused or running... For my mod, I currently specify 4 blades as workaround. The phase issue is still there but at least both eyes see the same image. MyAircraft.lua engine = { prop_locations = {{2.11219, -0.702867, 0.00}, {0, 0, math.rad(-4.7)}}, -- forward..back, down..up, left..right, rotation roll, yaw, pitch prop_blades_count = 4,
-
Thanks, @Copprhead! I had a regression about that with the 2.9 update but I couldn't figure it out. It's not easy having to write the API and Breaking Changes document ourselves! I now learned to keep my eye on the evolution of wHumanCustomPhysicsAPI.h. Just to be clear, the propeller in the EDM must respond to argument 407 but it should not be set in the EFM. MyEFM.cpp void ed_fm_simulate(double dt) { propellerAngle += engine_rpm * rpm2radps * dt; propellerAngle = fmod(propellerAngle, twoPI); ===== void ed_fm_set_draw_args(EdDrawArgument * drawargs, size_t size) { // drawargs[407] = (float)propellerAngle_0_1; // don't do this drawargs[413] = (float)0; // [0..1] propeller pitch ===== double ed_fm_get_param(unsigned index) { if (index < ED_FM_ENGINE_2_RPM) { switch (index) { case ED_FM_ENGINE_1_RPM: return engine_rpm; case ED_FM_ENGINE_1_RELATED_RPM: // 0..1 return engine_rpm_0_1; case ED_FM_ENGINE_1_CORE_RPM: // 0..RPMmax Engine and prop sound return engine_rpm * engine_running; case ED_FM_ENGINE_1_CORE_RELATED_RPM: // 0..1 displayed as RPM% in 2D F2 view return engine_rpm_0_1; case ED_FM_ENGINE_1_FAN_PHASE: // 0..2*pi return propellerAngle; } } =====
-
Thanks, @prccowboy! Somehow I no longer had engine.prop_* fields! This fixes a lot of things! <duh> MyAircraft.lua engine = { prop_locations = {{2.11219, -0.702867, 0.00}, {0.0, 0.0, math.rad(-2.112)}}, -- forward..back, down..up, left..right, spin axis orientation: roll, yaw, pitch prop_blades_count = 2, prop_direction = 1, -- clockwise as viewed from cockpit -- prop_pitch_*: specify even for fixed-pitch propeller or else AI will show thicker (pitched) blades as viewed with the prop disk edge-on (i.e. from the side) prop_pitch_min = 0.0, -- prop pitch min, degrees prop_pitch_max = 10.0, -- prop pitch max, degrees prop_pitch_feather = 80.0, -- prop pitch feather position, degrees if feather < prop_pitch_max no feathering available } prop_blade.FBX Exported a textured single blade at scale 0.01, same orientation as the aircraft model. Textures\MyAircraft\description.lua and/or Liveries\MyAircraft\*\description.lua {"Material_propeller", DIFFUSE, "prop.dds", true}; {"Material_propeller", ROUGHNESS_METALLIC, "prop_roughMet.dds", true}; -- optional With the above changes, the AI now works perfectly in all regimes. Now the problem is with the player aircraft: - The propeller hub spins and stops correctly, in direct relation with argument 407. - The DCS-generated propeller blur disk changes the blurred blades' visual aspect but does not spin. - When engine is off, the propeller's rest position is alternating at every simulation frame between the EDM's rest position and whatever constant value I supply for argument 407. In other words, it flickers... - I still have no idea what I should do, if anything, with argument 370. I tried engine_rpm, engine_rpm_0_1, 0, 1...
-
Custom radio setup is a nightmare
Jack McCoy replied to Sérvalpilot's topic in How To Mod for DCS World
Congrats! To communicate with the ground crew, I think the canopy needs to be open (and recognized as such by DCS) OR you need to set up an intercom device. From what I've seen, radios and intercom are related as "linked devices" which, to me, is yet another layer deeper in the black box... Bonne chance! -
Related to DCS changelog: "New to DCS 2.9.4.53549: Added over-pressure shockwave influence from bombs, missiles, shells and gunfire on terrain vegetation like trees, bushes, and grass." From my observations, both variables ED_FM_ENGINE_1_FLOW_SPEED and ED_FM_FLOW_VELOCITY have to be set for the effect to manifest itself. Units are meters/second.