tsunamods-codes/7th-Heaven

[Feature Request] Allow mods to setup links to other folders within the games path

Open

#57 opened on Jan 27, 2022

 (0 comments) (0 reactions) (0 assignees)C# (45 forks)auto 404
enhancementhelp wantedpriority/P2

Repository metrics

Stars
 (269 stars)
PR merge metrics
 (PR metrics pending)

Description

So it has been requested that we stop duplicating files inside mods (a reasonable request) to do this we need to look at setting up a link system in the mod.xml so a mod can register links.

Thinking something like

<Links>
    <Link src="$(GamePath)/somefile.jpg" des="${modPath}/somefile.jpg" />
</Link>

For security both src and destination will be barred from containing, ../, ./, : or starting with / this prevents people from making links outside of the game directory, it will also block links to .exe, .bat, .cmd, .msi or any other windows executable format (this should outright prevent the mods being loaded and tell the user why)

Need to make sure when parsing mod.xml we ignore links for IROs, as IROs are never extracted to the file system for use links won't work they are a file system, system, but maybe a system for the file loader to know that there is a link instead (more research required)

Contributor guide