Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsJedi Outcast and Jedi Academy Editing Forum → New way to do custom NPCs
New way to do custom NPCs
2002-07-26, 11:28 AM #1
On page 24 of the ICARUS manual it says that an entity's behavior is determined by it's weapon. If you simply want a stormtrooper to fight like a jedi and use a saber write a script like this:

set ( /*@SET_TYPES*/ "SET_WEAPON", /*@WEAPON_NAMES*/ "WP_SABER" );

In JK2Radiant add to your stormtrooper npc, key: spawnscript value: nameofscript

Another example: How to make a new reborn character with Tavion force powers.

Extract the NPC.cfg file form assets0 and put it in your gamedata folder. The file you extracted should be in a folder named ext_data. Go to the properties of the NPC.cfg file and uncheck read only. Open up the file and copy all of RebornBoss and paste it right bellow. Now rename RebornBoss to newreborn.
Do not rename the playermodel! Go to class and change it from reborn to tavion. Adjust his reactions, aim, evasion to 5. Increase his health to 350. Save it. Select your ext_data folder in your gamedata folder and make it a pk3 file. Create a new folder and name it NEW. Put your pk3 file inside of it. In Radiant put an NPC_spawner in your map. Add Key: NPC_type value: newreborn. If you were to just do the above your reborn would be standing there using his saber as a rifle. You need to put a saber in his hand for him to behave like a jedi. Add this to your NPC_spawner, key: spawnscript value: newreborn. Compile your map. Now for the script use this:

set ( /*@SET_TYPES*/ "SET_WEAPON", /*@WEAPON_NAMES*/ "WP_SABER" );
set ( /*@SET_TYPES*/ "SET_FORCE_JUMP_LEVEL", /*@FORCE_LEVELS*/ "3" );
set ( /*@SET_TYPES*/ "SET_FORCE_PUSH_LEVEL", /*@FORCE_LEVELS*/ "3" );
set ( /*@SET_TYPES*/ "SET_FORCE_PULL_LEVEL", /*@FORCE_LEVELS*/ "3" );
set ( /*@SET_TYPES*/ "SET_FORCE_SPEED_LEVEL", /*@FORCE_LEVELS*/ "3" );
set ( /*@SET_TYPES*/ "SET_FORCE_GRIP_LEVEL", /*@FORCE_LEVELS*/ "3" );
set ( /*@SET_TYPES*/ "SET_FORCE_LIGHTNING_LEVEL", /*@FORCE_LEVELS*/ "3" );
set ( /*@SET_TYPES*/ "SET_SABER_THROW", /*@FORCE_LEVELS*/ "3" );
set ( /*@SET_TYPES*/ "SET_SABER_DEFENSE", /*@FORCE_LEVELS*/ "3" );
set ( /*@SET_TYPES*/ "SET_SABER_OFFENSE", /*@FORCE_LEVELS*/ "3" );

Save the script as newreborn and compile it. The reason we're increasing the force powers is because we're using Tavion's and she's not a Master yet.

Don't forget to select your mod at the startup screen. I'm still doing tests on this. Let me know how it works.


[This message has been edited by Mercenary (edited July 26, 2002).]

[This message has been edited by Mercenary (edited July 26, 2002).]
2002-07-26, 11:38 AM #2
it aint really new, but [http://forums.massassi.net/html/cool.gif] to you for bringing it up and this point in time

------------------
Shaving is not a high priority with Jedi.
Would you want to shave with a lightsaber?
Shaving is not a high priority with Jedi.
Would you want to shave with a lightsaber?

I don't like quake, never liked quake, and don't like Star Wars quake. So basically jk2mp.exe never gets used on my computer.
2002-07-26, 11:46 AM #3
I tried so many other tutorials and they didn't work for me. And I'm not the only one either. I don't mean to knock other people's tutorials because without them I couldn't have figured out this way. This way should work for everyone.

This is a hot topic on other forums too. If others knew about this way they should have said so before. Many have spent hours and hours of frustration on other tutorials.
2002-07-26, 12:00 PM #4
well basically, they have... like in the early threads (on jk2.net forums) about the new npc way (with the .npc file and the crazy name ****), a few people, even RichDiesel, were like, why not just change the parameters in a script?

i guess it just depends on how the mapper/editor wants to go about doing it

------------------
Shaving is not a high priority with Jedi.
Would you want to shave with a lightsaber?

[This message has been edited by Michael (edited July 26, 2002).]
Shaving is not a high priority with Jedi.
Would you want to shave with a lightsaber?

I don't like quake, never liked quake, and don't like Star Wars quake. So basically jk2mp.exe never gets used on my computer.
2002-07-26, 1:46 PM #5
I wish I'd known before. Live and learn I guess. But with my way you don't need to create a newnpcs.npc file and none of the existing npcs are affected. And another thing is Reborns don't have the lightning force. I tried giving reborns the use of lightning through scripts but it would never work. With tavion's or desann's force class you can use lightning and it can be modified with scripts. My point is sometimes scripts are not enough.

[This message has been edited by Mercenary (edited July 26, 2002).]
2002-07-26, 2:54 PM #6
well i plan on using .npc files AND scripting

------------------
Shaving is not a high priority with Jedi.
Would you want to shave with a lightsaber?
Shaving is not a high priority with Jedi.
Would you want to shave with a lightsaber?

I don't like quake, never liked quake, and don't like Star Wars quake. So basically jk2mp.exe never gets used on my computer.
2002-07-26, 4:20 PM #7
Okay...that works, but, um, what if I want an entirely new Jedi with a new skin and model and don't want to replace an old one?
Bassoon, n. A brazen instrument into which a fool blows out his brains.
2002-07-26, 4:59 PM #8
Good question Emon. I'm going to try to figure it out soon. If you want to go ahead and try it now, this is how I think it might have to be done. Let's say you created a new skin and model and you have all the jpegs and model files named properly. Copy and paste the jeditrainer's info in the npc.cfg. Rename jeditrainer to whatever you want and rename the playermodel using the name of the model you created. When you make your pk3 file, your model,related files and jeditrainer's animation.cfg, animsound.cfg and sound.cfg should be in a file path like this models\players\nameofnpc. Don't forget your ext_data folder and npc.cfg file should be in your pk3 file as well.
Write a script putting a saber in his hand when he spawns. Again, I'm just guessing right now. I haven't tried it yet. Don't send me hate mail if it doesn't work. I am going to try it this weekend sometime.



[This message has been edited by Mercenary (edited July 26, 2002).]
2002-07-27, 8:07 AM #9
I tried putting in a custom model and skin. I used Darth Vader. He did appear in my map but his saber is stuck in his body. Everything else worked, his custom sounds in all.

Vader
{
playerModel vader
saberColor red
rank captain
reactions 3
aim 3
move 5
aggression 3
evasion 5
intelligence 5
hfov 160
vfov 160
scale 135
height 78
crouchheight 42
width 18
playerTeam enemy
enemyTeam player
// race human
class desann
yawSpeed 120
walkSpeed 55
runSpeed 200
snd vader
sndcombat vader
sndjedi vader
health 500
dismemberProbHead 10
dismemberProbArms 35
dismemberProbLegs 10
dismemberProbHands 50
dismemberProbWaist 10
}

In the pk3 file the path looks like this models\player\vader and for his custom sounds sound\chars\vader. I used Vader's animsounds.cfg. Basically, every bit of data you put in your pk3 file has to be put in folders the same way it would appear in the assets0.pk3.

Someone did put Vader in a sp map. I don't remember what the name is but if you have it open it up and see how he configured the npc.cfg file. I don't think you have to replace an existing character though.

If someone knows how to fix the saber problem I mentioned above please let me know.

[This message has been edited by Mercenary (edited July 27, 2002).]
2002-07-27, 9:03 AM #10
You're a little behind. My tutorial works flawlessly, there's nothing wrong with it. I fixed that loong ago.
Bassoon, n. A brazen instrument into which a fool blows out his brains.
2002-07-27, 10:39 AM #11
i thought you've been having unexplained troubles with your method emon?
Shaving is not a high priority with Jedi.
Would you want to shave with a lightsaber?

I don't like quake, never liked quake, and don't like Star Wars quake. So basically jk2mp.exe never gets used on my computer.
2002-07-27, 12:03 PM #12
Ya Emon. What about all those posts you made about you having trouble with your npcs. Very interesting. Now your method is flawless? What about all those threads on various forums of people who can't get your tutorial to work. Do you spend your free time going around antagonizing people on internet forums? If that's the case you need to get a life.

There's something you have to realize. The file paths are the same in both my way and yours. When you start your mod it recognizes the folder path and consequently understands what it should be looking for and what it should do with it. I have no experience with taking custom made models and skins and putting them into sp maps. I never claimed to have figured that part out. But I've seen it done and by the way I've never seen it done with your method.

This method is far more advanced than yours. This way you don't have to make a complete new stormtrooper to have him behave like a jedi. And when you're ready to submit your work it's all together in one place in a pk3 file.

[This message has been edited by Mercenary (edited July 27, 2002).]
2002-07-27, 1:06 PM #13
1. I had some problems, but it works now. Cause of problem is unknown.

2. Most people who have had problems are newbs who don't know how to name the file or load a mod. Sine's gotten my method to work fine, as well as studman and a ton of other people.

3. I know, it's easier your way to give a stormtrooper a lightsaber. That wasn't the point of my tutorial. The point of my tutorial was to show you how to make one that would also work for entirely new models.
Bassoon, n. A brazen instrument into which a fool blows out his brains.
2002-07-27, 1:50 PM #14
Good I'm glad we cleared that up. From what I learned, I think you have to rename an existing model_default.skin to get a custom made skin(Vader for example) to work properly. You have to rename all the jpegs in the file. I was looking at the sp map called the Mainframe and the guy renamed all the jpegs in Desann's model_default.skin. I think you have to do something to that effect.

I did try your way Emon and I got the same result, Vader's light saber is stuck in his body.

[This message has been edited by Mercenary (edited July 27, 2002).]
2002-07-27, 2:58 PM #15
I got it! It's so easy it's a joke. I should have followed my own tutorial, don't rename the playermodel! If you already have Vader installed in your base folder you don't have to touch his files at all. Keep them where they are.

Put this in your npcs.cfg file. You don't have to replace anyone.

Vader
{
playerModel desann
saberColor red
rank captain
reactions 3
aim 3
move 5
aggression 3
evasion 5
intelligence 5
hfov 160
vfov 160
scale 135
height 78
crouchheight 42
width 18
playerTeam enemy
enemyTeam player
// race human
class desann
yawSpeed 120
walkSpeed 55
runSpeed 200
snd vader
sndcombat vader
sndjedi vader
health 500
dismemberProbHead 10
dismemberProbArms 35
dismemberProbLegs 10
dismemberProbHands 50
dismemberProbWaist 10
}

Make a script to put a saber in his hands and you're all set. The problem I had before was caused by me changing the playermodel to vader.
2002-07-27, 3:24 PM #16
Sorry my mistake. I apologize. Vader does replace Desann somehow. Can someone please help me out with this? I want to put Vader in the game without replacing Desann.
2002-07-27, 4:13 PM #17
Again I f*cked up. The playermodel has to be vader in this case.

I had a bullSh*t map/mod that was screwing around with my game. When I thought I was getting results I really wasn't. Do not download the sp map called the mainframe. It will permanently change Desann into Vader until you take it out of your base folder. Although it's cool to fight Vader in the Yavin_Final you shouldn't have to replace any Character.

So now I'm back to square one, Vader with his saber stuck inside of him.

↑ Up to the top!