Spirit Posted April 29, 2018 Posted April 29, 2018 Hello. Before I start, let me point out that I don't know anything about shadering. I do my stuff by observing, reverse-engineering, and copy-pasting, without actually understanding what I'm doing. So I'm sorry if the following question is stupid. I'm trying to make a pack of ported JK2 multiplayer maps to Jedi Academy. I'm about 70% done, however, one of the bugs that I've noticed, and what I'm trying to fix, is caused by JKA itself. The map FFA_Deathstar from JK2 uses a texture: kejim/alpha. JKA does not have this texture, but it has a a shader defined for it in JKA's imperial.shader file: textures/kejim/alpha{q3map_nolightmap { map textures/kejim/alpha blendFunc GL_ONE GL_ZERO }} This is different from how it's defined in JK2: textures/kejim/alpha{q3map_nolightmap { map textures/kejim/alpha blendFunc GL_DST_COLOR GL_ONE_MINUS_SRC_ALPHA }} This difference causes graphical glitches, and the .shader file that I made, which contains the correct shader from JK2, does not seem to overwrite the faulty one from JKA. Is there a way I can force it somehow, or do I have to include a modified version of the imperial.shader file in my addon? I'd rather not do that, I'd rather not overwrite the game's original files if possible, because it would probably have unwanted side effects, such as compatibility issues, ect.
Ramikad Posted April 29, 2018 Posted April 29, 2018 You could try packing the new shader file in z_<something>.pk3. Naming it alphabetically it should overwrite the original file in-game.
Spirit Posted April 29, 2018 Author Posted April 29, 2018 Hmmm the pk3 is called Jk2MPMapPack.pk3, but I'll try putting a Z in front of it. And the shader file too, just to make sure. ... Nope, that didn't work.Just to make it clear. I have the Jk2MPMapPack.pk3, inside it the shaders folder, inside that the Jk2MPMapPack.shader file, which contains the JK2 definition of the kejim/alpha shader, which is in conflict with the same shader's different definition in JKA's imperial.shader file. JKA has no reason to have that shader, because the kejim/alpha texture doesn't even exist in JKA, I had to port it from JK2. My goal is to make the Jk2MPMapPack.shader file overwrite this shader's definition, because the other option would be to include a complete version of JKA's imperial.shader file, but with the part in question rewritten.I don't want to do that, because as I learned, the shader files don't like being rewritten, and this would probably cause compatibility issues with other mods, and maybe even worse.
AshuraDX Posted April 29, 2018 Posted April 29, 2018 Hmmm the pk3 is called Jk2MPMapPack.pk3, but I'll try putting a Z in front of it. And the shader file too, just to make sure. ... Nope, that didn't work.Just to make it clear. I have the Jk2MPMapPack.pk3, inside it the shaders folder, inside that the Jk2MPMapPack.shader file, which contains the JK2 definition of the kejim/alpha shader, which is in conflict with the same shader's different definition in JKA's imperial.shader file. JKA has no reason to have that shader, because the kejim/alpha texture doesn't even exist in JKA, I had to port it from JK2. My goal is to make the Jk2MPMapPack.shader file overwrite this shader's definition, because the other option would be to include a complete version of JKA's imperial.shader file, but with the part in question rewritten.Try putting an a infront of the shader filename. The order in how it loads shaders seems to be reversed.
Spirit Posted April 29, 2018 Author Posted April 29, 2018 Try putting an a infront of the shader filename. The order in how it loads shaders seems to be reversed.Nope, didn't work.
AshuraDX Posted April 29, 2018 Posted April 29, 2018 Huh, did you keep the z infront of the .pk3 name?
Jeff Posted April 29, 2018 Posted April 29, 2018 I think you would have to name it something like "0_<something>.pk3" , just the letter a may not read before assets0.
Spirit Posted April 29, 2018 Author Posted April 29, 2018 Huh, did you keep the z infront of the .pk3 name?No. If it doesn't matter, then it's not needed. If it does matter, J still comes after A, and I have no other addons that could conflict. I think you would have to name it something like "0_<something>.pk3" , just the letter a may not read before assets0. I tried that, also, multiple a's, multiple a's with underscore before the real filename....
AshuraDX Posted April 29, 2018 Posted April 29, 2018 No. If it doesn't matter, then it's not needed. If it does matter, J still comes after A, and I have no other addons that could conflict. I tried that, also, multiple a's, multiple a's with underscore before the real filename....I was talking about adding an a to the beginning of the .shader filename.
Spirit Posted April 29, 2018 Author Posted April 29, 2018 I was talking about adding an a to the beginning of the .shader filename.Ok sorry for the confusing post. here's what I've tried so far: Zsomething.pk3Z_something.pk3Asomething.pk3A_something.pk3Zsomething.shaderZ_something.shaderAsomething.shaderA_something.shader And pretty much all combinations of these pk3 and shader names.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now