View Full Version : my next step
dcc
March 21st, 2006, 22:51
As some of you know I've been slowly porting my P-38 through FSDS3 and I believe I've got most of the oddities worked out now and my model is finally compiling and working to some degree.
So my next step -- conditionals. For instance, part visibility based on some switch or engine speed, etc. I've got illuminating nav lights, ID lights, etc. that I want visible (not just the fx lights, but parts) when I flip the appropriate switch.
In the old FSDS I had used the 'pre-process' feature. I've tried the 'experiemental' pre-process in FSDS3 and it doesn't seem to work with the parts I've got, and I'd rather take the plunge and do it the way it ought to be donw now with makeMDL.
So, I gather I must venture into the world of XML. Fine. I've been looking at code snippets, etc at some of the sites but one question still remains... what do I do will the code? Where does it go? I'm guessing I have to somehow add the code somewhere (.x file?!?) before makeMDL does its thing, but I haven't seen any mention of where and how?
Can someone point me to a tutorial or some explanation of how to do this? I see lots of code examples of conditionals, I'm looking for something a bit more basic, like what to do with the code? thanks!
- dcc
Silver Fox
March 21st, 2006, 23:44
Your custom part XML must be added to the MakeMDL.parts.xml file so that MakeMDL knows what to do with it when it compiles. I've seen it suggested that you add new code to the top of the file because any error will prevent code further down from being implemented.
Fr. Bill over at http://www.freeflightdesign.com/ forums can be a real help comprehending XML issues. One section of the forum has all sorts of working XML code snippets to use as well...very handy not to re-invent the wheel. :)
FelixFFDS
March 22nd, 2006, 00:08
One of the best - very basic - explanations of XML coding is the thread "Anatomy of an XML Code", where Fr. Bill (poor fellow, he's been accused of being my alter ego) describes the XML incarnation of our beloved (at least to FSDS2 users) "lavatory dump valve" ...
dcc
March 22nd, 2006, 20:05
thanks for the tips! so it's the MakeMDL.parts.xml file ...
the fun never ends :d
- dcc
Wozza
March 22nd, 2006, 21:25
Hi Dcc
Lights in fsds3 are controled by material names.When you apply a material to a part with the correct name (see makemdl.doc for names) the part will responed to the respective light switch and light source
Ive got most of the easier preprocess done as xml code if you want them
but they are pretty usless as a little bit more advanced code will do a much better job.Anyway yell If ya need a hand
Chears
Wozza
dcc
March 23rd, 2006, 18:50
wozza thanks for the offer -- I'm looking for code that would make visible/invisible nav lights when the nav light switch changes, and similar for landing light, strobes and beacon. I looked through the makemdl.doc but am still a bit confused...:d I'll keep plodding through, but if you happen to have code that would do these basic tasks, I can use the help!
- dcc
Wozza
March 23rd, 2006, 21:43
Hi Mate
These are just simple on off vis switchs to use in place of SOME of the older fsds2.4 preprocess's,These were done as a simple proof of concept
paste the lines into the top of your makmdl.parts.xml(back it up first just in case) just under the <part_dictionary> line
<!--Preprocess lights start -->
<part>
<name>Light_panel_off</name>
<visible_in_range>
<parameter>
<code>
(A:LIGHT PANEL,number)
</code>
</parameter>
<minvalue>-1</minvalue>
<maxvalue>0</maxvalue>
</visible_in_range>
</part>
<part>
<name>Light_panel_on</name>
<visible_in_range>
<parameter>
<code>
(A:LIGHT PANEL,number)
</code>
</parameter>
<minvalue>1</minvalue>
<maxvalue>1</maxvalue>
</visible_in_range>
</part>
<part>
<name>Light_land_off</name>
<visible_in_range>
<parameter>
<code>
(A:LIGHT LANDING,number)
</code>
</parameter>
<minvalue>-1</minvalue>
<maxvalue>0</maxvalue>
</visible_in_range>
</part>
<part>
<name>Light_land_on</name>
<visible_in_range>
<parameter>
<code>
(A:LIGHT LANDING,number)
</code>
</parameter>
<minvalue>1</minvalue>
<maxvalue>1</maxvalue>
</visible_in_range>
</part>
<part>
<name>Light_nav_off</name>
<visible_in_range>
<parameter>
<code>
(A:LIGHT NAV,number)
</code>
</parameter>
<minvalue>-1</minvalue>
<maxvalue>0</maxvalue>
</visible_in_range>
</part>
<part>
<name>Light_nav_on</name>
<visible_in_range>
<parameter>
<code>
(A:LIGHT NAV,number)
</code>
</parameter>
<minvalue>1</minvalue>
<maxvalue>1</maxvalue>
</visible_in_range>
</part>
<part>
<name>Light_beacon_off</name>
<visible_in_range>
<parameter>
<code>
(A:LIGHT BEACON,number)
</code>
</parameter>
<minvalue>-1</minvalue>
<maxvalue>0</maxvalue>
</visible_in_range>
</part>
<part>
<name>Light_beacon_on</name>
<visible_in_range>
<parameter>
<code>
(A:LIGHT BEACON,number)
</code>
</parameter>
<minvalue>1</minvalue>
<maxvalue>1</maxvalue>
</visible_in_range>
</part>
<part>
<name>Light_strobe_off</name>
<visible_in_range>
<parameter>
<code>
(A:LIGHT STROBE,number)
</code>
</parameter>
<minvalue>-1</minvalue>
<maxvalue>0</maxvalue>
</visible_in_range>
</part>
<part>
<name>Light_strobe_on</name>
<visible_in_range>
<parameter>
<code>
(A:LIGHT STROBE,number)
</code>
</parameter>
<minvalue>1</minvalue>
<maxvalue>1</maxvalue>
</visible_in_range>
</part>
<part>
<name>Light_taxi_off</name>
<visible_in_range>
<parameter>
<code>
(A:LIGHT TAXI,number)
</code>
</parameter>
<minvalue>-1</minvalue>
<maxvalue>0</maxvalue>
</visible_in_range>
</part>
<part>
<name>Light_taxi_on</name>
<visible_in_range>
<parameter>
<code>
(A:LIGHT TAXI,number)
</code>
</parameter>
<minvalue>1</minvalue>
<maxvalue>1</maxvalue>
</visible_in_range>
</part>
<part>
<name>Light_logo_off</name>
<visible_in_range>
<parameter>
<code>
(A:LIGHT LOGO,number)
</code>
</parameter>
<minvalue>-1</minvalue>
<maxvalue>0</maxvalue>
</visible_in_range>
</part>
<part>
<name>Light_logo_on</name>
<visible_in_range>
<parameter>
<code>
(A:LIGHT LOGO,number)
</code>
</parameter>
<minvalue>1</minvalue>
<maxvalue>1</maxvalue>
</visible_in_range>
</part>
<part>
<name>Light_recon_on</name>
<visible_in_range>
<parameter>
<code>
(A:LIGHT RECOGNITION,number)
</code>
</parameter>
<minvalue>1</minvalue>
<maxvalue>1</maxvalue>
</visible_in_range>
</part>
<part>
<name>Light_recon_off</name>
<visible_in_range>
<parameter>
<code>
(A:LIGHT RECOGNITION,number)
</code>
</parameter>
<minvalue>-1</minvalue>
<maxvalue>0</maxvalue>
</visible_in_range>
</part>
<part>
<name>Light_wing_on</name>
<visible_in_range>
<parameter>
<code>
(A:LIGHT WING,number)
</code>
</parameter>
<minvalue>1</minvalue>
<maxvalue>1</maxvalue>
</visible_in_range>
</part>
<part>
<name>Light_wing_off</name>
<visible_in_range>
<parameter>
<code>
(A:LIGHT WING,number)
</code>
</parameter>
<minvalue>-1</minvalue>
<maxvalue>0</maxvalue>
</visible_in_range>
</part>
<!--Preprocess lights end -->
<!--Preprocess on_off Ground conditions -->
<part>
<name>on_ground</name>
<visible_in_range>
<parameter>
<sim>
<variable>SIM ON GROUND</variable>
<units>bool</units>
</sim>
</parameter>
<minvalue>1</minvalue>
</visible_in_range>
</part>
<part>
<name>off_ground</name>
<visible_in_range>
<parameter>
<sim>
<variable>SIM ON GROUND</variable>
<units>bool</units>
</sim>
</parameter>
<minvalue>-1</minvalue>
<maxvalue>0</maxvalue>
</visible_in_range>
</part>
<part>
<name>Park_Brake_on</name>
<visible_in_range>
<parameter>
<sim>
<variable>BRAKE PARKING POSITION</variable>
<units>bool</units>
</sim>
</parameter>
<minvalue>1</minvalue>
<maxvalue>1</maxvalue>
</visible_in_range>
</part>
<part>
<name>Park_Brake_off</name>
<visible_in_range>
<parameter>
<sim>
<variable>BRAKE PARKING POSITION</variable>
<units>bool</units>
</sim>
</parameter>
<minvalue>-1</minvalue>
<maxvalue>0</maxvalue>
</visible_in_range>
</part>
<!--END on_off Ground conditions -->
<!--Preprocess Engine conditions "simple on/off" -->
<part>
<name>Engine_1_off</name>
<visible_in_range>
<parameter>
<sim>
<variable>ENG1 COMBUSTION</variable>
<units>bool</units>
</sim>
</parameter>
<minvalue>-1</minvalue>
<maxvalue>0</maxvalue>
</visible_in_range>
</part>
<part>
<name>Engine_1_on</name>
<visible_in_range>
<parameter>
<sim>
<variable>ENG1 COMBUSTION</variable>
<units>bool</units>
</sim>
</parameter>
<minvalue>1</minvalue>
<maxvalue>1</maxvalue>
</visible_in_range>
</part>
<part>
<name>Engine_2_off</name>
<visible_in_range>
<parameter>
<sim>
<variable>ENG2 COMBUSTION</variable>
<units>bool</units>
</sim>
</parameter>
<minvalue>-1</minvalue>
<maxvalue>0</maxvalue>
</visible_in_range>
</part>
<part>
<name>Engine_2_on</name>
<visible_in_range>
<parameter>
<sim>
<variable>ENG2 COMBUSTION</variable>
<units>bool</units>
</sim>
</parameter>
<minvalue>1</minvalue>
<maxvalue>1</maxvalue>
</visible_in_range>
</part>
<part>
<name>Engine_3_off</name>
<visible_in_range>
<parameter>
<sim>
<variable>ENG3 COMBUSTION</variable>
<units>bool</units>
</sim>
</parameter>
<minvalue>-1</minvalue>
<maxvalue>0</maxvalue>
</visible_in_range>
</part>
<part>
<name>Engine_3_on</name>
<visible_in_range>
<parameter>
<sim>
<variable>ENG3 COMBUSTION</variable>
<units>bool</units>
</sim>
</parameter>
<minvalue>1</minvalue>
<maxvalue>1</maxvalue>
</visible_in_range>
</part>
<part>
<name>Engine_4_off</name>
<visible_in_range>
<parameter>
<sim>
<variable>ENG4 COMBUSTION</variable>
<units>bool</units>
</sim>
</parameter>
<minvalue>-1</minvalue>
<maxvalue>0</maxvalue>
</visible_in_range>
</part>
<part>
<name>Engine_4_on</name>
<visible_in_range>
<parameter>
<sim>
<variable>ENG4 COMBUSTION</variable>
<units>bool</units>
</sim>
</parameter>
<minvalue>1</minvalue>
<maxvalue>1</maxvalue>
</visible_in_range>
</part>
<!--END Engine conditions "simple on/off" -->
<!--Preprocess Landing Gear conditions "globel" -->
<part>
<name>Gear_Up</name>
<visible_in_range>
<parameter>
<code>
(A:GEAR TOTAL PCT EXTENDED, percent) 100 *
</code>
</parameter>
<minvalue>-1</minvalue>
<maxvalue>0</maxvalue>
</visible_in_range>
</part>
<part>
<name>Gear_Down</name>
<visible_in_range>
<parameter>
<code>
(A:GEAR TOTAL PCT EXTENDED, percent) 100 *
</code>
</parameter>
<minvalue>100</minvalue>
<maxvalue>200</maxvalue>
</visible_in_range>
</part>
<!--END Landing Gear conditions "globel" -->
FelixFFDS
March 23rd, 2006, 23:27
<perk> Izzit okay if I post it ... "elsewhere" ?
Wozza
March 23rd, 2006, 23:34
Of course Felix
I actually thought it was already posted over at FFDS
Wozza
Silver Fox
March 24th, 2006, 00:53
Handy!
Now I don't have to write them myself...or try to figure them out myself! :)
FelixFFDS
March 24th, 2006, 20:21
DAngnabit, the yaBB script those <bleeps> use at FFDS says it's too long! I guess I'll have to cut it up in pieces.
Of course, it's also going to go in as a zipped file ...
dcc
March 24th, 2006, 20:57
WOW!!!! :jump:
thanks a ton! please accept a few of these :medals: and if you drink, some virtual these :ernae: on me
:applause: :applause: :applause:
- dcc
Gnoopey
March 25th, 2006, 17:39
Hi Mate
These are just simple on off vis switchs to use in place of SOME of the older fsds2.4 preprocess's,These were done as a simple proof of concept
paste the lines into the top of your makmdl.parts.xml(back it up first just in case) just under the <part_dictionary> line
snipped ...
wow Wozza - I'll second that 'thankx a ton' - you're da man - great stuff M8 :)
<!-- -->
<!--P-47 Thunderbolt mania enhancements - experimental but working! - (C)opyright by Tom Kohler - 2005 / 2006 -->
<part>
<name>high_CHT0</name>
<visible_in_range>
<parameter>
<sim>
<variable>RECIP ENG CYLINDER HEAD TEMPERATURE:1</variable>
<units>farenheit</units>
</sim>
</parameter>
<minvalue>355</minvalue>
</visible_in_range>
</part>
<part>
<name>high_CHT1</name>
<visible_in_range>
<parameter>
<sim>
<variable>RECIP ENG CYLINDER HEAD TEMPERATURE:2</variable>
<units>farenheit</units>
</sim>
</parameter>
<minvalue>355</minvalue>
</visible_in_range>
</part>
<part>
<name>high_CHT2</name>
<visible_in_range>
<parameter>
<sim>
<variable>RECIP ENG CYLINDER HEAD TEMPERATURE:3</variable>
<units>farenheit</units>
</sim>
</parameter>
<minvalue>355</minvalue>
</visible_in_range>
</part>
<part>
<name>high_CHT3</name>
<visible_in_range>
<parameter>
<sim>
<variable>RECIP ENG CYLINDER HEAD TEMPERATURE:4</variable>
<units>farenheit</units>
</sim>
</parameter>
<minvalue>355</minvalue>
</visible_in_range>
</part>
<part>
<name>low_CHT0</name>
<visible_in_range>
<parameter>
<sim>
<variable>RECIP ENG CYLINDER HEAD TEMPERATURE:1</variable>
<units>farenheit</units>
</sim>
</parameter>
<maxvalue>355</maxvalue>
</visible_in_range>
</part>
<part>
<name>low_CHT1</name>
<visible_in_range>
<parameter>
<sim>
<variable>RECIP ENG CYLINDER HEAD TEMPERATURE:2</variable>
<units>farenheit</units>
</sim>
</parameter>
<maxvalue>355</maxvalue>
</visible_in_range>
</part>
<part>
<name>low_CHT2</name>
<visible_in_range>
<parameter>
<sim>
<variable>RECIP ENG CYLINDER HEAD TEMPERATURE:3</variable>
<units>farenheit</units>
</sim>
</parameter>
<maxvalue>355</maxvalue>
</visible_in_range>
</part>
<part>
<name>low_CHT3</name>
<visible_in_range>
<parameter>
<sim>
<variable>RECIP ENG CYLINDER HEAD TEMPERATURE:4</variable>
<units>farenheit</units>
</sim>
</parameter>
<maxvalue>355</maxvalue>
</visible_in_range>
</part>
<part>
<name>oxy_mask_OFF</name>
<visible_in_range>
<parameter>
<sim>
<variable>INDICATED ALTITUDE</variable>
<units>foot</units>
</sim>
</parameter>
<maxvalue>10000</maxvalue>
</visible_in_range>
</part>
<part>
<name>oxy_mask_ON</name>
<visible_in_range>
<parameter>
<sim>
<variable>INDICATED ALTITUDE</variable>
<units>foot</units>
</sim>
</parameter>
<minvalue>10000</minvalue>
</visible_in_range>
</part>
<part>
<name>l_dtank</name>
<visible_in_range>
<parameter>
<sim>
<variable>FUEL TANK EXTERNAL1 QUANTITY</variable>
<units>gallon</units>
</sim>
</parameter>
<minvalue>1</minvalue>
</visible_in_range>
</part>
<part>
<name>r_dtank</name>
<visible_in_range>
<parameter>
<sim>
<variable>FUEL TANK EXTERNAL2 QUANTITY</variable>
<units>gallon</units>
</sim>
</parameter>
<minvalue>1</minvalue>
</visible_in_range>
</part>
<part>
<name>c_dtank</name>
<visible_in_range>
<parameter>
<sim>
<variable>FUEL TANK CENTER3 QUANTITY</variable>
<units>gallon</units>
</sim>
</parameter>
<minvalue>1</minvalue>
</visible_in_range>
</part>
<part>
<name>P47_guns</name>
<visible_in_range>
<parameter>
<sim>
<variable>PAYLOAD STATION WEIGHT:1</variable>
<units>Pound</units>
</sim>
</parameter>
<minvalue>537</minvalue>
</visible_in_range>
</part>
<part>
<name>c_pylon</name>
<visible_in_range>
<parameter>
<sim>
<variable>PAYLOAD STATION WEIGHT:3</variable>
<units>Pound</units>
</sim>
</parameter>
<minvalue>5</minvalue>
</visible_in_range>
</part>
<part>
<name>l_pylon</name>
<visible_in_range>
<parameter>
<sim>
<variable>PAYLOAD STATION WEIGHT:4</variable>
<units>Pound</units>
</sim>
</parameter>
<minvalue>20</minvalue>
</visible_in_range>
</part>
<part>
<name>r_pylon</name>
<visible_in_range>
<parameter>
<sim>
<variable>PAYLOAD STATION WEIGHT:5</variable>
<units>Pound</units>
</sim>
</parameter>
<minvalue>20</minvalue>
</visible_in_range>
</part>
<part>
<name>c_tank_mnt</name>
<visible_in_range>
<parameter>
<sim>
<variable>PAYLOAD STATION WEIGHT:6</variable>
<units>Pound</units>
</sim>
</parameter>
<minvalue>10</minvalue>
</visible_in_range>
</part>
<part>
<name>l_tank_mnt</name>
<visible_in_range>
<parameter>
<sim>
<variable>PAYLOAD STATION WEIGHT:7</variable>
<units>Pound</units>
</sim>
</parameter>
<minvalue>30</minvalue>
</visible_in_range>
</part>
<part>
<name>r_tank_mnt</name>
<visible_in_range>
<parameter>
<sim>
<variable>PAYLOAD STATION WEIGHT:8</variable>
<units>Pound</units>
</sim>
</parameter>
<minvalue>30</minvalue>
</visible_in_range>
</part>
<part>
<name>P47_Pilot</name>
<visible_in_range>
<parameter>
<sim>
<variable>PAYLOAD STATION WEIGHT:9</variable>
<units>Pound</units>
</sim>
</parameter>
<minvalue>140</minvalue>
</visible_in_range>
</part>
<part>
<name>user_sim</name>
<visible_in_range>
<parameter>
<sim>
<variable>IS USER SIM</variable>
<units>bool</units>
</sim>
</parameter>
<minvalue>1</minvalue>
</visible_in_range>
</part>
<part>
<name>AI_MP_sim</name>
<visible_in_range>
<parameter>
<sim>
<variable>IS USER SIM</variable>
<units>bool</units>
</sim>
</parameter>
<minvalue>-1</minvalue>
<maxvalue>0</maxvalue>
</visible_in_range>
</part>
<part>
<name>sim_on_ground</name>
<visible_in_range>
<parameter>
<sim>
<variable>SIM ON GROUND</variable>
<units>bool</units>
</sim>
</parameter>
<minvalue>1</minvalue>
</visible_in_range>
</part>
<part>
<name>sim_airborne</name>
<visible_in_range>
<parameter>
<sim>
<variable>SIM ON GROUND</variable>
<units>bool</units>
</sim>
</parameter>
<minvalue>-1</minvalue>
<maxvalue>0</maxvalue>
</visible_in_range>
</part>
<part>
<name>P47_taxiing</name>
<visible_in_range>
<parameter>
<sim>
<variable>AIRSPEED INDICATED</variable>
<units>knot</units>
</sim>
</parameter>
<maxvalue>15</maxvalue>
</visible_in_range>
</part>
<part>
<name>P47_rolling</name>
<visible_in_range>
<parameter>
<sim>
<variable>CENTER WHEEL RPM</variable>
<units>rpm</units>
</sim>
</parameter>
<minvalue>1</minvalue>
</visible_in_range>
</part>
<part>
<!-- P-47D-28 main fuel selector. Keys: KF0=OFF (id 0), KF25=Center2 (id 7), KF50=Center1 (id 6), KF75=All External (id 17) -->
<name>switch_fuel_selector_P47_main</name>
<animation>
<parameter>
<!-- <code>3 0 0 0 0 0 0 3 3 3 1 2 0 0 2 2 2 0 18 (A:FUEL TANK SELECTOR:1, enum) case 25 *</code> -->
<code>75 0 0 0 0 0 0 75 75 75 25 50 0 0 50 50 50 0 18 (A:FUEL TANK SELECTOR 1,enum) case</code>
<lag>100</lag>
</parameter>
</animation>
<mouserect>
<cursor>Hand</cursor>
<help_id>HELPID_GAUGE_FUEL_SELECTOR</help_id>
<tooltip_id>TOOLTIPTEXT_FUEL_SELECTOR</tooltip_id>
<mouse_flags>LeftSingle+Wheel</mouse_flags>
<callback_code>
(A:Fuel tank selector 1,enum) 0 ==
<!-- off to Center2 -->
if{
7 (>K:FUEL_SELECTOR_SET)
}
<!-- Center2 to Center1 -->
els{
(A:Fuel tank selector 1,enum) 7 ==
if{
6 (>K:FUEL_SELECTOR_SET)
}
<!-- Center1 to All External -->
els{
(A:Fuel tank selector 1,enum) 6 ==
if{
17 (>K:FUEL_SELECTOR_SET)
}
<!-- center to off -->
els{
(A:Fuel tank selector 1,enum) 17 ==
0 (>K:FUEL_SELECTOR_SET)
}
}
}
</callback_code>
</mouserect>
</part>
<part>
<!-- P-47D-28 drop tank fuel selector. Keys: KF0=other (id 0), KF25=Center3 (id 8), KF50=External1 - left wing drop (id 9), KF75=External2 - right wing drop (id 10) -->
<name>switch_fuel_selector_P47_drop</name>
<animation>
<parameter>
<!-- <code>0 0 0 0 0 0 0 3 2 1 0 0 0 0 0 0 0 0 18 (A:FUEL TANK SELECTOR:1, enum) case 25 *</code> -->
<code>0 0 0 0 0 0 0 75 50 25 0 0 0 0 0 0 0 0 18 (A:FUEL TANK SELECTOR 1,enum) case</code>
<lag>100</lag>
</parameter>
</animation>
<mouserect>
<cursor>Hand</cursor>
<help_id>HELPID_GAUGE_FUEL_SELECTOR</help_id>
<tooltip_id>TOOLTIPTEXT_FUEL_SELECTOR</tooltip_id>
<mouse_flags>LeftSingle+Wheel</mouse_flags>
<callback_code>
(A:Fuel tank selector 1,enum) 0 ==
<!-- off to Center3 -->
if{
8 (>K:FUEL_SELECTOR_SET)
}
<!-- Center3 to External1 -->
els{
(A:Fuel tank selector 1,enum) 8 ==
if{
9 (>K:FUEL_SELECTOR_SET)
}
<!-- External1 to External2 -->
els{
(A:Fuel tank selector 1,enum) 9 ==
if{
10 (>K:FUEL_SELECTOR_SET)
}
<!-- External2 to Center3 -->
els{
(A:Fuel tank selector 1,enum) 10 ==
8 (>K:FUEL_SELECTOR_SET)
}
}
}
</callback_code>
</mouserect>
</part>
<!-- end of P-47 Thunderbolt mania enhancements - experimental - (C)opyright by Tom Kohler - 2004 - 2006 -->
<!-- -->
dcc
March 26th, 2006, 00:21
wow, some interesting stuff in there Gnoopey. I thinkg I see code that may release drop tanks? If so, does it release when the user issues the drop tank command, or when the tank is empty?
- dcc
Gnoopey
March 27th, 2006, 00:51
wow, some interesting stuff in there Gnoopey. I think I see code that may release drop tanks? If so, does it release when the user issues the drop tank command, or when the tank is empty?
- dcc
Dave, I'd posted similar answers at freeflightdesign.com - here ==> http://www.aerodynamika.com/cgi-bin/yabb/YaBB.cgi?board=General;action=display;num=11427957 31
But for you, I'll put it in here, too :)
I couldn't get the animation stuff 'in sync' - read, I couldn't make it work (at least not yet) - I also took parts of XML snippets from LilSki (Kevin) for this. Then I was contacted by Doug Dawson; he'd made some C gauges that one 'rookie XML programmer' could interface with and I tried that as well but failed in first and second attempt. Was then pushed by time limits for the beginning RTW in february and concentrated on the proper fuel selector stuff setup. That I could solve and then I'd used some 'tricks' with weight (fuel load) and visibility conditions to cobble the P-47M together in time for the RTW.
It also depends on the setup of tanks you'd like to make work. As usual, I tried to do the nearly impossible with three drop tanks. We know that FS9 is only supporting two external tanks and if I still want to make this possible, Doug Dawsons gauges are (very likely) the way to go. So, the currently released P-47M works like this:
two wing drop tanks as External1 and External2
are made visible with proper weight conditions via the FS9 load manager - you'll have to mount the pylons first
can be 'dropped' with a lever in the 3D cockpit - 3D parts just disappear when that is done - the remaining fuel (with the corresponding weight) is dropped / flushed with default FS logic. Read once more - the animation sequence is not working at the moment when the tanks are released but that's just because I was yet too stupid to 'cobble' everything together as it should be. I'm pretty sure I've got some minor syntax issues somewhere - perhaps even a major logic understandig issue.
center belly drop tank as Center3
3D part will just disappear if empty (weight of mounted tank - 10 lbs. - will 'stay')
3D part is only visible if proper weight is added to the proper 'station_load.x' - see also my comments in the aircraft.cfg
cannot be dropped / flushed as of now
parts are linked like that:
l_pylon
- l_underwing_pylon
-- l_tank_mount
--- visible_wing_tank_01 // dummy part - minimum geometry
---- lever_drop_wing_tank_01 // dummy part - minimum geometry
----- dt_150-US-gallons-wing-tank // mesh
rest of parts - forgotten in 1st post - but BEWARE - there's somewhere an error still! Part 'lever_drop_wing_tank' is working!
<part>
<name>lever_drop_wing_tank</name>
<animation>
<parameter>
<code>
(L:dropwingtanks, bool) 100 *
</code>
<lag>200</lag>
</parameter>
</animation>
<mouserect>
<cursor>Hand</cursor>
<tooltip_text>Drop wing tanks</tooltip_text>
<callback_code>(L:dropwingtanks,bool) ! (>L:dropwingtanks,bool) (>K:RELEASE_DROP_TANK_ALL,bool) (>K:RELEASE_DROP_TANK_ALL,bool)</callback_code>
</mouserect>
</part>
<part>
<name>drop_wing_tank</name>
<animation>
<parameter>
<code>
(L:dropwingtanks, bool) 100 *
</code>
<lag>200</lag>
</parameter>
</animation>
<callback_code>(L:dropwingtanks,bool) ! (>L:dropwingtanks,bool)</callback_code>
</part>
<part>
<name>visible_wing_tank</name>
<visible_in_range>
<parameter>
<code>
(L:dropwingtanks, number) 100 *
</code>
<lag>200</lag>
</parameter>
<minvalue>0</minvalue>
<maxvalue>95</maxvalue>
</visible_in_range>
</part>
vBulletin® v3.7.2, Copyright ©2000-2008, Jelsoft Enterprises Ltd.