Jump to content

Tutorial: How to Create an Item Set


Site Bot

Recommended Posts

Article link: Tutorial: How to Create an Item Set

 

<style type="text/css">

 

div.divMain {

font-family: "Trebuchet MS";

font-size: small;

}

div.Ctr {

text-align: center;

}

 

span.sHdr {

font-size: medium;

font-weight: bold;

color: navy;

}

 

 

</style>

 

</head>

 

<body>

<div class="divMain">

This tutorial will be a step by step guide on how to create an Item Set to use in Dragon Age: Origins. If you haven't created your own item and/or module before this, I *highly* recommend you

go and follow John Vanderbeck's excellent tutorials "<a href="http://dragonagemodding.wordpress.com/2009/11/11/a-start-creating-a-module-to-give-your-player-an-item/">A

Start: Creating a Module to Give Your Player an Item</a>" and "<a href="http://dragonagemodding.wordpress.com/2009/11/11/2da-or-not-2da-overriding-2da-files/">2DA

or not 2DA - Overriding 2DA files</a>". I did and I still refer to them from time to time.

<p></p>

This tutorial is intended as a compliment to that those. We'll cover some of the same ground, and then go on the few extra steps to add the necessary connections for items to be an Item Set.

For those of you familiar with the process, please excuse the hand-holding *grins!*.

<p></p>

<span class="sHdr"><strong>Create a New Module</strong></span><br />

We'll start off from scratch by creating our own new module. Click <em>FILE</em> then <em>MANAGE MODULES</em>. In this dialog:<br />

<br />

<div class="Ctr">

<img src="http://empyreancitadel.wordpress.com/files/2009/12/01_manage_modules.jpg" alt="Manage Modules"/>

</div>

<br />

Click the NEW button, which will display the next dialog. We're now looking at the properties for our module. There's a lot of stuff in here, but we won't actually be touching all of it. First, we'll give our module a name. I'm going to call mine, "QuickBlades". You can name yours whatever you'd like, as long as its 19 characters or less.

The next thing is the UID or Unique Identifier, which has to be unique across every mod out there. I use the three letter prefix of 'kny_' for nearly all my work, so I'll use the UID "kny_quicklades".

Since we're adding on to the single player campaign, we need to change the 'Extended Module' property to it. I've outlined the three properties in the image below:<br />

<br />

<div class="Ctr">

<img src="http://empyreancitadel.wordpress.com/files/2009/12/03_new_module_objectinspector_a.jpg" alt="New Module Properties" />

</div>

 

<br />

Next, we'll clear out the script for our module. We're going to be triggering our module a different way, which I'll delve into later.<br />

<br />

<div class="Ctr">

<img src="http://empyreancitadel.wordpress.com/files/2009/12/04a_new_module_objectinspector_script.jpg" alt="New Module Properties - Script" width="442" height="531" />

</div>

<br />

Click the "..." to open the Resource Open/Save dialog and choose (None) then

the <em>OK</em> button (which will take you back to the Object Inspector):

<br />

<br />

<div class="Ctr">

<img src="http://empyreancitadel.wordpress.com/files/2009/12/04b_resourceopensave_script.jpg" alt="Resource Open/Save" width="505" height="374" />

</div>

<br />

 

 

I also like to take care of this next step, dealing with StringID's, before

continuing on. I've highlighted the relevant properties in the next image:<br />

<br />

<div class="Ctr">

<img src="http://empyreancitadel.wordpress.com/files/2009/12/04_new_module_objectinspector_stringids1.jpg" alt="New Module Properties - String IDs" width="442" height="711" />

</div>

<br />

A bit counter-intuitively, you start off with the StringID Last Used. This number, minus 1, will end up being your StringID Begin. I believe the number here has to be above 700,000,000. Whatever number you use,

it has to be unique across *all* modules, so pick one sufficiently random. I set my StringID Last Used to 1016002999, so my StringID Begin is 1016003000. I've given myself space for 50 entries, so my

StringID End is 1016003050. <br />

<br />

Now, I'll go ahead and set three of the StringIDs that show in the Download Content screen when our module is viewed: DisplayNameStringID (1016003000), DescriptionStringID (1016003001) and

PublisherStringID (1016003002).<br />

<br />

With these properties set, Click the OK button. You'll be back in the Manage Modules dialog, with our new module selected. If it's not, select it and and click <em>OPEN</em>. We have one more property to set for

our Module, so click FILE then <em>MANAGE MODULES</em>. Click the HIERARCHY button. In the Hierarchy dialog, click the Single Player checkbox.<br />

<br />

<div class="Ctr">

<img src="http://empyreancitadel.wordpress.com/files/2009/12/05_module_hierarchy.jpg" alt="Module Hierarchy" />

</div>

<br />

Next, click the OK button and lastly, close the Manage Modules dialog.<br />

<br />

<span class="sHdr"><strong>Starting StringIDs</strong></span><br />

Click <em>TOOLS</em> then <em>STRING EDITOR</em>. You'll see a dialog

similar to the next image:<br />

<br />

<div class="Ctr">

<img src="http://empyreancitadel.wordpress.com/files/2009/12/06_string_editor.jpg" alt="String Editor" />

</div>

<br />

Where it says "There are no items to show." right mouse click and choose <em>

INSERT</em> and then <em>INSERT STRING</em>.  You'll see the Edit String

dialog:<br />

<br />

<div class="Ctr">

<img src="http://empyreancitadel.wordpress.com/files/2009/12/11_string_editor_empty.jpg" alt="String Editor" width="553" height="428" />

</div>

<br />

Click the drop down for Type, and choose "Module Localized Text"

(I'm being extra particular here because we want to make certain the String

is part of our Module and not attached to anything else inappropriately).<br />

<br />

<div class="Ctr">

<img src="http://empyreancitadel.wordpress.com/files/2009/12/12_string_editor_empty.jpg" alt="String Editor" width="553" height="428" />

</div>

<br />

<br />

The Text is what will show. I'm naming the Module QuickBlades. I've also gone the anal

retentive route and put the description and StringID into the Description

field.<br />

<br />

<div class="Ctr">

<img src="http://empyreancitadel.wordpress.com/files/2009/12/08_string_editor_edit_string.jpg" alt="String Editor" />

</div>

<br />

Lets go ahead and fill in the two other StringIDs we've already defined. the DescriptionStringID and PublisherStringID.<br />

 <br />

<div class="Ctr">

<img src="http://empyreancitadel.wordpress.com/files/2009/12/09_string_editor_descriptionstringid.jpg" alt="String Editor - DescriptionStringID" width="553" height="428" />

</div>

<br />

<br />

<div class="Ctr">

<img src="http://empyreancitadel.wordpress.com/files/2009/12/10_string_editor_publisherstringid.jpg" alt="String Editor - PublisherStringID" width="553" height="428" />

</div>

<br />

Let's check our work real quick. Check the "Do NOT Use Filter" checkbox and

you should see the following dialog:<br />

<br />

<div class="Ctr">

<img src="http://empyreancitadel.wordpress.com/files/2009/12/13_string_editor_showentries.jpg" alt="String Editor - Show Entries" width="820" height="473" />

</div>

<br />

Pat yourself on the back and let's move on to creating our items.<br />

<br />

<span class="sHdr">Item Creation</span><br />

The game will let you create many different types of item set collections. For this

tutorial, we'll go with something easy, two daggers.

Click <em>FILE</em> then <em>NEW</em> then choose <em>ITEM</em>. You'll see the following

dialog:<br />

<br />

<div class="Ctr">

<img src="http://empyreancitadel.wordpress.com/files/2009/12/14_create_new_resource.jpg" alt="New Resource" width="385" height="223" />

</div>

<br />

Change the module to Core Game Resources.

Enter the Resource Name and, for ease of use, a Folder:<br />

<br />

<div class="Ctr">

<img src="http://empyreancitadel.wordpress.com/files/2009/12/15_create_new_resource_bloodthorn1.jpg" alt="New Resource - BloodThorn" width="385" height="223" />

</div>

<br />

Now, you'll have the item open in your main window, which should look

something similar to this:<br />

<br />

<div class="Ctr">

<img src="http://empyreancitadel.wordpress.com/files/2009/12/16_item_bloodthorn1.jpg" alt="Item - BloodThorn" width="889" height="946" />

</div>

<br />

I'm not going to spend a whole lot of time detailing what you can do here

(most of you probably already know). Let's make our first item of the set, the

dagger BloodThorn. <br />

<br />

Change the Base Item Type to Weapon - Dagger. <br />

Change the

Description to: BloodThorn. <br />

Click the box where it says [No Image]. Click

the button with the ellipse("..."). In the Resource Open/Save dialog Name

field, type ico_dagger and double click it in the list.<br />

<br />

<br />

<div class="Ctr">

<img src="http://empyreancitadel.wordpress.com/files/2009/12/17_resource.jpg" alt="Resource Open/Save" />

</div>

<br />

Change the Inventory Subgroup to: 203000. <br />

Change the Item Variation to: Dagger 3 <br />

Change the MaterialProgression to: Weapon,Steel. <br />

Change the MaterialType to: Weapon,Steel. <br />

Change the Name to : BloodThorn. <br />

Change the Name to : BloodThorn. <br />

Select Item Properties. In the Item properties dialog, Add Increase Attack at Power Level 2 and Increase Damage of 2: <br />

<br />

<div class="Ctr">

<img src="http://empyreancitadel.wordpress.com/files/2009/12/18_item_properties.jpg" alt="Item Properties" />

</div>

<br />

Click the OK button. Next click Variables and the ellipse ("..."). This is

where we tell the game that this item belongs to an Item Set.<br />

<br />

<div class="Ctr">

<img src="http://empyreancitadel.wordpress.com/files/2009/12/19_item_properties_variables.jpg" alt="Item Properties - Variables" />

</div>

<br />

I've changed the ITEM_SET to 400 and ITEM_RUNE_ENABLED to 1. Setting ITEM_RUNE_ENABLED to 1 means that this item can be enchanted with Runes. We'll deal with the ITEM_SET variable later. Now, Save our item.

It should look simiar to the following:<br />

<br />

<div class="Ctr">

<img src="http://empyreancitadel.wordpress.com/files/2009/12/20_item_properties_set.jpg" alt="Item Properties - Variables" />

</div>

<br />

At the top, where it says "kny_dager_bloodthorn.uti", right mouse click and choose "Check In"<br />

<br />

<div class="Ctr">

<img src="http://empyreancitadel.wordpress.com/files/2009/12/21_item_properties_set.jpg" alt="Item Properties" />

</div>

<br />

At the top, where it says "kny_dagger_bloodthorn.uti", right mouse click and choose "Check In". Confirm the check in (you can enter a Comment if you wish or check the 'I do not wish to enter a comment' checkbox). Right mouse click again and choose Duplicate Item.<br />

<br />

<div class="Ctr">

<img src="http://empyreancitadel.wordpress.com/files/2009/12/22_item_properties_duplicate.jpg" alt="Item Properties" />

</div>

<br />

Fill in the Resource Name and click OK.

<br />

<div class="Ctr">

<img src="http://empyreancitadel.wordpress.com/files/2009/12/23_duplicate_resource.jpg" alt="Duplicate Resource" width="385" height="223" />

</div>

<br />

Now we have an EXACT copy of BloodThorn, which we need to change a few fields on like the following (changed fields highlighted):<br />

<br />

<div class="Ctr">

<img src="http://empyreancitadel.wordpress.com/files/2009/12/24_item_properties_bonecarver.jpg" alt="BoneCarver" />

</div>

<br />

Check in the BoneCarver. At this point, we've completed creating the items themselves. We've only got a few more steps to go!

<br />

<br />

<span class="sHdr">Content Delivery</span><br />

Now that we have our items crafted, we need a script to put them some where that the characters can access them. This tutorial includes two methods for item delivery, both via scripting: one script puts

the items in the party inventory, or, my preferred method, puts the items in the camp merchant's inventory. We'll start with the first script, the one that adds the items directly to the party inventory.

Since we want this to happen only one time, we'll follow weriKK's tried and true method and create a Plot that we can later check to see if we've already given the party the items. Click

<em>FILE</em> then <em>NEW</em> then <em>PLOT</em> and you'll see the now familiar Create New Resource dialog. File it out as I have below:<br />

<br />

<div class="Ctr">

<img src="http://empyreancitadel.wordpress.com/files/2009/12/26_createresource_plot_aic.jpg" alt="Add Item Check Plot" width="385" height="223" />

</div>

<br />

Now we have the Plot dialog open for us. We don't need to do much here. In the big white area where it says "There are no items to show", right mouse click and choose <em>INSERT</em> then <em>MAIN FLAG</em>.

At that point, you should see a screen like the following:

<br />

<br />

<div class="Ctr">

<img src="http://empyreancitadel.wordpress.com/files/2009/12/27_plot_properties1.jpg" alt="Plot Properties" width="1024" height="826" />

</div>

<br />

Click on the area that says "FLAG_0" and change it to "ADD_ITEM_CHECK":

<br />

<br />

<div class="Ctr">

<img src="http://empyreancitadel.wordpress.com/files/2009/12/28_plot_properties_changed1.jpg" alt="Plot Properties" width="1024" height="826" />

</div>

<br />

We're now done with the plot and can move on. Save it, check it in and close it. Time now to create our two scripts. The first one is the Add To Character script. Click

<em>FILE</em> then <em>NEW</em> then <em>SCRIPT</em>. Populate the

New Resource dialog like the following: <br />

<br />

<div class="Ctr">

<img src="http://empyreancitadel.wordpress.com/files/2009/12/29_script_resource_atc.jpg" alt="Add to Character Script" width="385" height="223" />

</div>

<br />

Now, lets add the code to the Script Resource. You should be able to copy and paste the

following code in:

<br />

 

<div style="border:1px black dashed;">

<div style="margin: 10px;position: relative;">

<pre>

// Add To Character Script

#include "utility_h"

#include "plt_aic_check"

 

void main()

{

object oPC = GetHero();

 

// Debug Code - uncomment the next line by deleting the '//' on the next line to have the message show

//DisplayFloatyMessage(oPC, "atc_qb script started", FLOATY_MESSAGE, 14329120, 10.0);

 

// Checks to see if the plot has already been triggered. If it has then the script will end

if ( WR_GetPlotFlag( PLT_AIC_CHECK, ADD_ITEM_CHECK ) == TRUE ){

// Debug Code - uncomment the next line by deleting the '//' on the next line to have the message show

//DisplayFloatyMessage(oPC, "QuickBlades have been already delivered", FLOATY_MESSAGE, 14329120, 10.0);

 

return;

}

else {

// Debug Code - uncomment the next line by deleting the '//' on the next line to have the message show

//DisplayFloatyMessage(oPC, "QuickBlades have NOT been delivered", FLOATY_MESSAGE, 14329120, 10.0);

 

// Adds the items to the party inventory

UT_AddItemToInventory(R"kny_dagger_bloodthorn.uti", 1);

UT_AddItemToInventory(R"kny_dagger_bonecleaver.uti", 1);

 

// Displays a message to let you know the items have been added to the party inventory

DisplayFloatyMessage(oPC, "Items Added to Inventory", FLOATY_MESSAGE, 14329120, 10.0);

 

// Sets the plot flag so these items won't be continually added

WR_SetPlotFlag( PLT_AIC_CHECK, ADD_ITEM_CHECK, TRUE );

}

}

</pre>

 

</div>

</div>

 

<br />

Next is out script to Add to Merchant. Click <em>FILE</em> then <em>NEW</em> then <em>SCRIPT</em>. Populate the New Resource dialog like the following: <br />

<br />

<div class="Ctr">

<img src="http://empyreancitadel.wordpress.com/files/2009/12/29_script_resource_atc.jpg" alt="Add to Character Script" width="385" height="223" />

</div>

<br />

Now, lets add the code to the Script Resource. Copy and paste the

following code in:

<br />

 

<div style="border:1px black dashed;">

<div style="margin: 10px;position: relative;">

<pre>

//Add to Merchant Script

#include "utility_h"

#include "plt_aic_check"

 

void main()

{

object oPC = GetHero();

 

// Debug Code - uncomment the next line by deleting the '//' on the next line to have the message show

//DisplayFloatyMessage(oPC, "atm_qb script started", FLOATY_MESSAGE, 14329120, 10.0);

 

// Checks to see if the plot has already been triggered. If it has then the script will end

if ( WR_GetPlotFlag( PLT_AIC_CHECK, ADD_ITEM_CHECK ) == TRUE ){

// Debug Code - uncomment the next line by deleting the '//' on the next line to have the message show

//DisplayFloatyMessage(oPC, "QuickBlades already delivered to merchant", FLOATY_MESSAGE, 14329120, 10.0);

 

return;

}

else {

 

object oArea = GetObjectByTag("cam100ar_camp_plains");

 

if (IsObjectValid(oArea)){

 

object oMerchant = GetObjectByTag("store_camp_bodahn");

 

if (IsObjectValid(oMerchant))

{

// Adds BloodThorn to the Merchant if he doesn't already have one

if (UT_CountItemInInventory(R"kny_dagger_bloodthorn.uti",oMerchant) == 0){

CreateItemOnObject(R"kny_dagger_bloodthorn.uti",oMerchant,1,"",TRUE);

}

 

// Adds BoneCleaver to the Merchant if he doesn't already have one

if (UT_CountItemInInventory(R"kny_dagger_bonecleaver.uti",oMerchant) == 0){

CreateItemOnObject(R"kny_dagger_bonecleaver.uti",oMerchant,1,"",TRUE);

}

 

// Displays a message to let you know the items have been added to the party inventory

DisplayFloatyMessage(oPC, "Items Added to Merchant Bodahn's Inventory", FLOATY_MESSAGE, 14329120, 10.0);

 

// Sets the plot flag so these items won't be continually added

WR_SetPlotFlag( PLT_AIC_CHECK, ADD_ITEM_CHECK, TRUE );

}

}

}

}</pre>

 

</div>

</div>

 

<br />

Alright, believe it or not, we're almost done with the Toolset for now.

We need to do some exporting and then we can close down the Toolset. The

following seems to be the best sequence.<br />

On the right hand side, Palette Window, Click the <em>ALL</em> button. On

the right hand side of the app, you should see something like the following:<br />

<br />

<br />

<div class="Ctr">

<img src="http://empyreancitadel.wordpress.com/files/2009/12/30_palette_all.jpg" alt="Palette All" width="703" height="817" />

</div>

<br />

Right Mouse Click on the QuickBlades Folder (you'll do this a few times) and

Click:<br />

Export > Empty Export Folders<br />

Right Mouse Click again and Click:<br />

Export > Export without dependent resources (an absolute TON of files will

be exported)<br />

Right Mouse Click again and Click:<br />

Export > Generate Module XML<br />

Right Mouse Click again and Click:<br />

Export > Generate Manifest XML<br />

Right Mouse Click again and Click:<br />

Export > Export Talk Table<br />

<br />

Whew! Alright, that's all the exporting we need to do, and actually, we can

now close down the Toolset.<br />

<br />

Now, we need to clear out a bunch of unnecessary files. They'll be located in

the folder:<br />

<Your Documents Folder>BioWareDragon Agepackagescoreoverridetoolsetexport<br />

<br />

Everything in that folder goes.<br />

<br />

Alright, now for the two most important steps of this entire process. We've

created our content, and our scripts, BUT, we've not set up the actual Item

Set, nor have we told the game how to trigger our module. In <br />

order to do both, we need to create two data files that the game can read

(2DA files, which have a .gda extension). <br />

<br />

For ease of use, I've created both files and put them in a zip you can

download over at DragonAge <br />

<br />

<span class="sHdr">Item Set...Setup</span><br />

Dragon Age stores some data in what are essentially modified Excel files. We

need to extend one such file, the itemsets.xls file. Go ahead and take a

peek at it now. It's located in the folder:<br />

<br />

Dragon AgetoolsSource2DA<br />

<br />

<br />

<div class="Ctr">

<img src="http://empyreancitadel.wordpress.com/files/2009/12/31_itemset.jpg" alt="itemset.xls" width="1006" height="835" />

</div>

<br />

Every item set is defined here. We are going to create our own item set. In

your xls creation tool of choice (Excel or OpenOffice), create a new

spreadsheet and make it look like the following:<br />

<br />

<div class="Ctr">

<img src="http://empyreancitadel.wordpress.com/files/2009/12/32_excel_itemset.jpg" alt="Excel Item Set" width="545" height="197" />

</div>

<br />

 

 

</div>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...