Jump to content

Help Adding Another Lightsaber Slot


Recommended Posts

I am fairly new to Jedi Knight modding, but I have already looked around a lot and it doesn't seem like anyone has already made what I'm looking for. What I'd like is just another lightsaber slot for Jedi Academy single player, my idea was that I could enable g_saberpickuppabledroppedsabers and then pick up and exchange dropped sabers while always having access to my original. I didn't think it would be too hard, and I've learned enough to know how to modify weapons.dat and items.dat and put them in a pk3, but I wasn't able to actually add another lightsaber with just those two files obviously. I also got the source code for the game and OpenJK, and started looking at the C++ files, but I'm only just learning the language so not much of it was making sense. Also I tried compiling the OpenJK source code with CMake and Visual Studio and I'm pretty sure it worked fine, but I don't really understand what to do with the .dll files yet.

So, does anyone know how hard it would be to add another slot for a lightsaber, and the steps to doing it? Or if a mod like that has been done before and maybe I'm just missing it?

Thank you

Link to comment
  • 2 months later...
On 6/15/2020 at 6:28 AM, Jim_Draven said:

I am fairly new to Jedi Knight modding, but I have already looked around a lot and it doesn't seem like anyone has already made what I'm looking for. What I'd like is just another lightsaber slot for Jedi Academy single player, my idea was that I could enable g_saberpickuppabledroppedsabers and then pick up and exchange dropped sabers while always having access to my original. I didn't think it would be too hard, and I've learned enough to know how to modify weapons.dat and items.dat and put them in a pk3, but I wasn't able to actually add another lightsaber with just those two files obviously. I also got the source code for the game and OpenJK, and started looking at the C++ files, but I'm only just learning the language so not much of it was making sense. Also I tried compiling the OpenJK source code with CMake and Visual Studio and I'm pretty sure it worked fine, but I don't really understand what to do with the .dll files yet.

So, does anyone know how hard it would be to add another slot for a lightsaber, and the steps to doing it? Or if a mod like that has been done before and maybe I'm just missing it?

Thank you

the more easy way for do that, should be edit the code for add a new weapon and program the new weapon for be a duplicated of lightsaber, that call the same identical code functions of the original WP_SABER for work. something like a WP_SABER2.

You can follow my old tutorial about add a new weapon on Single player. Remember that your saber need to use the same fire function of lightsaber if you want it work properly. but that is an experiment that can have some risk. lightsaber is a very specific weapons with some unique features. i am not sure if all the lightsaber code functionality for swings and damage is all called by the fire function of the lightsaber weapon. there is also another trouble. WP_SABER is binded to an external SAB library. and that should be apply also to the new weapon. you need to link to the lib of SAB files ALSO the new saber weapon you will create. if not, you will have a serious amount of trouble cause you cannot customize the new saber weapon and also it will not work fine.

 

Link to comment

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