View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0005018||The Dark Mod||Textures||public||22.03.2019 22:48||28.01.2020 05:32|
|Product Version||TDM 2.07|
|Summary||0005018: FM-overridden material definitions do not automatically load in-game|
|Description||In previous versions of TDM, materials defined in the FM folder that have the same name as core mod ones will take priority and load over the defaults in an FM. Currently, this only happens if the user types the console command to reload declarations, at which point whatever (modified) default materials are used in the map will update to match their FM definitions. |
This is too much to ask for average players and may already be messing with the look of some released FMs.
|Steps To Reproduce||Take a random material e.g. textures/darkmod/stone/cobblestones/blocks_mixed_multicolour|
Copy it over to your own .mtr file but change something significant, e.g. replace the diffusemap with _white.
Fully restart the game if you have it open.
You will notice the cobblestone will look as usual, but upon typing reloadDecls it will update to your custom definition.
|Tags||No tags attached.|
|Slight correction, on a further test I see reloadDecls might not work, but reloadImages does.|
I failed to reproduce it, both on unpacked SVN and on packed 2.07-hotfix.
What I did is:
1) Copy materials/tdm_stone_brick.mtr into closemouthed_shadows.pk4::materials/tdm_stone_brick.mtr.
2) In the copied file inside pk4, find declaration textures/darkmod/stone/brick/old_worn_blocks_002 and replace: diffusemap to _white, bumpmap to _black.
3) Start TDM, choose Closemouthed Shadows FM and start new game.
The walls look white for me, without doing anything special.
Is this problem happening to someone else?
Does it happen to you now?
Are you using packed 2.07-hotfix?
Note that declarations are loaded when TDM starts, not when you start the FM.
Some ways to see what is happening:
1) condump has search paths you are using (can be printed separately by command "path")
2) You can enable cvar "logFile 1", then start TDM as "TheDarkModx64.exe +set fs_debug 1", then search for the name of your .mtr file in qconsole.log.
3) Probably procmon can help to see where TDM goes, but most likely it won't explain anything anyway.
I now don't remember precisely the incident because of which I submitted this bug but it may well be a wrongful submission. IIRC the kernel of what this bug actually is (and I've ran into it recently again) has nothing to do with materials but rather with texture formats. The problem is that upon overwriting a core mod .dds texture file with an FM .tga equivalent, the texture wouldn't update in-game unless "reloadImages" was invoked. If however the FM texture is changed to .dds (and I don't know if it's the format per se really, it may just be up to texture format parity) and put in the appropriate folder, the texture ingame gets overwritten properly.
Given that it's my error in over-generalizing the report here, I ask that it's either suspended, closed or renamed, though I don't rightly know if the bug as I've reframed it now is even that much of a bug. I still thank you for looking more into it, stgatilov.
There is some nontrivial logic of loading DDS / TGA. I.e. engine loads DDS, and if that it not found, then tries to load TGA.
If DDS was originally missing and you add it, I'm not sure which of the files will get loaded on reloadImages.
And the same applies to timestamps. If you have both TGA and DDS but update TGA, then I would imagine it will never be reloaded, because DDS is always preferred.
Maybe that's not the exact behavior, but something close certainly happens.