Aller au contenu

Photo

Item drop frustration


  • Veuillez vous connecter pour répondre
7 réponses à ce sujet

#1
PJ156

PJ156
  • Members
  • 2 983 messages
I am having a problem with item drop.

The creature is dropping all its equipment regarless of the settings I place on it. It does not seem to matter if i alter the instance or the blueprint all equipment is dropped regardless of the fact that  have not ticked the droppable box in the game.

Am I missing something this is very frustrating.

Two of the principle offenders are below. This is a copper temple interior for The Last Days of the Raven Posted Image.

Posted Image

PJ

Modifié par PJ156, 24 octobre 2010 - 04:07 .


#2
PJ156

PJ156
  • Members
  • 2 983 messages
I can see now that it is the modified blueprints that are causing the problem. This does not occur with stock blueprints. I wonder if this is something in the blueprint setup,

Nothing comes to mind.

PJ

#3
Lugaid of the Red Stripes

Lugaid of the Red Stripes
  • Members
  • 955 messages
Its a bug, everything in the creature's inventory becomes droppable when you check that box, same for pickpocketable items. The equipped items seem to work on a separate list, though. There's some tricky things you can do to get around it. For example, if you want the creature to drop their sword but not their armor, you can add a second sword to the inventory, marked droppable, while all the equipped items are undroppable. Alternatively, you can used scripts to resolve the issue, either an on-spawn or an on-death script that adjusts the creature's inventory.

#4
kamalpoe

kamalpoe
  • Members
  • 711 messages
Also, you should make the picture clickable so we can see it's full awesomeness.

#5
PJ156

PJ156
  • Members
  • 2 983 messages

Lugaid of the Red Stripes wrote...

Its a bug, everything in the creature's inventory becomes droppable when you check that box, same for pickpocketable items. The equipped items seem to work on a separate list, though. There's some tricky things you can do to get around it. For example, if you want the creature to drop their sword but not their armor, you can add a second sword to the inventory, marked droppable, while all the equipped items are undroppable. Alternatively, you can used scripts to resolve the issue, either an on-spawn or an on-death script that adjusts the creature's inventory.


Thanks LotRS, I will play with that, if I can double up in the inventory them that is a simple fix. Dang these pesky bugs.

Thanks also for your kind post Kamal, I cannot seem to get the url/img string right to provide a picture and a link. I saw DNO's short tut but it's not clear enough to me how they nest.

PJ

Modifié par PJ156, 24 octobre 2010 - 07:42 .


#6
Olblach

Olblach
  • Members
  • 175 messages
You need to set this string variable on the creature to a script name of your choice: N2_SCRIPT_SPAWN_CREATURE



Then for the script you need something like this:

void main()
{
int invid ;
object oCreature = OBJECT_SELF ;
object item ;

    int nAmtGold = GetGold(oCreature) ;
	if (nAmtGold)
	{
     	TakeGoldFromCreature(nAmtGold, oCreature,TRUE, FALSE) ;
	}
    for (invid=0; invid<NUM_INVENTORY_SLOTS; invid++) {
        item = GetItemInSlot(invid, oCreature);
        if (GetIsObjectValid(item)) {
            SetDroppableFlag(item, FALSE) ;
        }
    }
    item=GetFirstItemInInventory(oCreature);
    while (GetIsObjectValid(item)) {
        SetDroppableFlag(item, FALSE) ;
        item=GetNextItemInInventory(oCreature) ;
    }
}



It may vary wether you need something specific or not (like letting it drop one specific item).


#7
PJ156

PJ156
  • Members
  • 2 983 messages
Thanks for taking the time to post a script Olblach.

In this case LotRS solution works nicely. All the dropable stuff goes in the unequiped inventory.

Thanks for all the help on this.

PJ

#8
Olblach

Olblach
  • Members
  • 175 messages
I don't mind posting scripts, I've lost my NWN1 module, but got back many scripts because I posted them on forums ;)