Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Development

Archive::Development Archive area for Development's posts that were moved here after an inactivity period of 90 days.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #6  
Old 08-09-2004, 03:13 AM
govtcheeze
Hill Giant
 
Join Date: Mar 2004
Location: South Florida
Posts: 247
Default

Actually sotonin, I found out it does NOT roll a strict yes/no for "will something drop":

Code:
	for (int32 i=0; i<lts->NumEntries; i++) {
		for (int32 k = 1; k <= lts->Entries[i].multiplier; k++) {
			if ( (rand()%100) < lts->Entries[i].probability) {
				AddLootDropToNPC(npc,lts->Entries[i].lootdrop_id, itemlist);
For each item that can drop, if it passes the rand() test it will add an item to the mob (if it also passes the check for the item in addlootdropnpc). If the for and if statements were reversed, then it would be a strict yes/no for "will stuff drop".I know I said this doesn't happen when we talked about it, but I was looking at the wrong code

In the current system, using sotonin's example, item1 is ALWAYS tested to see if it drops, since it is first in the array. item4 is only tested if FOUR other tests fail...this is not truely random itemization. Now imagine this in a loot table with 80 items (which a lot of sebilis tables are)...items toward the bottom have a significant mathimatical disadvantage, since 70+ checks must fail before the item even has a chance...and then it still has to pass it's own rand() check.

This system keeps rare items rare, since the item must still pass the second, individual item chance test. The only difference is items near the beginning of the loottable are not more likely to drop.
__________________
GovtCheeze, Welfare Warrior
"Listen, here's the thing. If you can't spot the sucker in the first half hour at the table, then you ARE the sucker." -- Mike McDermott, Rounders

Developer of the original (circa 2004):
Loots v2.0, bitch!
Faction v1.0, bitch!
Magelo-like clone v0.3, bitch!
Zone geometry and spawn/path viewer, bitch!
Reply With Quote
 


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 05:54 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3