Return to site

Skyrim Creation Kit Add Item To Player Inventory

broken image


  1. Skyrim Se Add Item
  2. Skyrim Creation Kit Add Item To Player Inventory Guide
  3. Skyrim Creation Kit Add Item To Player Inventory System
  4. Skyrim Creation Kit Add Item To Player Inventory List
  5. Skyrim Creation Kit Add Item To Player Inventory List
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.

Removeallitems player. This example is similar to the second, but instead of moving them into the inventory of an NPC with a specified reference ID, this command will move the items from your target's inventory into your own inventory. This console command clears your character's inventory. The easiest way for adding new content, including new characters, for Skyrim with the Creation Kit is to copy an existing object and that is what we are going to do in this tutorial. So, we are going to use an existing NPC as a template for creating the new one. In the Object window expand the menu Actor and choose any of the existing NPCs. Remove item preview and move player character to the position while opening the inventory menu. The easiest way for adding new content for Skyrim with the Creation Kit is to copy an existing object and that is what we are going to do in this tutorial. First we are going to add a new container that will have all the objects our merchant is going to sell. To do this: Launch the Creation Kit; Load the Skyrim master file. For The Elder Scrolls V: Skyrim, I'm looking for a way to read the player's inventory without having to go into the game to do it. I've scoured the pages from the UESP wiki on save file format but I couldn't find where the player's inventory is, even after writing a crude REFR change form reader. The wiki has a lot of information on many.

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.
  • A placement indicator – this is an activatorobject that allows the player to visualize where their item will go when they're finished placing it.
  • A placeable object – the placeable object is always a furnitureor activatorobject 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 Steamsteamappscommonskyrim 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.

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

This tutorial relies on knowledge gained in previous tutorials, and requires understanding the basics of navigating the Creation Kit.

In this tutorial, we will create a safe storage chest that the player can place wherever they like.

Creating placeable containers in Campfire is almost identical to creating regular placeable objects (like the chair in previous tutorials). The difference is that we will create a container reference that our placeable 'container' will point to. We will put that container reference in a far-off cell (_Camp_ModPlaceableObjectCell). That way, the player can pick up and place the container without risk of losing items, and the player can place many containers which will all access the same centralized storage.

Getting Started

To start, open the Creation Kit with both Campfire and the Campfire Dev Kit installed. 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 Steamsteamappscommonskyrim 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
Skyrim Creation Kit Add Item To Player Inventory
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 AA_PlaceableChestMISC 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 AA_PlaceableChestIndicator. See that your placement indicator looks similar to the one shown below.

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

Skyrim Creation Kit Add Item To Player Inventory
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 object that will actually be placed into the world. Create a new Activator object and set the ID to AA_PlaceableChest.

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

  • Set the Name to Supplies Chest.
  • Set the Activate Text Override to 'Open', which is more appropriate for a container.
  • Assign the upperchest01.nif mesh to the Activator. (This is a base game Skyrim mesh located in meshes/clutter/upperclass. Decompressing the Skyrim – Meshes.bsa archive is beyond the scope of this tutorial. See here for more info.)
  • For fun, we want our chest 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 chest.
  • Lastly, attach the CampPlaceableContainer script to the form.

When you're finished, your chest should look something like what's shown below.

Item

The Container Reference

We need to create a new container reference that will act as the 'real' container that all placed containers of this type will point to. In the Object Window, navigate to Containers and duplicate BarrelEmpty01. Rename the copy as AA_PlaceableChestContainer.

IMPORTANT! Open the new container and uncheck the 'Respawns' flag. If you fail to do this, the storage will not be safe, and the player will lose their items!

Skyrim creation kit add item to player inventory free

Drag and drop this new container into the _Camp_ModPlaceableObjectCell. Name the reference AA_PlaceableChestContainerRef.

Skyrim Creation Kit Add Item To Player Inventory
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 AA_PlaceableChestMISC 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 AA_PlaceableChestIndicator. 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 object that will actually be placed into the world. Create a new Activator object and set the ID to AA_PlaceableChest.

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

  • Set the Name to Supplies Chest.
  • Set the Activate Text Override to 'Open', which is more appropriate for a container.
  • Assign the upperchest01.nif mesh to the Activator. (This is a base game Skyrim mesh located in meshes/clutter/upperclass. Decompressing the Skyrim – Meshes.bsa archive is beyond the scope of this tutorial. See here for more info.)
  • For fun, we want our chest 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 chest.
  • Lastly, attach the CampPlaceableContainer script to the form.

When you're finished, your chest should look something like what's shown below.

The Container Reference

We need to create a new container reference that will act as the 'real' container that all placed containers of this type will point to. In the Object Window, navigate to Containers and duplicate BarrelEmpty01. Rename the copy as AA_PlaceableChestContainer.

IMPORTANT! Open the new container and uncheck the 'Respawns' flag. If you fail to do this, the storage will not be safe, and the player will lose their items!

Drag and drop this new container into the _Camp_ModPlaceableObjectCell. Name the reference AA_PlaceableChestContainerRef.

Tying it All Together

We're almost finished. We've created our 4 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.
  • Required_this_item: Set this to the inventory item itself.

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_activator_to_place: Set this to the chest placeable object. We named ours AA_PlaceableChest.

Your properties window should look like the following.

Skyrim Se Add Item

Lastly, open your chest placeable object. Select the attached CampPlaceableContainer script and select Properties.

We need to set the Required_LinkedContainerRef property to the container reference we created earlier. We should also set the Setting_StartUpRotation property to 180, so the chest isn't facing away from us when we place it. Configure as shown below.

Crafting

The final thing we need to do is make our chest acquirable by the player in-game. There are several ways to do this, but in this tutorial we will make our chest craftable when using a Forge with 10 firewood and 2 iron ingots.

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

Use the CraftingSmithingForge workbench keyword. Add the firewood and iron ingots to the Required Item List as shown below.

Placing the Chest

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

As expected, our chest appears in the Forge crafting system.

Hypersonic 2 team air win7 64bit java. When we 'Use' our chest in our inventory, the indicator appears and we can place it. Success!

When 'Use' is selected, the chest's inventory appears.

Skyrim Creation Kit Add Item To Player Inventory Guide

In this tutorial, you learned:

  • How to use CampPlaceableContainer to create a new placeable container item

Skyrim Creation Kit Add Item To Player Inventory System

Further Improvements:

  • Change the placement indicator to look like a chest by changing the indicator's mesh. You'll have to set the indicator's z_angle_adjustment property to have the front of the chest face the player when placing it.
  • Just like CampTentEx and CampPlaceableObjectEx, there is a CampPlaceableContainerEx, which allows you to use position references to place more complex container objects consisting of several parts.

Good luck, and happy modding!

To release your creations as your own Campfire-powered mod, please review the License pagefor important details.

Skyrim Creation Kit Add Item To Player Inventory List

Have fun,

Skyrim Creation Kit Add Item To Player Inventory List

– Chesko





broken image