Jump to content

Home

The "Random" Saber Color


Shem

Recommended Posts

As in both Jedi Knight games by Raven, when you put the saber color in the NPC file as random, you get either blue, green, purple, orange, or yellow. But not red of course. What I am wondering is how you do change the programing on it. Say I want to add red to the list, how would I go doing that? Or say I want to remove orange and yellow, how would I go doing that?

Link to comment
Share on other sites

this really cannot be done by making a mod.

 

if you would like to add red to the list of random colors and you have the SDK:

 

bg_saberLoad.c has exactly what you want:

if ( !Q_stricmp( name, "random" ) ) 
{
	return ((saber_colors_t)(Q_irand( SABER_ORANGE, SABER_PURPLE )));
}

 

now, change where it says SABER_ORANGE to SABER_RED. and random now chooses red as a random color, this would probably be client mod.

 

as for adding or removing colors from the menu, well thats all ui scripting.

Link to comment
Share on other sites

this really cannot be done by making a mod.

 

That's all right. I wasn't looking to make it a mod.

 

 

if you would like to add red to the list of random colors and you have the SDK:

 

What is the SDK?

 

 

as for adding or removing colors from the menu, well thats all ui scripting.

 

I figured that out. That's something I learned when I found out how to add hilts to the menu.

Link to comment
Share on other sites

you need firstable to learn how to programm using the C programming language

and download the SDK of the game which is the C source code of some of the dynamic library launched by the main programm of the game....

 

this is like that that some mods like the RS, FM3,OJP, lugormod, mobiebattle, JA+...etc... are doing

 

SDK download

http://jediknight2.filefront.com/file/Jedi_Academy_SDK_MP;20909

Link to comment
Share on other sites

you need firstable to learn how to programm using the C programming language

and download the SDK of the game which is the C source code of some of the dynamic library launched by the main programm of the game....

 

this is like that that some mods like the RS, FM3,OJP, lugormod, mobiebattle, JA+...etc... are doing

 

SDK download

http://jediknight2.filefront.com/file/Jedi_Academy_SDK_MP;20909

 

Okay, I've downloaded the program. I've found the "bg_saber.c" file. Opening it with Microsoft Word shows me that it is 84 pages long. I've been going through just now. If anybody knows what page it is before I get back, please mention just in case I don't find it.

 

As for using it. Do you still "pk3" it the folder path in which the file is located?

Link to comment
Share on other sites

Actually I was looking at the wrong file. The file is 57 pages. I did find the script Ensiform showed me. It seems incomplete. It mentions orange and purple than returns to blue. Where are yellow and green at? Or does it matter?

Link to comment
Share on other sites

As for the only using orange and purple thing, I'm guessing that values are stored as ints, right? And the Q_irand function generates a number (colour) between these two?

 

yes correct. except they are enums with the int cast so they are ints then.

 

typedef int saber_colors_t;

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...