View Single Post
Old 11-10-2005, 10:38 AM   #1348
Fred Tetra
Kotor Tool Guy
 
Fred Tetra's Avatar
 
Join Date: Jan 2004
Location: What a creepy photo, eh? Had to use it!
Posts: 947
Hot Topic Starter LFN Staff Member Helpful! Notable contributor 
Quote:
Originally Posted by Fuu
Yes, and Yes. Tried your suggestion and it still put out another error.

Ok, so I'm guessing that the gff editor in KoToRTool cant edit files that have been opened in another prog? I think I'll just start a new one..........thanks Mr. Tetra!

Fuu
How did you create the Properties section of your UTI file? What I found is that the Param1 field always had 0 (zero) in it when it should have been -1.

The 255 value tells KotOR (and Kotor Tool) that there isn't any "fine grained detail" for a property.

For example, an Attribute Bonus, Strength, +2 has a:
Property ID of 0 (Row 0 in itempropdef.2da; tells you to use iprp_abilities.2da)
Subtype ID of 0 (Row 0 in iprp_abilities.2da; "Strength")
CostTable of 1 (Row 1 in iprp_costtable.2da; tells you to use iprp_bonuscost.2da; "Bonus")
CostValue of 2, (Row 2 in iprp_bonuscost.2da; "+2")
Param1 of 255
Param1Value - doesn't matter; if Param1 is "unused", value is unused
Param2 - doesn't matter; if Param1 is "unused", Param2 is as well.

As you can see, no Param1 or Param2 values are needed, so they must be set to -1; 0 or higher means the param is in index into yet another 2DA table.

Just for example, if you had a property "Damage Bonus vs. Alignment, Dark Side, +2, Unstoppable", the values would look like this:
Property ID of 12 (Row 12 in itempropdef.2da; tells you to use iprp_aligngrp.2da)
Subtype ID of 3 (Row 3 in iprp_aligngrp.2da; "Dark Side")
CostTable of 4 (Row 4 in iprp_costtable.2da; tells you to use iprp_damagecost.2da; "Damage")
CostValue of 2 (Row 2 in iprp_damagecost.2da; "2")

Ahh, now how do we specify "Unstoppable"? With the Param1:
Param1 of 0 (Row 0 in iprp_paramtable.2da; tells you to use iprp_damagetype.2da)
Param1Value of 4 (Row 4 in iprp_damagetype.2da; "Unstoppable")


Ok, so now you're probably wondering why your data causes the Kotor Tool property editor to crash. Because the editor follows the exact rules that the game engine does for looking up values, when it sets up the drop down menus and sets the values for the property (#1 above), it "knows" that there isn't a Param1 or Param1Value associated with it because the itempropdef.2da says so. So when your property specifies values for them, it doesn't handle it gracefully.

The item property editor was designed to be used only with property data from in-game items or that which it assigned to user-made items. It will work with "hand edited" properties, but you have to follow some strict rules.

I suggest editing your item's properties by using the editor to duplicate each existing "bad" entry, then delete that "bad" entry. You'll be left with a good set of properties.


Kotor Tool Developer
http://kotortool.starwarsknights.com/

"You want to help everyone who asks for aid, answer all of their questions, write that crucial bit of code for which they're searching, and be the hero who saves the day (and their job), but there comes a point when you realize that sleep is sometimes necessary."
—Stephen Toub

Visit the Kotor Tool Forum
Fred Tetra is offline   you may: quote & reply,