Difference between revisions of "House for Sale Tutorial"
Made this page more exact.
imported>GhanBuriGhan (Added to quest tutorials cat.) |
imported>Vswe (Made this page more exact.) |
||
Line 1: | Line 1: | ||
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. | |||
===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 | |||
'' 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.<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: | |||
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.<br> | |||
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 | float fQuestDelayTime | ||
Line 51: | Line 93: | ||
;Kill script if conditions aren't met | ;Kill script if conditions aren't met | ||
if ( GetStage | if ( GetStage housearea2 < 10 ) | ||
Return | Return | ||
endif | 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 | ;These are the variable triggers that are set when a voucher is acquired | ||
if ( Player.GetItemCount | if ( Player.GetItemCount (first set of furniture ID) == 1 ) && ( Doonce1 == 0 ) | ||
(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 | if ( TotalCount == 2 ) ;change the "2" to the number of things you have. | ||
setstage (Quest Name) 30 | |||
set fQuestDelayTime to 0 | |||
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> | |||
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> | |||
And now you have made a House for sale. | |||