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

Feature: Combined mods #46

Merged
merged 25 commits into from
Sep 8, 2024
Merged

Feature: Combined mods #46

merged 25 commits into from
Sep 8, 2024

Conversation

finnhartshorn
Copy link
Member

@finnhartshorn finnhartshorn commented Jul 24, 2024

Description

Load both OpenZT data and Zoo Tycoon Data from each .ztd, based on ztd_type in meta.toml

Proposed Changes

Checklist

@finnhartshorn finnhartshorn marked this pull request as draft July 24, 2024 22:55
@GoosiferIO
Copy link
Member

I think instead we can have a legacy flag in the meta.toml. If it exists, new mod. If not, we scan the mod directory the old way. We could of course just scan the directory for a pattern like you said but I think it would solve so many steps in our other systems, specifically considering PANDA.

@GoosiferIO
Copy link
Member

Or sorry I meant, if legacy is false == new mod.

@finnhartshorn
Copy link
Member Author

finnhartshorn commented Jul 24, 2024

I think instead we can have a legacy flag in the meta.toml. If it exists, new mod. If not, we scan the mod directory the old way. We could of course just scan the directory for a pattern like you said but I think it would solve so many steps in our other systems, specifically considering PANDA.

The main motivation is being able to add in OpenZT stuff to existing mods and have new features work seamlessly if OpenZT is installed. Feels annoying to need to have a separate mod to add a custom habitat or location to an animal.

Also just one less flag that could be in the wrong state.

The only reason I need to change anything to start with is because my first implementation is very naive, I just load any file inside a .ztd, whereas Zoo Tycoon looks for .cfg files or .uca/ucs/ucb files and reads their contents to figure out what resources to load.

@finnhartshorn
Copy link
Member Author

finnhartshorn commented Jul 24, 2024

specifically considering PANDA.

Sorry, missed this part. Maybe we should have a mod_type enum which defaults to openzt but can also be legacy or combined. I really want to support combined mods, but agree we don't want to have to implement complex detection logic in both OpenZT and PANDA

@GoosiferIO
Copy link
Member

Yeah initially I figured just the presence of a toml file in the root folder would be enough but it would be nice to generate toml files even for legacy files, so I agree some kind of flag would be necessary. I'd be happy with an enum flag, but maybe a different name for clarity. Mod type could also mean the kind of thing it's modifying: textures, new buildings, etc. I can't think of something better off the top of my head though. mod_status maybe? I'm not sure.

@finnhartshorn
Copy link
Member Author

Yeah initially I figured just the presence of a toml file in the root folder would be enough but it would be nice to generate toml files even for legacy files, so I agree some kind of flag would be necessary. I'd be happy with an enum flag, but maybe a different name for clarity. Mod type could also mean the kind of thing it's modifying: textures, new buildings, etc. I can't think of something better off the top of my head though. mod_status maybe? I'm not sure.

Maybe ztd_type?

@finnhartshorn finnhartshorn changed the title First pass combined mod loading Feature: Combined mods Jul 25, 2024
@GoosiferIO
Copy link
Member

Yeah that's perfect

@finnhartshorn finnhartshorn marked this pull request as ready for review September 5, 2024 07:37
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