Difference between revisions of "House for Sale Tutorial"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>GhanBuriGhan
(Added to quest tutorials cat.)
imported>Vswe
(Made this page more exact.)
Line 1: Line 1:
Needed for the Purchase A House Quest
Here comes a tutorial about how you make your own House for Sale.<br>
<br>
===Preparetions===
Before we can start you need to do this:<br>
*Make the Exterior of the house.
*Make a cell for the Interior, name it ''House for Sale''.
*Make the interior of the House and decorate it.
*Make a Npc who will sell the house.
*Make a House Key
*Make a Quest
===Preparing the house===
First, add two doors, one in the interior and the other one in the Exterior. Link them together and set the lock to ''Need A Key'' and choose your key as the correct key.<br>
Then decide what decoration who will come with each set of things.<br>
In each set you need a parent, just pick one of the thing in the set.<br> Double-click on it and check the ''Persistent Reference'' box,give it an Referece ID too. Example: ''BedroomParentRef''.<br> Double-click on the other things in the same set and go to ''Enable Parent'' then press ''Select Reference in Render Window''.<br>
Double-click on the Parent of the set. Then repeat this on the other set so each set is linked to their own parent.<br><br>
Now Your house is ready.
<br><br>
===The Npc===
The Npc needs some dialogues.<br>
Go to the Quest and go to ''Topics''.<br>
Right-click in the empty list and press ''add topic''.<br>
Then you add ''HouseDecline'' and ''HouseInquiry''.<br>
Go back to the ''addtopic''list, right-click and press ''new topic''.<br>
Make one topic called ''Housebuy(the name of your town)'' and one called ''HouseTooMuch(the name of your town)''.<br><br>
Before you continues. You need to choose a price on the house.<br><br>
Now select ''HouseBuy''. In the ''topic text'' you whrite something like this: "''I'll gladly pay 3,000 gold for it''" (If your house cost 3000, of course).<br> Then go to the list beneath the ''topic text''. Right-click and select ''new''. <br>In the Response text you whrite something like this: "''Good chose, here is your key...''" <br>Then add the audio, if you don't want to record your own voice you can unpack some voices from oblivion. <br>Press ''Ok''.<br>
In the ''Result Script'' write:
SetStage ''(The name of your Quest)'' 10
In the ''Conditions'' list you right-click and press new.<br>
Set the ''Condition Function'' to GetGold, leave the ''Function Parameters'' empty, set Comparision to ''>='' and the value to the price of your house, then check the ''Run on target''.<br> Then add a new Condition, Function: GetisId, Parameters: (Your Npc), Comparison: ==, Value: 1 and ''Run on Target'': Unchecked. <br>Select ''HouseDecline'' add a new response.<br> Add a text like this: "''I'd prefer to only discuss the property with serious buyers.''".<br>
Then add the audio.<br> Add a condition like the second one on the previouse Topic.<br>
Select ''HouseInquiry''. Add a new response with a text like this: "''I've been looking for just the right owner for a special home I have.''".<br> Add audio.<br>
In the conditions you add the same condition as the last topic. <br>Then you add a new condition: Function: IsCellOwner, Parameters:(The cell of your house) Player, Comparison: == and Value: 0. <br>Then add a third condition: Function: GetDisposition, Comparison: >= and Value: (How much the Npc needs to like you before He/She Offer you the house). <br>In the ''Choices'' List, add ''HouseBuy'', ''HouseDecline'' and ''HouseTooMuch''.<br>
Select ''HouseTooMuch'', whrite ''I can't afford 3,000 gold.'' in the ''Topic Text''.<br> Add a new response with a text like this: "''What a shame. I guess I have to look for another buyer.''".<br> Add audio. <br>Add a condition, the usual GetIsID condition.<br><br>
Now the dialouges is finished.


-House
===The furnishing===
First create a scroll for each set of furniture and name them like: ''House BedRoom'' or ''House DinningRoom''.<br>In them you whrite what this set of furniture will add to your house. Something like this: ''<br>This will upgrade your house with:<br>
<br>
1 Bed<br>
1 Carpet<br>
1 Bookshelf with 1 book<br>
1 Drawers with 3 clothes<br>
1 Stool


-Interior
'' Add this script on them:


-A HouseForSale door (ie. HouseForSaleBartholm) (HouseBartholmScript runs on this object)
Scriptname HouseFurnReceiptScript
short Doonce
begin OnAdd player
if ( Doonce == 0 )
SetItemValue 0
set Doonce to 1
endif
end


-Furnished with All purchase furnishings linked to one parentobject. (ie the rug is the parent of the chair, table, books on the table, etc. named something to the effect of ParentStudyAreaBartholm, ParentStorageAreaBartholm, etc.)
Then add a value to them.<br>
You can make the next part on different ways, i will show one of them.<br>
First choose the seller of the set's, you can use the seller of the house or someone else. <br>Select the Merchant cointainer to this Npc. Then add this to it's Script:


-A vendor (the person you purchase furniture from)
short once
begin gamemode
if getstage (QuestName) >= 10
if once == 0
additem (Id of the first Set) 1
additem (Id of the second Set) 1
                        ; Do this on all of the sets                     
set once to 1
endif
endif
end


-A house quest giver. (the person you buy the house from)
===The Quest===
Make a Quest Script and add it to your Quest.<br>
This is the script you will need:


-A container object hidden in the vendors cell with all the receipts for purchased furniture (give it a reference name its refered to in the house furniture script)
scn aaabuyinghouse
 
-A Receipt (actually a book) for each Furnishable Area (ie. House Bedroom Area) with the HouseFurnReceiptScript linked to it.
short TotalCount ;counts how many furniture set you have bouught
 
short Doonce1    ;check if you have bought the first thing
-A script HouseBartholmFurnScript for the furnishings (it enables purchases once you have bought you house and completes the quest once you have purchased all available upgrades) (quest script linked to the house for sale quest)
short Doonce2    ;check if you have bought the second thing
 
;add "Short Doonce3" if you have 3 items
-A script HouseBartholmScript to advance the quest once you have visited your new house. (ie. I've seen my new house now I want furniture... point me towards the furniture store) (object script)
 
-A quest for the House for Sale (HouseBartholm runs HouseBartholmFurnScript)
 
+ Quest Data: runs HosueBartholmFurnScript
 
+ Quest Stages: 3 (bought house, visited house need furniture, purchased all available upgrades)
 
+ Quest Targets: Point to house3sale door and furniture vendor
 
+ Quest Topics:
HouseByBartholm- sets stage 1
HouseDecline
HouseInquiry- adds choices HouseBuyBartholm, HouseDecline,HouseTooMuchBartholm
HouseTooMuchBartholm
 
 
*Note: I do not mention the conditions, result scripts, & checks in the quest. (Actually I did but my dog sat on my surge protector and I’m not motivated to write them a second time) Refer to the game’s topics and infos to make sure you have everything linked correctly. Use the copy all conditions and paste them into your infos and then change their references to your town, house, door, furniture vendor, etc.
 
 
 
Scriptname HouseBartholmFurnScript
   
   
short TotalCount
short MerchSetup
short Doonce1
  float fQuestDelayTime
  float fQuestDelayTime
   
   
Line 51: Line 93:
  ;Kill script if conditions aren't met
  ;Kill script if conditions aren't met
   
   
  if ( GetStage HouseBartholm < 10 )
  if ( GetStage housearea2 < 10 )
  Return
  Return
  endif
  endif
   
   
  ;Merch Container Stuff
  if getstage (Questname) == 10 && player.getincell  (HouseCell)  == 1
setstage (Questname) 20
endif
   
   
if ( GetStage HouseBartholm == 10 ) && ( MerchSetup == 0 )
HouseBartholmAddonsRef.Enable
HouseBartholmAddonsRef.SetOwnership ZorbagraUzgash
set MerchSetup to 1
endif
   
   
 
  ;These are the variable triggers that are set when a voucher is acquired
  ;These are the variable triggers that are set when a voucher is acquired
   
   
  if ( Player.GetItemCount HouseBartholmBedroomAreaReceipt == 1 ) && ( Doonce1 == 0 )
  if ( Player.GetItemCount (first set of furniture ID) == 1 ) && ( Doonce1 == 0 )
  ParentBedroomAreaBartholm.Enable
  (first parent).Enable
  set TotalCount to ( TotalCount + 1 )
  set TotalCount to ( TotalCount + 1 )
  set Doonce1 to 1
  set Doonce1 to 1
  endif
  endif
   
   
if ( Player.GetItemCount (Second set of furniture ID) == 1 ) && ( Doonce2 == 0 )
(second parent)..Enable
set TotalCount to ( TotalCount + 1 )
set Doonce2 to 1
endif
   
   
  ;Ends Quest if All Bought
  ;Ends Quest if All Bought
   
   
  if ( TotalCount < 11 )
  if ( TotalCount == 2 )   ;change the "2" to the number of things you have.
  if ( TotalCount == 10 )
  setstage (Quest Name) 30
setstage HouseBartholm 30
set fQuestDelayTime to 0
set fQuestDelayTime to 0
endif
  endif
  endif
   
   
  end
  end


Go to ''Quest Stages'' and add stage 10, 20 and 30. Select stage 10. <br>Make a new log Entry with the text: "''I just bought a house in (The name of your town).''".<br>
In the ''Result Script'' whrite this:
(first parent).disable
(second parent).disable
;do this on all the parents
Player.RemoveItem Gold001 (the price of your house)
Player.AddItem (Your key ID) 1
SetCellOwnership (HouseCell)
SetCellFullName (HouseCell) "(The name of your town) House"
ModPCMiscStat 15 1
set (Questname).fQuestDelayTime to 1


Select stage 20 and make a new Log Entry with the text: "''Now that I've arrived at my new house in (Your town), I may want to head over to (The Npc To sell the furniture) at (where he is) to secure some furnishings for it.''"<br><br>


ScriptName HouseBartholmScript
Select Stage 30 and make a new log entry with the text: "''I've now bought everything (The Npc To sell the furniture) has for my house in (Your Town).''".
Check the ''Complete Quest'' to finish the quest.<br><br>
Begin OnLoad
If GetStage HouseBartholm == 10
If Player.GetInCell BartholmHouseForSale == 1
SetStage HouseBartholm 20
EndIf
EndIf
End


[[Category:Tutorials]]
And now you have made a House for sale.
[[Category:Quest_Tutorials]]

Revision as of 11:19, 26 May 2008

Here comes a tutorial about how you make your own House for Sale.

Preparetions

Before we can start you need to do this:

  • Make the Exterior of the house.
  • Make a cell for the Interior, name it House for Sale.
  • Make the interior of the House and decorate it.
  • Make a Npc who will sell the house.
  • Make a House Key
  • Make a Quest

Preparing the house

First, add two doors, one in the interior and the other one in the Exterior. Link them together and set the lock to Need A Key and choose your key as the correct key.
Then decide what decoration who will come with each set of things.
In each set you need a parent, just pick one of the thing in the set.
Double-click on it and check the Persistent Reference box,give it an Referece ID too. Example: BedroomParentRef.
Double-click on the other things in the same set and go to Enable Parent then press Select Reference in Render Window.
Double-click on the Parent of the set. Then repeat this on the other set so each set is linked to their own parent.

Now Your house is ready.

The Npc

The Npc needs some dialogues.
Go to the Quest and go to Topics.
Right-click in the empty list and press add topic.
Then you add HouseDecline and HouseInquiry.
Go back to the addtopiclist, right-click and press new topic.
Make one topic called Housebuy(the name of your town) and one called HouseTooMuch(the name of your town).

Before you continues. You need to choose a price on the house.

Now select HouseBuy. In the topic text you whrite something like this: "I'll gladly pay 3,000 gold for it" (If your house cost 3000, of course).
Then go to the list beneath the topic text. Right-click and select new.
In the Response text you whrite something like this: "Good chose, here is your key..."
Then add the audio, if you don't want to record your own voice you can unpack some voices from oblivion.
Press Ok.
In the Result Script write:

SetStage (The name of your Quest) 10

In the Conditions list you right-click and press new.
Set the Condition Function to GetGold, leave the Function Parameters empty, set Comparision to >= and the value to the price of your house, then check the Run on target.
Then add a new Condition, Function: GetisId, Parameters: (Your Npc), Comparison: ==, Value: 1 and Run on Target: Unchecked.
Select HouseDecline add a new response.
Add a text like this: "I'd prefer to only discuss the property with serious buyers.".
Then add the audio.
Add a condition like the second one on the previouse Topic.
Select HouseInquiry. Add a new response with a text like this: "I've been looking for just the right owner for a special home I have.".
Add audio.
In the conditions you add the same condition as the last topic.
Then you add a new condition: Function: IsCellOwner, Parameters:(The cell of your house) Player, Comparison: == and Value: 0.
Then add a third condition: Function: GetDisposition, Comparison: >= and Value: (How much the Npc needs to like you before He/She Offer you the house).
In the Choices List, add HouseBuy, HouseDecline and HouseTooMuch.
Select HouseTooMuch, whrite I can't afford 3,000 gold. in the Topic Text.
Add a new response with a text like this: "What a shame. I guess I have to look for another buyer.".
Add audio.
Add a condition, the usual GetIsID condition.

Now the dialouges is finished.

The furnishing

First create a scroll for each set of furniture and name them like: House BedRoom or House DinningRoom.
In them you whrite what this set of furniture will add to your house. Something like this:
This will upgrade your house with:

1 Bed
1 Carpet
1 Bookshelf with 1 book
1 Drawers with 3 clothes
1 Stool

Add this script on them:

Scriptname HouseFurnReceiptScript

short Doonce

begin OnAdd player

if ( Doonce == 0 )
	SetItemValue 0
	set Doonce to 1
endif

end

Then add a value to them.
You can make the next part on different ways, i will show one of them.
First choose the seller of the set's, you can use the seller of the house or someone else.
Select the Merchant cointainer to this Npc. Then add this to it's Script:

short once

begin gamemode
	if getstage (QuestName) >= 10
		if once == 0
			additem (Id of the first Set) 1
			additem (Id of the second Set) 1
                       ; Do this on all of the sets                       
			set once to 1
		endif
	endif
end

The Quest

Make a Quest Script and add it to your Quest.
This is the script you will need:

scn aaabuyinghouse

short TotalCount ;counts how many furniture set you have bouught
short Doonce1    ;check if you have bought the first thing
short Doonce2    ;check if you have bought the second thing
;add "Short Doonce3" if you have 3 items

float fQuestDelayTime

begin gamemode

;Kill script if conditions aren't met

if ( GetStage housearea2 < 10 )
	Return
endif

if getstage (Questname) == 10 && player.getincell   (HouseCell)   == 1
	setstage (Questname) 20
endif



 
;These are the variable triggers that are set when a voucher is acquired

if ( Player.GetItemCount (first set of furniture ID) == 1 ) && ( Doonce1 == 0 )
	(first parent).Enable
	set TotalCount to ( TotalCount + 1 )
	set Doonce1 to 1
endif

if ( Player.GetItemCount (Second set of furniture ID) == 1 ) && ( Doonce2 == 0 )
	(second parent)..Enable
	set TotalCount to ( TotalCount + 1 )
	set Doonce2 to 1
endif

;Ends Quest if All Bought

if ( TotalCount == 2 )    ;change the "2" to the number of things you have.
	setstage (Quest Name) 30
	set fQuestDelayTime to 0
endif

end

Go to Quest Stages and add stage 10, 20 and 30. Select stage 10.
Make a new log Entry with the text: "I just bought a house in (The name of your town).".
In the Result Script whrite this:

(first parent).disable
(second parent).disable
;do this on all the parents
Player.RemoveItem Gold001 (the price of your house)
Player.AddItem (Your key ID) 1
SetCellOwnership (HouseCell)
SetCellFullName (HouseCell) "(The name of your town) House"
ModPCMiscStat 15 1
set (Questname).fQuestDelayTime to 1

Select stage 20 and make a new Log Entry with the text: "Now that I've arrived at my new house in (Your town), I may want to head over to (The Npc To sell the furniture) at (where he is) to secure some furnishings for it."

Select Stage 30 and make a new log entry with the text: "I've now bought everything (The Npc To sell the furniture) has for my house in (Your Town).". Check the Complete Quest to finish the quest.

And now you have made a House for sale.