Joshuawec Posted December 16, 2015 Posted December 16, 2015 I've been searching around for a way to do this through the console but haven't found anything about how to do it. Is it possible to spawn an npc and specify which lightsaber/weapon they will use? I'd like to spawn some npc's with different lightsaber hilts and weapns like the darksaber and different swords. Is this possible to do through the console or would i have to edit the models pk3 file?
Cerez Posted December 17, 2015 Posted December 17, 2015 As far as I know, you have to edit this in the NPC file (which is a text file) in the PK3. You can create a number of custom NPCs you use, place them in an NPC file under "ext_data/npcs/", and package it as a PK3 to place in your "base" folder. It doesn't matter if those models/skins already have an NPC file -- you can create additional NPCs for them as needed. Here's an example of an NPC: ahsoka { playerModel ahsoka saber tano saber2 tano2 saberColor green saber2Color yellow weapon WP_SABER saberStyle 0 FP_HEAL 2 FP_LEVITATION 3 FP_SPEED 2 FP_PUSH 3 FP_PULL 2 FP_TELEPATHY 2 FP_GRIP 1 FP_LIGHTNING 0 FP_RAGE 0 FP_PROTECT 2 FP_ABSORB 2 FP_DRAIN 0 FP_SEE 3 FP_SABERTHROW 0 FP_SABER_DEFENSE 3 FP_SABER_OFFENSE 3 forcePowerMax 120 forceRegenRate 100 forceRegenAmount 1 rank commander reactions 5 aim 4 move 5 aggression 5 evasion 3 intelligence 5 move 5 vigilance 0.9 visrange 2048 earshot 1024 hfov 160 vfov 160 scale 94 playerTeam TEAM_PLAYER enemyTeam TEAM_ENEMY class CLASS_JEDI sex female yawSpeed 140 walkSpeed 55 runSpeed 250 acceleration 15 snd ahsoka sndcombat ahsoka sndjedi ahsoka health 250 dismemberProbHead 5 dismemberProbArms 30 dismemberProbLegs 30 dismemberProbHands 30 dismemberProbWaist 15 moveType walk } "Weapon" holds the value you're looking for. Depending on what weapon you give the NPC, their behaviour will change also.
Fuse294 Posted December 18, 2015 Posted December 18, 2015 Cerez is correct, it's a simple thing to do just copy the original text and paste it directly below, changing anything you want along the way. Keep in mind that npcs WON'T change weapons if you plan to give the new npc more then one. Where it says weapon you can input:WP_BLASTERWP_BLASTER_PISTOLWP_SABERWP_BRYAR_PISTOLWP_THERMALWP_NOGHRI_STICKWP_TUSKEN_RIFLEWP_MELEEWP_DISRUPTORWP_REPEATERWP_BOWCASTERWP_DEMP2WP_ROCKET_LAUNCHERWP_CONCUSSIONWP_TUSKEN_STAFFWP_SCEPTER (If you're altering a force user but you may have to change the 'CLASS' to 'CLASS_REBORN' for it to work like tavion uses it.) Cerez likes this MB2 Beta Tester / MB2 FA Assistant Dev
Joshuawec Posted December 18, 2015 Author Posted December 18, 2015 Thank you both very much, I will try this out soon. Is it also possible to disable an NPC fron using force powers by changing the force options the their NPC file? There's some players id like to not use the force bacause they didn't in the movies or they arnt from Star Wars like Ganondorf.
Fuse294 Posted December 18, 2015 Posted December 18, 2015 Thank you both very much, I will try this out soon. Is it also possible to disable an NPC fron using force powers by changing the force options the their NPC file? There's some players id like to not use the force bacause they didn't in the movies or they arnt from Star Wars like Ganondorf. Just set their force abilities to 0 like so, I'll edit cerez post below to demonstrate: Any number for the powers between 0 and 3 will represent what level they will use the ability at with 0 being disabled, 1 being the weakest form and 3 the most powerful, they use them in the same way we would as the PC.As for saberstyle it works like this: 1 = Fast Style2 = Medium3 = Strong4 = Desann5 = Tavion6 = Dual7 = Staff You can group them up so you can have saberStyle 2saberStyle 5saberStyle 4 That npc will use Medium, Tavion and Desann against you. ahsoka{ playerModel ahsoka saber tano saber2 tano2 saberColor green saber2Color yellow weapon WP_SABER saberStyle 0 FP_HEAL 0 FP_LEVITATION 0 FP_SPEED 0 FP_PUSH 0 FP_PULL 0 FP_TELEPATHY 0 FP_GRIP 0 FP_LIGHTNING 0 FP_RAGE 0 FP_PROTECT 0 FP_ABSORB 0 FP_DRAIN 0 FP_SEE 0 FP_SABERTHROW 0 FP_SABER_DEFENSE 3 FP_SABER_OFFENSE 3 forcePowerMax 120 forceRegenRate 100 forceRegenAmount 1 rank commander reactions 5 aim 4 move 5 aggression 5 evasion 3 intelligence 5 move 5 vigilance 0.9 visrange 2048 earshot 1024 hfov 160 vfov 160 scale 94 playerTeam TEAM_PLAYER enemyTeam TEAM_ENEMY class CLASS_JEDI sex female yawSpeed 140 walkSpeed 55 runSpeed 250 acceleration 15 snd ahsoka sndcombat ahsoka sndjedi ahsoka health 250 dismemberProbHead 5 dismemberProbArms 30 dismemberProbLegs 30 dismemberProbHands 30 dismemberProbWaist 15 moveType walk} Cerez likes this MB2 Beta Tester / MB2 FA Assistant Dev
Joshuawec Posted December 22, 2015 Author Posted December 22, 2015 I'm having trouble saving the NPC file inside the pk3. It says its saved when I edit it but then when I hope it back up its back the original values. I'm doing it on a tablet using an app called RAR to open the pk3 and just a plain text editor for the NPC file. I play the game on my tablet using Beloko's JK3 touch port,that's why it's all being done on the table.
Fuse294 Posted December 22, 2015 Posted December 22, 2015 Make sure the pk3's aren't set to 'Read Only' otherwise it won't save over them just dump the file in another folder like My Documents. MB2 Beta Tester / MB2 FA Assistant Dev
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now