-
Notifications
You must be signed in to change notification settings - Fork 328
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
RuntimeMaterial: Take RandomDungeonTextures setting into account #2026
RuntimeMaterial: Take RandomDungeonTextures setting into account #2026
Conversation
I don't know how RandomDungeonTextures option works, i'll investigate and then test your addition. This change breaks assignment via public API, but i can fix it during merge. Please tell me when you've finished working on it and i can review and push to master. |
From what I can see, it's used in the UseLocationDungeonTextureTable function on line 173 of DaggerfallDungeon.
I didn't have a solution at the time for the compile error and didn't know that function was being used. No worries though, I've fixed it myself.
Pretty much just trying to track down what the game does when set to use Random textures and how to integrate it into RM. From what I can see, the RandomTextureTableAlternate function in DungeonTextureTables is used to construct a texture table by picking five completely random archives from the entire set. |
I'll leave this one to @TheLacus to review as RuntimeMaterials are his. But if I'm needed for anything, please don't hesitate to ping me and I'll do what I can to help. |
Thank you for working on this! I changed username, apologise for any possible confusion.
I'd suggest to change method signature to |
RuntimeMaterials previously didn't take the game's RandomDungeonTextures setting into account when it decided to apply climate variations to dungeon models. This meant that dungeon models using RuntimeMaterials looked noticeably different next to vanilla models. This commit integrates the same logic that DaggerfallDungeon uses to decide what textures vanilla models use. The texture assignment abilities of RuntimeMaterials now almost match that of the vanilla logic.
This commit completes my work in making RuntimeMaterials compatible with DFU's RandomDungeonTextures setting by adding support for it's "Random" and "RandomOnly" options.
@rossipaolo I've made the changes you requested. |
Added a way for the OnSetDungeon event to pass the Texture Table and Dungeon ID to Runtime Materials rather than having each one retrieve it from DaggerfallDungeon every time.
No need to change event signature, i only said to get dungeon id directly from event. In any case thank you for improvements, i'll merge to a branch for further changes if needed. |
After further review of how dungeon texture tables work, i believe they already contain any information about climate and don't need additional climate step with I tested your mod with #2062 and i couldn't replicate any issue. If you also confirm that unsetting ApplyClimate solve the issue for you, i'll merge that simpler fix instead of this one. Otherways, please provide save and texture settings to replicate issue. |
Just tried disabling the ApplyClimate setting on my models and things seem to be working as they should. The models still receive their climate specific textures when textures are set to Climate. |
I'll need to confirm to be sure (it has been a few years now since I last looked at this) but my memory is that dungeon texture tables work on a different process to overland textures. I don't believe they need to run ApplyClimate() and removing this call is OK. |
Thank you both for your take, i'll merge that PR then. |
RuntimeMaterials previously didn't take the game's RandomDungeonTextures setting into account when it decided to apply climate variations to dungeon models. This meant that dungeon models using RuntimeMaterials looked noticeably different next to vanilla models. This PR integrates the same logic that DaggerfallDungeon uses to decide what textures vanilla models use.
The texture assignment abilities of RuntimeMaterials now
almostmatches that of the vanilla logic. The only thing I still need to sort out is that when the RandomDungeonTextures setting was set to "Random", I found a dungeon (Castle Buckington - Ilessan Hills in this case) where the vanilla models were using textures from the "Swamp" climate set whereas RuntimeMaterials used the "Temperate" set. Edit: This no longer applies.In particular, I would like @TheLacus to take a look at this since RuntimeMaterials was his work.
If merged, this PR will
mostlyfix the third problem described in issue #1990.RuntimeMaterials - Temperate textures:
Vanilla model - Swamp textures: