Dropping a stack of an item

Discussions on various DOL development features

Moderator: Support Team

Dropping a stack of an item

Postby Tolakram » Sun Aug 26, 2007 2:50 pm

Howdy,

I want to drop a stack of 50 or so arrows (yea, I'm sticking to the old archery) but there doesn't seem to be a way to drop a quantity of items, just one at a time?

Am I just missing something? Has anyone written a work around for this (assuming I'm not being stupid)?

Thanks.
User avatar
Tolakram
Storm / Storm-D2 Admin
 
Posts: 9189
Joined: Tue Jun 13, 2006 1:49 am
Location: Kentucky, USA

Postby stealth215 » Sun Aug 26, 2007 3:18 pm

max count field
packsize field


set Max Count to like 200 or w/e and then set packsize to 50...it should would i think
Image
Batlas: ...180982168721657816182761875612765127652176512762576576576^17867
Stealth215: i believe the proper term for that is a kajillion
Batlas: Thread winnar!
Stealth215 yay me!
User avatar
stealth215
Inactive Staff Member
 
Posts: 1113
Joined: Mon Nov 06, 2006 3:29 pm
Location: Milwaukee, Wisconsin

Postby Tolakram » Sun Aug 26, 2007 3:57 pm

Unfortunately PackSize is not handled by the loot generator.

Ah, I found two problems:

in GameNPC.DropLoot

if (((GameInventoryItem)loot).Item.Id_nb == "aurulite")
{
((GameInventoryItem)loot).Item.Count = ((GameInventoryItem)loot).Item.PackSize;
}

So for whatever reason someone decided only aurulite can recognize packsize.

The second problem is that I can set Count to be what I want to drop when the item is an inventory item, but the loot generator uses itemtemplate not inventory item, so the Count is lost.

So the only way to set how many you want to drop is via packsize. Can someone remove the aurulite restriction to packsize? I'm going ahead and removing it locally, but I question why the restriction is there in the first place. Null or 0 packsize should equal 1, anything else should be used when dropping the loot.

if (((GameInventoryItem)loot).Item.PackSize > 1)
((GameInventoryItem)loot).Item.Count = ((GameInventoryItem)loot).Item.PackSize;
User avatar
Tolakram
Storm / Storm-D2 Admin
 
Posts: 9189
Joined: Tue Jun 13, 2006 1:49 am
Location: Kentucky, USA

Re: Dropping a stack of an item

Postby Marko » Sat Mar 26, 2016 9:29 pm

Sorry to revive this old thread, but did you ever get this to work Tola? I'm trying to get DF princes and high lords to drops stacks of seals like 'live' . I've updated both the itemtemplate maxcount (25) and packsize (10), and I've added set count in the loottemplate count (10) just for Princes & Lords.

I'd like other DF mobs to still drop singles though, so... can this be done? Right now I"m getting stacks, but everything is dropping stacks, not just the Princes and Lords..
User avatar
Marko
DOL Novice
 
Posts: 80
Joined: Mon Jun 09, 2014 8:17 pm
Location: Rural Central Utah (Near Bryce Canyon)

Re: Dropping a stack of an item

Postby Maze » Wed Mar 30, 2016 7:57 am

You don't want packsize, you want to set the drop count higher. Packsize is for loot that you want to always buy in stacks.

I don't think my code ever got committed, but I did work on the loot generator some years back, but never finished. I think my loot code works very well: http://www.dolserver.net/viewtopic.php?f=47&t=20899 it may fix some issues you're having.

I also don't know how old this issue is and what changes happened since the posts in this thread. Would have been better to start a new thread than to necropost. :)
User avatar
Maze
DOL Apprentice
 
Posts: 38
Joined: Wed Aug 08, 2012 3:39 am


Return to “%s” DOL Development Discussion

Who is online

Users browsing this forum: No registered users and 1 guest