Jump to content
The simFlight Network Forums

INI file comments not persistent


Recommended Posts

I have recently begun setting up aircraft-specific sections in my FSUIPC4.INI file for eventual transfer to a new

gaming laptop that will use a Logitech G13 'gamepad'. Essentially a programmable keyboard with a mini-joystick.

I will be obtaining a new registered copy of FSUIPC4 for this system but am currently tesing my approach on

my home desktop system.

 

In the process of creating the new "Keys" section I discovered that, unlike the "Buttons" section, comments

appended to the entries are being removed whenever I reload that section. The same is true of the "Axis"

and "Joystick Calibration" sections also.

 

In the past I have not had any reason to add comments in the "Keys" sections as all my customization has

been done via the "Buttons" entries, but with the G13 being seen as a keyboard I needed to create a rather

lengthy and complex "Keys": section for the aircraft I will primarily be flying on the new laptop while

away on my many travels.

 

Currently I have to save a copy of my INI file with the added comments and use that copy to make any

changes. I then have to replace the actual INI file with a copy of this saved copy. It would be nice if the

comments were retained in the "Keys" section. Actually retention in all sections would be ideal.

 

This statement from the Advanced Users Guide in the section discussing Button programming is what

I would like to see for the Keys section as well:

 

"You can add comments following a semicolon (  ;  ) at the end of  the  line, and these will be retained."

 

Just to demonstrate my use of the Keys section in which I emulate the 'multiple mode' technique of my current

"Buttons" sections, below is a listing of 3 of the 13 unique groups of key assignments that I have defined so far.

This should serve to demonstrate my 'need' for comments as well as demonstrate to others what can be accomplished

through the use of the Logitech G13 and other programmable keyboard devices.

(There is virtually no practical information available for using the G13 in FSX)

!0=//----------- C=Control S=Shift Nx=NUMx -------------
!0=//--- KEY ASSIGNMENTS FOR THE G13 MODE 1 G-KEYS -----
!0=//--   G1     G2     G3     G4     G5     G6     G7
!0=//-- C+S+1  C+S+2  C+S+3  C+S+4  C+S+5  C+S+6  C+S+7
!0=//---------------------------------------------------
!0=//--   G8     G9     G10    G11    G12    G13    G14
!0=//-- C+S+F5 C+S+F6 C+S+F7 C+S+F8 C+S+F9 C+S+F10 C+S+F11
!0=//---------------------------------------------------
!0=//--       G15    G16    G17    G18    G19
!0=//--      S+F5   S+F6   S+F7   S+F8   S+F9
!0=//---------------------------------------------------
!0=//--             G20    G21    G22   
!0=//--             C+6    C+7    C+8
!0=//---------------------------------------------------
!0=//--             Joy Left  Joy Bottom
!0=//--               C+F5      C+F7
!0=//---------------------------------------------------
!0=//---------------------------------------------------
!0=//--- KEY ASSIGNMENTS FOR THE G13 MODE 2 G-KEYS -----
!0=//--   G1     G2     G3     G4     G5     G6     G7
!0=//--    5      6      7      8      9    S+F2  C+S+8
!0=//---------------------------------------------------
!0=//--   G8     G9     G10    G11    G12    G13    G14
!0=//--  C+F6   S+F1   C+F11  C+F12  C+S+B  C+S+E  C+S+J
!0=//---------------------------------------------------
!0=//--       G15    G16    G17    G18    G19
!0=//--       C+I   C+S+M   S+J    S+N   S+F3
!0=//---------------------------------------------------
!0=//--             G20    G21    G22   
!0=//--             S+J    S+N    C+S+W
!0=//---------------------------------------------------
!0=//--             Joy Left  Joy Bottom
!0=//--               C+F5      C+F7
!0=//---------------------------------------------------
!0=//----------------------------------------------------
!0=//--   KEY ASSIGNMENTS FOR THE G13 MODE  3 G-KEYS
!0=//--     DEFAULT FSK KEY ASSIGNMENTS USED HERE
!0=//----------------------------------------------------
!0=//-- G1     G2    G3      G4      G5     G6     G7
!0=//-- F3     F6  S+NUM 4 S+NUM 6  NUM 4  NUM 8  NUM 6
!0=//----------------------------------------------------
!0=//-- G8     G9   G10     G11     G12     G13    G14
!0=//-- F2     F7 S+NUM 8 S+NUM 2  NUM 0   NUM 2 NUM ENT
!0=//----------------------------------------------------
!0=//--         G15    G16    G17    G18    G19
!0=//--          G     F9     F12   S+F9   NUM 5
!0=//----------------------------------------------------
!0=//--                G20    G21    G22   
!0=//--               NUM *  NUM -   S+F8
!0=//----------------------------------------------------
!0=//--              Joy Left       Joy Bottom
!0=//--               CTL+F5        CTL+F7
!0=//----------------------------------------------------

[Keys.Boeing B-17G "Fearless Fosdick" Test]
!0=//----------- MODE 0 -----------------
!0=//---- Generators, Batteries, Hydraulic Mode
!0=//---- Ignition, Inverter
!0=//----------- MODE 0 -----------------
0=B66C0=0 49,11,M6:13,0 ;//TOGGLE GENERATOR 1
1=B66C0=0 116,11,M6:32,0 ;//APU MACRO 
2=B66C0=0 50,11,M6:14,0 ;//TOGGLE GENERATOR 2
3=B66C0=0 117,11,M6:64,1 ;//RADIO POWER           
4=B66C0=0 51,11,M6:15,0 ;//TOGGLE GENERATOR 3
5=B66C0=0 118,11,65858,0 ;//PITOT HEAT
6=B66C0=0 52,11,M6:16,0 ;//TOGGLE GENERATOR 4
7=B66C0=0 119,11,66535,0 ;//MASTER IGNITION TOGGLE
8=B66C0=0 53,11,M6:43,1 ;//HYDRAULIC MODE MANUAL 
9=B66C0=0 120,11,M6:43,0 ;//HYDRAULIC MODE AUTO
10=B66C0=0 54,11,M6:38,0 ;//INVERTER SWITCH ON
11=B66C0=0 121,11,M6:38,2,M6:38,1 ;//INVERTER OFF / NEUTRAL
12=B66C0=0 55,11,M6:18,1 ;//BATTERY 1 ON  MACRO
13=B66C0=0 55,11,M6:19,1 ;//BATTERY 2 ON  MACRO
14=B66C0=0 55,11,M6:20,1 ;//BATTERY 3 ON  MACRO
15=B66C0=0 122,11,M6:18,0 ;//BATTERY 1 OFF  MACRO
16=B66C0=0 122,11,M6:19,0 ;//BATTERY 2 OFF  MACRO
17=B66C0=0 122,11,M6:20,0 ;//BATTERY 3 OFF  MACRO
18=B66C0=0 55,11,65908,0 ;//PANEL 4 OPEN - CONTROLS
19=B66C0=0 55,11,L17:R,0  ;//START DISP B17G
20=B66C0=0 55,11,L32:R,0  ;//START CALC TRACK

!1=//----------- MODE 1 -----------------
!1=//---- Fuel Valves and Pumps, Tail Wheel Lock, Carb Filters
!1=//---- Controls Lock, Windows, Parking Brake
!1=//----------- MODE 1 -----------------
30=B66C0=1 49,11,M6:39,0 ;//TOGGLE ENG1 FUEL VALVE
31=B66C0=1 116,11,66340,0 ;//TOGGLE FUEL PUMP 1
32=B66C0=1 50,11,M6:40,0 ;//TOGGLE ENG2 FUEL VALVE
33=B66C0=1 117,11,66341,0 ;//TOGGLE FUEL PUMP 2
34=B66C0=1 51,11,M6:41,0 ;//TOGGLE ENG3 FUEL VALVE
35=B66C0=1 118,11,66342,0 ;//TOGGLE FUEL PUMP 3
36=B66C0=1 52,11,M6:42,0 ;//TOGGLE ENG4 FUEL VALVE
37=B66C0=1 119,11,66343,0 ;//TOGGLE FUEL PUMP 4
38=B66C0=1 53,11,M6:45,1 ;//CONTROLS LOCK ON
39=B66C0=1 53,11,M6:46,1 ;//CONTROLS LOCK ON
40=B66C0=1 54,11,66541,0 ;//TAIL WHEEL LOCK
41=B66C0=1 55,11,M6:44,0 ;//CARB FILTER TOGGLE
42=B66C0=1 120,11,M6:45,0 ;//CONTROLS LOCK OFF
43=B66C0=1 120,11,M6:46,0 ;//CONTROLS LOCK OFF
44=B66C0=1 121,11,M6:81,99 ;//OPEN PILOTS COCKPIT WINDOW
45=B66C0=1 121,11,M6:82,99 ;//OPEN COPILOTS COCKPIT WINDOW
46=B66C0=1 122,11,65752,0  ;//PARKING BRAKES
!2=//------ MODE 2 -------------------
!2=//------ Mags, Suit Heaters, Vent
!2=//------ MODE 2 -------------------
50=B66C0=2 49,11,x11000892,x00030001  ;//MAG1 INC
51=B66C0=2 116,11,x21000892,x00000001  ;//MAG1 DEC
52=B66C0=2 50,11,x1100092A,x00030001  ;//MAG2 INC
53=B66C0=2 117,11,x2100092A,x00000001  ;//MAG2 DEC
54=B66C0=2 51,11,x110009C2,x00030001  ;//MAG2 INC
55=B66C0=2 118,11,x210009C2,x00000001  ;//MAG2 DEC
56=B66C0=2 52,11,x11000A5A,x00030001  ;//MAG2 INC
57=B66C0=2 119,11,x21000A5A,x00000001  ;//MAG2 DEC
58=B66C0=2 53,11,M6:83,50 ;//SUIT HEATER 1 50%
59=B66C0=2 54,11,M6:84,50 ;//SUIT HEATER 2 50%
60=B66C0=2 120,11,M6:83,0 ;//SUIT HEATER 1 0%
61=B66C0=2 121,11,M6:84,0 ;//SUIT HEATER 2 0%
62=B66C0=2 55,11,M6:85,100  ;//CABIN VENT OPEN
63=B66C0=2 122,11,M6:86,0  ;//CABIN VENT CLOSE

For this aircraft I have 9 "modes" defined by the 0x66C0 offset. Also, the G13 allow me to program

three unique sets of keys for the 22 primary keys. For one of those sets I have programmed the default FSX keys for

a number of functions. That is my "G13 Mode 3". My G13 Mode 1 and 2 make use of 44 of the unassigned keys in FSX.

These then are used to create the 'multiple FSX modes' as shown above. In theory I could wind up with 9 'modes' in each

of the first two G13 modes and a single addition mode in the G13 Mode 3 for a total of 19 groups of 22 unique assignments.

 

So you see this can, ney will, become quite complicated and thus my desire for persistent comments.

 

I fly the A2A Simulations "Accu-Sim" warbirds almost exclusively and a great deal of the functionality of those aircraft is

down by coding 'outside' of FSX. I use L:Variables extensively to enable a 'push button' environment with my dual Saitek

quadrants and most of those sircraft require from 4 to 9 'modes'....hundreds of lines of hand-edited INI entries.

 

Now, creating a 'button-free' setup, I need to se my "Buttons" sections as a guide to creating the new "Keys" sections.

Without the existing comments in my "Buttons" section, that task would take a good many hours more than the 16 or 20 hours

that I have spent so far.

 

   Paul

Link to comment
Share on other sites

I will be obtaining a new registered copy of FSUIPC4 for this system but am currently tesing my approach on

my home desktop system.

I'm sure Pete would appreciate the extra purchase for another PC but that isn't needed, you are allowed to install FSUIPC on as many PC's as you want as long as they belong to you. The FSUIPC licence is person specific not PC specific, which makes a refreshing change in this day and age of FS developers trying to wring every cent out of its customers.

I also remember reading about ini comments being removed before, it may be worth searching for an answer while Pete is still away.

Link to comment
Share on other sites

So you see this can, ney will, become quite complicated and thus my desire for persistent comments.

 

Hi Paul,

 

It's not been requested before, unlike Buttons, so it was never implemented. I also never suspected key presses would ever be so widely used, as usually they merely translate into controls which could better be assigned directly.

 

I'll have a look to see how much work it might be. I'm loathe to disturb too much code -- that's how errors are introduced -- and the code in that area is almost as old as FSUIPC (i.e. 15 years), but if it looks easy and relatively isolated I'll add it -- FSUIPC4 only, though, not FSUIPC3.

 

Not sure when I'll get to it. Still catching up at the moment.

 

Pete

Link to comment
Share on other sites

FSUIPC version 4.936b, just uploaded to Download Links subforum, retains comments in Keys sections just as in Buttons.

 

Incidentally, you don't actually need ;// at the start, just the ; will do.

 

The same 64 character limit applies, including the ; and a zero terminator.

 

Pete

Link to comment
Share on other sites

FSUIPC version 4.936b, just uploaded to Download Links subforum, retains comments in Keys sections just as in Buttons.

 

Incidentally, you don't actually need ;// at the start, just the ; will do.

 

The same 64 character limit applies, including the ; and a zero terminator.

 

Pete

 

Thank you Pete! I add those 'extra' // marks out of habit, plus they let me see the added comment better. The simi-colons can

seem to get lost on my high res monitor :)

 

   Paul

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.