Forums » General
Quick question about config.ini/wgaf.cfg
Both my .ini and my .cfg are a mess of unordered lines of binds and variables. I was wondering if there was a proper way to add in side-notes to help me keep my custom binds and stuff separate from the rest, or if that would somehow interfere with the files in-game.
something along the lines of:
---Custom Binds---
placed in areas of the text to seperate and organize the files for myself.
thanks,
-H.H.
something along the lines of:
---Custom Binds---
placed in areas of the text to seperate and organize the files for myself.
thanks,
-H.H.
Somebody should make a bind/alias manager plugin - assuming you can get a list of binds and aliases via lua. That would be pretty sweet.
I agree, a manager would be nice.
In the meantime, you can create your own custom cfg file such as binds.cfg that is organized and use the line-comment symbol # to separate or describe your binds. An example of the usage of # is the command appendix itself. However, be careful as when # is used after a valid command, the entire line is ignored along with the command.
Then, whenever you update binds.cfg, you can use /load binds.cfg to load it. Unfortunately, placing a load command itself in wgaf.cfg will only work until the game automatically saves a new wgaf.cfg. For the same reason, comments in wgaf.cfg will disappear. You could try making wgaf.cfg read-only, but I don't recommend it, and it may not work depending on the filesystem in use and whether the game honors it.
For ini's, the line-comment symbol is ; and from my testing it seems to keep the comments intact after saving, but it wouldn't hurt to have backups. It also seems to understand declarations with a ; comment after it on the same line, but after saving, the comment disappears.
In the meantime, you can create your own custom cfg file such as binds.cfg that is organized and use the line-comment symbol # to separate or describe your binds. An example of the usage of # is the command appendix itself. However, be careful as when # is used after a valid command, the entire line is ignored along with the command.
Then, whenever you update binds.cfg, you can use /load binds.cfg to load it. Unfortunately, placing a load command itself in wgaf.cfg will only work until the game automatically saves a new wgaf.cfg. For the same reason, comments in wgaf.cfg will disappear. You could try making wgaf.cfg read-only, but I don't recommend it, and it may not work depending on the filesystem in use and whether the game honors it.
For ini's, the line-comment symbol is ; and from my testing it seems to keep the comments intact after saving, but it wouldn't hurt to have backups. It also seems to understand declarations with a ; comment after it on the same line, but after saving, the comment disappears.
Thanks alot firemage. I truly appreciate a consice answer. Really, all i needed was a way to insert comments in the text files to help me differentiate between what i've written and what is stock binds/.ini stuff. So, to be thorough, its the # singn to seperate comments in the .cfg and ; to insert comments in the .ini?
- HH
- HH
wgaf is frequently re arranged so notes,comments and ordering dont work well.
Keeping a tidy copy of yer binds in a separate file seems to be the best option.
Keeping a tidy copy of yer binds in a separate file seems to be the best option.
Yes, use # in cfg files other than wgaf.cfg.
Use ; in ini files which may (dangerously) include config.ini.
In both types of files, you should start the line with their respective comment symbols and heed PaKettle's advice of modifying separate files that you load or copy from. That is, use the load command with cfg files, and use regular old file copy for ini files.
cfg ex:
# My Hail
set hailmsg "Get out."
ini ex:
; My alternate character
[IRC]
channels=1 100
; I need to find a better ship color
defaultshipcolor=0
You may also use empty lines for further separation; I just wanted to keep the examples short.
Use ; in ini files which may (dangerously) include config.ini.
In both types of files, you should start the line with their respective comment symbols and heed PaKettle's advice of modifying separate files that you load or copy from. That is, use the load command with cfg files, and use regular old file copy for ini files.
cfg ex:
# My Hail
set hailmsg "Get out."
ini ex:
; My alternate character
[IRC]
channels=1 100
; I need to find a better ship color
defaultshipcolor=0
You may also use empty lines for further separation; I just wanted to keep the examples short.