Custom Faction Support mod



This allows modders to create a new faction and make it compatible with other peoples faction mods. It requires a tiny bit of work from the modders but if all modders use this mod then all new factions are compatible with each other. Also makes it possible to enable or disable new factions through the mod manager.

Detailed info in the readme file included in the download.



Custom Faction Support mod v3

The last couple of days I've been working on this mod. It's a mod for Forged Alliance that can be used by other modders to make their faction mod compatible with other faction mods (that also rely on this mod). Additionally it allows to change the availability of the new faction(s) through the mod manager.

What it does
- Makes it easier for modders to add their own faction and keep compatibility with other faction mods
- Adds functionality that makes new factions available based on the status of specific mods in the mod manager

What it doesn't
- Add a new faction
- Add other playable content

- Supreme Commander: Forged Alliance fully patched to version 1.5.3599 (it may work with older versions but I didn't test that)

How to use
This mod overwrites the stock FA files (doesn't hook) and therefor it needs to be in the gamedata folder. This is also why there isn't a ZIP version available. It also isn't Vault compatible.

Here's what you need to do to use this mod for your own faction mod:

- Put the SCD file in the gamedata folder
- In your own faction mod add a folder called 'CustomFactions' to the lua folder. In /lua/CustomFactions and create a new lua file in it. The name of the file doesn't matter but it must have the .lua extension. This file is meant to contain the data for your new faction so it's recommended to give it an appropriate name.
- Open the new file and copy-paste in this file the Factions table found in the stock file /lua/factions.lua . Edit the faction data as you see fit for your new factions, delete the excess faction entries. Then save the file.

If you want to make your faction available only when one or more mods are selected in the mod manager then you have to complete these steps aswell:

- Open the file for your faction in /lua/CustomFactions again
- In the Factions table, in the entry for your new faction add a new table variable called 'ModsPrerequisite'. In this table variable list the UID's of the mods you want enabled before your faction can be selected in the game lobby.
- Save file and test

note: The mod prerequisite uses mod UIDs so you can only use regular mods that can be enabled through the mod manager.
note: The mods specified as prerequisite don't have to do anything. You can simply create a mod which only contains the mod_info.lua file and use it's UID to toggle your faction(s).
note: If you get confused by the above then check the readme file included in this mod, it contains an example.

Additional information and notes
- Don't include the files in this mod in your own mod. Instead provide this mod with your own mod. This way you keep compatibility with other faction mods.
- This mod overwrites the files luafactions.lua and luauilobbylobby.lua . It's not compatible with mods that also change any of these files.
- This mod is inspired by Sorians AI support mod.
- It took quite some time to make this mod, much more than you would think when looking through the code. I hope you find it useful!

Please let me know what you think. Also please report any errors you find. Thanks!

There are no comments yet. Be the first!