EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Feature Requests (https://www.eqemulator.org/forums/forumdisplay.php?f=612)
-   -   Random Loot or Dynamic loot tables. (https://www.eqemulator.org/forums/showthread.php?t=19075)

sdabbs65 08-04-2005 01:48 AM

Random Loot or Dynamic loot tables.
 
I do not know if this been Discussed before, searched found nothing...
so I will give it a shot.
Random loot from Monsters or Dynamic loot tables
is that something that could be implemented or sourced into the database >?
I know there is percent chances in the loot tables but thats not what im looking for.

Examples.
In WoW end bosses within instances drop a class specific item--they always drop the same item but the class is random.
For instance, the General in UBRS drops the class specific BP and the Baron in Schoolmance drops the legs, but the class is always random.

RangerDown 08-04-2005 01:50 PM

There is no such item in the code and I don't think it's really been discussed.

I am, however, going to have to go against you and at this time suggest that the devs not spend any time on this feature. Reason being, stock EQEmu code is supposed to emulate EQLive, and EQLive loot mechanics don't discern between a group's class makeup. The one master design principle for stock emu code should be if it's in eqlive, do it -- if it's not in eqlive, don't. There sure don't seem to be any other design documents or policies, so if you ignore that one design principle to appease random whims, then there practically is no design goal behind eqemulator. It has even gone against its own name.

This would make a very good custom server feature however.

Sarepean 08-06-2005 07:22 AM

Something you can try is dropping all the items from the loot tables in the database and writing up quest code that randomly selects items--- it'd take a lot of work as far as the functions that discern the group's classes and then selects equipment to randomly drop, not to mention that it needs to know the mob's level in order to figure out what level of equipment to drop--- then just use summonitems to summon the item onto the player's cursor.

Or--- on event_attack (this would take a good knowledge of adding perl functions), you randomly select the equipment and then (this is why you'd need to know the perl function thing) add that equipment to the mob's inventory so that it drops.

Shadow-Wolf 08-06-2005 03:58 PM

What I think he means is the shit that would randomly drop in some mobs even if it had a loot table there was still a chance of you getting something wierd like flames of vox or wing of xegony.

RangerDown 08-07-2005 02:39 AM

Hmmm so he was wanting something to the following effect:

The mob could drop these two items. They're both "Steel Toed Boots of Asskicking" but the class being different:

Steel Toed Boots of Asskicking
WEIGHT: 2.0 MEDIUM
AC: 15 ATK: +10
SLOT: FEET
RACE: ALL
CLASS: WARRIOR

-or-

Steel Toed Boots of Asskicking
WEIGHT: 2.0 MEDIUM
AC: 15 ATK: +10
SLOT: FEET
RACE: ALL
CLASS: RANGER

Well you can do that with the current mechanics. Add your own records into the Items table, and then add the ID's from those items into your loot tables appropriately. No guarantee that the class-specific item it drops is going to be usable by the group that killed it but unless it's nodrop it could be taken back and sold.

There's not much documentation on the Items table since its structure tends to change drastically every time SOE wants to monkey around with how items work and add a new this or that to item attributes (which is at least every expansion and sometimes in between). Your best bet would be to lookup the existing items, locate some well-known items and look for patterns in their field values.

sdabbs65 08-08-2005 04:10 AM

npo
 
Quote:

Originally Posted by RangerDown
Hmmm so he was wanting something to the following effect:

The mob could drop these two items. They're both "Steel Toed Boots of Asskicking" but the class being different:

Steel Toed Boots of Asskicking
WEIGHT: 2.0 MEDIUM
AC: 15 ATK: +10
SLOT: FEET
RACE: ALL
CLASS: WARRIOR

-or-

Steel Toed Boots of Asskicking
WEIGHT: 2.0 MEDIUM
AC: 15 ATK: +10
SLOT: FEET
RACE: ALL
CLASS: RANGER

Well you can do that with the current mechanics. Add your own records into the Items table, and then add the ID's from those items into your loot tables appropriately. No guarantee that the class-specific item it drops is going to be usable by the group that killed it but unless it's nodrop it could be taken back and sold.

There's not much documentation on the Items table since its structure tends to change drastically every time SOE wants to monkey around with how items work and add a new this or that to item attributes (which is at least every expansion and sometimes in between). Your best bet would be to lookup the existing items, locate some well-known items and look for patterns in their field values.

Well thats going to take a long time for me to figgure out.
I would be happy if I could make a perl script on death to put a random item on a corpse.
I think I found what I was looking for tho just need to know how to use it.
globaly.

quest::summonitem("$items[int(rand($#items+1))]");

sdabbs65 08-08-2005 04:23 AM

hmm
 
after looking into it deeper is see I need more
still tweaking to see what works.

sub EVENT_DEATH
{
quest::say("I'll get you back $name!");
my @items = (all the item numbers go here 1,22,33,433,40.);
quest::summonitem("$items[int(rand($#items+1))]"); <-- this is wrong need the item on the npc's corpse.
quest::shout("I've just died!");
}

eyenseq 02-09-2024 03:24 PM

Loot based on class hate list
 
sub EVENT_SPAWN{
quest::setnexthpevent(50);
}

sub EVENT_HP {
my @items = (123, 456, 789); #array of items / loot tables
my @item = shuffle(@items); #Shuffle array into new array
my $loot = @item[0]; #Assign the 1st entry in new array to $loot

# Check if HP is at or below 50%
if ($hpevent == 50) {
# Get hate list of NPC
my @hate_list = $npc->GetHateList();

foreach my $ent (@hate_list) {
my $hate_entity = $ent->GetEnt();
my $hate_entity_id = $hate_entity->GetID();
my $hate_entity_class = $hate_entity->GetClass();

# Check if entity is a paladin
if ($hate_entity_class == 9) {
my $client = $entity_list->GetClientByID($hate_entity_id);
if ($client) {
# Add item 1234 to NPC1 for each Paladin on hate list
$npc->AddItem($loot, 1); # Assuming 1234 is the item ID and 1 is quantity could be swapped out for AddLootTable. item id replaced with $loot
}
}
}
}
}

This would add loot based on player classes on hatelist..3 pally's 3 items..maybe add a out of combat that would reset loot so he wouldnt end up with a ton of items.

Additionally, I would use shuffle over quest::summonitem("$items[int(rand($#items+1))]") for example


All times are GMT -4. The time now is 03:21 PM.

Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.