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.

Adding unique items to random loot

Page: 1 of 1
 dcinroc
10-30-2007, 1:53 PM
#1
I have been looking for a tutorial on how to add unique items to the random loot found in the game.

Can somebody point me in the right direction?
 Achilles
10-30-2007, 11:01 PM
#2
For KotOR or Sith Lords?

For Sith Lords, simply follow the naming convention used by the game itself for your new item. The script that generates the random loot doesn't care if wooden piston fiber #27 was made by you or someone at Obsidian :)
 dcinroc
10-31-2007, 1:06 AM
#3
TSL

Which file(s) do I edit? itemcreate.2da and itemcreatemira, or placeables?
 Achilles
10-31-2007, 2:29 PM
#4
The utis for the unique items. You did say random loot correct?

All you have to do is use the existing naming covention and the game will automatically add it to random loot.
 dcinroc
10-31-2007, 2:41 PM
#5
The utis for the unique items. You did say random loot correct?

All you have to do is use the existing naming covention and the game will automatically add it to random loot.

I am not sure I understand.

So, any mod item that is put into my Override folder should have a chance of showing up randomly in the game?

For example, I have downloaded all of Prime's armour and robe mods, but I've never seen any of those things show up as loot. I can only get them by console.
 Darth Xander
10-31-2007, 2:51 PM
#6
What Achilles means is that to add a unique item to "the loot" you will have to use a current item's templateresref and tag. Replacing the item with the tag and resref!

e.g replacing dark jedi robe

tag:a_robe_09
templateresref: a_robe_09
 dcinroc
10-31-2007, 3:05 PM
#7
What Achilles means is that to add a unique item to "the loot" you will have to use a current item's templateresref and tag. Replacing the item with the tag and resref!

e.g replacing dark jedi robe

tag:a_robe_09
templateresref: a_robe_09

So, in other words, you can't "add" at all, just replace?

Cuz wouldn't doing what you say overwrite the original item?
 Achilles
10-31-2007, 5:48 PM
#8
I am not sure I understand.

So, any mod item that is put into my Override folder should have a chance of showing up randomly in the game? Yes, that precisely correct, assuming that it adheres to the standard naming convention.

Read how Achilles learned about this. (http://lucasforums.com/showthread.php?t=148772)

For example, I have downloaded all of Prime's armour and robe mods, but I've never seen any of those things show up as loot. I can only get them by console. The code that handles robes is capped at...I think it's like 21 or something like that, so you'd only see them if he replaced existing robes. Everything else will work as described above.

What Achilles means is that to add a unique item to "the loot" you will have to use a current item's templateresref and tag. Replacing the item with the tag and resref!

e.g replacing dark jedi robe

tag:a_robe_09
templateresref: a_robe_09Actually, not quite however you are absolutely correct so far as robes are concerned. Unfortunately, he didn't specify robes so I did not assume that he was asking about them. ;)
 dcinroc
11-01-2007, 12:30 AM
#9
...assuming that it adheres to the standard naming convention.

Sorry to be a pain. I just want to make sure.

If it is armor, then it must have a_light/medium/heavy_xx, for weapons w_melee/blaste/brifle_xx, color crystal u_l_colo_xx, etc...

Unfortunately, he didn't specify robes so I did not assume that he was asking about them.

I didn't specify, because I didn't know there was a difference. But that also explains why all those special robes (Crado, Sylvar, etc...) never show up either.

Thanks, guys. :)
 stoffe
11-01-2007, 8:15 AM
#10
I have been looking for a tutorial on how to add unique items to the random loot found in the game.
For Sith Lords, simply follow the naming convention used by the game itself for your new item. The script that generates the random loot doesn't care if wooden piston fiber #27 was made by you or someone at Obsidian :)

If you do use the "fill out the blanks" method to add new items random loot, keep in mind that the number at the end of the UTI filename is linked to the player's character level to determine when the item becomes available (you can only get some of the better loot at high levels), so if you add items at the end of the number sequence they won't become available until later in the game.

This post (http://lucasforums.com/showpost.php?p=1894793&postcount=8) contains some info about how the Random Loot scripts pick what items to spawn.

If you want to add new items of a type that doesn't have any vacant "slots" in the number series, or want to add low-level loot, you'll have to modify the random loot system to include your items. The problem with doing this is that this isn't just a single script, but a huge bunch of scripts that use a set of include files, all of which would need to be recompiled.

To make it a little easier to add new items without having to recompile all those scripts I modified the random loot scripts to trigger an external script where custom items could be spawned. You can get it here (http://www.algonet.se/~stoffe/randomloot.rar) if you want it. The "plugin" script (which is the only one that should be modified) is 000_custom_loot.nss, it has code comments at the top that explains how it works. The normal random loot scripts (in the compiled filder) runs this script.
 dcinroc
11-01-2007, 11:01 AM
#11
Thanks, stoffe.

So, I guess the reasons why the mod items aren't showing up are two-fold;

1. some don't use the standard naming convention

2. those that DO use the standard naming convention usually have number suffixes that are too high (such as w_blaste_99)
Page: 1 of 1