Resources that you will need to edit item properties:
• KotOR Tool – Used to locate and extract templates, models, and skins
• GFF Editor – Program used to edit .uti (item template) files.
Files that you will need to extract using KT:
• None. This walkthrough assumes that you have already successfully created a custom Lightsaber and would like to edit the item properties. If you have not successfully created a custom Lightsaber, please see my walkthrough here:
http://www.lucasforums.com/showthread.php?s=&threadid=129450)
Principles of editing item properties:
Editing item properties is very easy to do, however getting past the first mod can be a little difficult. This walkthrough will show you how to edit the properties of a Lightsaber, however by the end of this exercise, you will be able to edit any item in the game. This walkthrough assumes that you have already created a custom saber.
Open GFF Editor and then use File>Open to locate the Lightsaber template file that you created (g_w_lghtsbrxx.uti, etc). Open the file.
Expand the top level structure by clicking on the + sign.
All the nodes in this structure will be listed alphabetically. Locate PropertiesList and expand it by clicking on the + sign.
You should see 28 entries. These entries determine the properties that the Lightsaber will have when used with an upgrade crystal. Expand node 0 and let’s take a look at what’s there. You should see the following:
ChanceAppear [BYTE] = 100
CostTable [BYTE] = 0
CostValue [WORD] = 0
Param1 [BYTE] = 255
Param1Table [BYTE] = 0
PropertyName [WORD] = 43
Subtype [WORD] = 2
UpgradeType [BYTE] = 24
As you will be able to figure out for yourself later, this entry states “this Lightsaber can only be used by Light Side characters when Solari Crystal is added”.
Let’s take a moment to examine each of these entries and what they mean.
ChanceAppear [BYTE] = 100
This entry means that there is a 100% chance that these properties will be applied to this weapon. To the best of my understanding, this will always be 100.
The following entries I always think of as pairs.
CostTable [BYTE] = 0
CostValue [WORD] = 0
As I stated earlier, entries are listed alphabetically, which can be misleading as you will usually only determine what to enter for CostTable after you’ve selected an entry for PropertyName. Each PropertyName entry has a CostTable reference assigned to it which is how CostTable is determined. Similarly, you will select the entry for CostValue based on the CostTable assigned. Don’t worry; hopefully this will all make sense in a few minutes.
Param1 [BYTE] = 255
Param1Table [BYTE] = 0
These nodes are used to when assigning an On Hit property to your weapon (think “On Hit: Stun 25% chance, 6 seconds, DC10”). These two nodes are paired similarly to CostTable and CostValue
PropertyName [WORD] = 43
Subtype [WORD] = 2
These are the last of the “paired” nodes. This is where you will usually start when it comes to editing item properties. It all starts with PropertyName. More on this momentarily.
UpgradeType [BYTE] = 24
The last node in this example can pretty much be ignored. This applies only to items that are going to have special properties when upgraded. Examples include Melee weapons such as Mission’s Vibroblade, Armor such as Republic Mod Armor, Ranged weapons such as Carth’s blaster, or Lightsabers. If you get far enough into this to take on the challenge of making unique upgrades, then you probably don’t need this stinkin’ tutorial, so I won’t waste time going over it here. Just be aware that this is what you want to edit if you want to change upgrade properties. On to the good stuff…
Editing item properties:
Now that you have a little background on how it work, let’s go over some actual changes. We are going to apply the necessary changes to make a Lightsaber with the following properties.
Feats Required:
Weapon Proficiency – Lightsaber
Force Sensitive
Damage: Energy, 3-20
Energy, 1d8 vs. Dark Side
Critical Threat: 17-20,x2 +2d6
On Hit: Stun 50% chance, 9 seconds, DC22
Attack Modifier: +5
Let’s get started!
With your Lightsaber’s .uti file open in GFF Editor (we did this in the first step), open KT.
In KT expand BIFs>2da.bif>2d Array. Now locate and open Itempropdef.2da and IPRP_costtable.2da. Itempropdef.2da is where you will find the entries for the properties that you want to add to your weapon, as well as Costtable and Param1 information . Similarly, IPRP_costtable is where you will find the reference for the entry for CostValue. I always open these two tables first, because later, when I have several open, I know where they are in the toolbar.
In GFF Editor, right-click on PropertiesList and select Add [User-defined Struct: 0]. This will add node 29 to your list of available nodes (the 28 that were there when we opened the template).
Right click on 29 and select [Add BYTE]
Right click on 29 and select [Add BYTE]
Right click on 29 and select [Add WORD]
Right click on 29 and select [Add BYTE]
Right click on 29 and select [Add BYTE]
Right click on 29 and select [Add WORD]
Right click on 29 and select [Add WORD]
Next, click on each of the entries and enter the corresponding label in the Field ID area on the right.
1st BYTE => ChanceAppear
2nd BYTE => CostTable
1st WORD => CostValue
3rd BYTE => Param1
4th BYTE => Param1Value
2nd WORD => PropertyName
3rd WORD => SubType
Go back to ChanceAppear and type 100 into Basic Field Data window on the right.
You should now have a new node that looks something like this:
+29
ChanceAppear [BYTE] = 100
CostTable [BYTE] = 0
CostValue [WORD] = 0
Param1 [BYTE] = 0
Param1Table [BYTE] = 0
PropertyName [WORD] = 0
Subtype [WORD] = 0
Click on node 29 and use Ctrl+C to copy the node. Next, click on PropertiesList and use Ctrl+V to paste the copied node. You should see node 001 added to the list. Don’t worry about remunerating the node, the application will do it for you when you save and close. Use Ctrl+V to paste about 25 copies. You probably won’t use them all, but it’s very easy to delete the nodes you don’t use when you’re finished.
Now, let’s begin adding properties to the Lightsaber.
Let’s go back to Itempropdef.2da and find the first of the properties that we are going to add. All Lightsabers require that the user have the Weapon Proficiency – Lightsaber feat. Our weapon requires that the user also have the Force Sensitive feat (meaning only your PC can use it, since only he or she has the feat).
Looking through Itempropdef.2da, we see that line 57 references the Use_Limitation_Feat property. Now, we go back to our .uti file in GFF Editor, click on the PropertyName entry, and enter 57 in the Basic Field Data window. We have now assigned Use_Limitation_Feat to the Lightsaber, but we’re not finished with this property.
Back to Itempropdef.2da. Next to Use_Limitation_Feat in the Label column, we see Feat in the Subtyperesref column. This means that we have to assign an entry from the Feat.2da table to the SubType entry in our .uti file.
Go back to KT. Locate and open Feat.2da in the same list where you found IPRP_Costtable.2da and Itempropdef.2da. Ah, another table! Find Force Sensitive in this table (hint: it’s line 116). Now go back to GFF Editor, click on SubType, and enter 116 in the Basic Field Data. First we told the item to limit use to a certain feat, and now we’ve told the item which feat to limit use to. Clever, huh?
Back in Itempropdef.2da, we see that there is a column labeled Costtableresref. The number listed here needs to be assigned to CostTable in our .uti file. In this particular case, the Costtableresref is 0. We spend some time drilling down only to find that 0 means 0. The moral of the story is that if Costtableresref is 0, then CostTable and CostValue will be 0 in the .uti file.
**Note: four asterisks (****) in the Costtableresref column means that there is no CostTable entry associated with the Property. CostTable and CostValue will remain 0 in these cases.
This property edit is complete! Your node should look like this
+29
ChanceAppear [BYTE] = 100
CostTable [BYTE] = 0
CostValue [WORD] = 0
Param1 [BYTE] = 0
Param1Table [BYTE] = 0
PropertyName [WORD] = 57
Subtype [WORD] = 116
Next, let’s add some damage to your Lightsaber. Expand node 001. Back in Itempropdef.2da we see that the line for Damage is 11 (this goes in PropertyName back in our .uti).
Subtyperesref refers us to IPRP_damagetype. Back to KT and open IPRP_damagetype.2da. Please note that default damage type for Lightsabers is Energy. In order to improve the base damage of a Lightsaber, you must select Energy in the IPRP_damagetype table. Energy is line 12, so 12 is what we enter for Subtype in our .uti file.
In Itempropdef.2da, we see that we this time we do have a Costtableresref to deal with. This number is entered in Basic Field Data for CostTable in the .uti file. Referencing IPRP_costtable.2da, we see that line 4 refers us to IPRP_damagecost. Now locate and open IPRP_damagecost.2da in KT. Alas, yet another table. Remember that we are going to make this Lightsaber with 3-20 base damage, however the default damage for a Lightsaber is 2-16, a difference of 1d4. Luckily, IPRP_damagecost has an entry for 1d4 (it’s 6). So now we enter 6 for CostValue in our .uti file.
Our 2nd property is complete and looks like this:
+001
ChanceAppear [BYTE] = 100
CostTable [BYTE] = 4
CostValue [WORD] = 6
Param1 [BYTE] = 0
Param1Table [BYTE] = 0
PropertyName [WORD] = 11
Subtype [WORD] = 12
On to our 3rd modificiation: Damage vs. Dark Side. Back in Itempropdef.2da, we see that right below Damage, in line number 12 is DamageAlignmentGroup. PropertyName for this edit is 12. Subtyperesref is IPRP_aligngrp and when we open IPRP_aligngrp we see that Dark Side is line 3. This number represents the Subtype. Costtableresref is the same as last time, so again, CostTable is 4. We determined that we were going to add 1d8 vs. Dark Side, so checking IPRP_damagecost.2da, we see that CostValue will be 8. Our finished node should look like this:
+002
ChanceAppear [BYTE] = 100
CostTable [BYTE] = 4
CostValue [WORD] = 8
Param1 [BYTE] = 0
Param1Table [BYTE] = 0
PropertyName [WORD] = 12
Subtype [WORD] = 3
Hopefully, this is process is pretty clear by now, so we’ll try something a little more challenging: On Hit damage. Using Itempropdef.2da we determine that PropertyName is going to be 32, and that CostTable is going to be 25. We update our .uti file and then check IPRP_onhit to see that our Subtype is going to be 1. Checking IPRP_costtable we see that CostValue is 3. As a side note, line three means that defending characters must have a defense roll of 22 to resist Stun when you score a hit. Line 2 means that they must make a defense roll of 18 to resist and so on.
So now we told the weapon that we want to stun our opponent when we make a hit unless they can roll a 22 or better. Looking at most of the stun weapons we see that that the entry reads “Stun 50% chance, 9 seconds, DC22”. It looks like we’ve covered almost all of our bases, except “50% chance, 9 seconds”. I’ll save you the suspense and tell you that it’s now time to use Param1 and Param1Table.
Referencing Itempropdef.2da we see that there is, in fact, a column labeled Param1resref, but almost all of the entries (especially the one that we need) are ****. If you remember my earlier side note, you’ll recall that this means 0. Param1 remains 0 in our .uti file. Dead end? Nope. Exploring in KT, we see that there is an item property file labeled IPRP_Onhitdur (as in “dur”ation). Open that up and you’ll see that it has exactly what we’re looking for. The Label and Effectchance columns both reflect the percentage of a successful stun. Durationrounds provides our time limitation (Hint: each round is 3 seconds, therefore 9 second would be 3 rounds. The line we are looking for is number 4 and this goes in Param1Table. See? That wasn’t so bad. Our next node looks like this:
+003
ChanceAppear [BYTE] = 100
CostTable [BYTE] = 25
CostValue [WORD] = 3
Param1 [BYTE] = 0
Param1Table [BYTE] = 4
PropertyName [WORD] = 32
Subtype [WORD] = 1
Next, let’s alter the critical threat and critical hit damage our Lightsaber can shell out. Again, I’ll save you the suspense by telling you up-front that you alter critical threat range using Keen and critical hit damage using Massive Criticals. Once again back to Itempropdef.2da, we see that Keen is line 28, so we enter that number for our PropertyName, but wait. Subtyperesref, Costtableresref, and Param1resref are all 0’s. We enter 28 in PropertyName and that’s it! How easy is that? Unfortunately, one instance of Keen will only increase the critical threat range by one. The default for a Lightsaber is 19-20,x2 and we’ve now changed it to 18-20,x2. That’s nice, but we can do better. Expand one more node and enter 28 in the PropertyName field again. We’ve now changed to critical threat range to 17-20,x2 (Note: I believe this is the maximum amount that you can increase the range). Nodes 004 and 005 should look like this:
+004
ChanceAppear [BYTE] = 100
CostTable [BYTE] = 0
CostValue [WORD] = 0
Param1 [BYTE] = 0
Param1Table [BYTE] = 0
PropertyName [WORD] = 28
Subtype [WORD] = 0
+005
ChanceAppear [BYTE] = 100
CostTable [BYTE] = 0
CostValue [WORD] = 0
Param1 [BYTE] = 0
Param1Table [BYTE] = 0
PropertyName [WORD] = 28
Subtype [WORD] = 0
Now for those massive criticals. Check Itempropdef.2da and you’ll see that your PropertyName is going to be 49. Subtype is blank. CostTable is our good ole’ friend number 4 and we have selected number 10 for CostValue. Along with our two Keen entries, our Critical Threat line now looks like this at the Workbench:
Critical Threat: 17-20,x2 +2d6
Our node looks like this in the .uti file:
+006
ChanceAppear [BYTE] = 100
CostTable [BYTE] = 4
CostValue [WORD] = 10
Param1 [BYTE] = 0
Param1Table [BYTE] = 0
PropertyName [WORD] = 49
Subtype [WORD] = 0
Lastly, let’s add an Attack Bonus to our Lightsaber. You’re sure to have the hang of this by now, therefore you’ll quickly find that PropertyName is going to be 38, Subtype is 0, CostTable is 2, and CostValue is 5 (because that’s what we picked at the beginning). Our final node looks like this:
+007
ChanceAppear [BYTE] = 100
CostTable [BYTE] = 2
CostValue [WORD] = 5
Param1 [BYTE] = 0
Param1Table [BYTE] = 0
PropertyName [WORD] = 38
Subtype [WORD] = 0
At this point, you can go ahead and delete the extra nodes that we created using the Delete key. File>Save to save changes, copy the updated file over to the Override folder and replace your earlier mod, and you’re all set. The next time you open the .uti file, you’ll see that GFF Editor automatically changed 001-007 to 30-36 for you.
We only touched on part of what you can do with your item properties. Explore and experiment to learn what else you can do! I hope that this walkthrough has been helpful. Please feel free to PM me with comments or suggestions. Thanks for reading.