[Tutorial] Custom house upgrades VIA NPC!

Post » Mon Jun 18, 2012 2:31 pm

Welcome all to my first ever tutorial, for anything. period!

VIDEO TUTORIAL ADDED!

http://youtu.be/RLv9FRL9rGQ

Please read the description at the end of the video!

I wanted to be able to add dialogue to the current house NPC's so that I can make my own upgrades, After many painstaking hours, I finally got it to work and decided I would share it with everyone!
as this is my first tutorial the formatting may be all over the place, So sorry in advanced!.

The basic steps for creating this mod are as follows.
  • Generate new forms for extra dialogue.
  • Generate new dialogue for the existing NPC including money transaction.
  • Script dialogue to enable disabled items with world references.
  • create the in-world reference marker.
  • link our extension with a parent to the marker.
For this tutorial we will be upgrading Proudspire Manor with a basemant (you can make anything you want). If you get stuck or lost at any part, feel free to send me a PM and I will be happy to help.


Part 1 - Forms.
Our first step is to load the creation kit up with the skryim.esm data file, Once done you want to navigate to the object window. You want to expand the Miscellaneous tree, and click on Global's, once done, Set your filter to HDSolitude, You will see a list of the current available upgrades for the Proudspire Manor , You want to right click on any of them, I will use kitchen for this example and hit "Duplicate", This will create a copy, Next right click it and go to edit. Set the ID to HDSolitudeBasemant, Keep the variable type to Short, And for value, Put in the value you want the upgrade to cost, I have set it to 1500. Leave constant un-checked and click OK. It will ask if it is okay to create a new form, Click No, Then click Yes to confirm.


Part 2 - NPC Dialogue
The NPC dialogue is next up, and thankfully a lot of our work is done for us, We will use the template for the other house upgrades, meaning we will get full NPC dialogue with voice and subtitles. Once again in the Object window, Set your filter to HousePurchase, and then click ALL at the bottom. Double click the quest that comes up, the first thing we need to do is add a Display Text entry, On the new window that has come up, look at the large column on the right hand side. right click this and click and new. A Form selection window will come up, Type in HDSolitudeBasemant for the filter, and then double click the entry. Next you want to click the Player Dialogue at the top. In branches select DecorateSolitudeViewBranch1, Then under topics right click a blank are and click New Topic and type in DecorateSolitudeBasemant and hit OK, This will create a new topic that we can add some NPC Dialogue into.

We are going to leave NPC Dialogue for now so we can create our reference marker, Hit OK in the bottom right of the quest dialogue.

Part 3 - Reference Marker.
Next we want to look at the Cell View, Make sure it is set to Interiors , Click on any of the entries and type in SolitudeProud, It will highlight the cell for the Proudspire Manor, Double click this to show it in the render window. Once loaded use your mouse wheel to zoom out, Until you see a bunch of red XMarkers on the lower right side of the render window. We are going to duplicate one of these, Select one of them, (Any one) and hit CTRL+D to duplicate it, Then move it slightly so that it is not overlapping. Then right click your new marker and click Edit. You want to change the Reference Editor ID to be SolitudePlayerHouseDecorateBasemant And hit OK, Then click No, and click OK to confirm. We should keep the render window open as we will be using this next.

Part 4 - NPC Dialogue Continuation
In the object viewer you should still have the HousePurchase quest, Double click on this to bring the Quest Dialogue back up. Once again click on Player Dialogue, Then DecorateSolitudeViewBranch1 in the Branches. Locate our DecorateSolitudeBasemant topic, and click it. On the large blank window to the right, Right click and select New. A New Response window will pop up, Cancel this as we are going to use a template. When you cancel it will bring up the main dialogue editor. Just below the Prompt text box, You will see a pull down called "Share Response Data From Info, Click this and type in PlayerHouseDecorateBroke, Click this and you will see that our response, Audio and subtitles are automatically filled out for us, Our next task is to create some Condition for the dialogue We will make 5, I am going to separate them out below for readablilty sakes.

To create a condition right click and then click new in the Conditions area.
  • Condition 1
  • Condition Function: Type GetInCell
  • Parameters: Click invalid and type SolitudeBluePalace and click OK
Click OK, Then create another new one.
  • Condition 2
  • Condition Function: Type GetInFaction
  • Parameters: Click invalid and type JobStewardFaction and click OK
Ok That, Another new one.
  • Condition 3
  • Condition Function: Type GetVMQuestVariable
  • Parameters: Click invalid and for quest, Select HousePurchase and VM Variable should be ::SolitudeHouseVar_var, Click OK.
  • Comparison: Needs to be set to >=
Click Ok, Another new.
  • Condition 4
  • Condition Function: Type GetItemCount
  • Parameters: Click invalid and type Gold001 and click OK
  • Comparison: Needs to be <
  • Use Global: Under the Value box, make sure UseGlobal Is ticked, Then set value to HDSolitudeBasemant
  • Run On: Make sure this is set to Reference, Once set , Click the select box next to it, And choose Cell: (any) and Ref: PlayerRef('Player') and hit OK
Click OK, then Create this last one.
  • Condition 5
  • Condition Function: Type GetDisabled
  • Parameters: Leave as NONE
  • Run On: Make sure this is set to Reference, Once set , Click the select box next to it, And click Select Reference from Render window, What you need to do here is double click the red XMarker that we created earlier. Once selected hit OK.
Click OK on this last one, We have now created the dialogue that prevents the purchase if the player does not have enough gold. Next we will move onto the purchase and display of the upgrade.

We now need to Ok this dialogue window, We will be back at the Topic Selection menu, You will now see the <> Dialogue we have just created. Now if you look just above this, You will see a Topic Text box, It will be empty. We need to put the following in there Basemant. After doing this the Quest dialogue may close. This is normal, Open it up as before and get to the topic we have created.


Part 5 - Purchase Dialogue Activation.
Essential we are going to copy step 4, With the topics window , Right click our created <> Dialogue, And click Copy, This will make an exact copy of the dialogue. Then double click the top one, We will make the following changes. and add some script at the same time.

First of all, We need to change Share Response Data From Info , Change it to PlayerHouseDecorateSold, Next we need to look at the Linked To Check box, Make sure Invisible Continue is Enabled. Then look at the blank box below it, We need to add a link to the main tree dialogue. To do this we need to right click the list, and click Add Link, There is going to be a large list of topics , Now we need to make the Branch/Scene and Topic tabs larger so that we can find the one that has a Branch of DecorateSolitudeViewBranch1, And a topic of DecorateSolitudeElse, Once you have found it, Select it and hit OK. Next we need to change one of our condition, double click the GetItemCount condition, And change the condition value to =>, Ok that window.

We also need to add our dialogue reference in other parts of the dialogue as well, So OK this dialogue window so that you are back at the topics tree, And click on DecorateSolitudeElse. Then double clicked the <> Item in there,
On the right hand side you will see a list of Links, We need to add our new dialogue to this, So as before. Right click the list, And click Add Link, Then look for the following topic DecorateSolitudeBasemant and then click OK. Then OK out of this dialogue, And select the topic DecorateSolitudeViewBranch1Topic (At the bottom), Select the top <> Item and do the exact same, Add a new link to our DecorateSolitudeBasemant!
Next we need to write up some script to activate our marker, This is not as hard as it sounds!.

Part 6 - The script.
Ok. We have fixed our conditions, Next we will add a script! In the Papyrus Script Section, Click on edit. At the top of the window that has just opened you will see something similar to editing fragment attached to xxxxxxx, You need to remember what your xxxxxx Is, As we need to make the script first, In this example I will use 01002DD5, Close this window for now, And click Add next to the scripts list on the right. Then double click new script, And for the name put TIF__xxxxxxx so for our example, The name is TIF__01002DD5, Then Click OK. This will add a new script that is awaiting editing. Our next step is to add some code, Right click the TIF__ script, and click Edit source. You need to paste the following, And change the script name (in Red) to your script name!,

;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment;NEXT FRAGMENT INDEX 1Scriptname TIF_01002DD5 Extends TopicInfo Hidden;BEGIN FRAGMENT Fragment_0Function Fragment_0(ObjectReference akSpeakerRef)Actor akSpeaker = akSpeakerRef as Actor;BEGIN CODEgame.getplayer().removeitem(gold, HDSolitudeBasemant.value as int)decoratemarker.enable();END CODEEndFunction;END FRAGMENT;END FRAGMENT CODE - Do not edit anything between this and the begin commentMiscObject Property Gold  Auto  int Property GoldAmount  Auto  ObjectReference Property DecorateMarker  Auto  GlobalVariable Property HDSolitudeBasemant  Auto  

After changing the name, Hit file->Save and if you did it right, You will see no errors, 1 Succeeded. Close this window.

Next we need to change the properties of our script.
Double click our TIF__ Script, and you will see the propertied window pop up, there will be 4 properties already there, we need to do is assign some values to the properties, Click on the first on, Object Reference. On the right side click Edit Value, For Cell you need to detect SolitudeProudspireManor, and set Reference to SolitudePlayerHouseDecorateBasemant (XMarker), Then click Gold, And hit Edit Value, And set it to Gold001, then click on GoldAmount , Edit value and set it to 1500 (this is the price we set before), and last but not least, Click HDSolitudeBasemant and set it to HDSolitdueBasemant Once that's done, Click OK.

We are almost done! The last thing we need to do is add some code to the fragment! Paste the following code into the Papyrus fragment box.
game.getplayer().removeitem(gold, HDSolitudeBasemant.value as int)decoratemarker.enable()

Then hit compile. If everything has gone right, No error boxes will appear. Now click OK to the Quest dialogue window. We are on the home stretch!

Part 7 - The Final Step.
I am just going to take this opportunity to explain how this works, When you place an object in your house, It by default does not have a parent ID. Now any object that has a parent ID takes on the same parameters of your Parent. What we are going to do is Place a kettle out , Set its parent to our XMarker, And that's it!. In this example we are only going to do one object, but once you understand how it works, You will be able to do any type of object from walls to doors etc.

In your render window, Find a spot to place an object down, Then in your object viewer find the kettle (filter kettle with all) and drag it from the object window do the render window. Once you can see it, Double click the kettle. Set the editor ID to anything you wish, I am going to call it BasemantKettle. Then on the tabs below, Press the > button until you see Enable Parent. In this window you want to click Select reference from Render Window, And then find our XMarker that we created. Once you double click the Xmarker you are official done!


This is the end of the tutorial, All you need to do is now save the mod however you wish, And then load it into Skyrim. If all has gone to plan what will happen, is when you go to the manor, There will be no kettle. Then run to the blue palace NPC Falk Firebeard, He will have a new house decoration option called "Basemant", Purchase that from him for 1500, Run back to the house and the kettle will be there!

Now some of you may be asking, What if I want to hide the object when its purchased? for example a wall When you double click on an item, And are in the Parent section, You will see Set enabled state of opposite..... check that box, and you will have reversed effects.
User avatar
Miguel
 
Posts: 3364
Joined: Sat Jul 14, 2007 9:32 am

Post » Mon Jun 18, 2012 7:59 am

Thank you VERY much for this. I'll definitely be following your thread and working through your tutorial. I was wondering, since you're picking apart Proudspire manor, have you found anywhere at all where the "SolitudePlayerHouseDecorateGuestBedroom" Xmarker gets enabled? Presumably, (if it's supposed to work like all the other houses) it's supposed to enable when Elisif makes you Thane and Jordis is activated. However, in 4 different toons I've created including one to specifically test this, that marker has never enabled even once. It's supposed to enable Jodris' bed, and removes the useless wooden crates and hay piles in the basemant, as well as enabling some other clutter. I'm trying to decide how to deal with those assets in my tweaks to the house.

Thanks again, this is MUCH appreciated!

:foodndrink:
User avatar
Sarah MacLeod
 
Posts: 3422
Joined: Tue Nov 07, 2006 1:39 am

Post » Mon Jun 18, 2012 10:13 am

Tutorial Complete!! Video Coming soon!!
User avatar
Maya Maya
 
Posts: 3511
Joined: Wed Jul 05, 2006 7:35 pm

Post » Mon Jun 18, 2012 9:23 pm

Thank you VERY much for this. I'll definitely be following your thread and working through your tutorial. I was wondering, since you're picking apart Proudspire manor, have you found anywhere at all where the "SolitudePlayerHouseDecorateGuestBedroom" Xmarker gets enabled? ........

As far as I can tell, It never does get activated, Which is quite strange, there must be a reason the dev's left it out, Its also been moved aside from the main decorations. I might make the NPC Activate it, and see what happens , Will let you know the result
User avatar
Amy Masters
 
Posts: 3277
Joined: Thu Jun 22, 2006 10:26 am

Post » Mon Jun 18, 2012 5:55 am

Wow, this is amazing. Good job man!
User avatar
Hannah Barnard
 
Posts: 3421
Joined: Fri Feb 09, 2007 9:42 am

Post » Mon Jun 18, 2012 9:37 am

Wow, this is amazing. Good job man!

Thank you!
User avatar
Dean
 
Posts: 3438
Joined: Fri Jul 27, 2007 4:58 pm

Post » Mon Jun 18, 2012 1:57 pm

Changed some script so that Variables do not appear in dialogue menu!
User avatar
Symone Velez
 
Posts: 3434
Joined: Thu Sep 07, 2006 12:39 am

Post » Mon Jun 18, 2012 12:36 pm

Tutorial Video will be up in about 12 hours!
User avatar
mollypop
 
Posts: 3420
Joined: Fri Jan 05, 2007 1:47 am

Post » Mon Jun 18, 2012 8:25 pm

When is the video coming?
User avatar
Michelle Chau
 
Posts: 3308
Joined: Sat Aug 26, 2006 4:24 am

Post » Mon Jun 18, 2012 11:17 am

Sorry for the delay, With a mix of a cold, issues with video size and work its been tough, I'm currently trying to find the best program to record, as my current one is rubbish and produces file sizes of about 3GB D: and apparently already compressed, I will re-record with fraps tonight and compress it myself! Thanks for the patients
User avatar
Rude_Bitch_420
 
Posts: 3429
Joined: Wed Aug 08, 2007 2:26 pm

Post » Mon Jun 18, 2012 1:40 pm

This is really great, thanks! I was just thinking of expanding my house mod by making buyable upgrades and stumbled across this post. Much better than trying to reverse engineer from an existing Bethesda cell. Awesome.
User avatar
Karl harris
 
Posts: 3423
Joined: Thu May 17, 2007 3:17 pm

Post » Mon Jun 18, 2012 7:16 pm

Video tutorial is now up!

http://youtu.be/RLv9FRL9rGQ
User avatar
Allison Sizemore
 
Posts: 3492
Joined: Wed Jul 19, 2006 6:09 am

Post » Mon Jun 18, 2012 8:58 pm

This is cool I'll have to go through it later. I was considering doing almost exactly this. I had some ideas about how to do it but the last few parts like the marker I would not have known about.

Thanks for taking the time to share this.
User avatar
Natalie Taylor
 
Posts: 3301
Joined: Mon Sep 11, 2006 7:54 pm

Post » Mon Jun 18, 2012 5:15 am

Your welcome!
User avatar
Angela
 
Posts: 3492
Joined: Mon Mar 05, 2007 8:33 am

Post » Mon Jun 18, 2012 1:21 pm

I'm trying to do this thing for the Whiterun house, but it doesn't have the DecorateWhiterunElse in it when you add the dialogues near the end, like Solitude has.
User avatar
Keeley Stevens
 
Posts: 3398
Joined: Wed Sep 06, 2006 6:04 pm

Post » Mon Jun 18, 2012 9:25 am

Thats because its called DecorateWhiterunContinue, Same dialogue text just named differently :)
User avatar
Becky Cox
 
Posts: 3389
Joined: Thu Jun 22, 2006 8:38 am

Post » Mon Jun 18, 2012 1:20 pm

Thats because its called DecorateWhiterunContinue, Same dialogue text just named differently :smile:

Ah, gotcha! Thanks!
User avatar
Jennifer Munroe
 
Posts: 3411
Joined: Sun Aug 26, 2007 12:57 am

Post » Mon Jun 18, 2012 8:30 pm

Your most welcome!
User avatar
Elizabeth Davis
 
Posts: 3406
Joined: Sat Aug 18, 2007 10:30 am

Post » Mon Jun 18, 2012 7:24 am

I had a few questions about applying these principles to a concept very similar. You see, I am essentially making a custom upgrade-able player house, that is already in the PC's possession (start off as yours) and with a custom NPC that sells the upgrades.
I didn't want to fiddle with the exact quest in case I messed it up, so I copied the entire quest (kept names as HousePurchaseCOPY0000) and tried to do all this. I ran in to a lot of problems though. I added my custom NPC as a alias and he doesn't have the dialogue still. (he is using the voice as the steward of Windhelm, I of course changed the GenInCell, and also just left out the Quest condition.

Any ideas where I went wrong?
User avatar
Lewis Morel
 
Posts: 3431
Joined: Thu Aug 16, 2007 7:40 pm

Post » Mon Jun 18, 2012 6:46 am

I had a few questions about applying these principles to a concept very similar. You see, I am essentially making a custom upgrade-able player house, that is already in the PC's possession (start off as yours) and with a custom NPC that sells the upgrades.
I didn't want to fiddle with the exact quest in case I messed it up, so I copied the entire quest (kept names as HousePurchaseCOPY0000) and tried to do all this. I ran in to a lot of problems though. I added my custom NPC as a alias and he doesn't have the dialogue still. (he is using the voice as the steward of Windhelm, I of course changed the GenInCell, and also just left out the Quest condition.

Any ideas where I went wrong?

When you copy a quest the dialogue is not copied too. You'll need to redo it or edit the original quest.
User avatar
naana
 
Posts: 3362
Joined: Fri Dec 08, 2006 2:00 pm

Post » Mon Jun 18, 2012 5:22 pm

Ah my helpful friend again. What I want to do is to just give the player all that I just made when the player talks to the NPC. I don't want it is be branched to something if it is going to make it difficult. How would I go about just making it do that then?
User avatar
SamanthaLove
 
Posts: 3565
Joined: Mon Dec 11, 2006 3:54 am

Post » Mon Jun 18, 2012 7:32 pm

that's not the only issue, the current quest makes an alias to the jobstewardfaction , which requires a lot of alias copying, To be honest, your best bet is to make a whole new npc, or to keep with the current system, else you have to do a lot of hunting to find references that shouldn't exists
User avatar
Elizabeth Falvey
 
Posts: 3347
Joined: Fri Oct 26, 2007 1:37 am

Post » Mon Jun 18, 2012 6:56 am

Heya DatenThielt, Thanks a lot for your guide. I found it on the creationkit wiki and it was exactly what I was looking for.

I have a conceptual question, mainly because I'm too lazy to do all the legwork. If you wanted certain objects to disappear upon purchase you would just set them to be in the opposite state to the parent like with the wall, correct? Are you able to link for example some rubble blocking a hallway with the opposite state(visible until xmarker activated), but also hallway furniture set to normal state(invisible until xmarker activated) to the same xmarker without problems?
User avatar
Nice one
 
Posts: 3473
Joined: Thu Jun 21, 2007 5:30 am

Post » Mon Jun 18, 2012 3:41 pm

Correct, At the end of the guide you will see I talk about setting the oposite state, When you are on the parent window there is a check box at the bottom that says "Set state to opposite of parent" that way when the Xmarker is active, other items can be in-active if that makes sense
User avatar
Far'ed K.G.h.m
 
Posts: 3464
Joined: Sat Jul 14, 2007 11:03 pm

Post » Mon Jun 18, 2012 7:34 pm

First off, great tutorial. I basically went through the long way of digging through the decorate topics already created to figure all this out myself. Wish I would have found this earlier.

I've been having some troubles with one stage of this type of modding though.

When I add the condition for 'mymarker.isdisabled() == 0' to the Branch topic for "you've already purchased all the decorations", it works correctly. I know this because, after adding that condition it allows me to purchase more decorations after all the original ones have been bought. Now Im in a state where my custom decorations can be purchased by the user an infinite amount. This is not good, so I go to add the proper condition to fix this. HOWEVER, when I add a condition for 'mymarker.isdisabled() == 1' to the topic with shared data from 'playerhousedecorationsold' I no longer see the option to purchase my custom decorations. Any ideas as to why I see this behavior?
User avatar
matt white
 
Posts: 3444
Joined: Fri Jul 27, 2007 2:43 pm

Next

Return to V - Skyrim