How to test a mod offline / locally
-
Introduction
A recent problem has risen in which mods are repeatedly uploaded for testing purposes. In turn, the vault is repeatedly updated by authors that make only minor changes. Generally the testing happens without any additional players - therefore the testing could also be performed locally.
This article attempts to deal with this issue as it is not required for the majority of mods to be uploaded for testing purposes. In turn, this will prevent:
- Feeding of replays of testing sessions to the replay server.
- Versions of your mod taking up space on the server, while never being downloaded / used.
Steps to testing mods locally
Where are the mods stored on your hard drive
All mods that you use are stored locally on your hard drive. They can generally be found at the following location:
C:/Users/%USERNAME%/Documents/My Games/Gas Powered Games/Supreme Commander Forged Alliance/mods
Replace '%USERNAME% with your username. If the 'mods' folder does not exist then you can create one. Store your mod, as any other mod, in this folder.
Starting the game without any client
The FAF client stores a lot of data on your hard drive. They can generally be found at the following location:
C:/ProgramData/FAForever
What is especially interesting is the 'bin' folder that contains the executable 'ForgedAlliance.exe'. Double click this executable to launch the game without the interference of any client with the patches provided by the FAF community.
You can start a skirmish session and select the mod(s) you wish to test.
Small introduction on the development cycle
A few tips with regard to the development cycle:
- When you change the %MOD%_info.lua file you need to restart the game.
- When you restart a map the mod is reloaded and all changes are applied.
You can open up the moho log as usual with 'F9' or by searching for 'toggles the debugging window' in the Key Bindings menu (F1).
You can let the game re-load any disk changes that you make in the mounted (accessible) folders of the game. You can do so by adding /EnableDiskWatch to the list of arguments when launching the game. This can be achieved via creating a shortcut to the executable and then adding /EnableDiskWatch to its target at the end. As an example:
C:/ProgramData/FAForever/bin/ForgedAlliance.exe /EnableDiskWatch
Where to start modding
There are numerous sources out there to help you get going. As an example:
- https://supcom.fandom.com/wiki/Beginners_Tutorial._SC/FA_Creating_an_Upgradeable_Structure.
- https://supcom.fandom.com/wiki/Category:Mod_creation
And a visual guide:
Tutorials with regard to mods are rather scattered at the moment. Feel free to contribute and assist in cleaning it all up. This article is by no means an introduction to making mods.
FAQ
I have the vault fallback location enabled - does that influence anything?
No - both locations (the original one mentioned in this article) and the fallback location is mounted (accessible) for the game, allowing you to use either location.
-
And if you throw this into your game.prefs file
debug = { enable_debug_facilities = true }
You can run multiple instances of the game (assuming you don't have a PC from 1990) and use LAN multiplayers the test with more players for desyncs and stuff. Since game against AI won't cover that.
-
where is that file located exactly? I'll add it in the original post
-
You can find the folder through the client, if you click the button in the top-left corner (the button with three horizontal lines)
-
@jip Hi, I have this set up and running however it seems that the offline part doesnt share the same file path for maps as there are only about 10 maps showing for me and non that i have downloaded from faf, any idea whats going on? Thanks.