Jump to content

Photo

Keep NPCs from picking up dropped objects


  • Please log in to reply
11 replies to this topic

#1
IsharaMeradin

IsharaMeradin

    The Pale Redguard

  • Members
  • PipPipPipPipPip
  • 8,831 posts

Is there a way to set a piece of armor to disallow the NPCs from picking it up and handing it back to the player or asking the player if they can keep it?

 

I have a couple items that perform certain functions when dropped but the NPCs bugging me about the item is getting in the way of what I'm wanting to accomplish.



#2
Pevey

Pevey

    Faithful poster

  • Premium Member
  • 1,233 posts

Hi, Ishara.  I think the quest you want to look at is WIRemoveItem02.  It's triggered by the story manager (Player Remove Item event).  You could probably tweak it to install some sort of filter.  Or, if you want to avoid the script latency, you could go as far as to disable the quest.  So long as you tell users you did it, I really don't think anyone would mind.  I certainly wouldn't miss it.



#3
IsharaMeradin

IsharaMeradin

    The Pale Redguard

  • Members
  • PipPipPipPipPip
  • 8,831 posts

Hmm...  could I stop the quest on item drop and restart it when the player picks the item back up?  Cause I really don't want to be making edits to stock records. 



#4
Pevey

Pevey

    Faithful poster

  • Premium Member
  • 1,233 posts

Since the quest is spawned by the story manager each time an item is dropped, there is no way to avoid editing esm records to do what you want to do. 

 

Simplest and cleanest edit would probably be to unhook it completely from the story manager.  No script edits or anything like that.  I seriously doubt there is any other mod out there that touches this quest.



#5
IsharaMeradin

IsharaMeradin

    The Pale Redguard

  • Members
  • PipPipPipPipPip
  • 8,831 posts

I'll have to look at it when I can use the CK again.  Perhaps I can hook my items into the quest and halt the processing or something if the dropped/added item is one of mine.  Maybe do it as a utility esm with a form list that other authors could add their items to in an OnInit event with AddForm.



#6
IsharaMeradin

IsharaMeradin

    The Pale Redguard

  • Members
  • PipPipPipPipPip
  • 8,831 posts

Been looking into this...

 

There are 5 world interaction quests that initiate when the player drops an object.  Two of those include the NPC picking up the item.  It is those two that I need to work with.

 

WIRemoveItem02

WIRemoveItem05

 

I tried working with a utility esm to see if I could get something to work.  Form lists are a fail because it turns out that the quest has to be active to have any knowledge of forms added to a list in-game.  Tried using a negative check for a keyword that seemed to be a fail as well. 

 

I switched to working within my own plugin. I tried modifying the package file assigned to the alias filled NPCs. I tried stopping the quest as soon as it was initiated.  In one case, they took the item but never spoke with me.

 

Perhaps it is my lack of understanding when it comes to quest conditions or perhaps the game just isn't allowing one of the two quests to start when I COC from the main menu.

 

My last ditch effort is to try again but play the game normally for a while and see if I can get interactions on regular stuff...

 

By the way...  on conditions

subject HasKeyword  somekeyword != 1.000 AND

Does that mean that if it does not have the keyword it should be valid for use?

Is it the same as using

subject HasKeyword somekeyword == 0.000 AND



#7
Pevey

Pevey

    Faithful poster

  • Premium Member
  • 1,233 posts

These quests are spawned each time the linked event occurs.  In this case, the event is Player Remove Item.  The simplest solution, which would require no editing or installing of scripts, whether vanilla or otherwise, is to just unhook those two quests from the story manager node for that event.  They simply won't be spawned by the Player Remove Item event as long as your esp is installed.  Honestly, I don't think anyone would miss them.  Just include a warning in your mod that tells users that so long as your mod is installed, those two WI (world interaction) responses won't occur.



#8
IsharaMeradin

IsharaMeradin

    The Pale Redguard

  • Members
  • PipPipPipPipPip
  • 8,831 posts

How do you unhook from the story manager?

Do I just change the event from remove item to none?

 

Scratch that.

 

I was trying to work with within the existing setup.  When I changed the event on the two quests from remove item to none, I realized that these two quests could be started normally via script.  Since I already had a constant running player alias script for the OnItemAdded event, I set up one for the OnItemRemoved event and check the removed item against my two that I don't want NPCs picking up and giving back.  If it is not one of my two items, then both quests are started.

 

Tried it out in game and one of the kids in riverwood picked up the iron sword I dropped and gave it back to me while my item when dropped triggered the npc to ask if I no longer wanted it.

 

I'm ok with them asking, I just don't want the NPCs to pick up and return.


Edited by IsharaMeradin, 21 October 2013 - 09:20 PM.


#9
Pevey

Pevey

    Faithful poster

  • Premium Member
  • 1,233 posts

You want to go to the object window and look under Character - > SM Event Node.  You should see a number of different events.  Select the one you want (Player Remove Item).  This should bring up a list of spawns nodes. These control how quests are spawned from the story events.  You could delete those two quests from whatever spawn node they are currently in.  You shouldn't have to edit the quest in any way.  When you delete them from the story manager, all you've done is told the story manager not to spawn those quests. Since it is an esp edit, it should be cleanly reversible after uninstall.



#10
IsharaMeradin

IsharaMeradin

    The Pale Redguard

  • Members
  • PipPipPipPipPip
  • 8,831 posts

If I go back in and do that, can I still manually call the quests as I indicated in my edit of the post above?






Page loaded in: 0.961 seconds