Jump to content

Home

Creating Custom (holo) NPC's


codja

Recommended Posts

I've been toying with creating holographic shaders for use with a Coruscant map i'm making and have just started using .glm files to make them 3d and (possibly in the distant future) interactive. We've had a tutorial by Emon about getting custom NPC's into JO and so I thought I'd add my penny's worth for JA. This is my first post giving rather than taking information, so please be gentle.

 

Example: HoloTavion

 

Extract all the models to your base directory.

 

Copy the Tavion folder (we won't bother with Tavion_new) to HoloTavion (\base\models\players\HoloTavion)

 

Update the default.skin to reflect the change in the path (rename models\players\tavion\whatever.jpg to models\players\holotavion\whatever.jpg).

 

Mess about with the skins in Photoshop or Paintshop Pro - you will have to learn how to use alpha channels for the transparency.

 

Create a new shader in the shaders directory - you can call it HoloTavion.shader for example - I use ShaderEd, so browse to one of her tga files (models\players\holotavion\whaever.tga) - you can then select the blend function from within ShaderEd - make sure you set the background button on to tell if you can see through it or not (GL_ONE, GL_ONE is usually sufficient).

 

If you open the shader up in notepad you can add the line "glow" under the blend function to get the dynamic glow/super framerate hit effect. Unfortunately, ShaderEd2 doesn't support this (yet) so it will have to be done manually. Ignore the message if you reopen the shader in shaderEd

 

That's the model and graphics side finished.

 

Now I couldn't be bothered to fiddle with the AI or anything, so if you can't be arsed either then all you have to do is copy tavion.npc (or any .npc file) to holotavion.npc, open it up in notepad, change ALL entries from tavion to holotavion and voila! A fully functioning new NPC - to get it in the game either:

 

npc spawn holotavion

 

or create an npc_spawner entity in radiant and give it the key

 

npc_type "holotavion" and this should bring it up as well

 

If this has been put up on another thread then i'm sorry for the repeat. Also I have no idea at all about scripting or behaved - that's what i'm trying to work out now.

Hope this is helpful

 

Also add scale=200 to the .npc file for BIG tavion!

 

What i'm trying to do is make a script that plays when the npc is spawned and loops a set animation (doesn't matter which one at this point). I've set the npc to TEAM_NEUTRAL to make it docile, but i'd prefer a nice looped animation of my choosing. Any suggestions?

Link to comment
Share on other sites

Awesome! Been wanting to know how to do that for a while. Too bad, i when i couldnt learn how, i just decided not use that, but ill use it sooner or later, thanks a lot

 

about your question... make a script simular to this:

 

//(BHVD)

rem ( "This will make HOLOTAVION do the typing animation forever" );

 

affect ( "holotavion", /*@AFFECT_TYPE*/ FLUSH )

{

 

task ( "animationloop" )

{

set ( /*@SET_TYPES*/ "SET_ANIM_BOTH", /*@ANIM_NAMES*/ "BOTH_CONSOLE1" );

set ( /*@SET_TYPES*/ "SET_ANIM_HOLDTIME_BOTH", -1 );

}

 

do ( "animationloop" );

}

 

 

 

If you dont understand, youll need to learn how to script. the -1 means to last forever in jk2. (keep in mind, this script will make holotavion do the console typing animation forever, it works in jk2, but im not sure about JA)

Link to comment
Share on other sites

I think i've got the gist of it. Nice one - hopefully I'll be able to release a cool looking map now - lots of moving and animated stuff - i'm trying to make a level come alive, rather than just have loose collection of rooms and corridors

 

This should get me started off nicely:)

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...