Tutorial 1: Hello, Chair


Download the finished result of following this tutorial, for reference. Try creating the plug-in yourself first!

Download
Skill Level: Beginner

This tutorial is suitable for novice modders who may have never used the Creation Kit before and requires no prior knowledge of other parts of Campfire’s Dev Kit. Links to www.creationkit.com tutorials for more information about using the Creation Kit are provided.

In this introductory tutorial, we will create our first simple item in Campfire.

First, a few bits of terminology that will be used frequently. In Campfire, a placeable item is always made up of the following 3 components:

  • An inventory item – the item that the player carries in their inventory.
  • placement indicator – this is an activator object that allows the player to visualize where their item will go when they’re finished placing it.
  • placeable object – the placeable object is always a furniture or activator object that the player places into the world. When the player selects it, they can interact with it, or pick it back up, and they are given back their inventory item.

Our first placeable object will be very simple: a camping chair!

Getting Started

First, make sure both Campfire and the Campfire Dev Kit are installed. If you haven’t downloaded the Dev Kit yet, grab it here.

Once that’s done, open the Creation Kit and select File, Data… and select Campfire.esm. This will make our plug-in require Campfire as a master. Select OK.

You may need to enable multiple master support in the Creation Kit if this is your first time using it. With the Creation Kit closed, in SkyrimEditor.ini (located in your Steam\steamapps\common\skyrim directory), under [General] , set  bAllowMultipleMasterLoads=1 and save the file. Add this line if it is not present.

The Inventory Item

Next, we will create the first of our 3 required objects, the inventory item.

Begin by selecting the MiscItem category in the Object Window. To create our inventory item, we’re going to use a default item that Campfire includes for modders to easily use.

Right-click _Camp_MiscItem_DefaultForModdersCOPYME, and select Duplicate. Then, select the miscitem you just created and press F2 to rename it. If asked if you would like to create a new form, select No, and confirm that you are sure.

The _Camp_MiscItem_DefaultForModdersCOPYME form comes with a default 3D mesh (a generic large sack) and the correct script attached for Campfire inventory items, CampPlaceableMiscItem.

If you are an advanced modder, feel free to create your own Misc Item form yourself, attach your own mesh, and attach the CampPlaceableMiscItem script yourself.

Double click your new Misc Item and name it _Tutorial_ChairMiscItem as shown below, and set some weight and value numbers. Don’t worry about the attached script; we’ll come back to it.


The Placement Indicator

Next, we will create the placement indicator. Select the Activators category of the Object Window. We will again use a form that Campfire gives us for free: _Camp_Indicator_DefaultForModdersCOPYME. Like before, duplicate this form, rename it, and double-click it. We’re going to name ours _Tutorial_Indicator_CampingChair. See that your placement indicator looks similar to the one shown below.

Again, don’t worry about the attached script for now.

The _Camp_Indicator_DefaultForModdersCOPYME form comes with a default 3D mesh (a generic large sack) and the correct script attached for Campfire placement indicators, CampPlacementIndicator.

The Placeable Object

Now we will create the last form we need, the object that will actually be placed into the world.

For this tutorial, we will use a chair already present in the game. Select the Furniture category in the Object Window, and find the form CommonChair01. (Use the Filter box to help you find it.) Right-click it and select Duplicate. Double-click the new form you created.

Now that we have our chair, we need to set a few things.

  • Set the ID to something you will recognize. We’ll name ours _Tutorial_CampingChair.
  • Set the Name to Camping Chair.
  • For fun, we want our chair to be illegal to place in towns, cities, inns, and so on. To do this, we simply add a keyword. Right-click the Keywords box, select Add, and select isCampfireCrimeToPlaceInTowns. Click OK to add this keyword to the chair.
  • Lastly, attach the CampPlaceableObject script to the form.

When you’re finished, your chair should look something like what’s shown below.


Tying it All Together

We’re almost finished. We’ve created our 3 required objects, and now we will tie them together and set some parameters using the scripts attached to them.

Go back to the Misc Item category in the Object Window once again, and double-click the inventory item you created. Click the CampPlaceableMiscItem script attached to it, and select Properties.

There are a number of parameters that can be set here; you can mouse over them to read what they control. For this tutorial, we’re only interested in two properties:

  • Required_placement_indicator: Set this to the placement indicator form you created earlier. We named ours _Tutorial_Indicator_CampingChair, so if you did the same, select that.
  • Required_this_item: Set this to the inventory item itself. We named ours _Tutorial_ChairMiscItem.

Your properties window should look like the following.

After that, click OK and OK again on the Misc Item form to close it.

Next, select the Activators category in the Object Window and open your placement indicator. Select the attached CampPlacementIndicator script and click Properties.

Let’s set the following values:

  • indicator_distance: Set this to 150.0. This is the distance the indicator will float in front of the player.
  • Required_furniture_to_place: Set this to the chair placeable object. We named ours _Tutorial_CampingChair.
  • snap_to_terrain: By default, Campfire snaps placeable objects to the terrain for more natural placement. Unfortunately, chairs don’t behave that well in-game if they’re rotated. Select this and set it to False.

Your properties window should look like the following.

Lastly, open your chair placeable object in the Furniture category of the Object Window. Select the attached CampPlaceableObject script and select Properties.

Since this is the simplest placeable object, there’s not much to set here. However, we can make our chair flammable by setting setting_flammable to True. Do this if you like.


Chaircraft

The final thing we need to do is make our chair acquirable by the player in-game. There are several ways to do this, but in this tutorial we will make our chair craftable when using Survival Skill: Create Item with 2 firewood.

Select the ConstructibleObject category of the Object Window and create a new ConstructibleObject like the one shown below.

Use the _Camp_CraftingSurvival workbench keyword to place our recipe in the Survival Skill: Create Item crafting system.


Taking It For A Spin Sit

We can now Save the plug-in and try our creation in-game!

As expected, our chair appears in the Create Item crafting system.

When we “Use” our chair in our inventory, the indicator pops up and glows as expected, changing colors when the area is illegal.

We select Place Here, and… ta-da! Our chair has been placed!

We can now use our new awesome, portable chair to stare wistfully into the sunset.

Success!

In this tutorial, you learned:

  • The 3 objects that make up every Campfire placeable item: the inventory item, the placement indicator, and the placeable object
  • How to use Campfire’s built-in default inventory item and placement indicator forms to speed up creation time
  • How to tie them all together using properties
  • How to make your new item craftable using Survival Skill: Create Item

Head on to the next tutorial to learn how to take your chair to the next level by adding objects that spawn around it when it spawns, easily and automatically.