Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow resource replacement & isolate the converted assets better #134

Open
tonihele opened this issue Jan 2, 2016 · 8 comments
Open

Allow resource replacement & isolate the converted assets better #134

tonihele opened this issue Jan 2, 2016 · 8 comments

Comments

@tonihele
Copy link
Owner

tonihele commented Jan 2, 2016

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:

  • Convert the assets to a subfolder under the assets /Converted/, and maintain the same directory structure there (mirror the assets folder)
  • Allow people to commit assets to the normal locations
  • Create an asset locator that first searches the main asset folder and if not found, then the /converted/ folder
    • Replacing an asset is just mirroring it with the same name in the main asset structure (of course you would need to re-run the conversion on some cases)
    • When searching for mp2 or wav, search first for ogg :)

So we would end up with something like:

  • assets
    • Interface
    • Textures
    • ...
    • Converted
      • Interface
      • Textures
      • ...
tonihele added a commit that referenced this issue Jan 3, 2016
…nverted/ for easier exclusion, exclude the folder in Gradle & .gitignore. Help towards issue #134
@ufdada
Copy link
Collaborator

ufdada commented Jan 4, 2016

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
Copy link
Owner Author

tonihele commented Jan 4, 2016

I see your point... So the original suggestion and:

  • assets
    • ...
    • Custom
      • (Interface)
      • Textures
      • ...

?

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
Copy link
Collaborator

ufdada commented Jan 4, 2016

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
Copy link
Collaborator

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
Copy link
Owner Author

tonihele commented Jul 6, 2016

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
Copy link
Collaborator

Trass3r commented Oct 11, 2019

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

@tonihele
Copy link
Owner Author

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
Copy link
Owner Author

tonihele commented Oct 12, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants