Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sfall: add support for loading mods / mod_order.txt #392

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

JanSimek
Copy link
Contributor

@JanSimek JanSimek commented Jun 4, 2024

Loads mods from the mods directory based on their order in the mods/mods_order.txt file.

This feature is a prerequisite to get the Restoration Patch working.

See sfall-team/sfall#450 (comment)

Tested only on linux using data file from test_artemple.dat.zip which changes some tiles in the initial map artemple.map

@phobos2077
Copy link
Contributor

Maybe move the code to one of sfall_*.cc files to keep vanilla code clean?

@JanSimek JanSimek force-pushed the sfall-modorder-txt branch 3 times, most recently from 85150f0 to 87ecfba Compare June 4, 2024 12:20
@phobos2077
Copy link
Contributor

Have you looked at the original code? https://github.com/sfall-team/sfall/blob/b3ec9f1faa9e1bba1c71353b90f751a255ef3c71/sfall/Modules/LoadOrder.cpp#L266

There seem to be a couple of steps missing like disallowing paths to go outside of the game folder and checking if string is empty.

@JanSimek JanSimek force-pushed the sfall-modorder-txt branch from 87ecfba to 28c3908 Compare June 4, 2024 15:10
@JanSimek
Copy link
Contributor Author

JanSimek commented Jun 4, 2024

Thanks, I added a check for empty lines. Relative paths from the mods directory and neither absolute paths won't work. However, that could be easily overcome by creating a symlink anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants