Jump to content

Lightsaber Core Showing as a Series of Grey Squares In Game (Single Player)


Go to solution Solved by SorcererofRhand,

Recommended Posts

Posted

Greetings,

I have attempted to create a custom Lightsaber color using this tutorial

However, when I use my custom color in the game, everything works except for what I assume is the core as can be seen below in the attached images.

What I have tried so far:

1. Replacing my custom .jpg files with files pulled straight from the game's asset files (no change)

2. Renaming the .jpg "pink_glow2" and "pink_line" to .tga files (crashed the game on startup)

3. Looking through all JKA SP code files for keywords like "purple" and adding in entries for "pink" (no change)

4. Changing the "cull" parameter in the sabers.shader file from "disabled" to "twosided" to match the other entries (no change)

5. Changing the "map" parameter in the sabers.shader file from "gfx/effects/sabers/pink_glow2" to "gfx/effects/sabers/pink_glow2.tga" and doing the same for the pink_line entry (no change)

6. Creating a copy of the single_1.sab and going through the necessary steps to make a single_10.sab file with pink as its default color (no change)

---------------------------

What is working (seemingly):

1. The glow from the saber seems to work properly

2. The Lightsaber trail seems to work properly

3. Sound effects are all normal

4. The color can be selected from the console using the saberColor command without error

5. All vanilla saber colors work perfectly

6. All saber hilts (including custom hilts from JKHub) are able to switch to the pink color

7. The game is reading the "gfx/effects/sabers" folder successfully (I think, based on the game crashing when I renamed the files within to be .tga instead of .jpg)

8. The game is reading all other files in the .pk3 file containing the custom color successfully (all other files work as intended)

---------------------------

If there is any further information you require or any questions you might have, please do ask. I am not a coding novice, but I am just getting started with modding JKA

Thank you in advance for your help!

Saber Trail.png

Saber Glow.png

Posted

Start a new copy of the game, then type /developer 1 in the game console. Load a map, then look through the console's history to see if there are any errors relating to your problem. It should tell you what's wrong, but the message might be buried.

Posted

@NAB622

Firstly, thank you for your reply!

I have done so, but no errors appear in the console whatsoever when I use the command "saberColor 1 pink". It behaves as if I were commanding it to do "saberColor 1 blue".

Posted

Before getting too deep, I'm going to cover the obvious issue first, just to be absolutely sure. The width and height of your texture must be a power of 2: 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, etc. I get the feeling you already know that, but it's easy to miss. Also, if you're using a JPG, make sure you are not saving it as "Progressive", these images are intended for web browsers and are not compatible with JA.

I have a bit more time now, I'm going to dissect your original post a bit...

5 hours ago, SorcererofRhand said:

Replacing my custom .jpg files with files pulled straight from the game's asset files (no change)

When you say no change, do you mean it is broken both ways? And what files did you use from the game assets?

 

5 hours ago, SorcererofRhand said:

Renaming the .jpg "pink_glow2" and "pink_line" to .tga files (crashed the game on startup)

That makes sense, because the game tried to load a JPG file as a TGA. Using the wrong parser on code as fragile as JA could certainly cause a crash.

 

5 hours ago, SorcererofRhand said:

Looking through all JKA SP code files for keywords like "purple" and adding in entries for "pink" (no change)

Nah, this isn't a code issue. I do recall the game being very picky about the textures used in effects, or maybe I was just new to it myself at the time. But changes are certainly possible, so I don't think the code will hold your answer.

 

5 hours ago, SorcererofRhand said:

Changing the "cull" parameter in the sabers.shader file from "disabled" to "twosided" to match the other entries (no change)

This behavior is correct. According to the Q3 shader manual, cull disable and cull none are synonymous with each other:

https://icculus.org/gtkradiant/documentation/Q3AShader_Manual/ch02/pg2_1.htm#cull

For some reason, JA added a third option called twosided, which is also synonymous with the other two. They all do the same thing.

 

5 hours ago, SorcererofRhand said:

Changing the "map" parameter in the sabers.shader file from "gfx/effects/sabers/pink_glow2" to "gfx/effects/sabers/pink_glow2.tga" and doing the same for the pink_line entry (no change)

This is also correct behavior, JA will try all valid file extensions on its own.

 

5 hours ago, SorcererofRhand said:

Creating a copy of the single_1.sab and going through the necessary steps to make a single_10.sab file with pink as its default color (no change)

Unfortunately, I don't know anything about .sab files, so I won't be much help with this.

Posted

@NAB622

I must say thank you for your diligence! It is greatly appreciated!

48 minutes ago, NAB622 said:

The width and height of your texture must be a power of 2: 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, etc. I get the feeling you already know that, but it's easy to miss. Also, if you're using a JPG, make sure you are not saving it as "Progressive", these images are intended for web browsers and are not compatible with JA.

The "pink_line" is 64 x 256 and the "pink_glow2"  is 128 x 128. If it matters, I used GIMP to change the color hue of a copy of the original "yellow_line" and "yellow_glow2" and then exported them as .jpg files.

49 minutes ago, NAB622 said:

When you say no change, do you mean it is broken both ways? And what files did you use from the game assets?

There was no change to the behavior and the grey squares persisted. I pulled the "red_line" and "yellow_line" files from "gfx/effects/sabers" in the game's assets on two separate occasions (trying one at a time), deleted the old "pink_line" file (I made several backups just in case) and replacing it with the respective "line" file and renaming that "line" file to "pink_line" to ensure the code knew to grab it.

50 minutes ago, NAB622 said:

That makes sense, because the game tried to load a JPG file as a TGA. Using the wrong parser on code as fragile as JA could certainly cause a crash.

I will make sure to keep that in mind! Thank you!

53 minutes ago, NAB622 said:

Nah, this isn't a code issue. I do recall the game being very picky about the textures used in effects, or maybe I was just new to it myself at the time. But changes are certainly possible, so I don't think the code will hold your answer.

That is a relief! I do not mind debugging, but it can be tedious to look through so much code at once.

54 minutes ago, NAB622 said:

This behavior is correct. According to the Q3 shader manual, cull disable and cull none are synonymous with each other:

https://icculus.org/gtkradiant/documentation/Q3AShader_Manual/ch02/pg2_1.htm#cull

For some reason, JA added a third option called twosided, which is also synonymous with the other two. They all do the same thing.

That is also useful to know! Thank you!

55 minutes ago, NAB622 said:

This is also correct behavior, JA will try all valid file extensions on its own.

Even more useful information! Thank you again!

55 minutes ago, NAB622 said:

Unfortunately, I don't know anything about .sab files, so I won't be much help with this.

No worries, it simply sets it so that if that hilt is spawned with the "saber" command, the default color will be pink. I was trying to test and see if there was something wrong with the execution of the saberColor command.

  • Solution
Posted

Good news! I managed to fix the problem. Turns out I made a typo in the sabers.shader and that caused the error with the .jpg files. I somehow managed to type "rbg" instead of "rgb". After I corrected that, everything worked exactly as intended. Regardless, I am very appreciative of the help and solutions presented on this forum post and I firmly believe they will help me in the future as I continue learning to mod JKA.

NAB622 likes this

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...