lfnetwork.com mark read register faq members calendar

Thread: Items drop [KotOR]
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 08-09-2013, 08:11 AM   #1
Salk
Rookie
 
Join Date: Apr 2010
Posts: 73
Current Game: Knights of the Old Republic
Question Items drop [KotOR]

Hello!

Can someone shed some light about how the game handles items drop? I guess there is a randomization for some NPCs while some others that carry unique / plot items always drop them.

How does it work?

Thanks!
Salk is offline   you may: quote & reply,
Old 08-09-2013, 11:59 AM   #2
Fair Strides 2
Witty Programmer
 
Fair Strides 2's Avatar
 
Join Date: Jan 2012
Location: Oregon, United States
Posts: 584
Current Game: Master of Orion 2
Helpful! 
Quote:
Originally Posted by Salk View Post
Hello!

Can someone shed some light about how the game handles items drop? I guess there is a randomization for some NPCs while some others that carry unique / plot items always drop them.

How does it work?

Thanks!
I'll try not to overload you with info...

First off, the NPCs that always drop the same items. That's because they have those in their inventory in their .utc file. Auto-drop on death...

Okay, the game drops treasure in two ways:

1. Using k_inc_drop to determine random loot for creatures.

2. Using k_inc_treasure to determine random loot for containers.

Random Loot For Creatures:
In the OnSpawn event for creatures, they call a function that generates their random loot. That function calls functions from k_inc_drop, and is passed the level of the creature. This level is in the .utc, but is modified by the game's level-scaling.

Now in k_inc_drop...
The game has an assorted list of items that it classifies into 3 level zones. K_inc_drop has these levels at 5, 10, and 15, and refers to them at DR_LOW_LEVEL, DR_MEDIUM_LEVEL, and DR_HIGH_LEVEL.

If the creature's level is under or equal to 5, they normally get small stuff like
  • Repair Kits
  • Frag grenades
  • Med Packs
  • and stacks of 5,10, or 25 credits

***WARNING***This applies to all categories
I say normally because the way the functions are called, the creature will always get the treasure of their level, but there's a random chance that they will get a second copy of their treasure function called, and another random chance that they will get the function for the next higher level-category called.
***WARNING***

If the creature's level is under or equal to 10 and greater than 5, they normally get small stuff like
  • Advanced Repair Kit
  • 50 credits
  • Advanced Med Pack
  • Battle Stimulant
  • Adrenal Stamina
  • Adrenal Alacrity
  • Adrenal Strength
  • Stun Grenade
  • Frag Grenade
  • Poison Grenade
  • Sonic Grenade
  • Adhesive Grenade
  • Cryo Grenade
  • and Ion Grenade

If the creature's level is under or equal to 15, but greater than 10, they still get the Midlevel items, but have a chance to get high level items.

If the creature's level is greater than 15, they will usually get stuff like
  • Super Repair Kit
  • Life Pack
  • Thermal Detonator
  • Speed Stim
  • Hyper versions of the Stimulants from Mid levels
  • All of the grenades from Mid-levels
  • Plasma Grenade
  • Random credits between 50 and 99

The relevant code for this is:
Show spoiler


Due to the length of the post, I won't post the way for containers unless you want me to, okay? Sorry about the length...


All of my mods are available on Deadlystream.

Always remember modders: "Quality= Effort*Time"

KSE 3.3.4 is LIVE!!! Check it out here.

Check out WalkSwitch, the Walkmesh-changing tool!
Fair Strides 2 is offline   you may: quote & reply,
Old 08-09-2013, 04:04 PM   #3
Salk
Rookie
 
Join Date: Apr 2010
Posts: 73
Current Game: Knights of the Old Republic
Thank you very much for your help, Fair Strides 2!

I was especially interested in the item drop for Ajunta Pall because I am working on revising his quest a little due to, in my opinion, rather bad inconsistent choices made by the developers.

I had tried to do this by setting the droppable flag to 0 using Kotor Tool but it did not work.

Any suggestions?
Salk is offline   you may: quote & reply,
Old 08-09-2013, 10:54 PM   #4
Fair Strides 2
Witty Programmer
 
Fair Strides 2's Avatar
 
Join Date: Jan 2012
Location: Oregon, United States
Posts: 584
Current Game: Master of Orion 2
Helpful! 
Quote:
Originally Posted by Salk View Post
Thank you very much for your help, Fair Strides 2!

I was especially interested in the item drop for Ajunta Pall because I am working on revising his quest a little due to, in my opinion, rather bad inconsistent choices made by the developers.

I had tried to do this by setting the droppable flag to 0 using Kotor Tool but it did not work.

Any suggestions?
Could you PM me the details of what you're trying to do? I'll be able to help more that way.


All of my mods are available on Deadlystream.

Always remember modders: "Quality= Effort*Time"

KSE 3.3.4 is LIVE!!! Check it out here.

Check out WalkSwitch, the Walkmesh-changing tool!
Fair Strides 2 is offline   you may: quote & reply,
Old 08-12-2013, 03:35 AM   #5
Hassat Hunter
Forumite
 
Join Date: Jan 2010
Posts: 557
You need to use K-GFF to make items 'undroppable'
KOTOR Tool by default will make them droppable, which can be a problem if you use it on a vanilla NPC that has an item that should never be dropped.
Hassat Hunter is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > Knights of the Old Republic > Editing / Modding > Holowan Laboratories > Items drop [KotOR]

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:08 PM.

LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.