Jump to content

Creation Kit - Add Item Script


Pink Blossom

Recommended Posts

Posted

Hello,

 

I was creating some custom quest in the Creation Kit, but I was wondering how to make a dialogue add gold to the player at the end of it. I don't know anything of Papyrus coding.

I would need a simple fragment that adds to the player a certain amount of gold at the end of a dialogue. Could anyone help me with that, please?

Please, explain as clearly as you can, since everything I know about codings regards C and C++.

Thank you!

Posted

 

1) Create Dialogue

2) at bottom of Dialogue window u have Scripts

3) click anywhere and type anything ( just to create Script file )

4) rename it... make it something like _<Tag>_TIF_GiveGold

for example i'm using "QLG" Tag, in my example it looks like -> "_QLG_TIF_Quest_SomeName_GiveGold"

5) edit this script... TIF Files are fucked in Skyrim so u better do that in CK ( dont open TIF in external program )

6) copy and paste that code:

Game.GetPlayer().AddItem( Game.GetForm( f ), X )

in place of X type amount of Gold You want to give to player

 and tbh. i don't remember ID for Gold coins... but i think it was 0x000000f xD

 u can skip 0... just F should work... i always skip typing 0 in Console and it works...

 

but if it dont just replace "F" with "0x000000f" 

 

7) click "Save" - it should also compile ur Script ( make sure no errors show )

8) go to Your Data/Scripts and make sure that Your script exists ( as PEX file )

 

Once i have CK i can give You Tutorial with pictures...

but i got mad because that fucking fuckthesda ruined everything for me again with thier update...

so im thinking about installing pirate version of Skyrim...

Posted
14 hours ago, Incognitoman said:

Hello,

 

I was creating some custom quest in the Creation Kit, but I was wondering how to make a dialogue add gold to the player at the end of it. I don't know anything of Papyrus coding.

I would need a simple fragment that adds to the player a certain amount of gold at the end of a dialogue. Could anyone help me with that, please?

Please, explain as clearly as you can, since everything I know about codings regards C and C++.

Thank you!

Here's the way I did it as payment for accepting a prostitution offer. See parts circled in red. I put in the script fragment, renamed it (under Advanced tab), set the Property for the gold using the Properties button, and then compiled the script. The CK has an odd quirk that the Properties button won't show up until you type in a script fragment. So start by typing in ";" as the script fragment, compile that, exit and go back and click on the script name to see the Properties button.

 

EDIT: Actually, if you use the PlayerRef property like I did then you have to set that property too, as shown in the second picture. Or, you can use Game.GetPlayer() as in the above example, which doesn't need a property. But using the PlayerRef property runs a bit faster. So, either way.

 

CK Screenshot.png

CK Screenshot2.png

Posted
3 hours ago, Gristle said:

EDIT: Actually, if you use the PlayerRef property like I did then you have to set that property too, as shown in the second picture. Or, you can use Game.GetPlayer() as in the above example, which doesn't need a property. But using the PlayerRef property runs a bit faster. So, either way.

 

Yee... but u know... saving like almost no time by making few extra variables?...

 Its just waste...

 

Game.GetPlayer()

 and

Game.GetForm()

 

and also many other Functions were made for example like this... simple and very short script that gonna be used only once...

 I'm not saying ur script is wrong :x... it can be done better...

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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