Jump to content

Giving npc another weapon (jk2)


Recommended Posts

Hey ya'll!

 

I'm trying to found a way to give a npc another kind of weapon, in this case Jan. I want her to weild a saber. I've understod that this is rather difficult in the jk2.

But there is a NPC called jedif already in the basegame. Is there a way to change the jan model to the jedif model, which would make Jan weild a saber. And from which i could give  new skin to and thus achieve my goal?

 

Thanks for any tips. 

Link to comment

Hey ya'll!

 

I'm trying to found a way to give a npc another kind of weapon, in this case Jan. I want her to weild a saber. I've understod that this is rather difficult in the jk2.

But there is a NPC called jedif already in the basegame. Is there a way to change the jan model to the jedif model, which would make Jan weild a saber. And from which i could give  new skin to and thus achieve my goal?

 

Thanks for any tips. 

 

Well, to get Jan into the game as Jedi all you need to do is open up your .map file in Radiant. Add in an NPC_Spawner and give it a Key: "NPC_Type" and a value: "jediF". You'll spawn Jan as a Jedi. I threw Tavion in and right when the map started she attacked Tavion. 

 

shot0258_zpsbgfjblnp.jpg

 

shot0259_zpses68xnmo.jpg

 

 

 

Now, Jan doesn't seem to have her goggles, vest, ect.. because they are turned off on that model. If you want normal Jan just create a new NPC in the NPC config file and add the jedi stuff to the normal Jan and name the new entry JediJan or something. Then, use the Npc_spawner entity with the new name.

 

 

Jan
{
fullName "Ors, Jan"
playerModel jan
rank lt
reactions 3
aim 5
move 3
aggression 3
evasion 3
intelligence 3
playerTeam player
enemyTeam enemy
class jan
snd jan
sndcombat jan
sndextra jan
yawSpeed 140
walkSpeed 55
runSpeed 200
// race human
snd jan
dismemberProbHead 0
dismemberProbArms 0
dismemberProbHands 1
dismemberProbLegs 0
dismemberProbWaist 0
}
 
JediF
playerModel jan
surfOff "torso_vest hips_chaps torso_computer head_goggles torso_comp hips_belt"
surfOn "torso_augment_off hips_augment_off hips_torso_off"
saberColor random
rank lt
reactions 3
aim 3
move 3
aggression 3
evasion 2
intelligence 3
playerTeam player
enemyTeam enemy
class jedi
yawSpeed 140
walkSpeed 55
runSpeed 200
snd jan
sndcombat jan
sndjedi jan
health 200
dismemberProbHead 0
dismemberProbArms 5
dismemberProbLegs 0
dismemberProbHands 10
dismemberProbWaist 0
}
Asgarath83 likes this
Link to comment

Thank you so much for taking time to answer my question.

 

But the thing is I don't want this to happen in a custom map but rather in the original single player campaign of outcast - is that possible?

Link to comment

Yeah...I think it should be.

 

What I think you are going to need to do is create a new NPC.config file. Your then going to change the JediF  to "Jan" and leave the rest of that entry as is. Next, delete the original "Jan" entry. Finally, create a new pk3 and add your new npc file to that pk3 and then name the pk3 file whatever you want. I usually use ZZZ_name.pk3 since the game loads pk3's alphabetically. 

 

Give that a whirl and see what happens. 

 

Jan
playerModel jan
surfOff "torso_vest hips_chaps torso_computer head_goggles torso_comp hips_belt"
surfOn "torso_augment_off hips_augment_off hips_torso_off"
saberColor random
rank lt
reactions 3
aim 3
move 3
aggression 3
evasion 2
intelligence 3
playerTeam player
enemyTeam enemy
class jedi
yawSpeed 140
walkSpeed 55
runSpeed 200
snd jan
sndcombat jan
sndjedi jan
health 200
dismemberProbHead 0
dismemberProbArms 5
dismemberProbLegs 0
dismemberProbHands 10
dismemberProbWaist 0
}
 
Link to comment

ok, did what you wrote and I've achieved this before. 

 

Jan recieves a saber but is still holding a invisible blaster and the animation for holding a blaster. But by the looks of it, it's a saber shooting lasers.

 

Any thoughts? 

Link to comment

http://jkhub.org/tutorials/article/146-the-basics-of-npc-files/

 

Try this :

 

Jan
{
playerModel jan
surfOff "torso_vest hips_chaps torso_computer head_goggles torso_comp hips_belt"
surfOn "torso_augment_off hips_augment_off hips_torso_off"
saber        kyle
saberColor    blue
weapon    WP_SABER
saberStyle    
1
saberStyle    3
saberStyle    2
FP_HEAL            1
FP_LEVITATION    2
FP_PUSH            2
FP_PULL            1
FP_GRIP            0
FP_LIGHTNING    2
FP_PROTECT        2
FP_ABSORB        2
FP_SEE            2
FP_SABERTHROW    2
FP_SABER_DEFENSE 3
FP_SABER_OFFENSE 3
forceRegenRate        150
forcePowerMax        90
rank lt
reactions 3
aim 3
move 3
aggression 3
evasion 2
intelligence 3
playerTeam player
enemyTeam enemy
class jedi
yawSpeed 140
walkSpeed 55
runSpeed 200
snd jan
sndcombat jan
sndjedi jan
health 200
dismemberProbHead 0
dismemberProbArms 5
dismemberProbLegs 0
dismemberProbHands 10
dismemberProbWaist 0
}
 
don't know if it works for outcast...
If jan still hold a blaster, that means there is a script that force her to take a blaster.
Asgarath83 likes this
Link to comment

 

http://jkhub.org/tutorials/article/146-the-basics-of-npc-files/

 

Try this :

 

Jan
{
playerModel jan
surfOff "torso_vest hips_chaps torso_computer head_goggles torso_comp hips_belt"
surfOn "torso_augment_off hips_augment_off hips_torso_off"
saber        kyle

saberColor    blue

weapon    WP_SABER

saberStyle    

1

saberStyle    3

saberStyle    2

FP_HEAL            1

FP_LEVITATION    2

FP_PUSH            2

FP_PULL            1

FP_GRIP            0

FP_LIGHTNING    2

FP_PROTECT        2

FP_ABSORB        2

FP_SEE            2

FP_SABERTHROW    2

FP_SABER_DEFENSE 3

FP_SABER_OFFENSE 3

forceRegenRate        150

forcePowerMax        90

rank lt
reactions 3
aim 3
move 3
aggression 3
evasion 2
intelligence 3
playerTeam player
enemyTeam enemy
class jedi
yawSpeed 140
walkSpeed 55
runSpeed 200
snd jan
sndcombat jan
sndjedi jan
health 200
dismemberProbHead 0
dismemberProbArms 5
dismemberProbLegs 0
dismemberProbHands 10
dismemberProbWaist 0
}
 
don't know if it works for outcast...
If jan still hold a blaster, that means there is a script that force her to take a blaster.

 

this is the faster way, withut editing the map.

remember the weapon WP_SABER filed on the NPC file. it's important.

otherwise you can decompile the spawnscript of Jan with dehaved and give it SET_WEAPON WP_SABER as script and rebuild with behaved.

the first change ALL Jan Npc making she as saberist

Link to comment

don't understand why people give difficult solutions when modifying the npc file is so easy.

 

first, try to change the npc file. If it doesnot work, the easier second way is to ask someone (or do yourself) to modify the script(s) which give Jan a weapon.

With a piece of luck, there is only one script that is used to give jan the weapon on all maps.

Using entity modding (agent Jones) is not efficient because you must do that for EACH map -> lot of time and complicated.

 

 

Why people say  "use a hammer" to kill a single bee ?

Link to comment

otherwise you can decompile the spawnscript of Jan with dehaved and give it SET_WEAPON WP_SABER as script and rebuild with behaved.

You're right, I forgot about devaheb.

 

Why people say  "use a hammer" to kill a single bee ?

It is not a solution if it isn't overly complicated :P

Link to comment

or could someone do this for me?  :rolleyes:

Download the JA sdk tools and use dehaved for open the spawnscript of Jan on Kejim map. :) and you edit it and rebuold it with behaved.

otherwise you use pakscape for extract by pk3 files the jan.npc and set it like the post of Clan FJA

Or you do what you told irocjeff and work on the debuilded map replacing the jan npc spawn entity with a npc spawner of a custom jan npc, but you need q3map2 and radiant for do it.

 

the faster way is simply to edit the NPC file of jan, it's on ext_data/npcs folder of gamedata assest.PK3 of Jedi outcast  you need pakscape or winzip for open pk3. you can edit the NPC file with notepad.

That's is pretty easy. build and edit Npcs it's the ABC of the jKA modding.

Link to comment

so.. how do I do this? im a noob wannabe modder on a mac trying to modify outcast SP lol

I don't know if behavED has been ported on Mac yet. Anyway, here's the steps:

-Download DEvaheB: http://jkhub.org/files/fi814-devaheb/ (but it's an .exe. Maybe you could open it with a VM)

-Download BehavED : http://jkhub.org/files/file/1491-jk2-software-development-kit-editing-tools-20/ (see above)

-Extract the JO scripts from assets0.pk3

-Open the scripts of the first missions with DEvaheB.

-when you see the line "set ( "SET_WEAPON", "WP_BLASTER" );" affecting Jan, change WP_BLASTER to WP_SABER. There's one in scripts\kejim_post\jan_control_booth2.ibi

-save your new .txt file.

-Compile it with BehavED

-Place your new .ibi in a new pk3 file in base, under the same directory you took the original from.

 

With a piece of luck, there is only one script that is used to give jan the weapon on all maps.

There isn't a single script for everything. Jan switches weapons when opening doors/hacking...

Link to comment

ok, im getting improvements but there still a few things i need to figure out. 

 

1. Jan gets a saber after the first time she's in the first control booth on the first map, BUT - she can't use it, she just stands still and deflects laser shots from stormies. She can follow, do some forcejumps. But not much more than that. 

 

So, is it possible to add the same script in the beginning of the map upon spawning and make Jan able to use it? :)

 

Thank you all for your responses, they've been really helpful.

Link to comment

Kejim_start is the name of the script your going to use or modify since this script is targeted to Kyle and triggers when he spawns.  It has an entry for Jan where it changes her aim to 4 which is where you'll make all of your changes  for her. You could probably just delete the line in the control script that gives her a blaster just recompile it. You don't need to give her another saber since it'll switch back attack position or whatever when the typing animations are done.

 

You can also see it gives Kyle "0" for his force abilities. You may want to give Jan some of those attributes if you like.

 

I just have a thought here. Since Jan is a normal NPC in game and is treated like one with the waypoint system and combat points, how will giving Jan Jedi AI affect all that stuff, if at all?

Link to comment

I'm having problem making it work, could you show me what script to put in and exactly where?

 

I'm adding for example set ( "SET_WEAPON", "WP_SABER" ); after aim to 4, but nothing happens. 

Link to comment

I'm having problem making it work, could you show me what script to put in and exactly where?

 

I'm adding for example set ( "SET_WEAPON", "WP_SABER" ); after aim to 4, but nothing happens. 

have you clicked on Build Botton of behaved for recompile the script? past here the script that you are editing.

Link to comment

I'm having problem making it work, could you show me what script to put in and exactly where?

 

I'm adding for example set ( "SET_WEAPON", "WP_SABER" ); after aim to 4, but nothing happens. 

 

 

I just added the line into the script, saved it to my desktop and recompiled and got errors. You are  going to have to go in and change all the occurrences of "56"

into "flush" or "insert". Its more than likely that its "flush". You are also going to run into errors with the color security code script  and the "IF Else" statements. You are going to have to figure out what "6" is in relation to those specific occurrences. It is either a FLOAT, STRING, or VARIABLE. So, every occurrence of "6" needs to be changed until you get that right and then it should compile with no errors. 

 

Then, when you get all that compiled properly with no errors you'll save the file as as kejim_start.ibi and this file will go into a pk3 with the following heirarchy.

 

A folder named "scripts"

Inside that folder will be one called "kejim_post"

inside that folder will be your kejim_start script file

 

Then, name the pk3 file  x_JanSaber.pk3 or whatever you want .pk3. Then, put that pk3 in your base folder and start the game. 

Link to comment

wow, haha we'll see we what Ill be able to do.

 

What I'm really doing is converting SP into a prequel gameplay with mace windu as kyle, Jan supposed to be Shaak Ti with a saber if I could get it working. Replacing most of the npc's to prequel characters. TFdroids, jedis in to prequel jedis, luke-yoda and more. 

 

I've played JA and JO alot when I was younger, in clans and RP but I found the ol' game once again and wanted to make a cool SP scenario. 

 

thanks for all the help, ill check into the script when I have time

Link to comment

Yeah, its a pain in the ass. When you decompile scripts some stuff turns to a number for some reason. Then, Behaved doesn't know what 56 or 6 or whatever number of those things are so they need to be fixed. 

 

Take a look at the Prequel Conversion Mod and see if that will help you out doing yours for Jedi Outcast.

Link to comment

love that prequel conversion mod, it's for JA if i'm not mistaken. For some time ago there was a prequel conversion mod that even had voiceovers on kyle and luke for JA. But can't find it anywhere. Suppose some of the authors of parts of the material used might refused to have it released..

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