Jump to content

Home

New NPC debugging


JavaGuy

Recommended Posts

I have two new NPCs called RebornJawa and StormtrooperJawa. The RebornJawa works exactly as I wanted/expected, but the StormTrooperJawa won't spawn. The console message just says it was unable to spawn NPC npc_stormtrooperjawa. I'm at a loss. Here are the entries in the config file:

 

RebornJawa

{

playerModel rebornjawa

saberColor red

rank lt

reactions 3

aim 3

move 5

aggression 4

evasion 3

intelligence 5

hfov 160

vfov 160

playerTeam enemy

enemyTeam player

// race human

class reborn

snd jawa

sndcombat jawa

sndjedi jawa

yawSpeed 140

walkSpeed 55

runSpeed 200

health 75

scale 55

dismemberProbHead 30

dismemberProbArms 30

dismemberProbLegs 30

dismemberProbHands 30

dismemberProbWaist 20

}

 

 

StormtrooperJawa

{

playerModel stormtrooperjawa

health 30

headPitchRangeDown 30

reactions 3

aim 3

move 3

aggression 3

evasion 1

intelligence 5

rank crewman

playerTeam enemy

enemyTeam player

// race klingon

class stormtrooper

walkSpeed 51

runSpeed 200

snd jawa

sndcombat jawa

sndjedi jawa

yawSpeed 140

walkSpeed 55

runSpeed 200

health 75

scale 55

dismemberProbHead 30

dismemberProbArms 30

dismemberProbLegs 30

dismemberProbHands 30

dismemberProbWaist 20

}

Link to comment
Share on other sites

Okay, here's what I have so far. I went back to the original config file and just copied the StormTrooper entry, changing only the jawa-specific stuff. Here's how it looks:

 

 

StormTrooperJawa

{

playerModel stormtrooperjawa

surfOff torso_pauldron_off

surfOn "torso_armor_neck_augment torso_body_neck_augment"

health 30

headPitchRangeDown 30

reactions 3

aim 1

move 3

aggression 3

evasion 1

intelligence 5

rank crewman

playerTeam enemy

enemyTeam player

// race klingon

class stormtrooper

height 64

crouchheight 48

walkSpeed 51

runSpeed 200

snd jawa

sndcombat jawa

sndextra jawa

yawspeed 70

walkSpeed 55

runSpeed 200

dismemberProbHead 100

dismemberProbArms 100

dismemberProbLegs 100

dismemberProbHands 100

dismemberProbWaist 100

}

 

 

Still no luck! ;(

 

Incidentally, is there a difference between using the scale property and setting the height/crouchheight?

Link to comment
Share on other sites

Unfortunately, you can't spawn new NPCs unless they are named "Reborn****" in your new map. I don't know why, but I read that in the stuck thread by Emon about new NPCs. You may be able to spawn a RebornJawa, then use ICARUS to give it a blaster and no Force Powers.

Link to comment
Share on other sites

Another workaround for new NPCs is to just replace an existing one you don't want with a new model and use their entry in the npc.cfg file, changing it how you wish. This will of course only work if you have NPCs you don't want to use. It's easiest to have one with the gun you wan too, for example if you want a sniper its easier to replace the Rodian sniper skin - but in fairness its hardly a massive problem changing their guns around in Icarus, it just saves time creating a load of spawnscripts. Some barely used NPCs with guns like the tie pilot or imperial worker can be good ones to use.

Link to comment
Share on other sites

Originally posted by Kengo

Another workaround for new NPCs is to just replace an existing one you don't want with a new model and use their entry in the npc.cfg file, changing it how you wish. This will of course only work if you have NPCs you don't want to use. It's easiest to have one with the gun you wan too, for example if you want a sniper its easier to replace the Rodian sniper skin - but in fairness its hardly a massive problem changing their guns around in Icarus, it just saves time creating a load of spawnscripts. Some barely used NPCs with guns like the tie pilot or imperial worker can be good ones to use.

If you do that, you can very well just change the moddel without even touch the npc.cfg
Link to comment
Share on other sites

Okay, I'm a dumbass.

 

The RebornJawa was launched from a spawner as NPC_type RebornJawa. When I double-checked my map I discovered that all the StormTrooperJawas were declared as NPC_StormTrooperJawa. When I changed them to StormTrooperJawa it worked.

 

And no, they do not have to be declared as "Reborn[whatever]". The NPC type name just has to have the same prefix as the model folder. Most mappers seem to use the name of the underlying class to make it easier to remember what is behaving like what.

Link to comment
Share on other sites

Originally posted by imyourfather

If you do that, you can very well just change the moddel without even touch the npc.cfg

 

Ah you're right, you can just overwrite the model name.

 

Glad to hear you sorted your problem out Java!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...