Jump to content

Making sabers nonselectable in SP


Go to solution Solved by MagSul,

Recommended Posts

Posted

in assets1.pk3 lives the file ext_data\sabers\sabers.sab which contains a whole bunch of sabers which NPCs use and the player cannot. You can never use these. I see there is a key for "notInMP" but I see nothing defining if a saber is selectable in SP. Anyone know how that works?

Posted

Are you talking about in the menu?

 

The list for the sabers in the menu is in the saber.menu file found in the ui folder in assets1.pk3

 

And then in the MENUS.str in assets0.pk3, is where you put the names of the sabers. I'm not sure if this one is required to get them to show up though.

  • Solution
Posted

saber.menu is the correct file that determines whether sabers appear in the SP menu selection.

 

Tap Control+F whilst having it open in Notepad, type "single_2", and it should take you to here:

 

itemDef 

{
name hiltbut
group none
text @MENUS_HILT1
descText @MENUS_HILT1_DESC
type ITEM_TYPE_MULTI
style WINDOW_STYLE_EMPTY
rect 240 132 160 16
font 4
textscale 1
textalign ITEM_ALIGN_LEFT
textstyle 1
textalignx 0
textaligny 0
forecolor .65 .65 1 1
 
cvarTest ui_saber_type
hideCvar { "staff" }
 
cvar "ui_saber"
//FIXME: read these from sabers.cfg + *.sab?
cvarStrList
{
@MENUS_SINGLE_HILT1 "single_1"
@MENUS_SINGLE_HILT2 "single_2"
@MENUS_SINGLE_HILT3 "single_3"
@MENUS_SINGLE_HILT4 "single_4"
@MENUS_SINGLE_HILT5 "single_5"
@MENUS_SINGLE_HILT6 "single_6"
@MENUS_SINGLE_HILT7 "single_7"
@MENUS_SINGLE_HILT8 "single_8"
@MENUS_SINGLE_HILT9 "single_9"

}

 

 

In MENUS.str (Strings -> English), you also need

 

 REFERENCE YOURSABERNAMEHERE

NOTES "saber hilt name"
LANG_ENGLISH "THE NAME OF YOUR SABER"

 

Hope that helps. ^_^

 

EDIT:

 

So if you wanted to add say, Luke's saber to the menu, you'd have to add

 

@MENUS_SINGLE_LUKE "single_luke" to the list in the spoiler, and then copy the second example in the MENUs.str file.

 

Hope that's cleared it up. If it's still not making sense, there's always this fella's tutorial on the matter: Click me.

MUG likes this
Posted

 with this information could I remove the saber completely from the game or will it still default a saber to my player anyway? i really would like o know this as im stuck on changing the saber file which is not what i desire.planning to omit the player from ever using a saber for my mod.

Posted

info_player_start has a spawn flag that makes you spawn without any weapons, I think. Like in that map with Rax Joris. That will do the trick for stripping away the lightsaber.

Posted

info_player_start has a spawn flag that makes you spawn without any weapons, I think. Like in that map with Rax Joris. That will do the trick for stripping away the lightsaber.

I am aware of that but thankyou anyway :) I should of been clearer; Is their another way, so that it is a default for all maps SP and there is no gui for it, or does removing the select saber function in the gui do this for me by essentially, breaking the link of the information that saves about the Info_player and playermodel npcs... something like that. I hope you understand what I am getting at. I would try myself but i'd like not to mess with the UI files until I know how each functions properly.

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...