Tutorial: Removing the Fog of War effect
Posted: Thu Jul 28, 2011 3:42 pm
I noticed this had been asked for by a couple of people and the developers suggested it wasn't something they were interested in providing an option for so I thought I'd post this up.
The fog and its effects can be removed via a mod with some very simple .yaml editing.
What do I need?
You need a mod that includes the system.yaml, defaults.yaml, aircraft.yaml and vehicles.yaml files which are all under the rules folder.
Those files could just be edited in the ra mod but I recommend backing up both the original files and your own modified files as you may wish to restore the former for online play and the latter may be replaced when a new OpenRA version is released.
You'll need a text editor to edit the .yaml files. Notepad doesn't seem to lay the files out correctly but Wordpad works. Personally I use Notepad++.
Editing system.yaml.
Open system.yaml in your text editor.
Search for the word "fog" or manually go to line 151.
We're interested in these three lines:
Delete the three lines of code. We now need to tell the game what to do instead of the deleted code when it starts looking for a section named fog.
Just above the ShroudPalette@fog: section is this section
Copy the above and paste it where the "ShroudPalette" code was.
Replace the two instances of "disabled" with "fog", this tells the game that this bit of code is the bit relating to fog.
Change the value for A from 180 to 0, this sets the alpha value for the fog to zero which means completely transparent.
Your code should now read:
Do a search for "HiddenUnderFog", you should find this line under the "FLARE" section.
Delete this line, removing it tells the game not to hide the relevant entities when they're under fog.
This concludes the editing of system.yaml, so save and close it.
Editing defaults.yaml.
Open defaults.yaml in your text editor.
You need to remove all instances of two lines of code.
The first line we're interested in is:
Removing this tells the game not to hide the relevant entities (and their inheritors, i.e. the actual units) when they're under fog.
The second line we're interested in is:
Removing this line tells the game not to draw a dot for units under fog when you have a GPS Satellite, it causes a crash if you remove the "HiddenUnderFog" lines but leave the "GpsDot" lines so it needs to be removed.
There are six instances each of these two lines to remove from the defaults.yaml file. The easiest way is to run a search on them.
When you have removed all six instances of each line of code you can save and close defaults.yaml.
Editing vehicles.yaml.
Do a search for "GpsDot" and remove the line:
There is only one instance of the code in vehicles.yaml, once you've removed it you can save and close the file.
Editing aircraft.yaml.
Do a search for "GpsDot" and remove the line:
There are two instances of the code in aircraft.yaml, once you've removed both you can save and close the file.
You can now run the game (remember to run the mod that you've made the changes to) and there will be no fog of war effect at all in the main window. The radar screen displays the visual effect where the fog should be but units will still be visible.
The fog and its effects can be removed via a mod with some very simple .yaml editing.
What do I need?
You need a mod that includes the system.yaml, defaults.yaml, aircraft.yaml and vehicles.yaml files which are all under the rules folder.
Those files could just be edited in the ra mod but I recommend backing up both the original files and your own modified files as you may wish to restore the former for online play and the latter may be replaced when a new OpenRA version is released.
You'll need a text editor to edit the .yaml files. Notepad doesn't seem to lay the files out correctly but Wordpad works. Personally I use Notepad++.
Editing system.yaml.
Open system.yaml in your text editor.
Search for the word "fog" or manually go to line 151.
We're interested in these three lines:
Code: Select all
ShroudPalette@fog:
IsFog: yes
Name: fog
Just above the ShroudPalette@fog: section is this section
Code: Select all
PaletteFromRGBA@disabled:
Name: disabled
R: 0
G: 0
B: 0
A: 180
Replace the two instances of "disabled" with "fog", this tells the game that this bit of code is the bit relating to fog.
Change the value for A from 180 to 0, this sets the alpha value for the fog to zero which means completely transparent.
Your code should now read:
Code: Select all
PaletteFromRGBA@fog:
Name: fog
R: 0
G: 0
B: 0
A: 0
Code: Select all
HiddenUnderFog:
This concludes the editing of system.yaml, so save and close it.
Editing defaults.yaml.
Open defaults.yaml in your text editor.
You need to remove all instances of two lines of code.
The first line we're interested in is:
Code: Select all
HiddenUnderFog:
The second line we're interested in is:
Code: Select all
GpsDot:
There are six instances each of these two lines to remove from the defaults.yaml file. The easiest way is to run a search on them.
When you have removed all six instances of each line of code you can save and close defaults.yaml.
Editing vehicles.yaml.
Do a search for "GpsDot" and remove the line:
Code: Select all
GpsDot:
Editing aircraft.yaml.
Do a search for "GpsDot" and remove the line:
Code: Select all
-GpsDot:
You can now run the game (remember to run the mod that you've made the changes to) and there will be no fog of war effect at all in the main window. The radar screen displays the visual effect where the fog should be but units will still be visible.