Making a house buyable the proper way?

Post » Mon Jun 18, 2012 9:35 am

and your telling the script to compile after every change?
User avatar
Rachael Williams
 
Posts: 3373
Joined: Tue Aug 01, 2006 6:43 pm

Post » Mon Jun 18, 2012 5:23 am

Yeah. :yes: I have some minimal experience with oop. Enough to know to do that, lol. :P It defies logic at this point.
I'm restarting the CK. I deleted every script again. It seems like it won't register anything that isn't added by the script fragments section.
User avatar
marina
 
Posts: 3401
Joined: Tue Mar 13, 2007 10:02 pm

Post » Sun Jun 17, 2012 9:13 pm

Hmm, got this error when trying to close the quest menu.
SCRIPTS: Cannot open store for class "QF_RWH01_02005486", missing file?
That's probably related. >.>
User avatar
Tanya
 
Posts: 3358
Joined: Fri Feb 16, 2007 6:01 am

Post » Mon Jun 18, 2012 3:46 am

I'm at a loss, I don't get why this isn't working.

;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment;NEXT FRAGMENT INDEX 1Scriptname zSellHouse extends TopicInfo Hidden;BEGIN FRAGMENT Fragment_0Function Fragment_0(ObjectReference akSpeakerRef)Actor akSpeaker = akSpeakerRef as Actor;BEGIN CODEgame.getplayer().removeitem(Gold, 2500);END CODEEndFunction;END FRAGMENT;END FRAGMENT CODE - Do not edit anything between this and the begin commentMiscObject Property Gold  Auto  key Property RWKey Auto

My Method:
I go to the Topic Info window. I choose to Add Script. I select new script. I created the script to have name zSellHouse, I copy/paste the above into the script. It complies without issue. I assign Gold001 to property Gold, and I assign zRiverwoodPlayerHouseKey to property RWKey.

Then I hit okay. I hit okay on the quest menu. Then I save the esp.

Did I do something wrong?

When I go in game and talk to Gerdur, I see the dialogue options and everything. However the script for the topic that buys the house doesn't activate. No gold is removed. This has become very disheartening. I'm not sure where to go next with this.
User avatar
Scott Clemmons
 
Posts: 3333
Joined: Sun Sep 16, 2007 5:35 pm

Post » Mon Jun 18, 2012 5:52 am

well, the only real difference I see here is the integer..

;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment;NEXT FRAGMENT INDEX 1Scriptname zSellHouse extends TopicInfo Hidden;BEGIN FRAGMENT Fragment_0Function Fragment_0(ObjectReference akSpeakerRef)Actor akSpeaker = akSpeakerRef as Actor;BEGIN CODEgame.getplayer().removeitem(Gold, 2500 as int);END CODEEndFunction;END FRAGMENT;END FRAGMENT CODE - Do not edit anything between this and the begin commentMiscObject Property Gold  Auto  key Property RWKey Autoint Property GoldAmount  Auto  
Long shot, but you could try. You'd think putting a number there would act as an integer though, so that's my only shot for you. The original script uses a value defined in a global property, so I wouldn't know how different that would be.
User avatar
Kelly Tomlinson
 
Posts: 3503
Joined: Sat Jul 08, 2006 11:57 pm

Post » Sun Jun 17, 2012 11:14 pm

Thanks for your help, but it didn't work. Something like this shouldn't be this hard. Clearly, I'm screwing something up.
User avatar
Bethany Short
 
Posts: 3450
Joined: Fri Jul 14, 2006 11:47 am

Post » Mon Jun 18, 2012 7:27 am

Try adding a debug notification (causes a message to display in the upper left corner of your screen) to make sure that the fragment is actually running:
Debug.Notification("Look, I'm working!")

Also, are you still getting this error?
SCRIPTS: Cannot open store for class "QF_RWH01_02005486", missing file?
I don't know much about fragments in particular, but "missing file" makes it sound like something's gone wrong with its generation? Perhaps try, with the same script, starting to create the dialogue from scratch. Or, if you can find the fragment file being used, delete it and recreate it? Those are just guesses; as far as I can tell your code looks correct.

Cipscis
User avatar
Yung Prince
 
Posts: 3373
Joined: Thu Oct 11, 2007 10:45 pm

Post » Sun Jun 17, 2012 10:23 pm

My Method:
I go to the Topic Info window. I choose to Add Script. I select new script. I created the script to have name zSellHouse, I copy/paste the above into the script. It complies without issue. I assign Gold001 to property Gold, and I assign zRiverwoodPlayerHouseKey to property RWKey.
try this method instead

1. enter a comment line in the papyrus fragment such as the line inside the quotes here ";test"
2. hit compile
3. right click the newly generated script in the script list
4. edit properties to add the miscobject property for gold and the key property for the key
5. hit okay in the property window
6. hit okay in the dialogue window
7. reopen the topic
8. add your remove gold line to the papyrus fragment box
9. add your add key line to the papyrus fragment box
10. hit compile
User avatar
Mélida Brunet
 
Posts: 3440
Joined: Thu Mar 29, 2007 2:45 am

Post » Mon Jun 18, 2012 7:24 am

Something is very wrong. I'm opened the esp again and it's not referencing the right script anymore. I'm deletei
try this method instead

1. enter a comment line in the papyrus fragment such as the line inside the quotes here ";test"
2. hit compile
3. right click the newly generated script in the script list
4. edit properties to add the miscobject property for gold and the key property for the key
5. hit okay in the property window
6. hit okay in the dialogue window
7. reopen the topic
8. add your remove gold line to the papyrus fragment box
9. add your add key line to the papyrus fragment box
10. hit compile
I actually did just that earlier. It still wasn't working. On top of that when I opened the esp again later it wasn't able to recover the code from the script in the script fragments section I get this message:
";WARNING: Unable to load fragment source from function Fragment_0 in script TIF__020054C6
;Source NOT loaded"
The file is still listed under the scripts section, it I edit source I the script is now this:
Spoiler

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

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

MiscObject Property Gold001 Auto

Key Property RiverwodPlayerHomeKey Auto


Plus the properties don't auto link to their objects anymore. They are both listed as <>.

This thing is so broken. :shakehead:
I'm sure it something I did. I'm going to delete my topics and try again.
User avatar
Emerald Dreams
 
Posts: 3376
Joined: Sun Jan 07, 2007 2:52 pm

Post » Mon Jun 18, 2012 9:07 am

I got it working!!!!!!!!

:bunny: :bunny: :bunny: :bunny: :bunny: :bunny: :bunny: :bunny:

I added the second and third lines below to the script fragments section of the quest stages window for the terminal stage of the quest:
SetObjectiveCompleted(10)game.getplayer().removeitem(Gold001, 2500)game.getplayer().AddItem(RiverwodPlayerHomeKey)SetObjectiveDisplayed(20)SetObjectiveCompleted(20)
There's a little delay, but it works!!!!
Thanks everyone for all your help. :biggrin:
User avatar
Alexander Lee
 
Posts: 3481
Joined: Sun Nov 04, 2007 9:30 pm

Post » Sun Jun 17, 2012 7:07 pm

Congrats!, Maybe make a tutorial for others :D, If not then I have no issue running one though :)
User avatar
maya papps
 
Posts: 3468
Joined: Mon Aug 07, 2006 3:44 pm

Post » Mon Jun 18, 2012 4:03 am

Congrats!, Maybe make a tutorial for others :biggrin:, If not then I have no issue running one though :smile:
I don't know if I'd be best to explain everything. :tongue:

http://skyrim.nexusmods.com/downloads/file.php?id=9390
If anyone would like too. :)
User avatar
Lisa
 
Posts: 3473
Joined: Thu Jul 13, 2006 3:57 am

Post » Sun Jun 17, 2012 7:42 pm

Glad you got this working man. Sorry I couldn't be of more help. :P
User avatar
Soraya Davy
 
Posts: 3377
Joined: Sat Aug 05, 2006 10:53 pm

Post » Mon Jun 18, 2012 9:41 am

On the upgrade question, in the vanilla player houses there are x-markers that are designated as the parent of all the objects in a particular upgrade (so they are all in the house cell), and so all of those basically share the on/off switch with the marker. So when the dialogue activates the x-marker, all of the children activate, too. This is brilliant and saves the effort of including every object in a script. I haven't experimented with it yet, but this is what I figured out from poking around.
User avatar
Heather beauchamp
 
Posts: 3456
Joined: Mon Aug 13, 2007 6:05 pm

Previous

Return to V - Skyrim