PDA

View Full Version : spawn custom characters within a custom map


ihavedirt
07-12-2002, 04:38 AM
Okay, this is using JKRadiant for my SP test map spawning a custom npc titled "jedibeau"

Created a trigger_once entity:
classname trigger_once
spawnflags 1
target spawn_jedibeau

Created a NPC_spawner entity:
classname NPC_spawner
npc_type jedibeau
spawnscript test/spawn_jedibeau
targetname spawn_jedibeau

Created customnpcs.npc in ext_data:
jedibeau
{
playerModel jedibeau
saberColor blue
rank captain
reactions 5
aim 5
move 5
aggression 5
evasion 5
intelligence 5
hfov 160
vfov 160
playerTeam player
enemyTeam enemy
class luke
yawSpeed 140
walkSpeed 55
runSpeed 200
snd morgan
sndcombat morgan
sndjedi morgan
health 100
dismemberProbHead 10
dismemberProbArms 35
dismemberProbLegs 10
dismemberProbHands 50
dismemberProbWaist 10
}

Placed spawn_jedibeau.IBI in scripts\test

Placed test.bsp in maps

Placed jedibeau model in models\players\jedibeau
// make sure your model_default.skin jpg links link to your newly renamed jedi or st model etc

ihavedirt
07-12-2002, 05:05 AM
for more information about creating customised characters (npcs), here are the original threads that this was discussed in:

"How do I get my editting npcs.cfg to work in-game?"
http://64.246.44.70/~lucasforums.com/showthread.php?s=&threadid=66494

"New custom Npcs are possible"
http://64.246.44.70/~lucasforums.com/showthread.php?s=&threadid=68203

hope that helps

~* beau *~
ihavedirt@hotmail.com

RichDiesal
07-12-2002, 05:14 AM
Why don't you just edit the original NPCs.cfg file and change the models? Seems a lot easier...

Darth Jello
07-12-2002, 05:20 AM
LOL!

Rich, always trying to outsmart people (and usually succeding)

:p

RichDiesal
07-12-2002, 05:30 AM
It's not outsmarting... it just seems like a lot of extra unnecessary effort unless you specfically need more than 40 or 50 NPCs in your map.

Emon
07-12-2002, 05:36 AM
HUGE PROBLEM with this method. The custom NPC will NOT work, I repeat will NOT work once it is inside a mod PK3, which you'd need for a good SP level. It only works outside of the PK3 in your base\ext_data folder, which is useless to a good leveler who doesn't want to put files other than the PK3 on people's PCs which could overwrite a person's other files. The weequayNPCname thing also does not work inside the PK3 if modifying NPCs.cfg instead of making a .NPC

What SORT of works is just using NPCname instead of stuff like weequayNPCname. Only problem is the gun is in the crotch. It's easy to change the weapon with ICARUS, but it's still in the crotch. I'm hoping he'll have an answer for either method soon.

And Rich, yes that would work, but neat editors like myself want to make new NPCs without replacing old ones. :) And actually, I'm planning on having over 50 new NPCs anyways.

RichDiesal
07-12-2002, 05:38 AM
Big mod, eh? :) You planning on having over a 70mb download for models alone then? :p

Emon
07-12-2002, 05:41 AM
Level/mod, there's mod aspects to it, too (BlasTech DH-17 replaces Bryar, SFX enhancements, etc). Many of the NPCs don't need new models or skins... Like if I wanted a more intellegent Stormtrooper or weequay w/o replacing an old one.

volrathxp
07-12-2002, 07:36 AM
Originally posted by Emon
HUGE PROBLEM with this method. The custom NPC will NOT work, I repeat will NOT work once it is inside a mod PK3, which you'd need for a good SP level. It only works outside of the PK3 in your base\ext_data folder, which is useless to a good leveler who doesn't want to put files other than the PK3 on people's PCs which could overwrite a person's other files. The weequayNPCname thing also does not work inside the PK3 if modifying NPCs.cfg instead of making a .NPC

What SORT of works is just using NPCname instead of stuff like weequayNPCname. Only problem is the gun is in the crotch. It's easy to change the weapon with ICARUS, but it's still in the crotch. I'm hoping he'll have an answer for either method soon.

And Rich, yes that would work, but neat editors like myself want to make new NPCs without replacing old ones. :) And actually, I'm planning on having over 50 new NPCs anyways.

now i put it in the npc in a pk3 and it worked but for some reason wasn't finding the eyes or mouth texture for the character (the Han Solo model).

haven't tried it in a mod yet... will do... hmm.. :cool:

Emon
07-12-2002, 07:49 AM
Placing the ext_data folder inside your mod folder fixes this problem.

studman0201
07-12-2002, 08:37 AM
Rich Deisal take this example. Say you have 2 mods that replace the Stormtrooper. 1 into a clonetrooper the other into a wookiee. The two levels will conflict so you can't play them the way the author intended and the multiplayer models will be different also. So this is a much more proffessional way

RichDiesal
07-12-2002, 09:57 AM
Actually, you're wrong. If they are both loaded as MODs instead of simple maps (as all SP maps really should be, as its much more... ah yes... professional), then they will not conflict at all.

Level/mod, there's mod aspects to it, too (BlasTech DH-17 replaces Bryar, SFX enhancements, etc). Many of the NPCs don't need new models or skins... Like if I wanted a more intellegent Stormtrooper or weequay w/o replacing an old one.
But if you wanted to change specific aspects of its (like visrange and agression and such) that can all be down with simple scripting... and would be (most importantly, at least to me) much less time consuming than dealing with making new NPCs... make a script, set spawnscript, done... wouldn't that be much easier? :)

And if you do it as a mod and want to change all of their settings, you can just change their settings in your mod's npcs.cfg...

Just don't see why you want to go to so much extra unnecessary effort. :p

studman0201
07-12-2002, 10:01 AM
There are also not enough jedi and enemy jedi to go around so if you want many jedi then new npcs is the way to go. Plus it is easier and allows better customization

RichDiesal
07-12-2002, 10:06 AM
There are 14 seperate light and dark Jedi, by my count, in the NPCs.cfg... you're making a level that needs more? You're going to need to redefine scripts for all new NPCs anyway, just like you would for replacing one... so there's no more work involved... less, if anything...

And you still haven't defined "better" in any way that I can actually determine... unless by "better" you mean "more difficult" in which case yes, you're right.

I admit, this will indeed be useful for people making true mods, groups of 6 or 7 maps, but there is no map out now (and I doubt any map that will come out for a few months, if not more) that could possibly benefit from this information.

I suppose what I'm really puzzled over is why so many people act like it's a godsend when only 5 or 6 in the entire community might even use it for any good at all (Emon possibly being one of them... though we will see about that. ;))

:)

Emon
07-12-2002, 10:11 AM
Rich, what was that part about reassigning scripting or something?

Making new NPCs is actually easier than replacing the old ones because you don't have to put it in the PK3 (you could, but it won't work, unlike editing where you will eventually put it in the PK3).

Also, why replace old ones if we can just make new ones? Besides, editors like me feel that replacing is cheap (don't ask why), so we like to make new ones.

I also find it a ton easier to look at a small list of npcs in my .NPC file that browsing through a big ass npcs.cfg.

RichDiesal
07-12-2002, 10:18 AM
If you want to set a specific, say, angerscript or AI file for an NPC, you can assign it in a script with relatively little difficulty.

Making new NPCs is actually easier than replacing the old ones because you don't have to put it in the PK3 (you could, but it won't work, unlike editing where you will eventually put it in the PK3).
It will need to go in a PK3 either way... I don't really know what differentiation you're talking about?

Also, why replace old ones if we can just make new ones? Besides, editors like me feel that replacing is cheap (don't ask why), so we like to make new ones.
Well sorry I made you feel bad. :p

I also find it a ton easier to look at a small list of npcs in my .NPC file that browsing through a big ass npcs.cfg.
Notepad -> Edit Menu/Find...? That just doesn't seem all that difficult to me. :)

Emon
07-12-2002, 10:22 AM
Forget about the PK3, I was thinking of something else.

If you want to set a specific, say, angerscript or AI file for an NPC, you can assign it in a script with relatively little difficulty.

Er, yeah, what's your point?

ihavedirt
07-12-2002, 01:21 PM
hey,

emon: when you say the mod pk3 doesn't work, are you referring to a pk3 file in the base dir or the unzipped pk3 in the gamedata\modname dir?

i have placed scripts, map, models and ext_data dirs in a pk3 and placed it in the base dir and it seems to work fine. i havent tested the latest pk3 as a loaded mod but the older one worked if i remember correctly. ill check though to ensure this one works as a mod but im confident that it does

rich: with regards to replacing npcs or modifying the npcs.cfg, now people can create maps with custom characters/skins for SP levels that do not affect other SP maps. for instance, the sp_tavion changed monmothma and some other characters. granted, if people use the same npc filename and same npc model name within that filename, we could have a similar problem but we could come up with a standard to eliminate that in most cases.

i personally think this works and is a great thing that has come about. perhaps its not as useful or wonderful as some people (including me in my own head) have been saying but i guess its regarded as this because it wasnt previously possible?

i dont know about mod packs with 50 npc characters and stuff like that. i think this is something, sort of a tool for people to use for themselves to make the custom characters and levels they want. i can see cool stuff like the great sarlaac pit level with chewie, han, boba and weequay etc all fighting it out.

its not just custom npcs being able to be spawned but we now can spawn custom npcs from custom maps.

its definitely one of the better things ive seen/wanted from jk2 so far. compared to say a kyle with less grey hair skin or something like that

~* beau *~

Emon
07-12-2002, 01:32 PM
I was referring to a mod folder PK3, the PROPER PK3 for a SP level.

The best solution is to PK3 what you can, then use the modname\ext_data folder for this info, then zip up the entire mod folder.

RichDiesal
07-12-2002, 02:34 PM
rich: for instance, the sp_tavion changed monmothma and some other characters.
Actually it doesn't, if you install it right. ;)

ihavedirt
07-13-2002, 12:38 AM
emon: i just created a test directory under gamedata and put my pk3 file in there that i used to run in the base dir and i loaded the test mod and it worked fine.

so im assuming that you can spawn custom npcs in custom maps either as a pk3 in base or as a mod?

do you want me to upload my pk3 and/or zip to my server for you to download and check out?

maybe im missing something or not understanding your posts properly?

rich: i see what you mean, make sp_tavion a mod. guess i didnt read the readme :D apologies. id still prefer to add my own custom npcs. the reason being is that i might want 5 different skinned shadowtroopers. i couldnt get that working by adding extra fields in npcs.cfg previously.

Joben
07-13-2002, 10:57 AM
Originally posted by RichDiesal
Why don't you just edit the original NPCs.cfg file and change the models? Seems a lot easier...

I know this is kinda dredging up and old section of the discusion but I had been
thinking about this subject and was looking for an excuse to express my views

Very simple: cause it makes a mess. If ppl change the original pk3 either you have to take their map out of yer base dir ever time you dont want to use it
or you have to set it up as a loadable mod, which then causes problems
if you want to play the map while using a mod that is actualy a mod.
(did you follow that?)

Secondly it can have annoying side effects. For example I was playing
a rather horrible map called "The Emperor's Villa" or something
and thought to myself, "This would be more fun if I had an npc buddy with me."
So I pulled down the console and spawned in a JediF. I was startled and annoyed when the thing that showed up was not a cute friendly Jedi but some
very nasty, cheesy looking Sith who promptly slashed me with his lightsaber.

keto
07-13-2002, 02:19 PM
i think this is great , will really open up the possiblities for the sp(/possible coop) mappers.

rich: 14 "jedi" yes that does seem enough, but expand your mind, its enough for a starwars but with the great "lightsaber" animations i dont see why many TC's wont be changing it into a either medieval or feudal times , in wich case almost every npc will need to know how to use a sword, or any other melee weapon for that matter, excpet for the few bowmen/crossbowmen. i am atleast going to try and do something more medieval fantasy-ish and i really hope others plan to do the same aswell. you are right about pretty much most of the other things you said, but why put down the work of someone else ? :P

itsa also good to soo all the information/links to the process of getting it all working here too. has this been included in one of the sticky's? like a FAQ one?

well keep up the good work ! :)
-keto

Emon
07-13-2002, 02:28 PM
With remodeling, new sounds, new effect files and modifying fire rate and range, you can create some suprisingly good medievil weapons for JO SP.

ihavedirt
07-13-2002, 02:47 PM
emon: could you have a look at my reply a few posts up and see if i have misunderstood something about your pk3 mod problem?

thanks

Emon
07-15-2002, 02:30 AM
I have my ext_data\newnpcs.cfg in a PK3 in a mod folder and it doesn't work. Dunno why.

ihavedirt
07-16-2002, 08:50 AM
you want me to mail you my pk3 and you can test it out to see if it works? im pretty sure it works as a standard pk3 and also as a mod

~* beau *~

Emon
07-16-2002, 11:11 AM
Sure. Emon1337@yahoo.com