-
Notifications
You must be signed in to change notification settings - Fork 5
Mod Structure and Loading
Because Empire at War Expanded consists of several projects with overlapping content/underlying systems, to prevent work being done repeatedly for the same effects, rather than having multiple copies of the same files per mod, the mods are structured in a series of stacked mods, loaded on top of each other. Content is stored in the highest-level folder where it can universally be used. The way this is structured is as follows:
The GC Editor (at least currently) does not work off of this structured system. Instead it works off of a standalone, compiled version of each mod, made by taking the Leftmost folder first (XML and LUA scripts only), and then copying the folders over that along the path to the mod's named folder in order, to overwrite any "generic" versions of files with mod specific ones.
ie, to make a workable folder for Thrawn's Revenge to be worked on in the Python GC Editor you would:
- Copy the EaWX folder
- Copy the CoreSaga Folder over that
- Copy the Thrawn's Revenge folder over that
Resulting in one complete mod folder. The game does not require this to be done, as we're able to run stacked mods.
This submod is the basis upon which all core functions of the mod are built. Anything which is used by every mod, or is conssistent between mods, is stored here.
Editor-relevant content:
- Planets
- Trade Routes
- Trade route file list (XML file which tells the game/editor files traderoutes are in)
These are the specific content of the mod, which is not shared with any othermods/projects.
Editor-relevant content:
- Units / Structures
- Factions
- Galactic Conquests
- Conquest manifest (XML file which tells the game which files contain valid galactic conquests)
- Object manifest (XML file which tells the game/editor which files contain valid game objects)
- Faction manifest (XML file Tells the game/editor which files contain valid faction objects)
Thrawn's Revenge and Fall of the Republic share certain content because of the time they're set in, which they don't share with Revan's Revenge. In order to avoid having to keep a copy of the assets in each mod's folder, while also avoiding having Revan's Revenge get extraneous assets (which would happen if they were instead kept in Data, the CoreSage folder exists, containing those shared assets, loaded between EaWX and FotR/TR. As Revan's Revenge is on its own and doesn't share any major bits of content with one mod that isn't shared by all mods (which can then go in the core EaWX folder), it simply goes from EaWX to Revan's Revenge.
Editor-relevant content:
- Units / Structures
One goal with the editor is to be able to load and work on the files directly in the development repository, which keeps this submod structure that the editor doesn't currently support. In order to support this, we would need to be able to tell the editor to load the XML/Scripts in a similar way to the game.
The way the editor loads files is by looking at the manifest files in the loaded mod for game objects (Planets, units, heroes), traderoutes, factions, and conquest maps. We would basically need to set up a prioritized list of data folders which are valid for finding the objects (and manifest lists), then the editor looks for the XML files listed in those manifests from bottom priority to top, overwriting lower-level ones with higher level.
So, what's currently set up as:
<DataPath>G:\Program Files (x86)\Steam\steamapps\common\Star Wars Empire at War\corruption\Mods\TRDev\Data</DataPath>
Would become:
<DataPath>..\TR\Data, ..\CoreSaga\Data, ..\EmpireatWarExpanded\Data </DataPath>
Then when saving it back in, it should know which file it's editing came from which original data folder (so edited/new conquests end up in the mod-specific folder, while edited traderoutes end up in the EaWX folder)