I would like help making the monsters drop the items instead of having them drop loot bags or treasure. If anyone is familiar with this system I would appreciate the help.
Silicone Scout treasure help?
Débuté par
Knight_Shield
, nov. 18 2011 11:39
#1
Posté 18 novembre 2011 - 11:39
#2
Posté 19 novembre 2011 - 03:23
You'll probably want to modify the monsters' on death script to check their inventory for droppable items (being sure to check equipment slots as well as just inventory), then have the script copy those items to the monster's location (or within a few feet) before destroying the items from it's inventory.
I seem to recall that Silicon Scout's system may have a script in place to do this with placeables (scattering items when placeables are destroyed). Not sure of the script name or the variable option(s) needed for this, and I'm not sure if it works for creatures (it's not an option I use for my PW). If I remember correctly, all of the scripts in that package start with "ss_". It is likely included in the documentation that comes with the system as well.
I seem to recall that Silicon Scout's system may have a script in place to do this with placeables (scattering items when placeables are destroyed). Not sure of the script name or the variable option(s) needed for this, and I'm not sure if it works for creatures (it's not an option I use for my PW). If I remember correctly, all of the scripts in that package start with "ss_". It is likely included in the documentation that comes with the system as well.
#3
Posté 19 novembre 2011 - 06:14
From what I have read in the pdf the ss_toss works only if player opens monster inventory or chest.So maybe the ss_toss can be tweeked?
#4
Posté 19 novembre 2011 - 03:56
You could just add in a few lines for slotted items:
int nPercentDrop = d100();
object oItem = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND);
if (nPercentDrop >90)
CreateObject(OBJECT_TYPE_ITEM, GetResRef(oItem), GetLocation(OBJECT_SELF));
object oItem1 = GetItemInSlot(INVENTORY_SLOT_LEFTHAND);
if (nPercentDrop > 88)
CreateObject(OBJECT_TYPE_ITEM, GetResRef(oItem1), GetLocation(OBJECT_SELF));
object oItem2 = GetItemInSlot(INVENTORY_SLOT_CHEST);
if (nPercentDrop >85)
CreateObject(OBJECT_TYPE_ITEM, GetResRef(oItem2), GetLocation(OBJECT_SELF));
Just make sure the items are not marked as droppable, or you may get two drops. Another thing I do is do a loop on some spawns where it marks an item as droppable from the inventory of the npc.
// ***** ADD ANY SPECIAL ON-SPAWN CODE HERE ***** //
object oItem = GetFirstItemInInventory(OBJECT_SELF);
while (GetIsObjectValid(oItem)&& GetDroppableFlag(oItem)== FALSE)
{
if (d100()>85)
{
SetDroppableFlag(oItem, TRUE);
}
oItem = GetNextItemInInventory(OBJECT_SELF);
}
So sometimes you hit the jackpot though I only put this on npc's with a few items.
int nPercentDrop = d100();
object oItem = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND);
if (nPercentDrop >90)
CreateObject(OBJECT_TYPE_ITEM, GetResRef(oItem), GetLocation(OBJECT_SELF));
object oItem1 = GetItemInSlot(INVENTORY_SLOT_LEFTHAND);
if (nPercentDrop > 88)
CreateObject(OBJECT_TYPE_ITEM, GetResRef(oItem1), GetLocation(OBJECT_SELF));
object oItem2 = GetItemInSlot(INVENTORY_SLOT_CHEST);
if (nPercentDrop >85)
CreateObject(OBJECT_TYPE_ITEM, GetResRef(oItem2), GetLocation(OBJECT_SELF));
Just make sure the items are not marked as droppable, or you may get two drops. Another thing I do is do a loop on some spawns where it marks an item as droppable from the inventory of the npc.
// ***** ADD ANY SPECIAL ON-SPAWN CODE HERE ***** //
object oItem = GetFirstItemInInventory(OBJECT_SELF);
while (GetIsObjectValid(oItem)&& GetDroppableFlag(oItem)== FALSE)
{
if (d100()>85)
{
SetDroppableFlag(oItem, TRUE);
}
oItem = GetNextItemInInventory(OBJECT_SELF);
}
So sometimes you hit the jackpot though I only put this on npc's with a few items.
Modifié par ffbj, 19 novembre 2011 - 04:01 .
#5
Posté 19 novembre 2011 - 06:16
Ok so I have the ss_treasure script in the onspawn script nw_c2_default9.
Like this
ExecuteScript('ss_tresure",OBJECT_SELF);
then add this to the nw_c2_defualt9
object oItem = GetFirstItemInInventory(OBJECT_SELF);
while (GetIsObjectValid(oItem)&& GetDroppableFlag(oItem)== FALSE)
{
if (d100()>85)
{
SetDroppableFlag(oItem, TRUE);
}
oItem = GetNextItemInInventory(OBJECT_SELF);
}
Like this
ExecuteScript('ss_tresure",OBJECT_SELF);
then add this to the nw_c2_defualt9
object oItem = GetFirstItemInInventory(OBJECT_SELF);
while (GetIsObjectValid(oItem)&& GetDroppableFlag(oItem)== FALSE)
{
if (d100()>85)
{
SetDroppableFlag(oItem, TRUE);
}
oItem = GetNextItemInInventory(OBJECT_SELF);
}
Modifié par Knight_Shield, 19 novembre 2011 - 06:19 .
#6
Posté 19 novembre 2011 - 07:23
Sure I guess though I don't know what the exe does. Anyway it will loop through the inv of the object_self and if d100 is greater than 85, a 15% chance, any item with no droppable flag set will drop on the death of object-self.
Modifié par ffbj, 19 novembre 2011 - 07:24 .
#7
Posté 19 novembre 2011 - 11:25
EDIT: Ok found this http://social.biowar...2/index/5110769
I put that script in as and Execute at the top of nw_c2_default7
I put that script in as and Execute at the top of nw_c2_default7
Modifié par Knight_Shield, 22 novembre 2011 - 11:41 .





Retour en haut






