tonihele / OpenKeeper

Dungeon Keeper II remake
GNU General Public License v3.0
442 stars 43 forks source link

Allow resource replacement & isolate the converted assets better #134

Open tonihele opened 8 years ago

tonihele commented 8 years ago

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:

ufdada commented 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.

tonihele commented 8 years ago

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.

ufdada commented 8 years ago

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.

ArchDemons commented 8 years ago

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.

tonihele commented 8 years ago

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...

Trass3r commented 5 years ago

https://github.com/tonihele/OpenKeeper/wiki/Custom-graphics Doesn't work for me. It only searches in the Converted folder, checked with ProcMon.

tonihele commented 5 years ago

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.

tonihele commented 5 years ago

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".