Skip to content

Mod loading system #5

@arrowsv

Description

@arrowsv

Describe the feature or enhancement

A built-in mod loader that doesn't require overwriting vanilla game files. Currently, the patch allows for overriding existing vpp_pc files by placing them in the overrides folder; this is done by hooking the keen_cf_open_file function to redirect the game to open a different vpp_pc file.

As an example, the already modified vpp_pc files of the Terraform Patch can be placed into the overrides folder and the game will correctly reflect those changes. The files 1-19.vpp_pc and mp_1-6.vpp_pc aren't recognised by the game unless they are placed in the data folder. May need to look at the functions init_packfiles and packfile_add and see if they can be hooked to add the new vpp_pc files and whether they can replace hooking keen_cf_open_file.

XML files can also be placed in the overrides folder which hooks the xml_parse function and manually allocates the space needed for it in the XML memory pool.

SyncFaction requires 2 large backups: the vanilla files and the vanilla files + patch applied on top. Allowing for non-destructive editing will resolve the need to rely on backups and allow the user to quickly switch from vanilla and modded files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementRequest for new feature or change of existing behaviour

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions