pufmat / skillsmod

A Minecraft mod that adds a fully configurable skill system to the game.
Other
36 stars 10 forks source link

Data structure question #19

Closed Sweenus closed 1 year ago

Sweenus commented 1 year ago

Hey there,

I'm currently working on a mod that includes Puffish Skills as a dependency in order to grant the player some more complex passive abilities. I'm running into trouble understanding how to pack the datafiles into my mod.

In my testing, I've been keeping my definitions, skills, etc in the run>config of my dev environment. This has been working well, however, I would like to have these files included in the mod itself when it's shipped.

I've tried adding the datafiles to my resources>data, using the folder structure outlined here: https://github.com/pufmat/skillsmod/wiki/Configuration-Structure

This doesn't work, and the files are completely ignored. Is there something I'm missing, or is there currently no way to use these datafiles outside of Puffish Skill's config folder?

pufmat commented 1 year ago

There is no other way than Pufferfish's Skills config directory. You can try adding files to this directory using your mod.

Sweenus commented 1 year ago

Thanks for getting back to me - that clears things up. Are you considering expanding upon this system to allow for easier modImplementation?

pufmat commented 1 year ago

Since version 0.6.0 you can ship your configuration as a data pack. Read more here.

Sweenus commented 1 year ago

This works great! Thank you for implementing this feature - this will be fantastic for user-experience ๐Ÿ™‚

Sweenus commented 1 year ago

@pufmat I think there may be an issue with the interpretation of formatting codes when the trees are loaded via datapacks. In the images attached you can see two identical trees, one loaded via the config folder, and one via the data folder of a mod. The one loaded via the data folder has some of the format code appearing when it shouldn't.

Interestingly, this issue does not occur in my dev environment (IntelliJ), only when deployed in a live-environment. Screenshot 2023-08-02 145503 Screenshot 2023-08-02 145510

pufmat commented 1 year ago

Make sure your configuration files are encoded in UTF-8.

Sweenus commented 1 year ago

Make sure your configuration files are encoded in UTF-8.

They are all UTF-8. You can see the formatting being read and deployed as the text is colored. But it's transforming and displaying what is supposed to be 'ยง' and is supposed to be hidden. Screenshot 2023-08-02 195854

Sweenus commented 1 year ago

@pufmat Do you want me to open a separate ticket for this issue?

pufmat commented 1 year ago

No, need. I was able to reproduce this issue on Windows, I'll release a fix today.

Sweenus commented 1 year ago

No, need. I was able to reproduce this issue on Windows, I'll release a fix today.

Oh, that's fantastic! Thank you so much for the speedy fix ๐Ÿ™‚