Jump to content

[Creation Kit Troubleshooting] Adding/Removing an item to player inventory.


ZeroKitteh

Recommended Posts

I've been working on a mod recently, and I need to be able to remove and add gold to a player's inventory for buying a house.

Now, this is what I have in my script.

 

http://i.imgur.com/J82Ltz0.png
The notifications work just fine, ignore those. But when it comes to the first and third lines, there's the trouble.
For the first line, I want to remove 1,000 gold from the player's inventory. For the third, I want to add a key to the player's inventory.
Now, when I compile, I get no error whatsoever. I have all proper alias needed, for gold and key (keyy is not mispelled, just the alias I made. Don't question it.)
In game, though, it does nothing but display notifications. I do not receive a key, nor do I have any gold taken away.
Does anyone have a simple solution to this issue? I've been looking everywhere and nothing works, eh.
Link to comment
Share on other sites

The error isn't in your code.

The error is:

 

Unable to find flags file: TESV_Papyrus_Flags.flg

If your getting that error then it means you'd be getting that error anytime you compile anything.

 

To be honest the only time I've seen that error was when I added papyrus compile option to my 3rd party text editor.

 

I have a sneaking suspision that the recent Skyrim steam update has screwed with ck psc files.

As I've seen recent posts with people with the same compile error and it turned out that after the update all their *.psc source files have been packed in a scripts.rar and removed from their Data\Scripts\Source\ directory.

(I haven't let my Skyrim update. So I'm only going from what I've read from others recent posts about it).

 

As for your Gold alias, it's not pointing to anything, are you forcing a reference to the Gold alias at a later time?

Link to comment
Share on other sites

I don't exactly get what you mean,

"As for your Gold alias, it's not pointing to anything, are you forcing a reference to the Gold alias at a later time?"

(Heh, I'm kind of new to this.)

All I'm doing is having a player buy something from an NPC, the NPC takes the gold and adds the key.

The only reference I ever have to the gold alias is the one I've shown.

 

And I'm not sure whats wrong at this point because, still, even when I load the game, it doesn't add the key or gold to the player inventory.. I really just need a fix for that.

Link to comment
Share on other sites

first of all you have to fix the Unable to find flags file: TESV_Papyrus_Flags.flg ... or you won't be able to compile any scripts....

 

simply create a text file named TESV_Papyrus_Flags.txt

paste this content:

 

  Reveal hidden contents

 

 

save the file and change the extension txt to flg... then save it in \Data\Scripts\Source\

 

in this case you don't have to define quest aliases for Gold or the Key... define them as script properties in CreationKit - the script will then look like this:

 

 

  Reveal hidden contents

 

 

... to better understand, check the HousePurchase quest and its scripts in CreationKit :wink:

Edited by cubedj21
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...