Jump to content

Editing aircraft.cfg's with Notepad ++


dogdish

Recommended Posts

My god!

 

I just found the ultimate tool for those who like to modify the aircraft.cfg

 

(FREE DOWNLOAD https://notepad-plus-plus.org/)

 

The macro function is VERY POWERFUL for...

 

 

1. Trim trailing space and save (invisible spaces).

 

2. Quickly add Shockwave lights to a folder full of AI aircraft.

 

3. Sort the aircraft.cfg so they are all uniform.

 

4. MORE!!!

 

Surely somebody here uses it. Tedious, time consuming tasks that I did manually before now take seconds.

 

Why hasn't this been mentioned before?

Gigabyte GA-X99 Gaming G1, i7-5960X, Noctua NH-D14, Crucial Ballistix Elite 64Gb, Nvidia GTX Titan X, Creative ZxR, Ableconn PEXM2-130, WD Black SN750 250Gb & 2Tb NVMe/Gold 10Tb HDD, Sony BDU-X10S BD-ROM, PC Power & Cooling 1200w, Cosmos C700M, Noctua iPPC 140mm x6, Logitech M570/K800, WinX64 7 Ultimate/10 Pro
Link to comment
Share on other sites

Notepad++ has several editing settings. In some of those, invisible code gets added when saving. Hard returns and such.

When you do that, your aircraft.cfg file is corrupt after saving, and won't work any more.

 

Also, in notepad plus closing the program does not close the open files. You need to close their tabs and explicitely save. Easy to forget.

 

If you don't want errors with your .cfg files, do not use notepad++ on them.

 

Stick to Notepad. Works every time. And no errors.

[sIGPIC][/sIGPIC]
Link to comment
Share on other sites

If I was going to modify/edit/change my FSX cfg 7 times a day, EVERY day, I MIGHT get Notepad++. There IS hundreds of 'mentions' at all FS sites, plus their own. Including bug reports, contribute, etc. Notepad has never had to be 'updated' (monthly?) since I have been using it (15 years?). KISS.

Chuck B

Napamule

i7 2600K @ 3.4 Ghz (Turbo-Boost to 3.877 Ghz), Asus P8H67 Pro, Super Talent 8 Gb DDR3/1333 Dual Channel, XFX Radeon R7-360B 2Gb DDR5, Corsair 650 W PSU, Dell 23 in (2048x1152), Windows7 Pro 64 bit, MS Sidewinder Precision 2 Joy, Logitech K-360 wireless KB & Mouse, Targus PAUK10U USB Keypad for Throttle (F1 to F4)/Spoiler/Tailhook/Wing Fold/Pitch Trim/Parking Brake/Snap to 2D Panel/View Change. Installed on 250 Gb (D:). FS9 and FSX Acceleration (locked at 30 FPS).
Link to comment
Share on other sites

Your warnings are noted!

 

Definitely will make a BACKUP of anything I intend on editing.

 

Found this because I want to add A2A 3d Shockwave Lights Redux to Traffic 2004, Traffic 360 and Ultimate Traffic Live!

 

Considering all the manual typing I would have to do, this will save HOURS of EDITING.

Gigabyte GA-X99 Gaming G1, i7-5960X, Noctua NH-D14, Crucial Ballistix Elite 64Gb, Nvidia GTX Titan X, Creative ZxR, Ableconn PEXM2-130, WD Black SN750 250Gb & 2Tb NVMe/Gold 10Tb HDD, Sony BDU-X10S BD-ROM, PC Power & Cooling 1200w, Cosmos C700M, Noctua iPPC 140mm x6, Logitech M570/K800, WinX64 7 Ultimate/10 Pro
Link to comment
Share on other sites

Notepad++ has several editing settings. In some of those, invisible code gets added when saving. Hard returns and such.

When you do that, your aircraft.cfg file is corrupt after saving, and won't work any more.

 

Hmmm, been using Notepad ++ for years and never had that happen. Ever.

 

Do all of my XML coding (90% anyway) in Notepad++ and never had a problem.

 

Curious if you have personally experienced this or are recycling something you read somewhere?

 

BTW, Notepad uses hard returns too. If it did not, everything would be on one line.

 

peace,

the Bean

WWOD---What Would Opa Do? Farewell, my freind (sp)

 

Never argue with idiots.

They drag you down to their level and beat you with experience

Link to comment
Share on other sites

Hmmm, been using Notepad ++ for years...

 

peace,

the Bean

 

I wish you would have mentioned this in one of your posts :)

 

Since I'm a novice with Notepad++, I practiced on a copy of the aircraft.cfg of the first AI aircraft.

 

Recorded a macro to find and replace each light, not sure if you need to go back up to the top between steps, so hit Ctrl+Home after each replace.

 

This..

 

[LIGHTS]

//Types: 1=beacon, 2=strobe, 3=navigation, 4=cockpit, 5=landing

light.0=3, -12.63, -73.43, 5.545, fx_navredm ,

light.1=3, -12.63, 73.43, 5.545, fx_navgrem ,

light.2=3, -87.38, 0.00, 8.610, fx_navwhih ,

light.3=2, -12.63, -73.43, 5.545, fx_strobeh ,

light.4=2, -12.63, 73.43, 5.545, fx_strobeh ,

light.5=1, 15.264, 0.00, 11.435, fx_beaconh ,

light.6=1, 15.264, 0.00, -7.309, fx_beaconh ,

light.7 = 1, 0, 0, 0, fx_TS_LJet ,

 

Became this...

 

[Lights]

//Types: 1=beacon, 2=strobe, 3=navigation, 4=cockpit, 5=landing, 6=taxi, 7=recognition, 8=wing, 9=logo, 10=cabin

light.0=3, -12.63, -73.43, 5.545, fx_shockwave_navred ,

light.1=3, -12.63, 73.43, 5.545, fx_shockwave_navgre ,

light.2=3, -87.38, 0.00, 8.610, fx_shockwave_navwhi ,

light.3=2, -12.63, -73.43, 5.545, fx_shockwave_strobe_L ,

light.4=2, -12.63, 73.43, 5.545, fx_shockwave_strobe_L ,

light.5=1, 15.264, 0.00, 11.435, fx_shockwave_beaconH ,

light.6=1, 15.264, 0.00, -7.309, fx_shockwave_beaconH ,

light.7 = 1, 0, 0, 0, fx_TS_LJet ,

 

Then saved the macro and did all the B737's and Airbus 2 engine aircrafts all ready. Started FSX and all the Shockwave lights are functioning on the edited AI models. :D

Gigabyte GA-X99 Gaming G1, i7-5960X, Noctua NH-D14, Crucial Ballistix Elite 64Gb, Nvidia GTX Titan X, Creative ZxR, Ableconn PEXM2-130, WD Black SN750 250Gb & 2Tb NVMe/Gold 10Tb HDD, Sony BDU-X10S BD-ROM, PC Power & Cooling 1200w, Cosmos C700M, Noctua iPPC 140mm x6, Logitech M570/K800, WinX64 7 Ultimate/10 Pro
Link to comment
Share on other sites

Been using Notepad++ for over three years since I installed my website. I use it all the time to edit code and for FS. I have NEVER had an issue with it. It's easy to right click a file and open with Notepad++.

 

I even use macros to edit very, VERY large IP address files for the program Peerblock. Peerblock blocks connections to IPv4 address you install. I have over 600 million IPs being blocked by Peerblock on my netbook that serves as a TeamSpeak and FTP server. Most of the IPs are cloud providers like Azure, Amazon AWS, Digital Ocean, Google Cloud, you name it. Others are countries like China, Russia, Iran and all the communist countries of the world and most of that sandbox they call the middle east. HAHAHA

 

Anyway, Notepad++ is used by scores of program developers and website owners with zero issues.

 

Couple other programs you might be interested in are File Seek and Everything.exe. File seek will search for text in damn near any file. So say you need to find all files that mention "KLAS" in it, just search for "KLAS" in your FS directory. It will search the entire directory and list all files that mention "KLAS." Then, you can setup Fileseek to open those files with Notepad++. It will even search withen dlls.

 

Everything.exe is a waaaaay faster search program to find files. I in fact I turn of the indexing service in my computers and just use Everything.exe. I found it great at narrowing down files in my browser that I'm trying to edit, etc. Yes, I have customize3d my core browser components.

 

 

You may find it interesting to know, that about a year or two ago the NSA had used a flaw in Notepad++ to gain access to computers or what ever the hell it was. The author of Notepad++ patched that crap right away. So it goes without saying that any and all patches for software should be used. In Windows I'd just use the criticals. Everything else is is mostly bloat crap and away your disk space goes.

 

 

Links:

 

https://www.voidtools.com/downloads/

 

https://www.fileseek.ca/Download/

 

https://alternativeto.net/software/notepad-plus-plus/

OOM errors? Read this.

"The great thing about flight simulation is that in real life there are no do-overs." - Abraham Lincoln c. 1865

An awesome weather website with oodles of Info. and options.

Wile E. Coyote would be impressed.

Link to comment
Share on other sites

Glad to see some of the senior members endorsing Notepad++ use!

 

I was hoping to sort ALL my aircraft.cfg's by each section (example [Weight_and_Balance]) to make them all in the original order. Some of them are a mess!

 

Not sure how to go about this but want to make a macro to do them all.

 

Would need to find/cut each section and all of text to the next section, then somehow paste them in the predetermined order.

 

Can any body suggest what functions to use to do this?

Gigabyte GA-X99 Gaming G1, i7-5960X, Noctua NH-D14, Crucial Ballistix Elite 64Gb, Nvidia GTX Titan X, Creative ZxR, Ableconn PEXM2-130, WD Black SN750 250Gb & 2Tb NVMe/Gold 10Tb HDD, Sony BDU-X10S BD-ROM, PC Power & Cooling 1200w, Cosmos C700M, Noctua iPPC 140mm x6, Logitech M570/K800, WinX64 7 Ultimate/10 Pro
Link to comment
Share on other sites

Well, I guess I'm not the only freaky geeky out there... I rearrange aircraft.cfg files (notepad) on almost every downloaded I get - particularly the camera sections. There are numerous parameters that matter quite a bit to me that are almost always missing. And making videos usually means I add 4 to 5 custom scenery cameras to the featured aircraft. Ya find duplicate sections not infrequently too.

 

I think I'd use the feature if it turns out to be practical. My script writing skills are not too current but I've used VBA to manipulate data in Word and Excel. I just never thought about using it to edit the cfg files.

 

I use Notepad++ for xml or html file editing but never thought of the exta features...

Seems like I did some text find-and-replace type stuff with XXCOPY a decade or more ago.

 

I bet it's doable, and a few of us would certainly take advantage of the 'improvements' but it'll be for us geeky ones. Still, it's a part of the hobby.

 

Loyd

Hooked since FS4... now flying:

self-built i7-4790 at 4 GHz; GA-Z97X mobo; GTX 970; 16GB gskill;

quiet, fast and cool running.

Win 7/64: 840 EVO OS; 840 EVO (500G) game drive;

Win10/64: 850 EVO (500G) for OS and games

A few Flightsim videos on YouTube at CanyonCorners

Link to comment
Share on other sites

Well, I guess I'm not the only freaky geeky out there... I rearrange aircraft.cfg files (notepad) on almost every download I get - Ya find duplicate sections not infrequently too.

 

Loyd

 

Yes, it makes it a lot easier to find duplicate (sometimes conflicting) sections.

 

I was thinking you could use the 'Find' feature to locate the section header, then if it's possible to cut a paragraph to the end by the empty line between the sections. Then paste in order some how. Want to make a macro to do this so I could hit them all!

 

I also seen there is a plugin manager however the Notepad++ author removed it because of advertising, but can still be added in. Wondering if I need a plugin to do a sort?

Gigabyte GA-X99 Gaming G1, i7-5960X, Noctua NH-D14, Crucial Ballistix Elite 64Gb, Nvidia GTX Titan X, Creative ZxR, Ableconn PEXM2-130, WD Black SN750 250Gb & 2Tb NVMe/Gold 10Tb HDD, Sony BDU-X10S BD-ROM, PC Power & Cooling 1200w, Cosmos C700M, Noctua iPPC 140mm x6, Logitech M570/K800, WinX64 7 Ultimate/10 Pro
Link to comment
Share on other sites

Probably can't use blank lines; I think you'd have to search from one '[' to the next '[' - some people leave blank lines IN the sections; then evaluate the text within the initial bracket set to see which section it is. Then what: collect the sections as strings, build a table of pointers/offsets to the beginning of each section etc, etc.

 

Admittedly, it doesn't have to be very 'efficient' or fast because it's gonna be a lot faster than a human no matter how clumsy the code is. A 'bubble sort' is slow but it's a lot faster than me...

 

L

Hooked since FS4... now flying:

self-built i7-4790 at 4 GHz; GA-Z97X mobo; GTX 970; 16GB gskill;

quiet, fast and cool running.

Win 7/64: 840 EVO OS; 840 EVO (500G) game drive;

Win10/64: 850 EVO (500G) for OS and games

A few Flightsim videos on YouTube at CanyonCorners

Link to comment
Share on other sites

I delete duplicate empty lines between and within the sections, leaving only the one blank line. However finding by section header then cutting to the next "[" might be better, as long as there are none within a section. Don't remember ever seeing any.

 

Also was thinking if it's not possible to sort a aircraft.cfg, maybe you could find and copy each section and paste to a new aircraft.cfg with a macro?

 

I'll figure it out eventually :)

Gigabyte GA-X99 Gaming G1, i7-5960X, Noctua NH-D14, Crucial Ballistix Elite 64Gb, Nvidia GTX Titan X, Creative ZxR, Ableconn PEXM2-130, WD Black SN750 250Gb & 2Tb NVMe/Gold 10Tb HDD, Sony BDU-X10S BD-ROM, PC Power & Cooling 1200w, Cosmos C700M, Noctua iPPC 140mm x6, Logitech M570/K800, WinX64 7 Ultimate/10 Pro
Link to comment
Share on other sites

Well, I guess I'm not the only freaky geeky out there... I rearrange aircraft.cfg files (notepad) on almost every downloaded I get - particularly the camera sections. There are numerous parameters that matter quite a bit to me that are almost always missing. And making videos usually means I add 4 to 5 custom scenery cameras to the featured aircraft. Ya find duplicate sections not infrequently too. Loyd

 

Loyd - Add me to the freaky geeky list! I too, like to organize my aircraft.cfg files after downloading them. Most sections of the cfg are separated by 3 blank lines. I like to condense the cfg by deleting any extra lines. However, it did get me in trouble with HJG (Historic Jetliner Group) awhile back. In the process of deleting blank lines, I inadvertently deleted part of a required entry, then couldn't figure out why the aircraft wouldn't work properly, I discovered the missing piece, corrected it, and then posted a thread as a "heads up" on HJG's forum. I thought the download was missing this info on their download, but they checked their files and it was there all along, at least until I touched my cfg. They couldn't understand why I would want to do that, only leaves a chance of damaging a perfectly good download. They are right, but I still do it, makes me feel better, I just have to move a little slower and pay closer attention to the "task at hand!"

 

It sounds like Dog Dish is on a mission with this! Help him all you can! He tends to get in trouble with some of these threads and the way they are interpreted! When he gets his mind made up, don't get in his way!

 

Later guys! - Rick :cool:

Link to comment
Share on other sites

Rick

I'm not always successful but I try to stay safe by always making the first step: "save as" orig_aircraft.cfg

or (if I'm feeling lazy) "copy of aircraft.cfg". Only a couple of times have I immediately started editing the supposed 'backup' copy then fussed for some indeterminate time wondering why the changes don't take effect. But I do keep the .zip files almost forever, also, just in case.

 

dd

on 'extra' bracket characters:

I'd expect that the '[' character is probably a 'reserved' char and if found anywhere other than at the beginning of a section title might wreck the rest of the cfg. A quick test indicates that an extra '[' affects at least the section that it's in ... it disabled wing_area and I couldn't get the 172 into the air. A mis-spelled parameter name would probably do the same thing.

 

Loyd

Hooked since FS4... now flying:

self-built i7-4790 at 4 GHz; GA-Z97X mobo; GTX 970; 16GB gskill;

quiet, fast and cool running.

Win 7/64: 840 EVO OS; 840 EVO (500G) game drive;

Win10/64: 850 EVO (500G) for OS and games

A few Flightsim videos on YouTube at CanyonCorners

Link to comment
Share on other sites

Just one thing to iron out to do a sort with a macro

 

1> Find by section header, first would be [General]

 

2> Select header and section text to end HOW ???????????

 

3> CUT

 

4> CTRL+END

 

5> PASTE

 

6> CTRL+HOME

 

7> Repeat for next section header

Gigabyte GA-X99 Gaming G1, i7-5960X, Noctua NH-D14, Crucial Ballistix Elite 64Gb, Nvidia GTX Titan X, Creative ZxR, Ableconn PEXM2-130, WD Black SN750 250Gb & 2Tb NVMe/Gold 10Tb HDD, Sony BDU-X10S BD-ROM, PC Power & Cooling 1200w, Cosmos C700M, Noctua iPPC 140mm x6, Logitech M570/K800, WinX64 7 Ultimate/10 Pro
Link to comment
Share on other sites

This is a macro I made for adding Shockwave 3D lights to AI traffic programs so it doesn't take 2 weeks to do!

 

BACKUP ENTIRE AI FOLDER SO YOU WILL HAVE ORIGINAL LIGHTS!

 

Macro - Start recording

 

FIND MATCH -------> REPLACE ALL ----------> THEN HIT

 

fx_navred -------- fx_shockwave_navred ------ CTRL+HOME

fx_navredm ------ fx_shockwave_navred ------- CTRL+HOME

fx_navegre ------ fx_shockwave_navgre ------- CTRL+HOME

fx_navegrem ----- fx_shockwave_navgre ------ CTRL+HOME

fx_navwhi ------- fx_shockwave_navwhi ------- CTRL+HOME

fx_navwhih -------fx_shockwave_navwhi ------ CTRL+HOME

fx_strobe -------- fx_shockwave_strobe ------- CTRL+HOME

fx_strobeh ------- fx_shockwave_strobe_L ----- CTRL+HOME

fx_beacon ------- fx_shockwave_beaconH ----- CTRL+HOME

fx_beaconh ------ fx_shockwave_beaconH ----- CTRL+HOME

fx_vclight -------- fx_shockwave_vclight ------- CTRL+HOME

 

Then finally do a FIND [LIGHTS]

 

Macro - Stop recording

Macro - Save current recorded macro as "Shockwave 3D Install" or whatever you like.

 

Run macro on all your AI aircraft.cfg's will end up stopping at the [LIGHTS] section. Make any further manual edits if you want and save if OK. You will also be able to use this macro to add shockwave lights to ANY user aircraft as well.

 

P.S I did not include LANDING LIGHTS since that requires modifications to the PANEL.CFG also.

Gigabyte GA-X99 Gaming G1, i7-5960X, Noctua NH-D14, Crucial Ballistix Elite 64Gb, Nvidia GTX Titan X, Creative ZxR, Ableconn PEXM2-130, WD Black SN750 250Gb & 2Tb NVMe/Gold 10Tb HDD, Sony BDU-X10S BD-ROM, PC Power & Cooling 1200w, Cosmos C700M, Noctua iPPC 140mm x6, Logitech M570/K800, WinX64 7 Ultimate/10 Pro
Link to comment
Share on other sites

Probably can't use blank lines; I think you'd have to search from one '[' to the next '[' - some people leave blank lines IN the sections...

 

Using your suggestion of searching with the "[", I created a macro that sorts the Aircraft.cfg in Microsoft ESP SDK order. The first thing I did was a Line Operation> Remove Empty Lines (Containing Blank Characters) which removes the spacing in the entire Aircraft.cfg. Then when the macro sorts, it adds a single space between each [section] (All other spacing added by users is now gone).

 

Can be used on any Airplane or Helicopter.

 

Admittedly, it doesn't have to be very 'efficient' or fast because it's gonna be a lot faster than a human no matter how clumsy the code is. A 'bubble sort' is slow but it's a lot faster than me...

 

One click of the mouse and the macro sorting takes about one second to complete!

Gigabyte GA-X99 Gaming G1, i7-5960X, Noctua NH-D14, Crucial Ballistix Elite 64Gb, Nvidia GTX Titan X, Creative ZxR, Ableconn PEXM2-130, WD Black SN750 250Gb & 2Tb NVMe/Gold 10Tb HDD, Sony BDU-X10S BD-ROM, PC Power & Cooling 1200w, Cosmos C700M, Noctua iPPC 140mm x6, Logitech M570/K800, WinX64 7 Ultimate/10 Pro
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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