Utilisateur:Jupotter/Sandbox

De Wiwiki
< Utilisateur:Jupotter
Révision datée du 8 février 2012 à 17:11 par Jupotter (discussion | contributions) (début article 2)
Aller à la navigation Aller à la recherche

Sandbox de Jupotter, utilisé pour faire des traductions Modèle:Tutorial Index

Résumé

Ce chapitre vas vous montrer comment faire des NPC dans l'éditeur, a la fois civils (pas fait

Overview

This chapter will show you how to make NPCs in the editor, both civilians (not meant to provide a combat challenge to the player) and enemies.

The reader will learn:

  • How NPCs are created in the editor
  • How to set up basic combat stats on an NPC

Actors

In Skyrim, all moving creatures are set up as a special kind of object called an Actor. All animals and humanoids use this object, and it's where appearance, behaviors, and everything else about a character is defined.

48px If you're familiar with Fallout 3 and earlier engines, Creatures and NPCs have been combined into Actors, which gives you a lot more flexibility in creating their behaviors.

In the Object Window, navigate to Actors -> Actor in the category list. Right-click anywhere in list of actors and select "New."

Creating Bendu Olo

Thankfully, a lot of the fields in the Actor window are pretty self-explanatory. That said, there's a decent amount of setup that you need to do to make someone. So here we go.

Fichier:EmptyActor.png


  • ID: Just like with the quest ID, this needs to be unique across the game. Give him the ID GSQBenduOlo. (Note that IDs can't have spaces or special characters in them.)
  • Name: The name that will be visible to the player. "Bendu Olo" in our case.
  • Short Name: How somebody familiar with this character might refer to them. This gets used by the radiant story system, which we'll come back to later. For now, just call him "Bendu."
  • Unique: This is the only checkbox you need to worry about for now. It lets the engine know that there should only be one of this actor in the world (as opposed to a new type of animal we were making, for instance). Make sure this is checked.

There are a few things we need to set up in the Traits tab, just to the right.

  • Race: Pretty self-explanatory -- sets the race that this actor will be. Select "DarkElfRace" from the pull-down menu. Now Bendu will have the appearance and racial bonuses of a Dark Elf.
  • Voice Type: This determines what generic dialogue and combat barks this actor will have available to them. Set him up as a MaleDarkElf.

600px

48px In most cases, characters are not prefixed with an identifier because they are often used by multiple quests. Since Bendu might have a bright future ahead of him, we might consider just calling him "BenduOlo."

Finally, hop over to the Inventory tab. Here we'll give him some clothes so he's not just running around in his underwear.

What an actor chooses to wear is determined by their Outfit. Skyrim ships with a number of snazzy outfits already defined, but you can make your own fairly easily if you want to. For now, give him some plain clothes with a hat by choosing "FarmClothesOutfit01WithHat" from the Default Outfit pulldown menu.

400px

Placing the Actor

What we've done here is create the base object for the actor; to actually place him in the game, we'll need to create a reference for him. (If you're unfamiliar with the difference between a base object and a reference, see the callout box on this page labeled "Base Object vs Reference.")

We're going to place Bendu into an existing space. In Mixwater Mill, there's a house that used to have workers there, but has since been abandoned. Let's make it Bendu's home.

Look at the Cell View window. Make sure that the pulldown menu to the right of "World Space" says "Interiors," then select "MixwaterMillWorkersHouse" from the cell list. Double click to load it up.

600px

Zoom out a little bit so you can see more of the interior space. (If you need help navigating around the render window, you can review the earlier tutorial on it.)

500px

Adding our good Mr. Olo to the cell is as simple as grabbing GSQBenduOlo in the object window and dragging it to a place in the render window.

500px

Testing the Actor In-Game

If you're eager to meet your new creation, that's easy enough. Just make sure your plugin is loaded, and start the game. Once you do, start the game, pull up the console, and:

COC MixwaterMillWorkersHouse

Inside, you should find Bendu wandering around, maybe sitting in a chair. He won't have much to say to you, since we haven't written any dialogue for him, and won't have much to do, since we haven't given him any activities. But you have now created a new NPC, so congrats.

500px

Making an Enemy

Now we're going to make the thief who stole Bendu's amulet. Create a new actor like you did before, and give it the ID "GSQThief" and the name "Dirty Thief."

Now things get a little more interesting, though. Instead of specifying the rest of the thieve's data, we're going to use a template. In the bottom left of the Actor window, you can see a "Template Data" section.

600px

Using a template lets us base this actor off another one. It's great for any kind of actor you plan to be a combatant, because you can easily use existing leveled lists and stats, just changing the bits that you want.

So from the ActorBase pulldown list, choose "LvlBanditMelee1H." That name is kind of a mouthful, but is easily broken down:

  • Lvl: This actor uses a leveled list, so as the player becomes more powerful, this actor will increase in difficulty accordingly. (Leveled lists are too complicated to get into here; if you're interested, their details are documented.)
  • Bandit: This actor's appearance and gear fit the archetype we generally think of for bandit characters in the world, and will show up as "Bandit" in the player's combat interface.
  • Melee: This actor will use melee attacks as opposed to ranged or magic attacks.
  • 1H: This actor will use a one-handed weapon.

Within that, there's a lot of variation and randomness. You might get a female Khajiit one time, a male Nord another. Using leveled templates let us provide suitable challenges to the player regardless of their progress, as well as a bit of variety.

Fichier:Achtung.png Note that most leveled templates can resolve to a multitude of voice types, so you need to be careful when writing dialogue for templated actors. In our case, this actor is just a quest obstacle, so we don't care.

Having chosen a template, we need to select which aspects of that template we want to use, by checking the appropriate boxes in the template area. Check every box except for "Use Script" and "Use Base Data."

300px

We don't have to worry about setting race, inventory, equipment, or anything else, since we're pulling all that from the template!

Click "OK" to save the thief actor.

Placing the Enemy

There aren't many unoccupied "dungeon" spaces in Skyrim, but one is available far out in the Reach. Load the cell "ReachwindEyrie01" and place a reference to the thief object the same way we we placed Bendu into the Mixwater Mill cell.

500px

48px You'll notice that the reference appears in the editor as a green M. Because this actor is templated, the editor doesn't know what it looks like, so it draws a capital M for historical reasons since lost to the vortex of time (theories range from "ninja monkey" to "monster" to "marker"). It's green because the default difficulty for leveled actors is "Easy."

If you want to visit the new baddie you've created, start up the game with your plugin and:

COC ReachwindEyrie01

Be ready for a fight!

500px

Modèle:Tutorial Bottom Bar