Art Packs are only recognized as .zip in .minecraft/mobtalker2/resources

Issue #88 resolved
mezzodrinker created an issue

Originally, Art Packs could be installed in three ways:

  1. As .zip files which contain a sprites and/or scenes folder and is placed in .minecraft/mobtalker2/resources.
  2. As folder with the above structure and also placed in .minecraft/mobtalker2/resources.
  3. As folder with the name resources and also the above structure which is then placed in a script pack, for example at .minecraft/mobtalker2/scripts/Script Pack/resources.

However, the last two of the above list appear to not be working. Whereas for the first option, the log contains a line which states that an Art Pack was located and loaded, this line is missing from runs with the latter two installations.

Comments (12)

  1. mezzodrinker reporter
    • changed status to open

    It appears that the second scenario was not meant to work. *shrugs* I implemented it either way. Appears to be working just fine, at least in the dev environment. Still need to test it in a regular Minecraft/Forge installation, though.

    As for the third scenario, according to the code, it should work just fine, but I haven't confirmed that it really, really works.

  2. mezzodrinker reporter

    Folder art packs work even outside the dev environment \o/ (→ d54e166)

    Integrated art packs, however, appear to not be detected reliably. Time for some testing.

  3. mezzodrinker reporter

    There seems to be a race condition between the loading of script packs and the scanning of script packs for integrated art packs.

  4. mezzodrinker reporter

    Whelp. Nevermind. It's not a race condition. I was just testing the dev version with Inter Astra.

    Apparently the reason was that Inter Astra does not have any interaction scripts with non-blank names, so it was only recognized as fallback, not as "active".

    Since only active script packs will be considered when looking for integrated art packs, the one that I put into Inter Astra's file tree was -- obviously -- ignored.

    Not sure if I should change that. @Fabian Maurer, any thoughts on this?

  5. Fabian Maurer

    Apparently the reason was that Inter Astra does not have any interaction scripts with non-blank names, so it was only recognized as fallback, not as "active".

    What exactly do you mean here?

  6. mezzodrinker reporter

    What exactly do you mean here?

    Check ScriptPackRepository, lines 231-243 (interaction scripts whose "Name" value is empty are not added to perNameEntry), 268-278 (entries from perNameEntry are always added to the list of active script packs) and 286-294 (entries from perTypeEntry are only added to the list of active script packs if any of their interaction scripts does not have their "Entities" value set to "*").

    Afterwards, check ScriptResourceLoader, lines 84-101 (integrated art packs are only loaded if the script pack they're contained in is considered "active", see above).

  7. Fabian Maurer

    And scripts that are considered non-active can't be used for playing right? If they can, it doesn't make sense to not load the resources.

  8. mezzodrinker reporter

    No, that's not correct. Inter Astra is considered not active when the "Name" value is missing from the script entry. It is, however, considered a "fallback" and can be used normally. However, because it's not active per se (namely because the "Name" value is empty and its only script is used for all compatible mobs), resources folders inside it are not recognized or loaded.

  9. mezzodrinker reporter

    So it doesn't make sense to not load the resources then.

    ...is what I was thinking, too. Just wanted to make sure I wasn't alone with that. Thanks.

  10. Log in to comment