Jump to content

Help on Custom Arguments


hu16flier

Recommended Posts

hu16flier, per your PM here is some information that should get you going making your own custom arguments.

 

Custom arguments can be added to any model (as far as I know) that has animation. Picture 1 shows an F/A-18 with bullet hole damage added as custom arguments to the livery. You could use a picture like this to fabicate a story to squadon members on how you fought off 5 enemy jets with just your guns and returned victorious (LOL). Picture 2 shows a V22 having its propeller replaced aboard a CVN. Custom arguments were used on the V22 (from the MAM) to open the rear cargo door, pilot door, and rotate the nacelles up. A custom arguments was also used to put CVN elevator 2 half way down. Several custom arguments were used on the Tilly Crane to have its boom up, pad down, hook lowered, and wheels turned.

 

Step one is to look at the model of interest in ModelViewer2 and record the settings for those arguments you want to make custom arguments for. For example on USS John C Stennis arguments 57, 58, 59, and 60 are the elevators 1 to 4 in that order (see Picture 3). A setting of 0 is default and the elevator is up. Set the argument to 1 and the elevator will be down. The hangar door arguments, from 1 to 4, are 47, 48, 53, and 54. A setting of 0 is default and the door is closed. Set the argument to 1 and the door will be open. Picture 3 shows argument 53 set to 1.0 and hangar door 3 is open. Using ModelViewer2 is a must to determine what animations are modelled and setting to use.

 

Step two is to identify the GT.name of the model. This can be found in the .lua file for the model in question. For USS John C Stennis the GT.name is STENNIS.

 

Step three is to create a Liveries folder in the c:/Users/YourName/Saved Games/DCS.openbeta folder if you don't already have one. In this Liveries folder create another folder titled STENNIS. In the STENNIS folder create folders with a title that gives an idea what animation is being activated. For example an ELEVATOR 4 DOWN folder.

 

Step four, create the Description .lua file and save it in the folder created in step three. This is really simple (see attached file):

 

--lua description file start

livery = { }

custom_args = {

[57] = 0.0, -- elevator 1 up

[58] = 0.0, -- elevator 2 up

[59] = 0.0, -- elevator 3 up

[60] = 1.0, -- elevator 4 down

[47] = 0.0, -- hangar door 1 closed

[48] = 0.0, -- hangar door 2 closed

[53] = 0.0, -- hangar door 3 closed

[54] = 1.0, -- hangar door 4 open

}

name = "Elevator 4 Down"

-- lua description end

 

Having no entry in the livery = { } area means the textures for the model will not be changed. Only the elevator position is being changed. In this case only elevator 4 will be down with it's hangar door open. You can add many arguments to the same description file. So, if we wanted all the hangar doors closed except for door 4 we would add [47] = 0.0, [48] = 0.0, and [53] = 0.0 to the entry above. The door default is closed so this doesn't really do anything to those doors. Change a hangar door setting to 1.0 and watch it be open. If you want textures changed then you will need to add them in the livery = { } area like any other livery. Just make sure the custom arguments are the last lines in the livery lua file.

 

You can do all sorts of things with custom arguments. Experiment with them. Using the above example for Elevator 4 if you set [60] = 0.5 the elevator will be half way up or down depending on how you view things. If an aircraft supports ladders, chocks, covers, etc then those too can be added the same way. Just need to know what argument numbers to use.

 

Something I stubbled into was that by using the following statement in a weapon section on the STENNIS I could cause a custom argument to occur. The statement is:

 

GT.WS[ws].animation_alarm_state = (time = 4.0, arg = 54);

 

If this is inserted into the seasparrow weapon section of the STENNIS, hangar door 4 will close (I have it open with elevator 4 down) when the seasparrow detects a target. As long as a target is detected the custom argument will work. The time variable sets how quickly the action occurs. I have been trying to get other hangar doors to close (if open) when the ship comes under attack but can only get one argument (closing one hangar door) to work at a time. Maybe someone out there has found a way to do multiple arguments using this command.

 

Hope this helps and I didn't mess up any information.

 

 

Rusty

808084057_Picture1.thumb.jpg.8d06a04392863be2438215537d6fde08.jpg

2120530883_Picture2.thumb.jpg.b7aa5a44c571aacbf1502ba2ebe973f3.jpg

601095119_Picture3.thumb.jpg.24999873f4ceb71ae403fa085cbca667.jpg

description.lua

Link to comment
Share on other sites

Please pardon my ignorance when it comes to mission editing. I feel that it has to be super painful to deal with my level of retardation, but I did every task as you described but it didn't work.

 

I copied and pasted the lua into the livery folder that I made for the stennis as seen in the pic, but no dice. Do I need to add anything else in the Livery folder or is the lua the only thing?

Should I see the custom arguments in the "PAINT SCHEME drop down after creating a new livery?

 

Also what does identifying the GT.name do in step 2 of your tutorial?

 

Dude, I totally owe you for helping me out. I truly appreciate it.

2086137520_Liveries_STENNIS_ELEVATOR4DOWN.thumb.PNG.9b2ce57631677c3abf36a292d9e77373.PNG

Link to comment
Share on other sites

Interesting request but I do not know how to do that as an automatic sequence of events. I have been trying to trigger custom ship arguments using the ME trigger feature but have been unsuccessful so far. Sorry but you are pushing my experience with this one.

 

A simple approach would be to spawn a LCAC behind the Oak Hill when the ship arrives on station (using a specific time) and set the LCAC to make a landing from there.

 

If you get this one figured out I would be interested in how its done too.

 

 

Rusty

Link to comment
Share on other sites

  • Recently Browsing   0 members

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