[TUTz]Making MSTT's useableusing Perks for interaction with

Post » Thu Jan 31, 2013 10:27 pm

Anyone remembers how you're not able to interact with moveable statics, nor you able to set up a moveable statics property? Well, I think I've partially found a way around this. The reason for my find was trying to use ordinary campfires to make food...at least the basic version of making food, grilled food and barbecue. So now I'm able to interact with every standard MSTT inside the Skyrim world, to do whatever I want.

1. Prepare moveable statics to be interactible:

First thing you want to notice is, that every moveable static instance has a name, which in most cases, is not filled. So to even be capable of getting any interaction string, you'll need to give a name to the moveable static. Fortunately giving the MSTT a name applies a standard option of interaction named 'take'. So yes, by simply giving the moveable static a name, you're capable of taking it. This needs to be tested further because I wasn't able to establish a solid proof of concept here, all I figured that the MSTT's now had a name and the string 'take' applied. I'm going to have a look into this todays evening CET.

2. Setting up a perk that allows interaction:

However. The second thing I did was setting up a perk with http://www.creationkit.com/Perk_Entry_Point set to 'activate' and the 'replace default' flag tagged. You also want fo fill the button label with something appropriate, I've filled it with the text 'Grill Food'. Remember how I said the standard interaction option for MSTT's is 'take'? Replace Default makes sure to turn the standard interaction off and replace it with anything you'd put inside the Button Label will instead be showen as string.

3. Putting a script on the entry point

The advantage of the activate entry point is, it allows us to put standard scripts on perks and not just script fragments (well basically they are still script fragments, but allow more variables and easier edit). So the third thing we want to do is putting a script on this entry point, which in my case was very simple, because all I needed to do was counting the raw meat I'd have in my inventory, then remove it and replace it with grilled food of the same quantity. So the script looked something like that:

!!!One important thing here!!! If you want to set up script propertys, you can't do this in the entry point script editor, you'll need to go to the perk script editor and add them over there. So make sure to always first set up all propertys in the script, or you'll get bombarded with compile errors.

Int BeefCount = PlayerREF.GetItemCount(FoodBeef) as IntInt ChickenCount = PlayerREF.GetItemCount(FoodChicken) as Int...PlayerREF.RemoveItem(FoodBeef, BeefCount, true)PlayerREF.RemoveItem(FoodChicken, ChickenCount, true)...PlayerREF.AddItem(FoodBeefCooked, BeefCount, true)PlayerREF.AddItem(FoodChickenCooked, ChickenCount, true)...Int CompleteMeatCount = BeefCount + ChickenCount; etc. add all the food counts hereDebug.Notification("You've grilled " + CompleteCount + " pieces of food")

4. Adding conditions to the perk entrie:

This is also important for whatever interaction you're planing on the MSTT. In my case I had to add 11 Player Conditions 'GetItemCount' 'FoodChicken' etc. &--#62;= 1, and 15 target conditions 'GetIsID' 'The ID's of the campfire MSTT's' == 1. So, now, when I step towards the campfire and have raw meat, potatoes or leek in my inventory, interacting with the campfire will grant me grilled food. I'm probably going to set up an expansion for Perseids Needs mod to allow boiling water on campfires...or even better, I let him know of my find, so he's able to directly incooperate this into this mod.
User avatar
Adam Porter
 
Posts: 3532
Joined: Sat Jun 02, 2007 10:47 am

Return to V - Skyrim