Nod Engine SDK > Modeling and NOT Editor

Creating an NPC for the Nod Engine

(1/2) > >>

YEAH! This is going to be AWESOME, but first you need to follow the tutorial on NOT Editing called How to Make a Sword in Redemption because we're going to use the sword we made in that other tutorial to equip it on our Milkmaid.

This tutorial will teach you how to make an enemy NPC that could be used to attack the players, but we'll also learn how to set this new enemy's AI to be more passive (like a lawman) as well as learn the basics of making an enemy AI attack another enemy AI rather than the players. In addition, you will walk away from this tutorial fairly knowledgable on how to make ANY kind of NPC (Non-Player Character) for Redemption using NOT Editor.

-Continuing from the previous tutorial you should have the 4 NOT files extracted from Resource.nob.
-You should also have your _myproj.not file inside the misc\Templates folder with the rest of the NOT files.
-Now let's load up the NOT Editor.
-Open the Global.not file and your template file form the last tutorial.
-Take the _actor parent template from Global.not, make a copy, rename it, and drag to your not file.

-Do the same to _enemies

-Now make an inner copy (child) of your new _enemies parent and name it appropriately. Like myproj_battlemilkmaid.

-The collidetype looks like it is already set to CYLINDER so no need to mess with it.
-We do need to set the RADIUS tag to 26 so do so now.

-Looks like the HEIGHT tag is missing so let's add it and set it to 110.

-We don't have a model tag. Add the MODEL tag and have it use the civ06milkmaid.nod model.

-Now let's setup the foley tag so our milkmade sounds more female.

-The .nag files are located in Resource.nob under misc\Foleys if you want a list.
-The .nag files assign .wav (sound) files to various events for the templates that use it.
-Now we need to give propper animation sets to our model by adding the MOTIONSET tag.

-The .nms files are located in Resource.nob under 3d\Motions if you want to see them.
-WARNING: Only certain kinds of nms files will work right for each model. Trial and error is needed if you want to experiment.
-Now let's set the SKELETONID tag value to 3 for the females.

-Now let's set the ACTOR_FLAGS tag values to check mark NO FEED, CAN GIB KILL, VALID SHAPE, and AI NO RETURN HOME.
-NO FEED makes it so vampires cannot feed off of our fair battle maiden.
-CAN GIB KILL makes it so that if she takes a massive amount of damage that kills her, she'll go SPLAT.
-VALID SHAPE allows for Mask of 1000 Faces to work on her.
-AI NO RETURN HOME makes it so she wont keep walking back to her spawn point when she has no enemies. Always annoying.

-Now let's set her ACTOR_TYPE tag to VAMPIRE.

-Sense she is a vampire now, let's give her a clan by adding the missing ACTOR_CLAN tag.

-Her default team makes her an enemy, let's make her an ally by setting her team to PLAYER 0.
-You could set her up as a lawman too by choosing the LAWMAN team, but I chose PLAYER 0.

-She will now aid the players in singleplayer and multiplayer coop mode. Well anyone that has a PLAYER 0 team she will not attack.
-Now we need to setup her AI by assigning a different nai file to her ACTOR_AI tag.
-Let's change it to something really COOL like a tremere methuselah. tremereMeth.nai
-Now if we want her to act like a lawman we should give her guard.nai instead.

-The nai files are located in Resource.nob file under misc\AI subfolder.

-These nai files can be opened in Notepad for viewing and editing.
-Open up tremereMeth.nai and look at the bottum of the file.
-NAI files contain both aggression data and DISCIPLINES for enemies. Shown below:

-If you had chosen guard.nai, you would not have any disciplines sense there are none inputted in there.
-Now let's set both the maiden's ACTOR_HEALTH and ACTOR_MAXHEALTH values to something high.
-We want our battle milkmaiden to be able to take a beating in hardcore battle. At least I do.  :P

-Just by some off chance a player kills our beloved maiden they could gain some XP points.
-Let's set the ACTOR_XP tag to give 500 points to a player for killing her.

-Currently our fair battle milkmaiden has no weapon. We need to add an ACTOR_WEAPON tag to do so.
-NOTE: The list will only show the templates of files currently loaded into NOT Editor. If you want more weapons, load more files.
-For now, let's find our custom weapon and add it to her.

-Now it's time to start setting up her STAT_ tags. This is where the inventive part of building her comes in.
-The 9 important stats of Strength, Dexterity, Stamina, Perception, Intelligence, Wits, Charisma, Manipulation, and Appearance are up to you, but I went with these values:

STAT_STRENGTH 50 - This'll give her a fair a mount of damage in melee battle.
STAT_DEXTERITY 75 - Hey! I want her to hit STUFF.
STAT_STAMINA 100 - This'll give her resistance to NORMAL and LETHAL damage types.

STAT_INTELLIGENCE 80 - For those powerful tremere spells her AI file 'll give 'er. hehe
STAT_WITS 50 - She is going to use our sword afterall.


-Ok so I set her up fairly high... wooptydoo.
-Now set her STAT_BLOOD and STAT_BLOODPOOL tags so she will have more blood to work those Tremere powers.

-Set her humanity up with the STAT_HUMANITY tag.

-If we want her to be able to resist the beast, we'll need to make sure her frenzyrating is low.
-Add the STAT_FRENZYRATING tag to our battle milkmaiden template.

-I think we should add some more damage resistance to her. Stamina is not enough.
-You can add SOAK_ tags to our maiden from the tags list on the bottom of the Actor tag list section.

-Sense we have setup our battle milkmaiden to be 'gib killable' through the CAN GIB KILL flag on our ACTOR_FLAGS tag, we need to add the ACTOR_GIBCLASS tag so that the game will know what bloody gibs to throw around when our maiden dies.
-Add the ACTOR_GIBCLASS tag and set it to a class value of 3.

-This value reflects keyname templates that start with gib_.
-Many of these gib templates can be found in Global.not.
-It is possible to make your own gib templates with a gib_#myclass template name, but we're not going to cover that here.

-Just a couple of more things to do now.
-First set the EDITORCATEGORY tag to Bosses so that in-game we can access this template on the ST object list under actors.

-And finally let's name our Battle Milkmaiden by editing the DESCRIPTIONID tag.

-Now you can spawn in multiplayer using ST mode or in singleplayer using console.
-Here's a look at ST Mode in multiplayer.

We're done! Your new NPC, as we call it, is ready to be spawned in-game to kick ass and chew... whatever.


Very interesting!   ;)

I try it and that was great.
A question: the milkmaid is my ally (player 0) but can she follow me in game to help me during a mission?
I think she will not move before to see an ennemie... true?

Thanks a lot for this good tuto.

Thanks, but no she wont follow you.

Is it possible to change the size of the bounding box that appears in Embrace for custom objects? The box for the BattleMilkmaid is pretty big compared to the regular milkmaid model, even though they have the same height and radius.

You don't use bounding boxes for npcs unless they are shaped like a box. Actually, you should always use cylinder collisions for most objects. The nod engine doesn't like actor or player type templates moving around as anything but cylinders. Anything else can cause instability, collision errors in the AI (worse than it usually is), and collide radius and height don't work with the bounding box type collision. AI navigation only works with cylinders, sure they can still get stuck especially if the cylinder is against something, but bounding boxes are the worst for the AI to navigate around and if npcs are walking bounding boxes then you're gonna see them get stuck on each other A LOT.


[0] Message Index

[#] Next page

Go to full version