Making a house buyable the proper way?

Post » Mon Jun 18, 2012 12:01 am

In the past (MW and OB) I normally cheated the system a bit when it came to creating a buyable house. I would add an item to merchant inventories and called it "Deed to WHATEVERHOUSE" and put a script on the item to add a key when read.

I'd rather do it properly this go around. I know I'd need to edit NPC dialogue (of course, lol.). But how exactly would I add the key and remove the gold? Sorry, it's probably quite simple. :unsure:
User avatar
Louise Dennis
 
Posts: 3489
Joined: Fri Mar 02, 2007 9:23 pm

Post » Sun Jun 17, 2012 6:19 pm

I managed to accomplish this by checking one of the other house upgrade NPC's for the money removal. and also looking at the dialogue script functions (from the quest tutorial) It explains how to add/remove inventory from the NPC, on the wiki, The harder part is upgrades :) Cant figure them out for the life of me!
User avatar
Heather Kush
 
Posts: 3456
Joined: Tue Jun 05, 2007 10:05 pm

Post » Sun Jun 17, 2012 7:07 pm

I'm not sure what you mean by the "proper way", but in this mod http://skyrim.nexusmods.com/downloads/file.php?id=8045 I had Katla at Katla's Farm selling the house. If you go to the quest EMBuyHighview you should be able to follow step by step how I did it. You might find it very useful to try out this wiki tutorial serie: http://www.creationkit.com/Bethesda_Tutorial_Planning_the_Quest
User avatar
Ron
 
Posts: 3408
Joined: Tue Jan 16, 2007 4:34 am

Post » Mon Jun 18, 2012 1:05 am

I'm not sure what you mean by the "proper way", but in this mod http://skyrim.nexusmods.com/downloads/file.php?id=8045 I had Katla at Katla's Farm selling the house. If you go to the quest EMBuyHighview you should be able to follow step by step how I did it. You might find it very useful to try out this wiki tutorial serie: http://www.creationkit.com/Bethesda_Tutorial_Planning_the_Quest
Ha, I found that tutorial only a few hours ago. I'm almost done with it now, I just need a silent sound file. (I don't have a mike and the CK won't let me record one.) Thanks for the info. :)
User avatar
zoe
 
Posts: 3298
Joined: Sun Nov 12, 2006 1:09 pm

Post » Mon Jun 18, 2012 1:22 am

The CK should allow you to record... are you sure the dialog is filtered so that there is a valid voicetype?
User avatar
Emma
 
Posts: 3287
Joined: Mon Aug 28, 2006 12:51 am

Post » Sun Jun 17, 2012 10:26 pm

I think so, there's only one type. FemaleNord. I'm using Gerdur to sell the house.

EDIT: Some suggested I try plugging headphones into the mike port. It worked. The silent audio recorded fine. Thanks for you help.
User avatar
Matt Bigelow
 
Posts: 3350
Joined: Sun Sep 30, 2007 6:36 pm

Post » Mon Jun 18, 2012 2:52 am

Buying it should be easy. Remove gold from the player and give him/her the key. The upgrades on the other hand are tough to figure out. In the associated dialogue (quest dialog, that is), the result script seems to activate a marker related to the particular upgrade... but I can't find the markers anywhere.
User avatar
Shelby McDonald
 
Posts: 3497
Joined: Sat Jan 13, 2007 2:29 pm

Post » Sun Jun 17, 2012 11:24 pm

Buying it should be easy. Remove gold from the player and give him/her the key. The upgrades on the other hand are tough to figure out. In the associated dialogue (quest dialog, that is), the result script seems to activate a marker related to the particular upgrade... but I can't find the markers anywhere.
It doesn't matter where the marker is. All that matters is that the marker is a parent of the 'upgrade furniture objects' and enabling or disabling that marker will enable or disable it's child objects.
User avatar
GRAEME
 
Posts: 3363
Joined: Sat May 19, 2007 2:48 am

Post » Mon Jun 18, 2012 8:38 am

It doesn't matter where the marker is. All that matters is that the marker is a parent of the 'upgrade furniture objects' and enabling or disabling that marker will enable or disable it's child objects.

Oh yeah... just like the Fallout 3 home upgrade thing... :facepalm:
User avatar
Maddy Paul
 
Posts: 3430
Joined: Wed Feb 14, 2007 4:20 pm

Post » Mon Jun 18, 2012 5:27 am

That's helped me as well, Did not know that they are all linked to one marker, and that hiding/showing that marker will make them all disappear, TY!
User avatar
Jennifer Rose
 
Posts: 3432
Joined: Wed Jan 17, 2007 2:54 pm

Post » Mon Jun 18, 2012 6:35 am

Well, I've finished the house and got all the dialogue in place (with proper conditions for buyer gold) but I can't seem figure out how to remove the gold from the player and add the key.
I tried adding the line

Game.GetPlayer().RemoveItem(Gold001, 2500)

in the script fragments section. It wouldn't compile. (I think I need to define Gold001 as a property for it to work. I later realized that the above only accepts Referenced Objects, not base objects.)

So could some one give me some guidance on how to implement removing gold from the PC when selecting a specific dialogue option. :unsure:
User avatar
JESSE
 
Posts: 3404
Joined: Mon Jul 16, 2007 4:55 am

Post » Mon Jun 18, 2012 6:31 am

Even if the script compile fails, You will see on the side it has created a tif_xxxxxxxxx, If you go into its properties you can add new globals for gold. Also in your conditions make sure you set it to be a reference, and reference -> any -> playerid

My advise is to look at the HousePurcahse dialogue, It has the exact script you are after :)
User avatar
NAkeshIa BENNETT
 
Posts: 3519
Joined: Fri Jun 16, 2006 12:23 pm

Post » Sun Jun 17, 2012 9:16 pm

So I'm trying to write a full script to do it now, but I can't figure out what http://www.creationkit.com/Category:Eventswould apply. I want it to add the key and remove the gold when the dialogue option is selected. Any suggestions?
User avatar
jaideep singh
 
Posts: 3357
Joined: Sun Jul 08, 2007 8:45 pm

Post » Mon Jun 18, 2012 3:00 am

Give me about half an hour to get home to the PC, and I can show you the functions, right now I'm stuck at work :(
User avatar
Austin England
 
Posts: 3528
Joined: Thu Oct 11, 2007 7:16 pm

Post » Mon Jun 18, 2012 6:38 am

I'd appreciate it. :) I'll be leaving soon, so I won't be here to reply. But any info you can share would be most appreciated. :D
User avatar
Roanne Bardsley
 
Posts: 3414
Joined: Wed Nov 08, 2006 9:57 am

Post » Mon Jun 18, 2012 4:15 am

Okay, I created a script. Created properties for Gold001 and RiverwoodPlayerHomeKey (the key for the house).

This was the code I tried:
Event OnActivate(ObjectReference akActionRef)
Game.GetPlayer().AddItem(RiverwodPlayerHomeKey, 1, false)
Game.GetPlayer().RemoveItem(Gold001, 2500)
EndEvent

It didn't work. Does anyone know what type of event I should use. I'm thinking it's the wrong type of event, but I'm not sure which I should use. :unsure: Is the rest of my code correct, it compiled without issue so the syntax must be good.
User avatar
Eileen Müller
 
Posts: 3366
Joined: Fri Apr 13, 2007 9:06 am

Post » Sun Jun 17, 2012 6:56 pm

You should be able to do it directly from the script as so

;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);END CODEEndFunction;END FRAGMENT;END FRAGMENT CODE - Do not edit anything between this and the begin commentMiscObject Property Gold  Auto  int Property GoldAmount  Auto  

and then just set the property values using the editor, once that's loaded into the dialogue option it will work
User avatar
dean Cutler
 
Posts: 3411
Joined: Wed Jul 18, 2007 7:29 am

Post » Mon Jun 18, 2012 5:36 am

Thanks for your help. :smile: Here's my code now. I'm just trying to get it to remove the gold atm. It's not working. It complies, but doesn't do anything in game. I set the properties properly. Lol.

Spoiler

;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment
;NEXT FRAGMENT INDEX 1
Scriptname TIF__01002DD5 Extends TopicInfo Hidden

;BEGIN FRAGMENT Fragment_0
Function Fragment_0(ObjectReference akSpeakerRef)
Actor akSpeaker = akSpeakerRef as Actor
;BEGIN CODE
game.getplayer().removeitem(Gold, 2500)
;END CODE
EndFunction
;END FRAGMENT

;END FRAGMENT CODE - Do not edit anything between this and the begin comment

MiscObject Property Gold Auto

key Property RWKey Auto
User avatar
Nicole Coucopoulos
 
Posts: 3484
Joined: Fri Feb 23, 2007 4:09 am

Post » Sun Jun 17, 2012 9:13 pm

did you set the value of your property "gold" to gold001? if it doesn't have the same name as the miscobject then auto can't set the value automatically
User avatar
Sierra Ritsuka
 
Posts: 3506
Joined: Mon Dec 11, 2006 7:56 am

Post » Mon Jun 18, 2012 4:41 am

Ok, What about your dialogue, Did you set that to Reference the player (Example below)

http://imageshack.us/photo/my-images/13/moneyel.jpg/
User avatar
glot
 
Posts: 3297
Joined: Mon Jul 17, 2006 1:41 pm

Post » Mon Jun 18, 2012 12:24 am

did you set the value of your property "gold" to gold001? if it doesn't have the same name as the miscobject then auto can't set the value automatically
Yes I did, however there is no [S] in the topic when you are looking at it in the Dialogue Views window. Perhaps it isn't recognizing there's a script attached?

It gets the player item count fine. If I have 2499 gold or less no topic appears if I have 2500 or more it appears. So that condition is working.
User avatar
Enie van Bied
 
Posts: 3350
Joined: Sun Apr 22, 2007 11:47 pm

Post » Mon Jun 18, 2012 12:48 am

Yes I did, however there is no [S] in the topic when you are looking at it in the Dialogue Views window. Perhaps it isn't recognizing there's a script attached?
does the script file show up in the list to the right of the papyrus fragments area?
User avatar
Claire Lynham
 
Posts: 3432
Joined: Mon Feb 12, 2007 9:42 am

Post » Sun Jun 17, 2012 8:19 pm

does the script file show up in the list to the right of the papyrus fragments area?
Yeah, it does. It's very odd.
User avatar
Batricia Alele
 
Posts: 3360
Joined: Mon Jan 22, 2007 8:12 am

Post » Sun Jun 17, 2012 6:09 pm

Yeah, it does. It's very odd.
might be something borked up in the script handling of the CK then, go into your data/scripts folder and delete the compiled script, remove the script entirely from the that dialogue topic then start the script over and see if that works, including the matching script source file in data/scripts/source
User avatar
KiiSsez jdgaf Benzler
 
Posts: 3546
Joined: Fri Mar 16, 2007 7:10 am

Post » Sun Jun 17, 2012 11:47 pm

Still not showing an S. This makes no sense. *sigh*
I remember why I did it the round about way in MW and OB, lol.
User avatar
Horse gal smithe
 
Posts: 3302
Joined: Wed Jul 05, 2006 9:23 pm

Next

Return to V - Skyrim