Commented autoload items get removed entirely

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Commented autoload items get removed entirely

Re: Commented autoload items get removed entirely

by Matt » Fri May 27, 2022 11:01 pm

Nash wrote:
Rachael wrote:Until you get into a habit of renaming your files .pk3_ :)
W-who... would even do such a thing?!
there's also "disabledPath=" which will also keep the line and also provide a clearly visible guide as to what's enabled or not.

Re: Commented autoload items get removed entirely

by Graf Zahl » Sun May 22, 2022 5:05 am

Lots of people do that to temporarily keep a file from being found.

Re: Commented autoload items get removed entirely

by Nash » Sun May 22, 2022 4:40 am

Rachael wrote:Until you get into a habit of renaming your files .pk3_ :)
W-who... would even do such a thing?!

Re: Commented autoload items get removed entirely

by Rachael » Sat May 21, 2022 8:55 pm

Until you get into a habit of renaming your files .pk3_ :)

Re: Commented autoload items get removed entirely

by Nash » Sat May 21, 2022 7:27 pm

I just do it the ghetto way and add an underscore to any autoloads I'd like to temporarily disable, for example:

Path=./mods/Autoload/bmplus/bmplus_vanilla.pk3

becomes

Path=./mods/Autoload/bmplus/bmplus_vanilla.pk3_

Works for me. =P

Re: Commented autoload items get removed entirely

by nova++ » Sat May 21, 2022 11:11 am

Oh, so that's what you meant by
If you want to keep the content, instead rename their key from "Path" to something else.

Re: Commented autoload items get removed entirely

by Graf Zahl » Sat May 21, 2022 12:37 am

You can already do that. Unknown sections with valid content are retained.

Re: Commented autoload items get removed entirely

by JPL » Fri May 20, 2022 4:09 pm

An alternative would be to have a "Disabled Autoloads" section of the cfg directly beneath it that you could move (with your text editor, which I assume is how people are adding autoloads) stuff to and from, that would be effectively ignored. But given how autoloads are subdivided by game, that could get a little complicated.

Re: Commented autoload items get removed entirely

by Graf Zahl » Fri May 20, 2022 12:58 am

In a perfect world the config should be split up, using JSON for its internal data so that it can be stored in hierarcial fashion plus a user-visible extra file for these special sections. But that still won't help you because the config parser just skips over comments, never parsing what they contain.

Re: Commented autoload items get removed entirely

by nova++ » Thu May 19, 2022 10:31 pm

I agree with Matt. I feel like there could be some sort of internal buffer for comments when a config file is loaded or something of that nature. I suppose another change would be the idea of bifurcating the config into different files (does the engine ever really modify the autoload section on its own?). Or really, it could be aware to some degree of the different sections etc.

Re: Commented autoload items get removed entirely

by Matt » Thu May 19, 2022 7:36 pm

too much work
I'd love to volunteer if I had the slightest idea what I'm supposed to be doing code-wise, so I'll just comment like this and hope someone out there takes the hint - being able to comment what stuff does in an ini file can be a huge QOL improvement for some people.

Re: Commented autoload items get removed entirely

by RKD » Mon May 16, 2022 9:04 am

Alternatively, ZDL also exists.

Re: Commented autoload items get removed entirely

by Graf Zahl » Mon May 16, 2022 12:27 am

The config file format has no way to retain the comments - they just get thrown away if the config is loaded. Ultimately this is too much work for too little gain.
If you want to keep the content, instead rename their key from "Path" to something else.

Commented autoload items get removed entirely

by mofumofu » Sun May 15, 2022 7:04 pm

Issue description:
Using # to comment out a line under the autoload header in the configuration file causes GZDoom to remove the entry (upon launch?)

Reproduction steps:
* Add an entry under any Autoload section in the .ini file
* Comment out the entry using a # mark
* Launch the appropriate game
* Exit and check the configuration file again
* Note that the commented line has been deleted entirely

Suggested fix:
* Do not delete commented lines

Why is this an issue:
It's convenient to use comments to temporarily disable items in autoload to test when you have a problem. Frankly I did not expect the engine to delete them and was a little frustrated when I lost the contents of my autoload, lol.

Top