Jump to content

Need Help - House Purchase for Custom Home


FatalxSyn

Recommended Posts

Hey guys,

 

I need help with setting up a house purchase for a custom home.

 

How do I go about getting an NPC to have the option to sell the custom home to the player?

 

I've looked at the HousePurchase Quest and tried to figure out how to link it to my home, but failed. I've looked for answers all over Google, but had no luck. Really hoping someone will actually see this thread this time!

Link to comment
Share on other sites

It would be possible to link it to your home, but you might be better off making your own. Make a start game enabled quest. Set up aliases for your NPC, the key, and the house location. Make the dialogue. And then, when the player chooses the topic, remove the key from the NPC, remove the gold from the player, give the player the key, increment the house purchase script's houses owned variable, and update the BYOH adoption (the last two can be seen in the house purchase quest's script fragments on its stage(10). Put in a check so the player can't choose the dialogue if they already own the house (perhaps by requiring your quest be at a certain stage and advancing the stage when they buy it). I don't know how to copy the dialogue from the other quest, though, so I don't know how to make it use the audio. But any decent dialogue tutorial should explain how to reuse vanilla dialogue.

Link to comment
Share on other sites

Thank you for responding!

 

Alright, so I am a complete noob at creating quests, I already planned on viewing tutorial guides on it.

 

But to be honest, I have no idea how to do any of what you said, but I at least now have a starting point on how to do it. So thank you. :)

Link to comment
Share on other sites

For a quick run-down of the basic steps:

  1. Make a start game enabled quest -> In the quests tab, just right click and choose new. It's start-game enabled by default, so you don't need to change anything. Utility quests don't need a name, because the name is just what appears in the journal. They do need an id, though. So give it an id and press ok to close it and save it (this step is more important than you'd think). Reopen it and continue.
  2. Set up properties (instead of aliases) for the key and the gold -> You make one by going to the Stages tab, making a new stage with index 10, and making a new Log Entry on the right (doesn't need any other info). Then in the script fragment area, click properties, and choose New. Make sure you choose the right type (MiscObject for the gold, Key for the key). You'll only need a property for the NPC if the NPC actually has the key. If you're just going to pretend they had the key (to avoid it being pickpocketed), then it doesn't need to be referenced (the dialogue shouldn't use it). Click the created property and edit the value so it's set to the right thing.

  3. Make the dialogue -> Find a tutorial on dialogue to help you reuse vanilla dialogue. Do that until you've got it all set up and make sure you've put in checks so only your NPC can say it.

  4. When the player chooses any of the dialogue topics that would purchase the house, give the player the key, take the gold, and update the house purchase script variable and BYOH adoption quest (so it knows there's a place for the kids to live... if they can live at your house).

  5. Put in a check so the player can't choose the dialogue if they already own the house -> Have the quest start at stage 10. Also have a stage 100 (or any other). In the dialogue, any of the top-level dialogue (the ones the player can choose when starting a conversation), put in the condition GetOwningQuest.GetStage() == 10 so it'll only appear if the stage is currently 10. When transferring the key and gold, set the stage to 100 (or whatever you went with).

It's just a quick run down, but maybe it'll make things easier.

Link to comment
Share on other sites

Thank you very much! That information helped out alot, though I did get stuck on "script fragment" area, but other than that you have been very helpful!

Link to comment
Share on other sites

  • 1 month later...

You two didn't understand it because I said it wrong. It was my fault. For an actual explanation of what script fragments are (if you care):

 

 

When I said script fragments I was referring to quest stage fragments, which are small (typically, though they can very easily be quite large) pieces of code which run when a quest is set to a particular stage. So, if you put a script fragment in stage 10, then as soon as the quest reaches stage 10, that code will run one time. They're made by typing in the large box on the right when you have a quest stage selected in the Quest Stages tab of a quest. The box is titled Papyrus Fragment and there's another tab titled Advanced. With the Papyrus Fragment tab active (it's active by default, you only have to change it if you switched to advanced), there are three buttons at the bottom of that section: Compile, Properties, and Edit.

 

 

Note that because stage one is the stage the quest starts on, the script fragment will run as soon as the quest starts. It's not actually relevant, but it has the potential to cause problems if you don't realize it.

 

 

The reason that was confusing in my original post was because I was telling you to set it up on the stage's script fragment, but it should actually be set in the dialogue's script fragment. The same box exists in dialogue as well, and it serves the same purpose: when the dialogue is said, the script fragment will run. So, you can put code there for when the player chooses to buy the house, and when they choose that topic or the NPC says it, the code will run (to transfer money and keys and stuff). So, the properties for the key and gold should be set in the dialogue's papyrus fragment, NOT the stage's papyrus fragment like I originally said. Sorry about that. I haven't actually done this, so I can't guarantee anything. (As a possibly confusing bit of potentially useful information, the properties for all the stages' script fragments are shared. If you set the property in one stage fragment, other stage fragments will have access to it. Setting a property for stage fragments actually invisibly sets the property in a script in the quest's script tab, and that script is what contains all of the fragments and properties. If that made no sense, ignore it.)

 

This was strictly an attempt to answer a specific question. If there are other questions, feel free to ask and I'll help if I can. However, if FatalxSyn got it working, you might consider asking her if she doesn't see this.

 

I only just got Skyrim re-installed and haven't even gotten to play it yet, let alone get back into working with the creation kit (I had to re-install Windows). So, if I need to, I'll try to write a better walkthrough, but if it comes to that, it might take a day or two as I get everything back in working order and get myself reacquainted with the CK.

Edited by Xander9009
Link to comment
Share on other sites

  • Recently Browsing   0 members

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