This tutorial will teach you how to integrate any hilt of your choice into the SP menus and correctly modify the string files. For low to mid experienced modders, you may use any hilt you want to follow the tutorial. For non-experienced modders, I've included a custom hilt made by me, just download it:
Programs we are going to need:
- Notepad and
Additionally, I've attached the final .pk3 file here, just so you can take a look at mine in case your own doesn't work and see what faults you've done!
We are going to do some preparations:
First, create a new folder directory on your desktop and name it "base". It's not really important but it's always good to keep the files organized and know where exactly they need to be when you pack it up into a pk3 file.
Then open up the zz_RevanSab.pk3 from the downloaded mod I attached up above and copy all three folders into the "base" folder we previously created.
Once you've done so, additionally, create two more folders and name them "strings" and "ui" respectively.
Open up the "strings" folder and create one more directory, name it "English".
Now we just need to copy some more files from the original assets files of the game: Namely, open up assets1.pk3, go into the "ui" folder and copy over the saber.menu file.
Then open up assets0.pk3, open the "strings" folder, open the "English" folder and copy over the menus.str file.
HINT: Right click on each of the two files you copied from the assets and un-check the "Read Only" checkbox! If you don't, you won't be able to save the modifications to the file!
That's it for the preparations! I hope it wasn't that hard. Now there's just a little bit of editing left, I'll divide the process down into a few parts to make it understandable a bit more.
1. First, the game needs to know which saber we want to integrate into the menus
- Take a look into your ui folder we created and open up the saber.menu file in Notepad, which we copied over from the assets earlier.
- hit ctrl + f. This will (or schould) open up the search box and search for "single_hilt1", you schould see something like this:
//FIXME: read these from sabers.cfg + *.sab?
As you can see, here's the 9 single hilts already in-game. Copy-paste the last line and change the number 9 in both cases to 10, the modified lines schould look like this:
Save and close.
2. .SAB File editing
Well, we've decided to go with the style of the already integrated sabers, so we need to modify the .sab file a bit. Go into ext_data/sabers and rename "revan.sab" to "single_10.sab" in Notepad.
Do a full copy-paste of everything inside the .sab file!
See the line where "revan" stands? change it to "single_10".
See the line where "Revan's Lightsaber" stands? change it to @MENUS_SINGLE_HILT10
The final look of the file:
Save and close.
3. Final editing step: Letting the game know what name you want to appear in the menus
So, open up strings/english/menus.STR in notepad. Hit ctrl + F and search for "SINGLE_HILT1"
You schould find lines that look like these:
NOTES "saber hilt name\n"
NOTES "saber hilt name"
NOTES "saber hilt name"
So scroll down to SINGLE_HILT9, copy all three lines and paste them just bellow LANG_ENGLISH "Firebrand"
Rename the SINGLE_HILT9 to SINGLE_HILT10 and change the name "Firebrand" to "Revan", you schould have something that looks kinda like this:
One last time, save and close!
4. Packing up and having fun!
Open up the zz_RevanSab.pk3 you downloaded. We will pack the modified files together with my created files, so the saber will work like it schould.
Easy enough, with packscape just import the strings and ui folders and you schould have something that looks like this:
In any case, I like to check the imported files anyway if they really are the modified ones.
After that, just save the .pk3, copy it to your base folder and try it out!
That's it for the process, have fun integrating your own hilts of choice into the menus!
- For staff hilts, instead of searching for SINGLE_HILT1 you search for STAFF_HILT1 on all occasions in this tutorial.
- YOU DO NOT NEED TO FOLLOW THE SAME STYLE I USED! For example, you could also make your saber integrated with using a line like @MENUS_REVANSABER, but keep in mind that you also need to apply that to each line where @MENUS_SINGLE_10 would stand. But I reccomend doing so, just to keep things really working, non-confusing and organized as it schould be.
- If you've got trouble getting it to work, I bet it's a fault in either one of the file/folder names or you did mistakes in the line writing. Please be sure to look at my screenshots to see how the correct way looks like!
- There are no real restrictions to what names you can use, just be sure to use english characters to avoid getting wierd ones showing up instead of them in-game!
- Keep in mind that files must not overlap with other mods! So if another mod uses the name single_10, you schould avoid using that name. Try it with something like single_010 or single_10_ in that case. Also, only one SP Menu support mod will work at a time, unless you modify and combine the sabers.menu and menus.str files yourself!
That's all folks! May the Force be with you!