Jump to content

Randomized Saber Colors on Enemies?


Recommended Posts

I've been looking around for how to make this happen but no luck so far. I found the console command for picking up dropped sabers and thought it'd be neat to just use whatever gets dropped throughout missions, but the problem is every saber-wielding enemy just uses red and that's kinda boring. How would I go about randomizing the colors wielded by enemies, and maybe even making saber wielders more common? Obviously I'd want there to still be normal enemies but a few extra duelists sprinkled in would be cool.

 

I figured something out, I copied the .npc file for cultist_saber and added the line "saberColor    random" beneath "saber        reborn" then just pasted that file back into the npcs folder within assets1.pk3

 

This worked, when I spawned the npc using console, I spawned three just to be sure. Two had orange sabers and one had a green. So this will work, just have to do it for every saber wielding foe, named characters aside. Only concern now is that red won't be included in that random, since random is used for the random jedi npc who likely would not have red. I'd prefer no red t only red, but red as a possibility would be nice.

 

Also, I'm feeling like there's a better way for me to do this, like bundling all the npcs I change into a .pk3 but with the same names so it overwrites, and then just dropping that in Base. But that didn't work when I tried it with just the one cultist, so probably not, right?

Link to comment
  • 1 month later...

I think "random" saber colours are defined in the source code somewhere :/ im trying to do something similar in MP. I want to make every bot have their dedicated saber colour instead of it being limited to red or blue :/.If you find out how to solve your problem id be very interested to hear how you solved it. Best of luck my friend

Link to comment

I've been looking around for how to make this happen but no luck so far. I found the console command for picking up dropped sabers and thought it'd be neat to just use whatever gets dropped throughout missions, but the problem is every saber-wielding enemy just uses red and that's kinda boring. How would I go about randomizing the colors wielded by enemies, and maybe even making saber wielders more common? Obviously I'd want there to still be normal enemies but a few extra duelists sprinkled in would be cool.

 

I figured something out, I copied the .npc file for cultist_saber and added the line "saberColor    random" beneath "saber        reborn" then just pasted that file back into the npcs folder within assets1.pk3

 

This worked, when I spawned the npc using console, I spawned three just to be sure. Two had orange sabers and one had a green. So this will work, just have to do it for every saber wielding foe, named characters aside. Only concern now is that red won't be included in that random, since random is used for the random jedi npc who likely would not have red. I'd prefer no red t only red, but red as a possibility would be nice.

 

Also, I'm feeling like there's a better way for me to do this, like bundling all the npcs I change into a .pk3 but with the same names so it overwrites, and then just dropping that in Base. But that didn't work when I tried it with just the one cultist, so probably not, right?

 

I believe you can add random saberColor into the .sab file of the actual hilt that the cultists use, though I haven't tested this.

 

The other alternative you could do, is to create a cultist_random.npc file or a reborn_random.npc file, going off the jedi_random.npc.

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