General Category > Unofficial F/A-18 Acceleration Pack board

FSXBA F/A-18C HORNET

<< < (14/96) > >>

PhantomTweak:

--- Quote ---Is there a safe way to success? What F-18 version goes with what Prepar3Dxx??
--- End quote ---
IMHO, for whatever that's worth, the v17.1.31 is the one you want. The link to download it is https://drive.google.com/file/d/0B3So3WwTLPRZcHVKUVczdm53Z1k/view .
It comes in an auto-installer, which does the work for you. Just tell it where your P3D root folder is, and let it go.
It will also install the required files the FCS needs to function. I'm not certain, but you may need to install the file Hornet_FCS.dll from FSX manually, but I think, think I say, that it installs the correct .dll for you. If not, the newer, correct, version is available here on this thread someplace. It's .zip file comes with complete instructions on how-to, where-to, etc etc. It's actually a very simple process. If you get an FCS FAILURE notification, a green bar across the top of the screen with red letters, when you go to try and fly it, and blank MFD displays, then you need it. If you do, I will dig up the link for you if you want.
It will install the necessary .NET Framework as well, but a note on that: It may appear, during that install, to be frozen, or locked up. It is not. Just let it run, and it will finish in it's own good time. I've seen it take up to 15-20 minutes to finish. Just go get some coffee, or take a walk or something.

Hope this helps out a little bit. It's really a great plane. Flies like a dream.

Now, on another note, Mr. Jimi, sir: I'm doing some work learning to code in XML. I'm trying to start simple. I want to see how the Anti-Skid switch coding looks, ie: How YOU all coded it, but I can't seem to find it. I have a bad feeling that it's in the .dll the plane uses. If it is, I will work on finding code like it someplace else. I just want to, not copy, but look and see, so I can learn to do the same sort of thing. Maybe with light switches, or other type circuits. I am just curious.
Like I say, if it's not available to look at, I'll find something else to work with.

Thanks in advance!
Good luck, and I'm glad the v18.something is progressing so  nicely :D
Pat☺

Amigo:
Pat;
Thanks a lot for your instant reply and your kind attempt to boost up my confidence in an installation process.
However, I did download version 17.1.31 already a year ago or so; but did not install it for the mentioned reasons.
Thank you for your confirmation that 17.1.31 is the correct version for an auto install on Prepar3Dv3.
I might go ahead and give it a shot while hoping Murphy stays out of reach.
Best regards, Amigo

PhantomTweak:
I forgot to mention: When you run the autoinstaller, make sure you select RUN AS ADMINISTRATOR.
Extract it from the zip file, right-click on it, and select the Run As Admin choice. About the 3rd or so choice down the menu that opens when you rclick the .exe file.

Good luck to you, and here's hoping Murphy stays far away from you :D
Pat☺

jimi08:

--- Quote from: PhantomTweak on April 02, 2018, 08:53:27 pm ---Now, on another note, Mr. Jimi, sir: I'm doing some work learning to code in XML. I'm trying to start simple. I want to see how the Anti-Skid switch coding looks, ie: How YOU all coded it, but I can't seem to find it. I have a bad feeling that it's in the .dll the plane uses. If it is, I will work on finding code like it someplace else. I just want to, not copy, but look and see, so I can learn to do the same sort of thing. Maybe with light switches, or other type circuits. I am just curious.
Like I say, if it's not available to look at, I'll find something else to work with.

--- End quote ---

Hey Pat,

First off, copy all you want.  This project has definitely taught me a lot and hopefully it will teach you and others as well.  Not all of it is my code so just make sure to give credit where it's due.

To monitor a gauge...

That being said, there are a few references/sources you will need to code in FSX.  The first is the list of Simulation Variables or SIMVARs for short.  You can find them in the SDK, or by simply doing a Google search for "FSX SIMVARs" or "P3D SIMVARs".  Here's the link: https://msdn.microsoft.com/en-us/library/cc526981.aspx . From there, a spreadsheet of the variables should show up.  These are all of the variables that are being actively monitored within the sim.

In the FSX XML, the standard format for writing a SIMVAR is as follows:
(VAR Type, Actual Variable being monitored, Unit of measurement)

Take the Simvar for Pressure Altitude for example, it would look like this:

--- Code: ---(A:PRESSURE ALTITUDE, feet)
--- End code ---
A = Indicates SIM Var from the AIRCRAFT.  E: is for ENVIRONMENTAL data such as computer, server or sim time etc.  P: is for PROGRAM data such as Sim Rate.  Most of the time, you will be dealing with "A" Variables.

PRESSURE ALTITUDE = The actual condition that you want to monitor.  This is listed in the "Simulation Variable" column of the SIMVAR chart as described above.

feet = The unit of measurement of the variable you are monitoring.  For the above, it will display numerical results in feet.  The standard unit used for each variable is usually listed next to the listed variable in the "Unit" column of the SIMVAR chart. If you wanted it in meters, simply replace "feet" with "meters".  If it's a digital function (on or off), "Bool" (short for Boolean) will work.  Your Anti-Skid switch would fall in this category.

So to wrap it all together to monitor your Anti-Skid switch, the code would look like this:

--- Code: ---(A:ANTISKID BRAKES ACTIVE, Bool)
--- End code ---
Since we're monitoring the variable from the Airplane, "A:" was used, ANTISKID BRAKES ACTIVE and Bool were pulled from the SIMVAR list.

I usually use my "DATA GAUGE" (Shift+8) to monitor the states of certain Simulation Variables while working on certain gauge/functions.  The DataGuage.xml can be found in the Panel.Fleet/Gauges folder.  There is a lot going on in there if you open it, but basically all of the entries in there are the display parameters for the info on the screen and are paired.  The first entry shows the info to display the title of the variable (i.e.
--- Code: ---<Gaugestring>Altitude</Gaugestring>
--- End code ---
) , and the second grouping shows, the display parameters for the actual data from the simulation variable
--- Code: ---<Gaugestring>%((i.e. (A:PRESSURE ALTITUDE, feet))3.1%</Gaugestring>
--- End code ---
).  To use the gauge, simply find a variable listed that you want to replace with yours, replace it with the variable you want to use, and also replace the title of that variable in the grouping above so you can easily find it.  Once you are done, save the file, reload the aircraft in the sim, press Shift+8 and look for your data.  For your Antiskid entry, and because it is a Boolean variable, it will return either a "1", indicating that the Antiskid brakes are active, or a "0" showing that they are inactive.

Now, that allows you to MONITOR something..... To get the sim to DO something is a little different....

Action items are known as "Key Events" in the sim, and there is a finite list of "doable" things in the sim.  That list is contained in another reference, and can be found through Google as well by searching "FSX Event IDs" or "P3D Event IDs". Linked at: https://msdn.microsoft.com/en-us/library/cc526980.aspx .

The standard for writing an Event ID is as follows:
(Trigger, Event Type, Event ID)

In practicality, it looks like this:

--- Code: ---(&gt;K:ANTISKID_BRAKES_TOGGLE)
--- End code ---
or

--- Code: ---(>K:ANTISKID_BRAKES_TOGGLE)
--- End code ---

"&gt;" and ">" are the triggers and mean the same thing.  They basically tell the gauge to execute/assign what comes after it.

For the sim, "K" will always be used to indicate a key event and you can find the list of Event IDs at the last link provided above.

Tying it all together......

Now that you know how to MONITOR something and also to DO something, you can now create basic "IF/THEN" statements in XML.  This basically states that "IF all of these things are true, THEN do this action".
Basic structure for an XML IF/THEN Statement is as follows:

(A:Variable 1, unit) parameter
(Variable 2, unit) parameter and
(Variable 3 & so on, unit) parameter and
if{ (>K:Event_ID) } els { (>K:Other Event_ID) }

Few things to note here....
-I put parameter in the example above.  This is to define the specifics of your statement.  In the case of the previously used Altitude Variable, I might use one of the following to better define parameters for the gauge:

--- Code: ---(A:PRESSURE ALTITUDE, feet) 10000 &lt;
--- End code ---
=> This means that this IF statement rings "true" if the aircraft's pressure altitude is at 10000 feet and below.  "&lt" translates to "and less than" so literally "10000 feet and less than"


--- Code: ---(A:PRESSURE ALTITUDE, feet) 10000 &gt;
--- End code ---
=> This means that this IF statement rings "true" if the aircraft's pressure altitude is at 10000 feet and above.  "&gt" translates to "and greater than" so literally "10000 feet and greater than"


--- Code: ---(A:PRESSURE ALTITUDE, feet) 10000 ==;
--- End code ---
=> This means that this IF statement rings "true" if the aircraft's pressure altitude is equal 10000 feet exactly.  "==" translates to "equal to" so literally "10000 feet exactly"

-For Boolean variables, no entry behind the variable indicates that the variable rings "true" if the variable is active, while an exclamation point "!" indicates that the Boolean rings true if the variable is not active.  For example, the variable (A:SIM ON GROUND, bool).  Simply stating (A:SIM ON GROUND, bool) indicates that this variable rings true if the aircraft is on the ground. (A:SIM ON GROUND, bool) ! indicates that this variable rings true if the aircraft is airborne.

-If you are using more than one variable together to define your if statement, the word "and" or "&amp;&amp;" needs to be included at the end of the second stated variable and every subsequent variable to be included.  If it's an "either/or", then the word "or" or "||" needs to be included.

-"Els" or Else statements, are used to indicate something to do be done until all of your "if statements" ring true.  An example might be that you want a certain switch to only be activated under certain circumstances, but off under all other circumstances.

So as a final example I will do a basic if/then statement that instructs the sim to TOGGLE THE ANTISKID BRAKES if the sim detects the aircraft to be ON THE GROUND, BELOW 50 KNOTS, and only to toggle the Antiskid Brakes if they aren't already activated.


--- Code: ---<Gauge:Example Antiskid Gauge>

<Element>
<Selection>
<Value>

(A:SIM ON GROUND, bool)                                    <!-- Monitors whether the aircraft is on the ground or in the air. Statement is true if the aircraft is on the ground. -->
(A:AIRSPEED INDICATED, knots) 50 &lt; and          <!-- Monitors the indicated airspeed of the aircraft.  Statement is true if the aircraft is below 50 KIAS. -->
(A:ANTISKID BRAKES ACTIVE, Bool) ! and              <!-- Monitors the status of the Antiskid Brakes.  Statement is true if Antiskid brakes are OFF/INACTIVE. -->
if{ (>K:ANTISKID_BRAKES_TOGGLE) }                  <!-- Tells the sim to toggle the antiskid brakes if all of the above statements are all true simultaneously. -->

</Value>
</Selection>
</Element>

</Gauge>

--- End code ---

The last reference worth mentioning is the aircraft's "Modeldef".  From my understanding, it basically displays all of the variables and event that are "baked" into the 3D model of the jet.  Changing them would mean decompiling and recompiling the jet.  None the less, very useful reference, especially when trying to tie certain buttons or switches within the cockpit to your gauges for functionality.  Here you can see all of the great work that FSDreamTeam put into modeling the F/A-18 Cockpit.
Kinda a lengthy explanation, but that's all I got for now (lunch break is over).  That's the basics.  Let me know if you have more questions (as I'm sure you do) and I'll try my best to answer them.  My best advice is to open an existing gauge, make small changes to them and reload the aircraft to see how things work/change.  Once you get used to that, move on to bigger/better things....

-Jimi


Amigo:
Pat;
I enjoyed Jimi's last, very interesting reply to you. I don't want to further clutter up his page with my stupid problems. Can I talk to you on a new page named; Murphy's Law?
Amigo

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version