다음을 통해 공유


You learn something new every day

You'd think that after over 18 months of work on the panel system in FS, I'd know all there is to know... but you'd be wrong.  I just learned about the "Strings" section that can be used in the panel.cfg file from a tutorial made by "Greekydeke" I found on simviation.com:  https://www.simviation.com/fsdesign_panels1.htm  ("Simple Panel Design").  Since the tutorial is distributed as a .zip file I can't link to the section of interest, so I've pasted it here (thank you Greekydeke):

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

[Strings]

This is another one of the sections addd in Flight Simulator 2002. This section is used for defining short aliases for any long key value strings that are used a lot in the file. Defining a short alias here avoids having to type out a long key value string over and over again if, for example, you use the same gauge in several different [Window] and VCockpit sections. An alias will also help avoid making mistakes when you type out the entry over and over again.

So, how do you use this section?  Suppose you've made up a lot of subfolders in you GAUGES folder to keep your gauges better organized. Now suppose that you want to replace the existing Cessna altimeter in an aircraft with one of the metric altimeters you have in one of your GAUGES subfolders. And let's also suppose that the Cessna altimeter is used in several of the [Window] and [VCockpit] sections in your file. Here's how you could use the [Strings] section to mimimize the keystrokes you'd have to use to get your replacement gauge installed:

 [Strings]
"altimeter"=IMPORT/CFS1/Metric gauges/German/BF109E!altimeter

[Window00]
/gauge11=Cessna!Altimeter, 100,100,100,,,,
gauge11=%altimeter%,100,200,75

[Window03]
/gauge01=Cessna!altimeter,100,100,100
gauge01=%altimeter%, 100, 200, 75

[VCockpit01]
/gauge02=Cessna!altimeter, 100, 100, 100
gauge02=%altimeter%,10, 50,35

[VCockpit02]
/gauge21=Cessna!altimeter, 100, 100, 100
gauge21=%altimeter%,10,50,35

As you can see, the alias can simplify your gauge entries. You'd still have to type in your gauge's panel position and size parameters in the different windows, of course. But a lot of typing can be avoided by using an alias.

Using an alias for a string that's only repeated a couple of times in your file might not be worth the effort, since you have to type the complete alias string into the [Strings] section anyway.

You can't use an alias for keywords. This is because the percent symbol used to delimit the alias when you use it will turn the keyword into a comment. You can only use an alias as a substitute for a key value string.

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

In my defense, I think someone mentioned this to me once, but I had completely forgotten about it until now.  I don't personally have use for this on a regular basis, but I would think that it could be very useful for some other people out there.  Note that this can be used in any Flight Simulator .cfg file, such as the aircraft.cfg and is not limited to the panel.cfg.