Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

Extract Item Icons?

Page: 1 of 1
 daemoj
06-17-2007, 11:57 AM
#1
I'm new to modding KotOR, so please bear with me.

Does anyone know what my best route would be to extract all of the in-game KotOR and KotOR II item icons to a generally useable format (GIF, JPG, etc.)? I'm going to make a database of all the items with their icons, but don't want to have to snap images of the icons from inside the game. Hopefully there's reasonable way of doing this using KotOR Tool or another utility. Any help is appreciated!
 CraZy_B
06-17-2007, 12:14 PM
#2
Yep, Kotor Tool is what you need. You can extract anything you want with that.
 tk102
06-17-2007, 12:18 PM
#3
In KotOR Tool browse to
ERFs -> TexturePacks -> swpc_tex_gui.erf
and click the "Extract Entire ERF File" to pull all the *.tpc files into a folder.

Open a command prompt in that folder.
md icons
move i*.tpc icons

This will create a folder called icons move all the tpc files that begin with I into that folder.


Next, download BulkTPC2TGA (http://www.lucasforums.com/showthread.php?p=2272437#post2272437) utility and put it in the icons folder.

Open a command prompt in the icons folder and type:

md tga_icons
bulktpc2tga . tga_icons
You'll get a bunch of messages that say "Use of uninitialized value in pack at /PerlApp/Bioware/TPC.pm line 83." but the program is working. You should now have all your icons as .tga files in your tga_icons folder.
 daemoj
06-17-2007, 1:29 PM
#4
That'll do it. Thank you very much!
 daemoj
06-22-2007, 10:11 AM
#5
I'm making good progress on this, but I have one more question. Is there anywhere within the KotOR Tool that I can find which icon name goes with each item tag? For whatever reason, the item blueprint window doesn't show the icon name associated with each item. I have all of the icons extracted, but right now I have no way of knowing which icon goes to which item without actually cross-referencing them in-game. Once again, any help would be appreciated.
 tk102
06-22-2007, 11:32 AM
#6
I'm making good progress on this, but I have one more question. Is there anywhere within the KotOR Tool that I can find which icon name goes with each item tag? For whatever reason, the item blueprint window doesn't show the icon name associated with each item. I have all of the icons extracted, but right now I have no way of knowing which icon goes to which item without actually cross-referencing them in-game. Once again, any help would be appreciated.
Unfortunately there is no easy way to get this. Here is how you can find the icon for a particular item:

1. Retrieve the BaseItem and ModelVariation fields from the .uti file using a GFF editor.
2. Use the BaseItem value from the .uti to determine which row in the baseitems.2da file to read from. Read the itemclass field from this row.
3. The name of the icon for this uti is: "i" + itemclass + "_" + ModelVariation (written as a 3-digit number)
 daemoj
06-22-2007, 12:35 PM
#7
Hmm, that's probably more time-consuming than just looking at each item in the game.

Some items don't even have a ModelVariation field in the UTI file, so I"m not sure what to do with those.
 tk102
06-22-2007, 12:43 PM
#8
I might be able to help you out creating a list. Talk to me by private messages.
Page: 1 of 1