Jump to content

Beginners Guide to DCS World Aircraft Mods


RedBeard2

Recommended Posts

Wow!

DCS Wishlist: 2K11 Krug SA-4 Ganef SAM, VR-TrackIR icons next to player names in score-chart

PvP: 100+ manual player-kills with Stingers on a well known dynamic campaign server - 100+ VTOL FARP landings & 125+ hours AV-8B, F-14 crew, royal dutch airforce F-16C - PvP campaigns since 2013

DCS server-admins: please adhere to a common sense gaming industry policy as most server admins throughout the industry do. (After all there's enough hostility on the internet already which really doesn't help anyone. Thanks.)

Dell Visor VR headset, Ryzen 5 5600 (6C/12T), RTX 2060 - basic DCS-community rule-of-thumb: Don't believe bad things that a PvP pilot claims about another PvP pilot without having analyzed the existing evidence

Link to comment
Share on other sites

  • 3 weeks later...

Apologies for being absent so long. I spent most of last year dealing with aging parents and had little time to dedicate to anything else. I'm going to start spending more time on this again and hope to get some more stages out soon.

 

Current state is animations are mostly done and the writeup is mostly in sync. I need to spend time figuring exactly where I was and what else I needed to say and cleanup. Other than that, I expect to get another draft out soon.

Link to comment
Share on other sites

  • 3 weeks later...

I'm definitely late to the party - I just discovered the thread now through /r/hogggit! Thank you for the effort in writing all of this down, I may even dare dip my toes into modding one of these days.

 

I'm sorry to head abour dealing with aging parents. I'm not in that position yet, but I can't imagine it being easy.


Edited by Stealth_HR

[sIGPIC][/sIGPIC]

 

Real men fly ground attack :pilotfly: where EVERYTHING wants a piece of you :D
Link to comment
Share on other sites

  • 4 weeks later...

Mods crashing DCS

 

RedBeard, or anyone, I have been working on the F-14d this week and I went to view my current changes to the external model and the game just crashed. The only thing I had changed about the entry.lua was the version number to make it congruent with the most recent DCS update. The mod worked wonders in 1.2.12 and 1.2.14, but alass no longer! Any idea what may have happened?

Link to comment
Share on other sites

  • 3 months later...
  • 3 weeks later...

I'm working on it. I'm selling off a parent's house / finishing handling the estate and that has been taking up a lot of time, but I just finished test flying some updates to confirm the behavior of the kjx SFM parameter.

 

Things have changed recently (in the last year or so) and animations have broken. It appears that programming will be required to get them working again. This may require a bit of reorganizing of the chapters if I need to coordinate device programming with animations to get them working.

 

Anyway, I'm still progressing, just slower than I would like right now.

Link to comment
Share on other sites

  • 1 month later...

At long last, I have a new version ready. This version includes updates to the flight model, a new and more detailed model of the F-104, and animations. It is flyable using the Su-25T cockpit.

 

However, there are some limitations. Not all the animations can be exercised with this cockpit. Also, there are still some animations that are not quite right (pilot visibility for example). I will clean these up in later versions.

 

Textures are very basic right now. Just enough to make the aircraft visible as that will be handled in a later chapter. I was expecting to focus on LODs and the damage model next, but I think coming up with a cockpit will be more pressing, so I think I'll focus on that next.

 

As always, I'm looking for ways to improve this. If you have suggestions, send them my way.

 

Links to the latest version will be updated in the first post of this thread.

Link to comment
Share on other sites

Thanks so much for the effort and keeping this document 'alive'. It is invaluable for starting out modding DCS. I wouldn't know where to begin if it wasn't for this manual...

"It's not the years, honey. It's the mileage..."

Link to comment
Share on other sites

Wouldn't you know. I just released a major update on dealing with animations including using IK bones and how to deal with the "unused bones" warnings on export and this morning I realized there is a simpler way to deal with it by placing the IK bones in a layer that doesn't get exported.

 

I'm going to test that a bit and then I'll probably make a minor update if that works.

Link to comment
Share on other sites

Ok, just verified that you can hide your unused bones in a 3ds max layer to prevent exporting them. That sure saves a lot of overhead from using dummies or transparent planes to get around unused bone exporting problems.

 

Updates have been made to the first post.

Link to comment
Share on other sites

  • 4 months later...

Would it be possible for you to create a start to finish guide on creating guages and other cockpit systems including 3d animations and the code behind them. I think I have finally figured it out after digging through many, many threads, but having a guide written down would be fantastic. Maybe I'll add it myself.

Link to comment
Share on other sites

Hopefully someone can answer this question:

 

When using a clickable cockpit, are the external animation arguments the same as for non-clickable cockpits or are you supposed to specify the arguments when you code your flight model? I am having an issue with my SFM aircraft that I am creating a clickable cockpit for where the external animations are showing in the model viewer but when I load my aircraft into DCS the animations don't translate in game. For example, I have animated the external airelons and elevator and they don't move when I move the stick. Is this because I have a clickable cockpit and there is some kind of flight model coding I need to do before the movement translates?

 

Thanks.

Link to comment
Share on other sites

Hopefully someone can answer this question:

 

When using a clickable cockpit, are the external animation arguments the same as for non-clickable cockpits or are you supposed to specify the arguments when you code your flight model? I am having an issue with my SFM aircraft that I am creating a clickable cockpit for where the external animations are showing in the model viewer but when I load my aircraft into DCS the animations don't translate in game. For example, I have animated the external airelons and elevator and they don't move when I move the stick. Is this because I have a clickable cockpit and there is some kind of flight model coding I need to do before the movement translates?

 

Thanks.

 

Well I answered my own question by testing w/ the f16 demo. There is definately something you need to define with an EFM before the animation arguments will play when you have a clicky cockpit. Using a "default" cockpit and all the animations play properly..

 

Now to find out what...

 

The arguments are the same however-they just dont play

Link to comment
Share on other sites

Well I answered my own question by testing w/ the f16 demo. There is definately something you need to define with an EFM before the animation arguments will play when you have a clicky cockpit. Using a "default" cockpit and all the animations play properly..

 

Now to find out what...

 

The arguments are the same however-they just dont play

 

Yes, I believe you are correct. This was a change ED made a couple years ago to how custom aircraft external animations work. If you want to use a completely custom aircraft, you will need to define the external animations values yourself.

Link to comment
Share on other sites

Yes, I believe you are correct. This was a change ED made a couple years ago to how custom aircraft external animations work. If you want to use a completely custom aircraft, you will need to define the external animations values yourself.

Not owning the Hawk or c101.. how do they work? do they not have clickable cockpits? As i understand it they use the SFM or is it an EFM but "simplified" and they still use their own .dlls ?

 

If i have to ill use the f16 as a template for now though that kind of changes my plans for the time being --either way I am enjoying the challenge this is providing to me.

 

edit: just wanted to add that after some digging i found where to define the draw arguments in the f16demo efm code. so if it turns out to be impossible to use the sfm with a clicky cockpit i now know how and where to do it.


Edited by Hedhunta
Link to comment
Share on other sites

Not owning the Hawk or c101.. how do they work? do they not have clickable cockpits? As i understand it they use the SFM or is it an EFM but "simplified" and they still use their own .dlls ?

 

If i have to ill use the f16 as a template for now though that kind of changes my plans for the time being --either way I am enjoying the challenge this is providing to me.

 

edit: just wanted to add that after some digging i found where to define the draw arguments in the f16demo efm code. so if it turns out to be impossible to use the sfm with a clicky cockpit i now know how and where to do it.

 

I have never flown or owned the hawk or C-101 either, but it is my guess that they also define animations in their code somewhere, whether it is in the cockpit dlls or the lua, I don't know.

 

I have some SFM aircraft modules that require defining the external animations and some that do not. I am not sure of the exact trigger for that requirement.

Link to comment
Share on other sites

  • 2 weeks later...
I have never flown or owned the hawk or C-101 either, but it is my guess that they also define animations in their code somewhere, whether it is in the cockpit dlls or the lua, I don't know.

 

I have some SFM aircraft modules that require defining the external animations and some that do not. I am not sure of the exact trigger for that requirement.

 

After doing some studying of threads it seems that as of like 1.2 ~2012 they changed the way external animations of aircraft with custom cockpits works. It looks like it is still possible to call the original lock on commands but I am having a hard time figuring out exactly how. The main problem is many of the information and threads on this conflicts between using the SFM and a custom EFM. Some people are using an SFM(which is what I would like to do for the time being) and others are using their own EFM and it is really hard to decipher what commands work for each.

 

I really wish ED could provide a list of how to use SFM commands for us people who are not amazing at programming. I am learning and it is not easy and I am getting there but I just want things to "work" sometimes and information is so sparse on how to get things to work that it can be downright infuriating.

 

Doesn't help that the modding community for this game is basically nothing compared to other games precisely because things are so difficult. The "begginers guide" hasn't been updated in months and while I understand that it is a volunteer project it could definately use some help from ED.

 

Anyhow enough of my soapbox and back to developing!

Link to comment
Share on other sites

I think I have sort of figured it out for the gear... by reusing some code from the F16 demo I was able to make my gear drop when my speed drops below a certain level... still cant get the G key to do it but I think if I set up a clickable device in the cockpit I could get it to work....

 

 

Any ideas on how to get the keyboard to cause the gear to go up/down?

 

Here is my code that I borrowed:

 

local landing_gear_system = GetSelf()

local update_time_step = 0.1
make_default_activity(update_time_step)

local sensor_data = get_base_data()

print("LOADING LANDING GEAR SYSTEM")
--Creating local variables
local GEAR_COMMAND		=	0				-- COMMANDED GEAR POS 0=UP, 1=DOWN
local GEAR_STATE		=	0				-- ACTUALT GEAR POS 0=UP,1=DOWN
local NOSE_GEAR_POS 	= 	0
local RIGHT_GEAR_POS 	=   0
local LEFT_GEAR_POS		=   0

function SetCommand(command,value)			
print_message_to_user("SetCommand Triggered")

if command == 3020 then  -- GEAR UP		
	GEAR_COMMAND = 0
	print_message_to_user("Gear Set to UP")
end

if command == 3019 then  -- GEAR DOWN		
	GEAR_COMMAND = 1
	print_message_to_user("Gear Set to DOWN")
end
end

function update()		
--print_message_to_user("Update")

NOSE_GEAR_POS 	=  get_aircraft_draw_argument_value(0)
RIGHT_GEAR_POS 	=  get_aircraft_draw_argument_value(3)
LEFT_GEAR_POS 	=  get_aircraft_draw_argument_value(5)

--if GEAR_COMMAND == 1 then
--	GEAR_STATE = 1
--end

--if GEAR_COMMAND == 0 then
--	GEAR_STATE = 0
--end
GEAR_STATE = 0

if (sensor_data.getTrueAirSpeed() * 1) < 200.0 then
	GEAR_STATE = 1
end

set_aircraft_draw_argument_value(0,GEAR_STATE)
set_aircraft_draw_argument_value(3,GEAR_STATE)
set_aircraft_draw_argument_value(5,GEAR_STATE)

--if	sensor_data.getWOW_LeftMainLandingGear()==1 or
--	sensor_data.getWOW_NoseLandingGear()==1 or
--	sensor_data.getWOW_RightMainLandingGear()==1 then 
--	print_message_to_user("TOUCHDOWN!")
--end
end

 

It seems to work... but it only gives me up and down.. it doesn't animate in between at all. Any idea how I can make it do the proper animation and also use a keyboard command instead of a speed?

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...