Jump to content

CK adding items to player inventory


F4llfield

Recommended Posts

Hi,

Using CK I added items to the player (000007) inventory, but with the mod enable and starting a new game, the items are not showing up in the player inventory.

What am I missing ?

Link to comment
Share on other sites

you are using player.additem ?

the command is

player.additem [form id] [amount] so adding 1k  caps would look like this

player.additem f 1000

You can omit all zeros from the beginning of the form id and 00000f is always currency in all Bethesda games.

If successful the console will say nothing and after closing the console you should get a notification in upper left sayng "1000 Caps added"

Edit: I'm an idiot please disregard.

Edit the 2nd: actual help.

You can't add to the player inventory before leaving the vault because the the quest to get out empties the player inventory.

Link to comment
Share on other sites

10 hours ago, F4llfield said:

Hi,

Using CK I added items to the player (000007) inventory, but with the mod enable and starting a new game, the items are not showing up in the player inventory.

What am I missing ?

You may need to delay the installation of your mod. Try this script. I haven't compiled it and I'm not sure that stage 100 is the "Exited the Vault" stage right now but something like this should work.

Quest Property MQ102 Auto Const
Actor Property PlayerRef Auto Const
MiscObject Property Caps Auto Const


Event OnQuestInit()
	If MQ102.GetStageDone(100) == true		; if Player has already left Vault 111 by the time this quest was initialized
		InitMyMod()							; "install" your mod
	Else									; if Player has not left Vault 111 yet
		RegisterForRemoteEvent(MQ102, "OnStageSet")		; listen for the OnStageSet event of the quest "War Never Changes" (i.e. when the Player leaves the vault)
	EndIf
EndEvent

Event Quest.OnStageSet(Quest akSender, int auiStageID, int auiStageItem)
	If akSender == MQ102			; not necessary if this is the only quest the script is registered for
		If auiStageID == 100		; stage 100 is set
			UnregisterForRemoteEvent(MQ102, "OnStageSet")		; unregister the script so it no longer receives OnStageSet events
			InitMyMod()
		EndIf
	EndIf
EndEvent

Function InitMyMod()
	PlayerRef.AddItem(Caps)
EndFunction

 

  • Thanks 1
Link to comment
Share on other sites

  • Recently Browsing   0 members

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