Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

NPCs & AI: Class #3


InsanitySorrow
 Share

Recommended Posts

NPCs & AI: Class #3

Class01.png

Step 1: Before we start

For this class we will be working from a pre-made ESP, download the ESP here as it is required :)

NPC & AI - Class 03

Note: Thanks to Mr_Siika for the Market Stall/Cart Resource.

All steps in this class will be completed inside this ESP, why this ESP? I hear you ask. Well I have already set up a space for the merchant in the IC Market District. There is a little market stall for him/her to use, along with a bedroll for them to sleep on.

;) Smarty Says: When creating a proper merchant you will also create a proper shop for them, this means you will be able to setup a proper sleeping area ect.

MarketStall.png

Step 2: Planning

As with our last NPC we'll need to put some thought into what we want, this way we'll be able to iron out any issues before we start implementing our ideas.

For this NPC let's go with something different:

Name: Melie

Race: Breton

Class: MerchSmith

Gender: Female

Level: 20

AI:

  • Eat Package
  • Sleep Package
  • Wander Package
  • Services Package

Now this is a basic look at what we want to create, we can customize more as we progress but it's good to have a plan :)

Step 3: Creating Our NPC

We're going to create the NPC the same as last time, so let's get started :), I gave set my NPC ID too aaClass03NPC, you may choose your own but I suggest using the same so we don't get confused.

The rest of the details are the same as we have planned, but I went a step further and set here as Essential, I don't anyone able to kill her, especially with her being outside. Another thing I done was I checked the auto-calc stats and then unchecked it, it'll se the stats based on level but then allow us to manually adjust.

A final touch was to set the hair and eyes, using brown eyes and a ponytail.

Screenshot38.jpg

Inventory:

Inventory is very basic, nothing special here, you could even use the same clothing/items as last time. Here is what I used.

  • MiddlePants04
  • MiddleShirt04
  • MiddleShoes04
  • Plain Gold Ring
  • Plain Gold Necklace
  • LL0NPCGoldMiddleClass
  • LL0NPCPotionRestoreHealth
  • LL0NPCWeaponLongsword100

Screenshot39.jpg

For this NPC we do not need to edit the Factions or Spell List, so you can skip those and edit your NPCs face :)

Link to comment
Share on other sites

  • 2 weeks later...
  • Replies 51
  • Created
  • Last Reply

Top Posters In This Topic

Step 4: Adjust NPC AI

Now that we're done creating the basics of our NPC we can start preparing the AI. Now before we create any packages we need to set her up so she will sell items, So what we need to do is click the AI button on the NPC screen, a new menu will open up.

Screenshot40.jpg

Now what we're going to do is edit the AI Attributes and the Buys/Sells section. So we'll start with the AI Attributes first, set them up like so:

  • Aggression: 5
  • Confidence: 70
  • Energy Level: 70
  • Responsibility: 80

Screenshot41.jpg

The reason for the edit here is because we want here to be different to other NPCs, but also the higher Responsibility will mean she'll report thefts better :yes:

Now onto the Buys/Sells section, here will will set the Barter Gold to 2000 and uncheck all boxes apart from the Weapons and Armor, Since she is a smith that is all she will sell.

Screenshot42.jpg

Step 5: In-Game Placement

So now we have our NPC setup, let's place her in-game before we create our packages. In the Cell View window, click the Worldspace drop down box and select ICMarketDistrict, double click ICMarketDistrict01 to load up the cell.

We are going to place our NPC right behind the stall that has been setup, that way when the NPC has the services package they will stand here to offer their services.

Screenshot43.jpg

With our NPC in place we can now create the AI packages to make her go about her day :)

:D Smarty Says: If you want an NPC to offer their services at a specific location but unlike the NPC above is NOT placed in that area then we can set down an Xmarker and in the Services Package location tab we can use a Near Reference setup to make the NPC go to our Xmarker. This will make them stand in a specifc place.

Step 6: Package Creation

Now onto our packages, let's make the NPC do something :D, As you may recall we previously decided to make four AI packages, these should cover the basic life of an NPC with the addition of a Services Package.

What we'll do is start with the basic packages, now with these we already have a sleeping area setup and have a sack with some food in, so we have saved ourselves a bit of time setting up other cells for our NPC to eat and sleep in.

Anyway let's get creating.

We'll create our packages with this information here as a base to work from, we can tweak the packages as need be, but for now these settings will work perfect for what we want.

  • ID: aaClass03Eat
  • Type: Eat
  • Flags: Weapons Unequipped
  • Time: 7am for 1 hour
  • Location: Near Editor Location, 1024

  • ID: aaClass03Sleep
  • Type: Sleep
  • Flags: Weapons Unequipped, Armor Unequipped
  • Time: 9PM for 10 hours
  • Location: Near Editor Location, 1024

  • ID: aaClass03Wander
  • Type: Wander
  • Flags: Defensive Combat
  • Time: Anytime
  • Location: Near Editor Location, 2048

  • ID: aaClass03Services
  • Type: Travel
  • Flags: Offer Services
  • Time: 8am for 11 hours
  • Location: Near Editor Location, 0

So we have our packages created, now we drag and drop them into our NPC's AI Package list. Once done we need to adjust the package order, for some reason Oblivion is very specific about package order and some packages need to be before others ect or they will not work.

So we'll adjust our list like so:

  • Services Package
  • Eat Package
  • Sleep Package
  • Wander Package

Screenshot44.jpg

Step 7: Final Step

With our NPC almost complete there is one last step to do, Our NPC is setup to sell equipment, but we have not told her what to sell. So what we need to do is create ourselves a new container, I gave mine the ID of aaClass03Vendor. What we'll do is throw in some basic iron weapons, Just a few basic things.

Screenshot45.jpg

Now with that done, let's drag the container and place it by our NPC, don't worry about it's placement because when we're done we will sink it into the ground so the player cannot get to it.

Screenshot46.jpg

Now double click the container and give it a Persitent Reference, I used this aaClass03VendorRef.

Screenshot47.jpg

So with that done, double click our NPC, a similar window to that of our chest will open up. Now click on the Merchant Container tab. We'll be using this tab to set the container for our NPC, this will allow her to sell equipment. Click the Select Reference in Render Window, this will allow is to now double click our Vendor chest, once done the Merchant Tab should now display some new data, this data is what links our NPC to our Vendor chest.

Screenshot48.jpg

With that all done we can now sink our chest into the floor so it cannot be touched by the player or other NPCs, but our NPC wil still be able to access it.

Congrats, you now have a Smith NPC :cry:, Why not go in-game and take a look-see? :D

:rofl: Smarty Says: Be sure to post screenshots of your NPC, AI Packages and Placement Setup. Be sure to include a shot of the Merchant Container Tab.

Link to comment
Share on other sites

Homework

Now onto the Homework :yes:

For the homework I would like you to create a new merchant NPC, The NPC will own a Stall like our previous one. You may place the new Stall across from the Class 03 NPC if you would like too, but the choice is yours. The NPC will be Male, a High Elf to be exact, His level maybe decided by you. The NPC sells books and nothing else, he has an average amount of gold to barter with.

The NPCs Stall is also dress acordingly to what he sells, you may also use the script from Class 03 to stop the player from picking up the display items, It is not required however.

Note: The script is something I made and added to the ESP, it's NOT something that was done during the class.

One last thing, the NPC sleeps inside, the local Inn would be the best bet, he also likes to eat inside too.

Here are the times for each of the packages, the rest of the settings are left upto you to decided.

  • Type: Eat
  • Time: 8am for 2 hour

  • Type: Sleep
  • Time: 10PM for 10 hours

  • Type: Wander
  • Time: Anytime

  • Type: Travel
  • Time: 10am for 11 hours

XD Smarty Says: Be sure to post screenshots of your NPC, AI Packages and Placement Setup. Be sure to include a shot of the Merchant Container Tab.

Link to comment
Share on other sites

Class 3 Pics:

Melie In Game - Here

***Willard Placement - My link

NPC Stats - Here

***NPC2 Stats - My link

NPC Inventory - Here

***NPC2 Inventory - My link

NPC AI Eat #1 - Here

***NPC2 Eat #1 - My link

NPC AI Eat #2 - Here

***NPC2 Eat #2 - My link

NPC AI Services #1 - Here

***NPC2 Services #1 - My link

NPC AI Services #2 - Here

***NPC2 Services #2 - My link

NPC AI Sleep #1 - Here

***NPC2 Sleep #1 - My link

NPC AI Sleep #2 - Here

***NPC2 Sleep #2 - My link

NPC AI Wander #1 - Here

***NPC2 Wander #1 - My link

NPC AI Wander #2 - Here

***NPC2 Wander #2 - My link

NPC AI Package - Here

***NPC2 AI Package - My link

NPC Vendor Container #1 - Here

***NPC2 Vendor Container #1 - My link

NPC Vendor Container #2 - Here

***NPC2 Vendor Container #2 - My link

HomeWork: Marked with ***NPC2

Link to comment
Share on other sites

IS, I just looked at mine and mine has persistant reference too In bother the 3d Data Tab and the Merchant container tabs. Both are greyed out and I never had an option to select it. I never set that so I don't know where it came from.

Link to comment
Share on other sites

Question about the homework. You mention "you may also use the script from Class 03 to stop the player from picking up the display items, It is not required however."

Sorry, but what script? Did I miss something? :)

If you look at the weapons in the CS that I added to the NPCs cart you will notice they have a script on them, this stops the player from picking them up XD

I should have noted it was something I made XD

Link to comment
Share on other sites

Theres a lot to go through in this lesson so heres my classwork for the time being.

NPC

Basic Stats

Inventory

Basic Merchant AI

NPC In Place

Packages

Eat 1

Eat 2

Sleep 1

Sleep 2

Wander 1

Wander 2

Services 1

Services 2

Applied Packages

Weapons Chest

Initial Placement

Reference Screen

Hidden Placement

I think thats all that was needed to be shown....now onto the homework exercise. :smug:

Link to comment
Share on other sites

  • 5 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share


×
×
  • Create New...