Jump to content

Help with Lootable Graves


duinnin

Recommended Posts

I created container versions of the gravestones and replaced the vanilla versions with mine throughout all cells. I have new leveled lists for the random loot one can find when clicking on a gravestone too. Simple and it works. I previously had done flora versions, but decided I didn't want forced to take bones and other junk.

 

To expand on this, I want to require the player have a shovel in order to open these gravestone containers, but I haven't a clue how to add this condition. I presume it needs a script, is there a vanilla one I can use?

 

Additionally, I created flora versions of woodpiles and hay bales, but it would be nice if upon "harvesting" the meshes would disappear and respawn after few days.

 

Any help would be appreciated.

Link to comment
Share on other sites

There isn't one that does it exactly how you want. At least not that I know of. However, you can adapt what the ResourceFurnitureScript does for the wood chopping blocks.

 

Form list entry which has the items that the player needs to have at least one of. As well as a failure message to be displayed if the player does not have one of the items in the form list.

formlist Property requiredItemList Auto  
{required for player to use - optional}


Message Property FailureMessage Auto  
{Message to say why you can't use this without RequiredWeapon}

After the one activating the object has been determined to be a valid actor (player or follower) the following IF statement is parsed

		bool allowActivation = true
		; check if player has required item
		if requiredItemList
			if akActionRef.GetItemCount(requiredItemList) == 0
				if akActionRef == game.getPlayer()
					; only require the axe item for the player
					allowActivation = false
; 					debug.trace("allowActivation = "+allowActivation)
					FailureMessage.Show()
				endif
			endif
		endif

After putting that into your script, you check the status of allActivation. If true then go on and give the player the items, if not true they get nothing and are shut out. Probably works better with an activator or a furniture than with a container.

Edited by IsharaMeradin
Link to comment
Share on other sites

I created container versions of the gravestones and replaced the vanilla versions with mine throughout all cells. I have new leveled lists for the random loot one can find when clicking on a gravestone too. Simple and it works. I previously had done flora versions, but decided I didn't want forced to take bones and other junk.

 

To expand on this, I want to require the player have a shovel in order to open these gravestone containers, but I haven't a clue how to add this condition. I presume it needs a script, is there a vanilla one I can use?

 

Additionally, I created flora versions of woodpiles and hay bales, but it would be nice if upon "harvesting" the meshes would disappear and respawn after few days.

 

Any help would be appreciated.

 

Sweet, I noticed that guy is actually working on lootable graves and much better approach than I was going for. I'll track his progress.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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