Jump to content

DCS Mods structure : How to create your plugin from scratch


Recommended Posts

  • Replies 487
  • Created
  • Last Reply

Top Posters In This Topic

That's the Issue,

 

You either have old = x and it loads those system

 

or you dont and you have to script your own systems,

 

as long as you have old = 6 , it will load the old F-15C cockpit systems, which will set argument states.

Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill,

X470 Taichi Ultimate, 2x R7970 Lightnings Crossfired @ 1.1/6.0GHz,

3x ASUS VS248HP + Hanns·G HZ201HPB + Oculus HMD,

Thrustmaster Warthog HOTAS + MFDs, CH Fighterstick+Pro Throttle+Pro Pedals

Link to post
Share on other sites

You either dont have a Cockpit LODs or your Declare Line is linking to a Aircraft Name you have not set correctly,

 

Do you have a cockpit lods file in the /shapes/ folder?

Cockpit_MiG-21Bis.lods Linking to the Su33 cockpit EDM File:

Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill,

X470 Taichi Ultimate, 2x R7970 Lightnings Crossfired @ 1.1/6.0GHz,

3x ASUS VS248HP + Hanns·G HZ201HPB + Oculus HMD,

Thrustmaster Warthog HOTAS + MFDs, CH Fighterstick+Pro Throttle+Pro Pedals

Link to post
Share on other sites
  • 2 months later...

Hi, I'm trying to mod the IVSA F/A-18 so that it uses an EFM, specifically the F-15 FM for now.

 

However, I've run into a problem. When I try and fly the plane, the AI takes it over and I can't fly, even though it has my name in the bottom left of the F2 view.

 

Here is my entry.lua code:

 

self_ID = "F/A-18 by ISVA"

declare_plugin(self_ID,

{

installed = true, -- if false that will be place holder , or advertising

dirName = current_mod_path,

version = "ISVA",

state = "installed",

info = _("The McDonnell Douglas (now Boeing) F/A-18 Hornet is a twin-engine supersonic, all-weather carrier-capable multirole fighter jet, designed to dogfight and attack ground targets (F/A designation for Fighter/Attack). Designed by McDonnell Douglas and Northrop, the F/A-18 was derived from the latter's YF-17 in the 1970s for use by the United States Navy and Marine Corps. The Hornet is also used by the air forces of several other nations."),

 

InputProfiles =

{

["FA-18C"] = current_mod_path .. '/Input/fa-18c',

["FA-18A"] = current_mod_path .. '/Input/fa-18a',

},

Skins =

{

{

name = _("F/A-18"),

dir = "Theme"

},

},

Missions =

{

{

name = _("F/A-18"),

dir = "Missions",

},

},

LogBook =

{

{

name = _("FA-18C"),

type = "FA-18C",

},

{

name = _("FA-18A"),

type = "FA-18A",

},

},

binaries =

{

'F15'

},

 

})

----------------------------------------------------------------------------------------

mount_vfs_model_path (current_mod_path.."/Cockpit/Shape")

mount_vfs_model_path (current_mod_path.."/Shapes")

mount_vfs_liveries_path (current_mod_path.."/Liveries")

mount_vfs_texture_path (current_mod_path.."/Textures/Avionics")

mount_vfs_texture_path (current_mod_path.."/Textures/Skins_FA_18C")

mount_vfs_texture_path (current_mod_path.."/Textures/Skins_Swiss_Air_Force_by_CHSubZero_1.4")

---------------------------------------------------------------------------------------------------------

--make_flyable('FA-18A',current_mod_path..'/Cockpit/', {nil, old = 54}, current_mod_path..'/Entry/comm.lua')--SFM

--make_flyable('FA-18C',current_mod_path..'/Cockpit/', {nil, old = 6}, current_mod_path..'/Entry/comm.lua')--SFM

 

--make_flyable('FA-18A',current_mod_path..'/Cockpit/', {self_ID, 'Su-27', old = 54}, current_mod_path..'/Entry/comm.lua')

--make_flyable('FA-18C',current_mod_path..'/Cockpit/', {self_ID, 'Su-27', old = 6}, current_mod_path..'/Entry/comm.lua')

 

make_flyable('FA-18A',current_mod_path..'/Cockpit/', {self_ID, 'F15', old = 54}, current_mod_path..'/Entry/comm.lua')

make_flyable('FA-18C',current_mod_path..'/Cockpit/', {self_ID, 'F15', old = 6}, current_mod_path..'/Entry/comm.lua')

---------------------------------------------------------------------------------------------------------

dofile(current_mod_path..'/Entry/FAA')

dofile(current_mod_path..'/Entry/FAC')

dofile(current_mod_path..'/Entry/FAW')

-------------------------------------------------------------------------------------

plugin_done()

 

 

What am I doing wrong?

Link to post
Share on other sites
  • 3 weeks later...

Hoping someone can assist me with an issue and also something else I am hoping to understand better. Particularly the issue as I imagine others must have fallen over it before. I am not an animator/graphic artist by the way I just do the lua side but I will direct Markindel to this thread if someone's explanations are talking about the 3dsmax side.

 

As you can see I am working on the damage table for Markindel's DC3 and running into the issue in the picture. I previously thought that arg 81 reaching a value of 1 was the trigger for spawning the DC3-oblomok-tail.edm shape in game but the lua running when that picture was taken had no reference to argument 81. So I now believe that 81 just controls the appearance of the tailless aircraft shape and something else triggers the spawn of the tail piece. Can anyone please explain how this part of the damage model is meant to work?

 

In the test mission the Bradley shot at the DC3 for a while and then it must have reached a damage level and the first tail piece spawned. Then every time the aircraft was hit a new tail spawned in. What triggers the tail piece being spawned? Does the lua parameter droppable = false suppress this from happening or is it for something else entirely?

 

 

Second thing I have been trying to research with limited success for a long time. Deps_cells. I think that a deps_cell assignment is basically saying that within a damage location these other damageable locations exist. Is that correct?

 

So the below says that the right in flap location is within the right centre wing

[30] = {critical_damage = 20, args = {215}, deps_cells = {38}},-- wing center right

[38] = {critical_damage = 2},-- flap in right

 

Is that correct?

 

If it is correct does the critical damage for the flap add to the critical damage for the wing centre right so that the total of the critical damage for location 30 is 22 or is the flap damage of 2 counted as part of the 20 or is there no connection at all and each component has it's own critical damage and potentially it's own damage animation etc?

 

If specified as above does a hit on location 38 also damage 30 and vice versa? Does a hit on 38 contribute towards triggering the animation for argument 215?

 

Can someone clarify how this part works please?

 

Thank you for any clues or assistance anyone can provide.

 

Regards,

Stonehouse


Edited by Stonehouse
Link to post
Share on other sites
Guys, who can help me with moving map on MFD? How to define pages? I know how to add on MFD but i need help with pages.....

 

A-10C LUAs might help give an idea.

 

Im back logged w/ stuff, so I cant help atm.

Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill,

X470 Taichi Ultimate, 2x R7970 Lightnings Crossfired @ 1.1/6.0GHz,

3x ASUS VS248HP + Hanns·G HZ201HPB + Oculus HMD,

Thrustmaster Warthog HOTAS + MFDs, CH Fighterstick+Pro Throttle+Pro Pedals

Link to post
Share on other sites
  • 4 weeks later...

So..

I've been experimenting with next to no luck.

 

I have some Animated PODS (which outside of animation and physical appearance dont have any function in DCS).

 

However, there are Items I want to animate on the Pods..

 

Now.... This is the issue... I have no success with any code layout so far.

 

I've tried pulling the aircraft argument status to link w/ the Pod

ie:

local NAME = get_aircraft_draw_argument_value(x)

 

I've tried loading Aircraft Sensor Data.

ie

local NAME =sensor_data:getSENSNORNAME()

 

 

And then tried to tie it into the Placeholder Pod Using random forms of if/then commands, without any type of success..

 

 

What I want to do is use the Aircraft's Animation Status to provoke a Pod's Argument Status, as well as use Sensor Data to provoke the Pods Argument Status..

 

ie Use a Deployed Object Animation Status to Control A Deployed Object Animation Status on the Pod<

And Use Aircraft's Airspeed Sensor, to control the Pod's Spinner RPM.

Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill,

X470 Taichi Ultimate, 2x R7970 Lightnings Crossfired @ 1.1/6.0GHz,

3x ASUS VS248HP + Hanns·G HZ201HPB + Oculus HMD,

Thrustmaster Warthog HOTAS + MFDs, CH Fighterstick+Pro Throttle+Pro Pedals

Link to post
Share on other sites
  • 2 weeks later...

is there any information on the "AddPropAircraft" Block and IDs?

 

ie:

AddPropAircraft = {
{ id = "SoloFlight",    	 control = 'checkbox' , label = _('Solo Flight')			   , defValue = false, weightWhenOn = -80},
{ id = "ExhaustScreen" , control = 'checkbox', label = _('Exhaust Dispenser'), defValue = true, weight = 20},		
},

 

I'd Like to Add Other Checkbox Items to remove certain elements and model parts.

Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill,

X470 Taichi Ultimate, 2x R7970 Lightnings Crossfired @ 1.1/6.0GHz,

3x ASUS VS248HP + Hanns·G HZ201HPB + Oculus HMD,

Thrustmaster Warthog HOTAS + MFDs, CH Fighterstick+Pro Throttle+Pro Pedals

Link to post
Share on other sites
is there any information on the "AddPropAircraft" Block and IDs?

 

ie:

AddPropAircraft = {
{ id = "SoloFlight",    	 control = 'checkbox' , label = _('Solo Flight')			   , defValue = false, weightWhenOn = -80},
{ id = "ExhaustScreen" , control = 'checkbox', label = _('Exhaust Dispenser'), defValue = true, weight = 20},		
},

 

I'd Like to Add Other Checkbox Items to remove certain elements and model parts.

 

 

Seems these are controlled via a 3DS Max Definition/Setting?

 

I tried to Use a test Object w/ Arguments that matched the Huey Exhaust Screen, and the Pilot Visibility Argument

 

Same w/ HardpointRacks_Edit = true.

 

However the objects w/ corresponding animations were not turned off.

Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill,

X470 Taichi Ultimate, 2x R7970 Lightnings Crossfired @ 1.1/6.0GHz,

3x ASUS VS248HP + Hanns·G HZ201HPB + Oculus HMD,

Thrustmaster Warthog HOTAS + MFDs, CH Fighterstick+Pro Throttle+Pro Pedals

Link to post
Share on other sites

I think it'd be more in the code. The code would have to read the special option's state and set an external arg to a specified value (like set_external_draw_arg or something). Not sure how you'd do all that just in the 3D model.

i7 7700K | 32GB RAM | GTX 1080Ti | Rift CV1 | TM Warthog | Win 10

 

"There will always be people with a false sense of entitlement.

You can want it, you can ask for it, but you don't automatically deserve it. "

Link to post
Share on other sites

no clue right now,

 

i had notepad++ search within all files for any instances of the IDs and it didnt find anything..

Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill,

X470 Taichi Ultimate, 2x R7970 Lightnings Crossfired @ 1.1/6.0GHz,

3x ASUS VS248HP + Hanns·G HZ201HPB + Oculus HMD,

Thrustmaster Warthog HOTAS + MFDs, CH Fighterstick+Pro Throttle+Pro Pedals

Link to post
Share on other sites

no idea how it's communicating w/ LUA either, like I said, likely via User Control Box or Additional Params in the 3d Model / User Defined Section.

 

As the AI Still uses functions of Airframes even when I have not installed them for the cockpit or FM binaries.

Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill,

X470 Taichi Ultimate, 2x R7970 Lightnings Crossfired @ 1.1/6.0GHz,

3x ASUS VS248HP + Hanns·G HZ201HPB + Oculus HMD,

Thrustmaster Warthog HOTAS + MFDs, CH Fighterstick+Pro Throttle+Pro Pedals

Link to post
Share on other sites

I was able to get the Tanker version to respond to tanker calls etc,

 

But the AI Hooks up and just never lets go.. Im guessing fuel isnt being transferred.

Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill,

X470 Taichi Ultimate, 2x R7970 Lightnings Crossfired @ 1.1/6.0GHz,

3x ASUS VS248HP + Hanns·G HZ201HPB + Oculus HMD,

Thrustmaster Warthog HOTAS + MFDs, CH Fighterstick+Pro Throttle+Pro Pedals

Link to post
Share on other sites

Or, fuel is being transferred but the tanker doesn't know that the plane is full.

i7 7700K | 32GB RAM | GTX 1080Ti | Rift CV1 | TM Warthog | Win 10

 

"There will always be people with a false sense of entitlement.

You can want it, you can ask for it, but you don't automatically deserve it. "

Link to post
Share on other sites
Or, fuel is being transferred but the tanker doesn't know that the plane is full.

 

has something to do with my script, as the other tankers work fine (IL-78 and S-3R), prolly the basket coordinates and settings for Client type maybe, if I Use the S-3R or IL 78 Settings and replace chunk by chunk the data, everything works fine until i replace the refueling points count from 3 to 1, and the point positions etc.

 

using the IL 78 data, the AI Hooks up to an invisible Left Basket, and lets go a after a brief connect (as I had the AI at like 95% fuel), but once any of the points are changed, they hook up and refuse to let go.

 

Also if I dont side load the S-3R via WorldID =, then the AI Just breaks off formation and RTBs, so Even though I have the Attributes Set for Tanker, they don't exist as tankers until I attached a World ID from Another tanker.

 

Which leads me to believe there's another file somewhere that declares World ID's for tankers.

 

Add in the fact that in Race Track Orbit, when the aircraft banks and the basket moves to the left, the AI still connects at the coordinates even though the basket has moved, tried re-naming connector to match KC tanker w/ no luck.


Edited by SkateZilla

Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill,

X470 Taichi Ultimate, 2x R7970 Lightnings Crossfired @ 1.1/6.0GHz,

3x ASUS VS248HP + Hanns·G HZ201HPB + Oculus HMD,

Thrustmaster Warthog HOTAS + MFDs, CH Fighterstick+Pro Throttle+Pro Pedals

Link to post
Share on other sites

So I Narrowed it down to the Refuel Point Location

 

If I set the S-3R World ID and S-3R Coordinates, Works, Change Coordinates, AI No Longer Disconnects.

If I Set the IL78 World ID and Coordinates, Works, Change Any of the 3 Coordinates, AI No Longer Disconnects,

 

Remove the World IDs for Either Aircraft, AI No Longer Responds to the Other as Tanker, and when flying an Aircraft, Tanker No Longer Appears In the Radio Menu.

Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill,

X470 Taichi Ultimate, 2x R7970 Lightnings Crossfired @ 1.1/6.0GHz,

3x ASUS VS248HP + Hanns·G HZ201HPB + Oculus HMD,

Thrustmaster Warthog HOTAS + MFDs, CH Fighterstick+Pro Throttle+Pro Pedals

Link to post
Share on other sites

That's.....bizzare. Wonder if the AI code only knows the default tanker points as valid connections...

i7 7700K | 32GB RAM | GTX 1080Ti | Rift CV1 | TM Warthog | Win 10

 

"There will always be people with a false sense of entitlement.

You can want it, you can ask for it, but you don't automatically deserve it. "

Link to post
Share on other sites
So I Narrowed it down to the Refuel Point Location

 

If I set the S-3R World ID and S-3R Coordinates, Works, Change Coordinates, AI No Longer Disconnects.

If I Set the IL78 World ID and Coordinates, Works, Change Any of the 3 Coordinates, AI No Longer Disconnects,

 

Remove the World IDs for Either Aircraft, AI No Longer Responds to the Other as Tanker, and when flying an Aircraft, Tanker No Longer Appears In the Radio Menu.

 

Do not waste your time on it...

I have made a new tanker also (KC-46), but I can't reassign the refueling point positions.

Seems like this points are hard coded for the both working World ID's. And it's animation parameters - Up/Down, Left/Right also limited by the game code.

There is small chance what KC-10A World Id's is working, as it still persist in wstype scripts, but again, it has only one refueling point for the flying boom...


Edited by Morkva_55

[sIGPIC][/sIGPIC]

Link to post
Share on other sites
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...