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

[v1.1.8] Current packing method for Thunderstore export causes asset loading failure #3

Closed
NeonCarbide opened this issue Apr 5, 2021 · 4 comments

Comments

@NeonCarbide
Copy link

Basically, the way the mod is currently being packed for export, as in the .zip file structure, is causing the mod to not be able to find the 'assets' directory as it is not being created.

The current packing method results in the following mod directory upon install using the r2modmanager:

/BepInEx
  /plugins
    /thegreyham-CookingSkill
      CookingSkill.dll
      manifest.json
      README.md
      icon.png
      meat-cooked.png

I'm assuming the desired outcome is this:

/BepInEx
  /plugins
    /thegreyham-CookingSkill
      /assets
        meat-cooked.png
      CookingSkill.dll
      manifest.json
      README.md
      icon.png

To achieve this, the mod has to be packed for Thunderstore like so:

/plugins
  /assets
  CookingSkill.dll
manifest.json
README.md
icon.png

This results in the 'assets' directory actually being created within the mod's install directory in the profile.

@thegreyham
Copy link
Owner

Thanks @NeonCarbide for you're feedback. TBH Thunderstore is a pain to use.
I only uploaded to Thunderstore as some people reached out to make the mod part of a mod pack. So I obliged.
I have made some updates to the functionality of the mod and have repacked it based on your suggestions.
Let me know how you get on.

@NeonCarbide
Copy link
Author

You were close with the packing method, but it's still resulting in a failure to load the skill icon image.

Basically, if r2modmanager finds the 'plugins' directory within a mod .zip, it will maintain the file structure that you have inside the 'plugins' directory in your mod .zip when it installs the mod to the profile.

The only ways I know of fixing this problem are either to change the code so that the image is loaded from the same directory as the .dll or simply pack the mod .zip like so:

manifest.json
README.md
icon.png
/plugins
  CookingSkill.dll
  /assets
    meat_cooked.png

I will say, I am glad you decided to upload it to Thunderstore, as I am also a modpack dev.

I do understand the frustrations with Thunderstore though. I have to maintain two different manifest.json versions, one for uploading the modpack to Thunderstore, and one for converting NexusMods mods to versions you can drag'n'drop install in r2modmanager. I also think that r2modmanager should just maintain file structure on install in the first place, as I really don't understand the need for full extraction in the first place.

@NeonCarbide NeonCarbide changed the title [v1.1.4] Current packing method for Thunderstore export causes asset loading failure [v1.1.8] Current packing method for Thunderstore export causes asset loading failure Apr 7, 2021
@thegreyham
Copy link
Owner

Should be resolved with the latest update of 1.2.0
https://valheim.thunderstore.io/package/thegreyham/CookingSkill/1.2.0/

Thanks for your assistance with this.

@NeonCarbide
Copy link
Author

It is indeed resolved in 1.2.0.

Thanks for all your work on the mod, it's been pretty nice to have ^-^.

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

No branches or pull requests

2 participants