Minecraft Comes Alive (MCA)

Minecraft Comes Alive (MCA)

13M Downloads

Suggestion: A more user-friendly way to add villager skin variants

Not-February opened this issue ยท 3 comments

commented

This is something I've been wanting for a long time, and since it seems a lot of internal stuff has changed recently in 6.0.0(especially the option to support the 64x64 skin format. Yay!), I was wondering if you might consider implementing an alternative way of adding villager variants that isn't opening up and repacking the .jar file. I don't know how possible this is with the system currently used, but it'd go a long way for how customizable the mod can be, and user friendliness is always a good thing.

Maybe make use of resource packs, or an extra config folder to put additional skins in? Maybe have the user-added villager variants follow a different or dynamic numbering function so that you don't overlap which villager 'slots' are already taken in the mod's internal files. Resource packs could be used to replace the existing skins if desired, to avoid conflicts.

Just a thought, and figured it might be good to put it out there now rather than later.

commented

I've always been conflicted on how to implement this in as user-friendly of a way as possible while also allowing for stability and compatibility with other mods.

What I settled with for this iteration, as you see, are .json files in the mod's archive. These also control other aspects such as buttons available in GUIs.

The current implementation allows you to specify what gender, profession, and the resource location of each skin available for that profession. Like so:

  {
    "gender": "male",
    "profession": "minecraft:farmer",
    "paths": [
        "mca:skins/male/farmer/farmerm1_converted.png",
        "mca:skins/male/farmer/farmerm2_converted.png",
        "mca:skins/male/farmer/farmerm3_converted.png",
        "mca:skins/male/farmer/farmerm4_converted.png",
        "mca:skins/male/farmer/farmerm5_converted.png",
        "mca:skins/male/farmer/farmerm6_converted.png",
        "mca:skins/male/farmer/farmerm7_converted.png",
        "mca:skins/male/farmer/farmerm8_converted.png",
        "mca:skins/male/farmer/farmerm9_converted.png",
        "mca:skins/male/farmer/farmerm10_converted.png",
        "mca:skins/male/farmer/farmerm11_converted.png",
        "mca:skins/male/farmer/farmerm12_converted.png",
        "mca:skins/male/farmer/farmerm13_converted.png",
        "mca:skins/male/farmer/farmerm14_converted.png",
        "mca:skins/male/farmer/farmerm15_converted.png",
        "mca:skins/male/farmer/farmerm16_converted.png",
        "mca:skins/male/farmer/farmerm17_converted.png",
        "mca:skins/male/farmer/farmerm18_converted.png",
        "mca:skins/male/farmer/farmerm19_converted.png",
        "mca:skins/male/farmer/farmerm20_converted.png",
        "mca:skins/male/farmer/farmerm21_converted.png",
        "mca:skins/male/farmer/farmerm23_converted.png",
        "mca:skins/male/farmer/farmerm25_converted.png"
    ]
  },

You should (?) be able to reference other mods/resource packs in paths, though I honestly don't know much about resource packs and how they work internally. Professions from other mods can absolutely be added in this way, as MCA uses its own API to add skins for its custom professions.

I feel that this gives you the greatest control since you can change everything and also see everything that's happening when skins are loaded into the game.

Repacking or not, you're probably going to be writing/changing JSON some way or another when making a modpack which is why I went for this method.

Though if you or anyone else have further ideas for how to simplify or improve this I'm definitely open to it.

commented

Ah, I didn't see anything about it in the changelog, so I assumed nothing had changed. Loving the alleged ability to add in professions from other mods, though - that was always pretty immersion breaking in older versions.

I might give customizing this stuff a try sometime to see how it works, can't guarantee it'll be soon but I always eventually have an itch to set this mod up with custom shenanigans. I can provide further feedback/suggestions when that is the case.

commented

Closing for now but definitely open to discuss a more user-friendly option.