Removing a weapon from an NPC's inventory

Post » Sat Nov 27, 2010 9:11 am

I want to remove a weapon from Uncle Roe's inventory, and for some reason this:
UncleRoe.RemoveItem WeapUniqueTheTrader 1


Doesn't seem to compile. Any ideas?
User avatar
josh evans
 
Posts: 3471
Joined: Mon Jun 04, 2007 1:37 am

Post » Fri Nov 26, 2010 11:58 pm

Do you want to have it permanately removed, or removed after a certain stage?

If it's the former, simply double click on Roe, select "edit base" then select the "inventory" tab and remove his rifle. I can't help you if you want it removed after a certain stage, sorry.
User avatar
XPidgex Jefferson
 
Posts: 3398
Joined: Fri Sep 08, 2006 4:39 pm

Post » Fri Nov 26, 2010 9:02 pm

I want it removed as a part of a script, so I guess after a certain stage is what I need.
User avatar
Krystal Wilson
 
Posts: 3450
Joined: Wed Jan 17, 2007 9:40 am

Post » Sat Nov 27, 2010 10:29 am

WeapUniqueTheTrader does not exist in Fallout3 or any of the DLCs as far as I can tell. Did you make this weapon yourself? Perhaps its from a mod then and you would need to have that mod loaded in the geck before you could act upon it.
User avatar
Darrell Fawcett
 
Posts: 3336
Joined: Tue May 22, 2007 12:16 am

Post » Sat Nov 27, 2010 8:19 am

I made it and I assure you that it's loaded.
User avatar
Avril Churchill
 
Posts: 3455
Joined: Wed Aug 09, 2006 10:00 am

Post » Sat Nov 27, 2010 12:25 am

Yea, Uncle Roe gets a hunting rifle, not that gun. So unless you made it yourself, and gave it to him, it wont work. And if you didnt even make it, and it doesn't exist, then it wont parse.
User avatar
Adrian Powers
 
Posts: 3368
Joined: Fri Oct 26, 2007 4:44 pm

Post » Sat Nov 27, 2010 5:15 am

I made it and I gave it to him.

EDIT:

Nevermind, I managed to make it work. All I needed to do was to use "uncleroeref" instead of "uncleroe".
User avatar
Sabrina Schwarz
 
Posts: 3538
Joined: Fri Jul 14, 2006 10:02 am

Post » Fri Nov 26, 2010 11:21 pm

Yeah, even if an inventory doesn't contain a certain item, http://geck.gamesas.com/index.php/RemoveItem would still compile. The issue was that "UncleRoe" is the editorID of a base form, as opposed to a reference. Reference functions can only be called on references, so if you attempt to call it on a base form the script won't compile. "UncleRoeRef" is the editorRefID of a persistent reference, so there's no problem with using it to call a reference function.

For future reference, posting the compiler error with a problem like this helps immensely when it comes to figuring out the problem.

Cipscis
User avatar
Steve Smith
 
Posts: 3540
Joined: Sat Jun 30, 2007 10:47 am


Return to Fallout 3