Open tonihele opened 8 years ago
Wouldn't it be better to make those custom texture folders also subfolder in the asset directory and just make a option with the asset folder that should be used in the first place?
So if someone wants to revert back to the normal textures/models he just needs to put in "Converted" to that option instead of deleting every single asset.
I see your point... So the original suggestion and:
?
The selection can be easily done with the AssetLocator ordering. But I don't know how the packaging should be done then.
With the current model the selection could be possible also by the same principle, possibly, need to check the locators. But the replacing needs IDE, or clumsy adding the resource to a ZIP file. I'm not sure if this is a real issue. A graphical replacing needs still some thinking about, since I would really like the new materials to have advanced maps not present in the original graphics.
The old system was a bit difficult GIT-wise and it also slowed down the IDE and the Gradle. Now at least that has been taken care of.
I see you got the point ;). I also think the new system is better since we have our own assets that doesn't exist in dungeon keeper and therefore are quite difficult to determine after converting the original assets.
In the game Maincraft good resources changes system. In sub folder "resource packs" contains zip archives with changed textures, sounds, ... In game settings sets resource pack name. Firstly loads from resource pack, if something is not found - from the default.
I implemented specular map & normal map support. But it is a bit hack perhaps. It'll do for now, but for more fine tuning we still need this system. Since the artist needs access to the material files. And add the appropriate maps itself.
Current system tries to find spec & normal map by the diffuse map name, for EVERY material. It is not awfully slow, since it is cached. But it still has this hackish feel to it...
https://github.com/tonihele/OpenKeeper/wiki/Custom-graphics Doesn't work for me. It only searches in the Converted folder, checked with ProcMon.
Need to check that then. Currently you can at least replace the original ones straight to the Converted folder. And should you want the originals back (and didn't make a backup), just adjust the settings file (set i.e. textures version to 0) to trigger reconversion.
This works as advertised only when running the development configuration (straight from the sources). Not the release. At the time of the writing I guess we really didn't have the release versions thought out at all.
Anyway, to enable this for all modes we would just need to add one new asset locator before the one that uses the converted resources (Main.java). And at the same time we could really differentiate the folder. Something like "assets/custom|mod|user".
Allow resource replacement & isolate the converted assets better. We don't easily support replacing of the assets at this point. Neither it is a huge priority at the moment. But we can tackle this at the same time if we isolate the converted assets so that they are easier to handle. Easier in terms of actually building releases & git-ignore.
I suggest the following:
So we would end up with something like: