Mod editor

+
MonarchX;n9698511 said:
Texture.cache is not necessary it seems
Texture mods without cache files more likely will cause issues like blurry loading screens in dialogues and other glitches, so cache IS necessary. What means that wcc still necessary, at least until Wolven Kit release.

MonarchX;n9698511 said:
I also uncooked UHDP and COMPILATION No Cosmetics Mods, removed all the Texture-Group-Export textures (I think) and left ONLY textures that have both XBM and TGA files- always in pairs and XBM size must not be 1-2KB. I think it worked!
If you removed *some files* you can't say that things work okay :) You've got just partially working mods. It's much easier to keep that mods not merged like XshI0u said, just merge all other stuff. And btw ModKit creates TGA files for modders, the game does not load it actually. If you got tga for xbm file it means that wcc succeed with that particular file uncooking.
 
Last edited:

Guest 3841499

Guest
DJ_Kovrik;n9699021 said:
Texture mods without cache files more likely will cause issues like blurry loading screens in dialogues and other glitches, so cache IS necessary. What means that wcc still necessary, at least until Wolven Kit release.


If you removed *some files* you can't say that things work okay :) You've got just partially working mods. It's much easier to keep that mods not merged like XshI0u said, just merge all other stuff. And btw ModKit creates TGA files for modders, the game does not load it actually. If you got tga for xbm file it means that wcc succeed with that particular file uncooking.

Things work okay as far as merging "non-merable" packs goes. At least I feel like I learned something from personal experimentation and I think those "Texture-Group-Export" packs are not 100%-unmergeable. When you get WCC errors, the whole "merged anyway" is not exactly so as XshI0u pointed out. You can actually lose texture files from mods that were properly uncooked (Better Oaks, HDProject Reworked) when a "problematic" packs are uncooked along with them. I am not 100% certain that not uncooking does not yield the same result. I think it's worth finding out for sure if that is the case, but I don't know how to test it.

I have not had any blurry screens and performance has been significantly better when all those conflicting, problematic textures were removed and bundle files replaced texture cache files. Bundle files with textures in them are MUCH bigger than equivalent texture.cache files. They may very much bundle that texture cache, but with reduced compression, which may actually help performance - my hypothesis, no real way to test it yet. Unlike before, uncooking them produces 0 errors now regardless of whether I do so with Mod Merger or W3 Oven. In my experience, merging any texture pack that results in WCC errors related to "texture-cache", "out out of memory", and "corrupt files" is more than likely to cause problems, even if they are not obvious, like UHDP pack supposedly "merging, regardless of errors" at the cost of losing textures from other texture packs If it wasn't for XshI0u and comparing merged texture packs to their un-merged parts, I would never even know and yes, there IS harm in not knowing.

How do I turn these blob bundle files into texture packs? I have only issue with them - size. My Mods folder is now 14GB instead of 4-5GB...


EDIT: Custom-editing texture packs has other benefits too. For example, COMPILATION pack has some bugs, some not-so-great textures, etc. UHDP is far from perfect and some of its textures drastically lower performance. Its only best to keep the whole package if the whole package is working or if you like the whole thing :).

UHDP merging still causes errors sometimes, but its random and this time its related to some "[Error][Core] CRawFileWriter write error: requested XXX bytes, sent 0 bytes in file '' and sometimes Mod Merger/WCC freezes/hangs during Metadata creation, even if one is created and when that happens - W3 does not load. I wish there was more info about all these particular WCC errors and cases. For some of us, "Just merge and play" doesn't cut it. I mean you had to dig up info to know what you know now, didn't you?
 
Last edited by a moderator:

Guest 3841499

Guest
Figured out how to do textures.cache... Doing it one only - too time consuming even for my level of curiosity...

Both Glowing Witcher Eyes and The Wolf Medallion report file corruption when transformed from bundle format to texture format, just like they do in their vanilla form. Mod Merger advises against merging The Wolf Medallion and since Witcher Glowing Eyes has the same exact issue, I assume it should also not be merged. UNLESS the vanilla texture format is not the one to use.

I am trying to understand these texture groups. My assumptions:
- Textures like that usually have no TGA files (or WCC fails to generate them) and use very small XBM file sizes.
- They are so small because they are linked to some vanilla texture and do not require the presence of the actual full-size texture file, possibly acting sort of lime "XDelta/Delta" patches
- May be performance un-friendly due to problematic texture cache generation
​​​​​​
 
MonarchX;n9700441 said:
Figured out how to do textures.cache... Doing it one only - too time consuming even for my level of curiosity...

Both Glowing Witcher Eyes and The Wolf Medallion report file corruption when transformed from bundle format to texture format, just like they do in their vanilla form. Mod Merger advises against merging The Wolf Medallion and since Witcher Glowing Eyes has the same exact issue, I assume it should also not be merged. UNLESS the vanilla texture format is not the one to use.

I am trying to understand these texture groups. My assumptions:
- Textures like that usually have no TGA files (or WCC fails to generate them) and use very small XBM file sizes.
- They are so small because they are linked to some vanilla texture and do not require the presence of the actual full-size texture file, possibly acting sort of lime "XDelta/Delta" patches
- May be performance un-friendly due to problematic texture cache generation
​​​​​​

Code:
    public class TextureCache : IWitcherArchiveType
    {
        //The images packed into this Texture cache file
        public List<TextureCacheItem> Files;

        public string TypeName { get { return "TextureCache"; } }
        public string FileName { get; set; }
        public List<uint> Chunkoffsets;
        public uint TextureCount;
        public uint NamesBlockOffset;
        public uint ChunkOffsetsOffset;
        public uint Magic;
        public uint Version;
        public List<string> Names;

        public TextureCache()
        {

        }

        public TextureCache(string filename)
        {
            this.Read(filename);
        }

        public void Read(string filepath)
        {
            FileName = filepath;
            Chunkoffsets = new List<uint>();
            using (var br = new BinaryReader(new FileStream(filepath, FileMode.Open)))
            {
                Files = new List<TextureCacheItem>();
                br.BaseStream.Seek(-20, SeekOrigin.End);
                TextureCount = br.ReadUInt32();
                NamesBlockOffset = br.ReadUInt32();
                ChunkOffsetsOffset = br.ReadUInt32();
                Magic = br.ReadUInt32();
                Version = br.ReadUInt32();
                var jmp = -(20 + 12 + (TextureCount * 52) + NamesBlockOffset + (ChunkOffsetsOffset * 4));
                br.BaseStream.Seek(jmp, SeekOrigin.End);
                for (var i = 0; i < ChunkOffsetsOffset; i++)
                {
                    Chunkoffsets.Add(br.ReadUInt32());
                }
                Names = new List<string>();
                for (var i = 0; i < TextureCount; i++)
                {
                    Names.Add(br.ReadCR2WString());
                }
                for (var i = 0; i < TextureCount; i++)
                {
                    var ti = new TextureCacheItem(this);
                    ti.Name = Names[i];
                    ti.ParentFile = FileName;
                    ti.Id = br.ReadUInt32();                //number (unique???)
                    ti.Filenameoffset = br.ReadUInt32();    //filename, start offset in block2
                    ti.Offset = br.ReadUInt32();       //* 4096 = start offset, first chunk
                    ti.PackedSize = br.ReadUInt32();       //packed size (all chunks)
                    ti.UnpackedSize = br.ReadUInt32();     //unpacked size
                    ti.Bpp = br.ReadUInt32();               //bpp? always 16
                    ti.Width = br.ReadUInt16();             //width
                    ti.Height = br.ReadUInt16();            //height
                    ti.Mips = br.ReadUInt16();              //mips
                    ti.Typeinfo = br.ReadUInt16();          //1/6/N, single, cubemaps, arrays
                    ti.B1Offset = br.ReadUInt32();          //offset in block1, second packed chunk
                    ti.Rpc = br.ReadUInt32();               //the number of remaining packed chunks
                    ti.Unk1 = br.ReadUInt32();              //???
                    ti.Unk2 = br.ReadUInt32();              //???
                    ti.Dxt = br.ReadByte();                 //0-RGBA?, 7-DXT1, 8-DXT5, 10-???, 13-DXT3, 14-ATI1, 15-???, 253-???
                    ti.Type = br.ReadByte();                //3-cubemaps, 4-texture
                    ti.Unk3 = br.ReadUInt16();              //0/1 ???
                    Files.Add(ti);
                }
                for (var i = 0; i < 3; i++)
                {
                    br.ReadBytes(4);
                }
                foreach (var t in Files)
                {
                    br.BaseStream.Seek(t.Offset * 4096, SeekOrigin.Begin);
                    t.ZSize = br.ReadUInt32();
                    t.Size = br.ReadInt32(); //Uncompressed size
                    t.Part = br.ReadByte();
                }
            }
        }
 

Guest 3841499

Guest
Please tell me which section of this thread I should read in order to understand what it is I am supposed to do that those lines of code you have kindly posted. What does it do?
 
MonarchX;n9703721 said:
Please tell me which section of this thread I should read in order to understand what it is I am supposed to do that those lines of code you have kindly posted. What does it do?

Reads the dds images packed in to the texture cache. You were wondering how does it work. There it is.
 

Guest 3841499

Guest
This is an AMAZING tool!!! I mean you can an epic amount of modding with it!
 

Guest 3841499

Guest
is 0.0.24 the latest version of this tool? Is it still being developed?
 

Guest 3841499

Guest
Yes, but Wolven Kit is under development. Is it functional like W3Edit or needs some software installed to be compiled and etc?
 
Hi, I'm new into modding The Witcher, I was wondering if this could help me edit lighting in the game, I'm a lighter myself working in video games, and I want to do a contribution on that side to this game :D
Any particular tools to help me do this? or tutorials? I've downloaded some tools here but it's hard to know what I'm doing.

Thanks!
 
tagarnav;n10616582 said:
Hi, I'm new into modding The Witcher, I was wondering if this could help me edit lighting in the game, I'm a lighter myself working in video games, and I want to do a contribution on that side to this game Any particular tools to help me do this? or tutorials? I've downloaded some tools here but it's hard to know what I'm doing. Thanks!

Welcome to the Forums, tagarnav!

There are numerous threads devoted to discussions on editing lighting. I recommend perusing the boards for tutorials on the basics.

MonarchX

Any ideas of where it would be best to start?
 
Look like my editor gives me an error when trying to run the game, I don't know if I'm doing something wrong. Also, is it text variables editor? or will those variables change when the game is opened? I remember that Fallout 3 had a visual editor for the levels, so you could see real time how things like light intensity, sky intensity, and other vars change in the editor.
Is this something similar? I can't tell as when trying to open the game it gives me an error from the editor, so I dunno if this is the "visual editor" I'm hoping, or it's all editing variables and then see those changes in game every time, making it a very painful :p
 
tagarnav

We understand that you are new, but it would be easier for us and for your learning to know exactly what you want to do.


To change the lighting globally there is SFX and Reshade.
If you want to do a lighting mod, I suggest unpacking an existing mod (STLM, Utoopia) and compare with vanilla

-take the time to read the tutorial explanations and watch the videos.
-do tests on a simple mod, a change of color of a garment for example
 
I'm trying to do a lighting mod, like STLM, but I have 2 goals in mind, one will be a more pleasant and less contrast type of lighting, and the other one will be film fx, to give you a reference, I will be matching GoT and other medieval style movies and series to simulate the same type of filters used in film production, so for that I'll be doing a mod for the base look, and inject Reshade for the more complex post effects.
Right now I haven't been able to tweak the game lighting in-game while changing values. I've also look for tutorials but all I could find was the same thing, editing variables on a .env file and checking the results in game, which is absolute time consuming and tbh is impossible for my goal. I'm thinking there must be an editor where I can open the game and tweak the variables and have real time results.
Thanks kind of what I'm after.

Thanks!
 
Top Bottom