vgbaron

A Word of Caution when updating add ons in V4

Recommended Posts

I've been using notepad as per previous to make any changes to the P3D & aircraft cfg files & can report that doing so doesn't seem to have caused any issues to date. So at least that still seems to work OK. Doing it with an external .exe could be another kettle of fish as reported I suppose.

  • Upvote 1

Share this post


Link to post
Help AVSIM continue to serve you!
Please donate today!

10 minutes ago, Rossco said:

I've been using notepad as per previous to make any changes to the P3D & aircraft cfg files & can report that doing so doesn't seem to have caused any issues to date. So at least that still seems to work OK. Doing it with an external .exe could be another kettle of fish as reported I suppose.

Is this on V4? I know Notepad++ works but regular notepad........ P3D V3 doesn't have a problem.

Vic

Share this post


Link to post

Yes Vic.

I have added the Affinity Mask lines in main cfg to test & also turned off optimized parts to test the XP Lear25 using regular notepad. Have also played around with the flight model settings for the F16 with no apparent issues.

Share this post


Link to post

Thanx Ross - good to know!

Vic

Share this post


Link to post

There will be no problems until somebody decides to use funny characters (like äöüß) in the scenery titles and paths.

So it easy to say "I never had problems".

If the file contains anything besides plain ASCII you better take care of the encoding.

People are creative and will add special characters. Think about paths containing Chinese characters. :smile:

A warning about Notepad++: White it is a great editor (I use it a lot when I have to dive the Windows swamp) it does not detect the encoding properly when loading files. You better set it manually after loading.

Alex

Share this post


Link to post

I never thought  that Notepad++ was supposed to detect the correct character  set. I learned something  new but then again, it doesn't really work properly.

Share this post


Link to post

Jay, you're right regarding Notepad++: It has no automatic detection. Just checked. I mixed that up with the Double Commander preview which *tries* to autodetect. :wacko: Meh.

Alex

Share this post


Link to post

With so many characters sets possible, if a text editor could guess the actual set of a file, it would be better than my phone's  spell checker. Oh wait...😉

Share this post


Link to post

Encoding is a problem already, even in the old incarnations of the ESP sims. I have a few testers in France and Germany, and they are using aircraft models that have "accents" and "Umlaut" in their config files and even in the models "title". And not only aircraft.cfg but in cameras.cfg as well. The simulator doesn't mind, but it is a lot of unnecessary effort to handle special characters in code when using .Net with a file that is supposed to be ASCII. I welcome the idea of UTF, although that probably means that I have to rewrite the respective addons and open a separate development stream only for V4 (which makes updating an app twice the effort than it should be). Would be even better if all config files would be changed to XML format to put an end to all these problems.

I only hope that all developers will keep the UTF encoding intact. It would be a disaster if everyone changed encoding of the config files to whatever they feel comfortable with. The simulator usually swallows everything without complaints - but another developer can end up having to check the encoding every time he reads a file, because he cannot be sure that it is per spec. But we will have to do that anyway I guess, as people will just drop their old content into the new sim too, so we end up with a veritable "zoo" of encodings.

IMHO, if there ever was a time to stick to those addons that have been updated for the new platform, then it is now.

Best regards

Share this post


Link to post
2 hours ago, Lorby_SI said:

separate development stream only for V4

Which I had to do. Pass the encoding down to the code reading the scenery.cfg for v4.:mellow:

2 hours ago, Lorby_SI said:

The simulator usually swallows everything without complaints

Yeah, exactly my experience with the scenery.cfg. Never ever read it with a strict validation especially since some add-ons place a mess in there. The sim is happy with this mess.

... and on the other hand some payware add-ons cannot even read PLN files with a valid XML comment while others need exactly Windows line breaks in the PLN (where is the banging head on keyboard emoticon?).

I'll stop whining now and "look forward" to the zoo.

Alex

 

Share this post


Link to post

There is a preferred method of adding and removing addons from the sim using command lines that avoids messing up the individual files.  Developers should be using the preferred method.

Share this post


Link to post
On ‎5‎/‎29‎/‎2017 at 7:28 AM, Lorby_SI said:

IMHO, if there ever was a time to stick to those addons that have been updated for the new platform, then it is now.

Best regards

If anyone remembers Michael Greenblatt from FSGS, you'll recall his mantra not to do anything with anything unless you're 100% sure it's OK.  It's worked well for me, not being a technical guy and all.  Although maybe appearing ultra cautious, I'm not even going to use any addons that say they're v4 compatible until they've been used for a week with no problems surfacing in the forums.

Share this post


Link to post

I'm glad there are pioneers willing to tease out these details for the less motivated like myself.  This discussion reinforces my plan to delay going down the V4 road until Majestic, Orbx, PMDG, HiFi, all have solid installers.   I've lost all desire to make something work that wasn't designed to work OOT box.

Share this post


Link to post

Ed, Alex, Oliver or anyone else that has posted in this thread so far. I've looked through the  V4 SDK Learning Center documentation and I can't find the references to cfg files being in any character set. The information must be there somewhere, but even Google couldn't find it. BTW, I've been experimenting with Notepad++ and saving cfg files as UTF-8 so far has not given P3d V4 anything to complain about.

Share this post


Link to post

A - I didn't state any given character set, rather I stated that one should take care not to mess things up by changing it.

B - As I stated above, there is a proper method to add things to many files (scenery.cfg, adons.cfg, etc) that does not include the use of Notepad++ or any other text editor.  It needs to be used.

A great deal of support time entails correcting messed up files.  There's nothing to prove here... just wanting people to have fewer problems.  No more, no less.  I hope that's okay with you...

Share this post


Link to post

I'm not disputing that. I'm just wondering  now what the actual character  set is. I understand  what you are saying, that the only supported method js to make changes to the cfg files is by command line options. 

Share this post


Link to post

I found no mention of encoding in the old documentation. Didn't check v4.

But it is easy to find out if you have v4 (I don't have it yet):

  • Backup you scenery.cfg (Ctrl+C and Ctrl+V in Explorer)
  • Load the scenery.cfg in an editor that allows to change the encoding (Notepad++, jEdit, ...).
  • Switch encoding to UTF-8
  • Add some special characters (ä, ö, ü, ß, 北京市 or whatever) to a scenery title and save
  • Start the simulator and check if it shows the correct title or just garbage.

You can try the same with the local path and with and without BOM

Alex

Edit: Just read that Jay already tried it.

But is important to add special characters, German, Russian, Chinese whatever. Problems will not show up otherwise.

Edited by albar965

Share this post


Link to post

The great little app called 'Scenery Config Editor' doesn't work in v4, and I'm guess due this very reason?

Share this post


Link to post
On 5/24/2017 at 11:22 PM, vgbaron said:

As I understand it, the problem could come if the cfg file format is not maintained by the program making the edits. This could make it unreadable by P3D which could then result in either a reinstall or deleting all created content and letting P3D rebuild them. This would initially result in addons being disabled.

Until there is clarification from LM I would still suggest being aware and making an informed decision.

I have used EditPad Pro for all text file editing for previous versions of P3D FSX .CFG DLL'S etc.

 

Am I still ok with EditPad Pro or is this Notepad++ a safer way to go?

How to tell when a file like the P3Dv4 cfg file is in Unicode format prior to editing it and messing it up with a standard Notepad editor?

Share this post


Link to post
2 hours ago, vonmar said:

How to tell when a file like the P3Dv4 cfg file is in Unicode format prior to editing it and messing it up with a standard Notep

You would need to use a hex editor to look at the first few bytes of the file. There is a Byte Order Mark (BOM) at the top of the file which indicates non ANSI  character  sets:

https://en.m.wikipedia.org/wiki/Byte_order_mark

The default  editor in Windows (Notepad) will recognize  and edit V4 files just fine for English  text. Notepad++ is only needed if a misbehaving  addon has messed up the character  set and you need to repair the file. So far I've only seen one V4 compatible addon "break" a cfg file and this issue was corrected by the developer in beta almost  immediately.

 

Share this post


Link to post

Jay,

 

Thanks for the additional follow up information.

I printed it .. save it.

 

Much appreciated.

 

Share this post


Link to post
50 minutes ago, jabloomf1230 said:

fsaerodata has a native P3d V4 installer. You shouldn't have to add it manually. Look here:

https://www.fsaerodata.com/forum/viewtopic.php?f=4&t=72

Yes Jay I saw ( and installed it), but it only installs fsAerodata to the scenery library, not as an addon package.  I was just trying it out to see if I could get it to work differently, as a) a test of the xml addon packages; and b) to try to move some of my addon scenery that I always have active to that method.

It rather appears that I'll be going back to the default scenery library now ... :p

Share this post


Link to post

I want to keep this as a list not a discussion thread - I've split the topic about add-on xml files into a separate thread. 

 

Share this post


Link to post

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