View Full Version : forceMasteryLevels, GUI

06-08-2002, 10:13 AM
I've implented a new force mastery level, it works like it's supposed 2 but the only thing that needs to be added is the selectable name in the ui/cgame side, right now there is no name for it but u can select it.

In the menu files u can see that the forcemastery levels are drawn from UI_FORCE_RANK (ownerdraw) so i searched the code for that ui/cgame/game but i can find no direct function where u can add your description name for the newforcemasterylevel, so if i want to name my new force "Jedi Bob" where would i do that.

Do not get me wrong the code works i just want to know where i can enter my for selectable name. Anybody who knows this?

06-08-2002, 10:36 AM
i ve worked a little with owner draw (for my mod ..)
and in ui.dll

there is a function in main.c

static void UI_OwnerDraw

it s a big switch....and it launchs
the diferent functions....

so line 2639 (well i added a few lines so .....)

case UI_FORCE_Rank:
UI_DrawForceMastery(&rect, scale, color, textStyle, uiForceRank, 0, MAX_FORCE_RANK, iMenuFont);

so you should work with this function UI_DrawForceMastery

wich is line 1170 in ui main.c

hope that helps ....

06-08-2002, 10:42 AM
why would this help?, i just want to trace back where the ui names "jedi knigt/jedi padawan" etc are defined.

PS: my post isnt meant to offend you

06-08-2002, 11:04 AM
well it is this function that is called when the JEDI / PADAWAN ... are drawed ...

it may be a hint it is the function
wich draws the JEDI/....and it s this one which should be able to draw Jedi BOB

some of the parameters are :
uiForceRank, 0, MAX_FORCE_RANK, iMenuFont

so the variable is uiforcerank (you should add your's into it)
from 0 to MAX_FORCE_RANK and it's displayed in the box rect
(defined by the .menu)
with the font iMenuFont ....

so you must trace

btw no offense taken ...
(i m still not sure it s going to help you lol but i m trying....)

06-08-2002, 11:09 AM
I already knew that mon ami, the thing is that nowhere in the source code there is something defined like this mastert7 = jedi master, mastery6 = jedi knight, the mastery[i] is just passed to the ui as uiforcerank/ui_max_force_rank, but not defined.

Blehhhhhhhhhhhhhh, i hate rewriting functions.....

06-08-2002, 11:50 AM
look in assets1.pk3 in the directory called strip
the .sp files there have all the strings that are used by the game

06-08-2002, 03:09 PM
Thank you, there are a few skill refs in there but those are only for the singleplayer skill aka skill5 = nightmare skill in sp, other then that i can find no refs in those files, btw they are in assets2.pk3