Jump to content

DCS Mods structure : How to create your plugin from scratch


Recommended Posts

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 comment
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 (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

  • 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 (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

  • 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 (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

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 (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

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 comment
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 (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

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 (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

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 (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

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 comment
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 (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

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 (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

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 comment
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

su-24.gif

Link to comment
Share on other sites

Hopefully that changes.

 

Ive searched and searched for the predefined parameters and came up empty.

 

ie theres likely a tankers table somewhere with world id, position and min/max rotation.

 

even then the AI connects to the pre defined point regardless of basket drift.

 

So if plane is in race track turn and basked drifts inward/left, AI will connect to the right of the basket.

 

Id rather define a table for position and simply use a connector name instead of coordinates.

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

Having Some issues defining new WeaponTypes..

 

Im Basically taking the -E Specs and Warhead and Giving it the -D Head..

 

But it's not showing up in the Loadout, and yes I've added it to the Pylon Data.


Edited 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

Edit:

Nevermind I found the Problem,

 

Missing "," after:

category = CAT_MISSILES

 

 

And:

warhead = warheads["AGM_65E"],

 

Should have been:

warhead = predefined_warhead("AGM_65E"),

 

 

All good and Working now :-)

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

Too many times I would spend an embarrassingly large amount of time wondering why DCS wouldn't start or a script wasn't working because of missing punctuation or grouping. At least the log will point you in the right path.

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 comment
Share on other sites

Too many times I would spend an embarrassingly large amount of time wondering why DCS wouldn't start or a script wasn't working because of missing punctuation or grouping. At least the log will point you in the right path.

 

Yeah,

Would Launch DCS, No Store in Aircraft,

Close, Scan quickly, Relaunch,

 

then when I pasted here, I noticed no Comma,

So I added a Comma, Launched DCS, DCS Process Terminates,

Check Logs, and Noticed that the warhead = line is scanning DB_Mods for the wrong warheads_table,

So I scroll db mods file to get the correct table/command which was not warhead = warheads["Name"], but warhead = predefined_warhead("name")

 

After that everything was gravy and the AI spams the Mavericks w/ no problems at ground targets.

 

Now I can remove all the Redundant versions from other Branches (-Ds, -E's and -Hs)

And Script the TGM and CATM versions of the -F

 

attachment.php?attachmentid=148219&stc=1&d=1473778126

 

attachment.php?attachmentid=148220&stc=1&d=1473778126


Edited 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

The scale of the pilot looks a wee-bit too small. Could just be me, though.

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 comment
Share on other sites

  • Recently Browsing   0 members

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