Remove hardcoded file paths for initSubsystem #1376
alanblack166
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
One way to deal with this is introducing magical folders for "Weapon", "Armor", etc, where multiple INI files can be placed into the folders. Another way is adding a new INI file that acts as a registry where all the Subsystems are linked to custom INI files. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Game definitions are read from .ini files. A subsystem is created by parsing .ini files, and a large number of these subsystems are hardcoded to look for specific paths.
Example line 464 in
GameEngine.cpp
:initSubsystem(TheWeaponStore,"TheWeaponStore", MSGNEW("GameEngineSubsystem") WeaponStore(), &xferCRC, NULL, "Data\\INI\\Weapon.ini");
For modding, this presents an issue: Instead of being able to add only the necessary definitions for a new unit (ArmorSet, Locomotor, Weapon, OCL, etc.) in a single file, the modder is forced to have complete copies of each hardcoded .ini file that they alter, bloating file size and forcing them to rebase their mod or patch if the main game/mod files are changed.
Beta Was this translation helpful? Give feedback.
All reactions