Jump to content

Home

New custom Npcs are possible


studman0201

Recommended Posts

  • Replies 189
  • Created
  • Last Reply

pud1,

 

dont forget to look at the older thread (http://64.246.44.70/~lucasforums.com/showthread.php?s=&threadid=66494) that has a few different examples and lots of posts with the codes in them also.

 

stormtrooper skins result in the model directory being called/referenced incorrectly i think

 

i also had the unignited saber problem.

 

basically, at the moment this is what i have

 

ext_data\customnpcs.npc

 

this contains references for all the new npc im using

 

basically, within that, i have for example

 

jediben_kenobe

{

playerModel jediben_kenobe

saberColor yellow

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 jedi1

sndcombat jedi1

sndjedi jedi1

health 200

dismemberProbHead 0

dismemberProbArms 5

dismemberProbLegs 0

dismemberProbHands 10

dismemberProbWaist 0

}

 

stboba_fett

{

playerModel stboba_fett

reactions 3

aim 1

move 3

aggression 3

evasion 1

intelligence 5

rank crewman

playerTeam player

enemyTeam enemy

// race human

class lando

snd lando

sndcombat lando

sndextra lando

sndjedi lando

walkSpeed 55

runSpeed 200

yawspeed 120

dismemberProbHead 0

dismemberProbArms 0

dismemberProbHands 0

dismemberProbLegs 0

dismemberProbWaist 0

}

 

these examples have incorrect sounds and arent totally realistic but its something i just chucked in quickly as a test.

 

with the jedi, you will notice that i have an old obi wan skin/model that im using. make sure that all references to this player are the same. that also means checking the .skin files reference your newly renamed model as well. hopefully that makes sense. and the same with the stboba_fett

 

so model_default.skin is something you are likely to have to edit as well as any shaders etc

 

there is possibly an easier way to do the .npc file but i find that if you have a prefix in front of everything (model dir, player name etc) then its much easier if someone is reading through the npc file to know whats going on. ie, you will have a list of all jedi, st, weequay, reborn etc

 

hope that helps

 

~* beau *~

Link to comment
Share on other sites

I found another thing you can do.

 

granboxeryourmodel = makes that model punch.

 

Heh, I found a nice looking model yesterday and made a NPC of it. But, the reason why I posted the info here is cause it is......JAR JAR!!! Now we can spawn him, torcher him...... He even has his annoying sounds!! Get it at http://www.jk2files.com and http://www.jediknightii.net !!!!

Link to comment
Share on other sites

Ok, so I have done everything that was told to do to create a custom npc. I downloaded the older Mace Windu Skin and tried ot create him as a custom npc. When I get into the game, I type npc spawn jediwindu and it spawns a stormtrooper with a lightsaber. Why will it not show mace windu in the game?

Link to comment
Share on other sites

download my jedi pack as soon as jk2 puts it up.

 

and to do it yourself, go into the pk3 and look at his SKIN file for model_default (like it says above).

 

Any directory that says "windu", "ep2windu", etc...rename it to jediwindu. That should fix your problem.

Link to comment
Share on other sites

From Chang about the weapon setup:

 

"where you see a "stricmp" it's looking for the exact name, where you see a "strncmp", it's only looking for the NPC's name to start with those letters...

 

int NPC_WeaponsForTeam( team_t team, int spawnflags, const char *NPC_type )

{

switch(team)

{

case TEAM_ENEMY:

if ( Q_stricmp( "tavion", NPC_type ) == 0 ||

Q_strncmp( "reborn", NPC_type, 6 ) == 0 ||

Q_stricmp( "desann", NPC_type ) == 0 ||

Q_strncmp( "shadowtrooper", NPC_type, 13 ) == 0 )

return ( 1 << WP_SABER);

 

if ( Q_strncmp( "stofficer", NPC_type, 9 ) == 0 )

{

return ( 1 << WP_FLECHETTE);

}

if ( Q_stricmp( "stcommander", NPC_type ) == 0 )

{

return ( 1 << WP_REPEATER);

}

if ( Q_stricmp( "swamptrooper", NPC_type ) == 0 )

{

return ( 1 << WP_FLECHETTE);

}

if ( Q_stricmp( "swamptrooper2", NPC_type ) == 0 )

{

return ( 1 << WP_REPEATER);

}

if ( Q_stricmp( "rockettrooper", NPC_type ) == 0 )

{

return ( 1 << WP_ROCKET_LAUNCHER);

}

if ( Q_strncmp( "shadowtrooper", NPC_type, 13 ) == 0 )

{

return ( 1 << WP_SABER); }

if ( Q_stricmp( "imperial", NPC_type ) == 0 )

{

return ( 1 << WP_BLASTER_PISTOL);

}

if ( Q_strncmp( "impworker", NPC_type, 9 ) == 0 )

{

return ( 1 << WP_BLASTER_PISTOL);

}

if ( Q_stricmp( "stormpilot", NPC_type ) == 0 )

{

return ( 1 << WP_BLASTER_PISTOL);

}

if ( Q_stricmp( "galak", NPC_type ) == 0 )

{

return ( 1 << WP_BLASTER);

}

if ( Q_stricmp( "galak_mech", NPC_type ) == 0 )

{

return ( 1 << WP_REPEATER);

}

if ( Q_strncmp( "ugnaught", NPC_type, 8 ) == 0 )

{

return WP_NONE;

}

if ( Q_stricmp( "granshooter", NPC_type ) == 0 )

{

return ( 1 << WP_BLASTER);

}

if ( Q_stricmp( "granboxer", NPC_type ) == 0 )

{

return ( 1 << WP_MELEE);

}

if ( Q_strncmp( "gran", NPC_type, 4 ) == 0 )

{

return (( 1 << WP_THERMAL)|( 1 << WP_MELEE));

}

if ( Q_stricmp( "rodian", NPC_type ) == 0 )

{

return ( 1 << WP_DISRUPTOR);

}

if ( Q_stricmp( "rodian2", NPC_type ) == 0 )

{

return ( 1 << WP_BLASTER);

}

 

if (( Q_stricmp( "interrogator",NPC_type) == 0) || ( Q_stricmp( "sentry",NPC_type) == 0) || (Q_strncmp( "protocol",NPC_type,8) == 0) )

{

return WP_NONE;

}

 

if ( Q_strncmp( "weequay", NPC_type, 7 ) == 0 )

{

return ( 1 << WP_BOWCASTER); }

if ( Q_stricmp( "impofficer", NPC_type ) == 0 )

{

return ( 1 << WP_BLASTER);

}

if ( Q_stricmp( "impcommander", NPC_type ) == 0 )

{

return ( 1 << WP_BLASTER);

}

if (( Q_stricmp( "probe", NPC_type ) == 0 ) || ( Q_stricmp( "seeker", NPC_type ) == 0 ))

{

return ( 1 << WP_BOT_LASER);

}

if ( Q_stricmp( "remote", NPC_type ) == 0 )

{

return ( 1 << WP_BOT_LASER );

}

if ( Q_stricmp( "trandoshan", NPC_type ) == 0 )

{

return (1<<WP_REPEATER);

}

if ( Q_stricmp( "atst", NPC_type ) == 0 )

{

return (( 1 << WP_ATST_MAIN)|( 1 << WP_ATST_SIDE));

}

if ( Q_stricmp( "mark1", NPC_type ) == 0 )

{

return ( 1 << WP_BOT_LASER);

}

if ( Q_stricmp( "mark2", NPC_type ) == 0 )

{

return ( 1 << WP_BOT_LASER);

}

if ( Q_stricmp( "minemonster", NPC_type ) == 0 )

{

return (( 1 << WP_MELEE));

}

if ( Q_stricmp( "howler", NPC_type ) == 0 )

{

return (( 1 << WP_MELEE));

}

//Stormtroopers, etc.

return ( 1 << WP_BLASTER);

break;

 

//allies

case TEAM_PLAYER:

 

if(spawnflags & SFB_RIFLEMAN)

return ( 1 << WP_REPEATER);

 

if(spawnflags & SFB_PHASER)

return ( 1 << WP_BLASTER_PISTOL);

 

if ( Q_strncmp( "jedi", NPC_type, 4 ) == 0 || Q_stricmp( "luke", NPC_type ) == 0 )

return ( 1 << WP_SABER);

 

if ( Q_strncmp( "prisoner", NPC_type, 8 ) == 0 )

{

return WP_NONE;

}

if ( Q_strncmp( "bespincop", NPC_type, 9 ) == 0 )

{

return ( 1 << WP_BLASTER_PISTOL);

}

 

if ( Q_stricmp( "MonMothma", NPC_type ) == 0 )

{

return WP_NONE;

}

 

//rebel

return ( 1 << WP_BLASTER);

break;

 

case TEAM_NEUTRAL:

 

if ( Q_stricmp( "mark1", NPC_type ) == 0 )

{

return WP_NONE;

}

if ( Q_stricmp( "mark2", NPC_type ) == 0 )

{

return WP_NONE;

}

if ( Q_strncmp( "ugnaught", NPC_type, 8 ) == 0 )

{

return WP_NONE;

}

if ( Q_stricmp( "bartender", NPC_type ) == 0 )

{

return WP_NONE;

}

if ( Q_stricmp( "morgankatarn", NPC_type ) == 0 )

{

return WP_NONE;

}

 

break;

 

default:

break;

}

 

return WP_NONE;

}

 

 

Next time I'll put these in the NPCs.cfg... heh

 

Michael Chang Gummelt

 

Gameplay Programmer: Jedi Knight II

 

Raven Software

 

http://www.ravensoft.com"

Link to comment
Share on other sites

Looking through it here are all available codes.

 

enemies only

stofficeryourmodel ----- uses flechette

shaodwtrooperyourmodel------uses saber

ugnaughtyourmodel ---------no weapon

granyourmodel -------------thermals, and punches

weequayyourmodel------------bowcaster

styourmodel-------------------stormie blaster

rebornyourmodel-----------------saber user

 

allies only

jediyourmodel---------------saber user

bespincopyourmodel------------ uses blaster pistol

prisoneryourmodel----------------no weapon

styourmodel--------------------stormie blaster

Link to comment
Share on other sites

How do u look at stuff....or extract files out of a pk3, maybe thats why i am doing this wrong?

 

I think i just need 1 pk3 to download that changes everything i need done, b/c i still hardly understand and have read both threads

Link to comment
Share on other sites

Neat, using the shadowtrooper prefix solves that problem I described in the older thread with shadowtrooper class npcs dropping rgb wireframes when killed. They drop normal forcegems now :) This custom npc style looks really cool with the MGS ninja, as he can cloak and de-cloak...

Link to comment
Share on other sites

Ok i finally got my qui-gon jedi npc model out there instead of stormtrooper i had to extract the qui-gon skin files into a folder and extract the npcs.cfg from assets0.pk3 and put em in the folder and rename the folder JediQui-Gon

I also have made a new folder in the base dir called ext_data and put my newnpcs.npc file there.

 

But now i got qui-gon fighting with no lightsaber

it's in his crotch hehee

and i dont remember how to corect that?

 

edit: ok i didnt need to extract assets0pk3 file called npcs.cfg to my qui-gon folder, so i took it out!

 

Still got his saber in his crotch!! pls help

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...