Difference between revisions of "Rent A Room Tutorial"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>Jsera
imported>GhanBuriGhan
(added to cats.)
Line 121: Line 121:


[[Category:Tutorials]]
[[Category:Tutorials]]
[[Category:Actor_Tutorials]]
[[Category:Miscellaneous_Tutorials]]

Revision as of 15:15, 2 August 2006

Creating an NPC that will rent a room to you.

Need: NPC

NPC PublicanScript

Activator

ActivatorScript

Door

Bed

BedRent Topic changes


The Inn: -Too create my Inn I made a copy of CheydinallyNewlandsLodge and linked it to my town. I called mine BartholmNewlandsLodge

The Innkeeper (Publican): -I selected DerveraRomalen in BartholmNewlandsLodge cell and created a copy calling my innkeeper FriedaJones. -Give it a unique name (FriedaJonesRef)

The vendor chest: -Edit the vendor chest and set the ownership to your innkeeper. (I used FriedaJones)

The Rent Bed: -Edit the bed you wish to rent. -Change the ownership to your innkeeper. (I used FriedaJones) -Give your bed a unique name. (I used BHNewlandsLodgeRentBed)

The Rent Door -Edit the door to the room you wish to rent. Give it a unique name. (I used BHNewlandsLodgeRentDoor) -Lock it -Give it an ownership other than your innkeeper (I used Abhuki) (I believe you do this so your innkeeper doesn't use the room.)


The Innkeeper (Publican) Script -Open Gameplay > Edit Scripts > Open > PublicanNewlandsLodgeDervera. Select all the text and copy. (Control C)

-Select Script > New in the Script Edit window and paste the copied text

-Change the scriptname (I used PublicanNewlandsLodgeFrieda)

-Change all references to cellname to your cell. (BartholmNewlandsLodge)

-Change all references to your rent door name (BHNewlandsLodgeRentDoor)

-Change all references to your rent bed name (BHNewlandsLodgeRentBed)

-Change all references to DerveraRomalen to your innkeeper (FriedaJones)

-Save the script. Close all windows and save your Mod. (This updates the script files list.)

-Edit your new innkeeper and add the new script to it.


The BedRent Topic:

-Select Character > Quests to open your quest window.

-Select the BedRental topic and the Topics tab.

-Select the bed topic.

-Right click on "But you've already rented a room for the night." by DerveraRomalen and select copy. (A new topic is added with the same info)

-Select the GetIsID condition and click the Function Parameters button. Select your innkeeper from the dropdown list (Frieda Jones in my case)

-Select the GetScriptVariable condition and click the Function Parameters button. Select rent from the list of variables

-Right click on "I do have a bed available, for 10 gold a night. Would you like to rent it?" by DerveraRomalen and select copy. (A new topic is added with the same info)

-Select the GetIsID condition and click the Function Parameters button. Select your innkeeper from the dropdown list (Frieda Jones in my case)

-Select the GetScriptVariable condition and click the Function Parameters button. Select rent from the list of variables

-Select the BedYes topic.

-Right click on "You don't have the money for the room. Perhaps some other time." by DerveraRomalen and select copy. (A new topic is added with the same info)

-Select the GetIsID condition and click the Function Parameters button. Select your innkeeper from the dropdown list (Frieda Jones in my case)

-Right click on "Walk just up the stairs there, and it's the door on the right. Thank you." by DerveraRomalen and select copy. (A new topic is added with the same info)

-Select the GetIsID condition and click the Function Parameters button. Select your innkeeper from the dropdown list (Frieda Jones in my case)

-In the Result Script section change "set DerveraRomalenRef.rent to 1" to "set FriedaJonesRef.rent to 1

-Click OK to close the quest window


The Activator & its Script -Load the exterior cell that connects to your inn (ie the outside of the building)

-In the Object Window > World Objects > Activator > Dungeons select PublicanNewlandsLodgeTriggerObj

-Open it and create a new form PublicanBartholmNewlandsLodgeTriggerObj

-Drag it into your exterior cell and set it near the entrance to your inn. (Mine is hidden in the steps up to the door)

-Give it a unique reference name (I use BartholmNewlandsLodgeTriggerRef)

-Open Gameplay > Edit Scripts > Open > PublicanNewlandsLodgeTriggerScript. Select all the text and copy. (Control C)

-Select Script > New in the Script Edit window and paste the copied text

-Change the scriptname (I used PublicanBartholmNewlandsLodgeTriggerScript)

-Change all references to DerveraRomalenRef to your innkeepers unique name (I used FriedaJonesRef)

-Save the script. Close all windows and save your Mod. (This updates the script files list.)

-Edit your new activator and add the new script to it.


Thats it. Test your mod. Enjoy!