Please Help Support E-Mods.net by Donating

e-mods.net

  • 2017-10-24, 02:39:47
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search

News:

Looking for VTMR Modding Tutorials? Check out the Open Nod Development section of e-mods.net.

Author Topic: Creating an NPC for the Nod Engine  (Read 8530 times)

Javokis

  • Horses Dick
  • Member
  • *****
  • Karma: 21
  • Offline Offline
  • Posts: 2365
    • E-Mods.net
Creating an NPC for the Nod Engine
« on: 2007-03-28, 17:49:48 »

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.


-On second thought, set XP to 0. NO REWARDS FOR KILLING OUR FAIR MAIDEN! WHAAA!
-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_PERCEPTION 60
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.

STAT_CHARISMA 40
STAT_MANIPULATION 60
STAT_APPEARANCE 50

-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.

HAVE FUN!

« Last Edit: 2010-02-28, 13:06:02 by Javokis »
Logged
"There's nothing wrong with horses dicks, there's nothing wrong with sucking horses dicks." -Signo

Vlad_III

  • Member
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 115
Re: Creating an NPC for the Nod Engine
« Reply #1 on: 2010-11-27, 15:41:03 »

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.
Logged

Javokis

  • Horses Dick
  • Member
  • *****
  • Karma: 21
  • Offline Offline
  • Posts: 2365
    • E-Mods.net
Re: Creating an NPC for the Nod Engine
« Reply #2 on: 2010-11-27, 20:30:17 »

Thanks, but no she wont follow you.
Logged
"There's nothing wrong with horses dicks, there's nothing wrong with sucking horses dicks." -Signo

GreenDragon

  • Member
  • *
  • Karma: 2
  • Offline Offline
  • Posts: 52
Re: Creating an NPC for the Nod Engine
« Reply #3 on: 2013-06-20, 10:16:25 »

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.
Logged

Javokis

  • Horses Dick
  • Member
  • *****
  • Karma: 21
  • Offline Offline
  • Posts: 2365
    • E-Mods.net
Re: Creating an NPC for the Nod Engine
« Reply #4 on: 2013-06-20, 17:30:36 »

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.
Logged
"There's nothing wrong with horses dicks, there's nothing wrong with sucking horses dicks." -Signo

GreenDragon

  • Member
  • *
  • Karma: 2
  • Offline Offline
  • Posts: 52
Re: Creating an NPC for the Nod Engine
« Reply #5 on: 2013-06-21, 01:36:29 »

Sorry, I should have said "box that appears in embrace", the collision is set to cylinder. I've found it a bit hard to align custom objects, since their box in Embrace doesn't reflect their size in-game. If I try to align the BattleMilkMaiden with the ground, she appears 1 m up in the air.
Logged

wesclash

  • Member
  • *
  • Karma: 2
  • Offline Offline
  • Posts: 60
Re: Creating an NPC for the Nod Engine
« Reply #6 on: 2013-06-21, 06:10:48 »

You have to set EDITORSIZEMINS and EDITORSIZEMAXS in NOT Editor. Maybe try the values used for the original milkmaid model: MINS = -52, -28, 0; MAXS = 52, 18, 115.
Logged

GreenDragon

  • Member
  • *
  • Karma: 2
  • Offline Offline
  • Posts: 52
Re: Creating an NPC for the Nod Engine
« Reply #7 on: 2013-06-25, 01:56:53 »

Yep, that did it. Thanks.
Logged
 

Page created in 0.07 seconds with 24 queries.