The following warnings occurred: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "extra" - Line: 100 - File: inc/plugins/google_seo/url.php PHP 8.1.28 (Linux)
|
Scripting for Silgrad Tower. - Printable Version +- Silgrad Tower from the Ashes (https://www.silgradmodding.net/forum) +-- Forum: Discussions for Silgrad Tower TES IV (Oblivion) & TES III (Morrowind) (https://www.silgradmodding.net/forum/Forum-Discussions-for-Silgrad-Tower-TES-IV-Oblivion-TES-III-Morrowind) +--- Forum: FAQ Board TESIV. (https://www.silgradmodding.net/forum/Forum-FAQ-Board-TESIV) +--- Thread: Scripting for Silgrad Tower. (/Thread-Scripting-for-Silgrad-Tower) |
Scripting for Silgrad Tower. - sandor - 10-11-2006 Scripting for Silgrad Tower. ABLE OF CONTENTS
Questions. Technical info concerning interiors. RE: Scripting and quests for Reich Parkeep and Steadhelm. - sandor - 10-11-2006 Second topic. A small quest. The PC has to retrieve 1 or more objects for the quest giver. In return the PC will be rewarded. I assume you know how to create a quest and add dialogue. Dialogue. ----[/HR] QuestName == StSrBooktoFindQuest IDBook == The object name of the book, this has to be retrieved. NPC "x" == Quest giver, your NPC ---------------------------- Scriptname StSrBooktoFindScript short BookToFind ; Runs on the Quest ; Script type == Quest ; Add the script to the quest (screenshots) ; If the PC has to find one book, this script can be skipped ---------------------------- Go to the quest stage tab (in your quest window). Go to the index field and right-click. Create a new stage. Go to the log entry(top one) and right-click and select new. Add the text in the log entry (left of the result script listing). Look at the screenshot. Quest stages. 10 I found a special book (or two special books) and I should talk to NPC "X" or whatever hint. 20 I spoke to NPC "X". If I find the book (or books), I'll receive a reward or whatever you like. 30 I brought the book (or books) to NPC "X" and received a nice reward. Add in the Result Script listing: StopQuest StSrBooktoFindQuest. 100 NPC "X" is dead, I can't complete the quest Add in the Result Script listing: StopQuest StSrBooktoFindQuest. --------------------- Scriptname StSrBookScript begin OnAdd Player if ( StSrBooktoFindQuest.BookToFind < 1 ) set StSrBooktoFindQuest.BookToFind to (StSrBooktoFindQuest.BookToFind + 1 ) endif if ( GetStage StSrBooktoFindQuest < 10 ) && ( StSrBooktoFindQuest.BookToFind == 2 ) setstage StSrBooktoFindQuest 10 endif end ; Script type == Object ; Attached to the book ; For two books or >>>>>>>>>>>>>>>>>>>For 1 item! Scriptname StSrBookScript begin OnAdd Player if ( GetStage StSrBooktoFindQuest < 10 ) setstage StSrBooktoFindQuest 10 endif end ; Script type == Object ; Attached to the book --------------------- begin OnDeath if ( GetStage StSrBooktoFindQuest >= 10 ) && ( GetStage StSrBooktoFindQuest < 30 ) setstage StSrBooktoFindQuest 100 endif end ; Attached to the NPC "X" ; Script type == Object --------------------- Go to the topics tab in your quest window. In editor ID listing, add a greeting. Add the topic (for example book) to the greeting. Topic Book. Add the info. "Can you find my IDBook?" In the result script listing add (below the response details): setstage StSrBooktoFindQuest 20 In the conditions listing add: GetIsID for NPC "X" GetStage StSrBooktoFindQuest < 10 --------------------- Add another info. "Great, you have the book (or books)!" In the result listing script add: setstage StSrBooktoFindQuest 30 player.removeitem IDBook 1 or 2 player.additem Gold001 50 In the conditions listing add: GetIsID for NPC "X" GetStage StSrBooktoFindQuest >= 10 GetItemCount IDBook == 1 (Run on target selected) or == 2 for two books!! ----[/HR] Poster has attached these images (downsized versions): Quest script___________ Quest script added_________ Quest stages RE: Scripting and quests for Reich Parkeep and Steadhelm. - sandor - 06-16-2007 Third topic. Room rental script, how to create a "room for rent"? I'll use Steadhelm08 as an example. blue[/HR] You have to change the red and blue parts in the script. Blue == reference editor ID i.e. StSrShc08StenRef (S). S == Screenshot. Order. 1 First you have to assign a reference editor ID to the door and the bed including ownership (S). 2 Then start with the script and attach it to the NPC. 3 Finally the dialogue ("rent" is defined in the script). Concerning 3. You have to add dialogue. Alter the dialogue via the quest window. You need a Greeting, a Bed Rental topic with two info's one for when the room is free and the other for when the room is rented. Further you need a Yes and No topic (the latter two are choices). The two choices will be added to the info (Bed Rental topic) that will be displayed when the room isn't rented. The Yes choice removes the gold and sets the room to rented via the result script when the player has enough gold. The second info (Yes choice) will be displayed when the PC doesn't have enough gold. The "GetScriptVariable" function through the function info [Reference: "StSrShc08StenRef", rent] determines if the room is free or rented (S). Rent == 0 ---> free. Rent == 1 ---> rented. Room topic. Look at the screenshot and you'll see the StSrShc08Bed topic. Add this topic to the GREETING. Add the Yes and No topic as a choice, to the info that will be displayed when the room isn't rented (S). No topic. (Standard for a merch publican, you don't have to create this topic) If you want to have a custom made answer create a new topic and always start with your modding ID. Yes topic. One info will be displayed when the player has enough gold. Through the "GetItemCount" function it's checked if there's enough gold. Select "run on target" (S). In the result script listing (S), player.removeitem Gold001 25 set StSrShc08StenRef.rent to 1 The second info will be displayed when the player doesn't have enough gold (S). Through the "GetItemCount" function it's checked if there's not enough gold. Select "run on target" (S). The bed and yes topic have to start with your modding ID. blue[/HR] This script works for a room that isn't in the same cell as well. The script (object type) is attached to the NPC (Inn owner). The rentdoor and bed are owned by the NPC, make sure persistent reference is selected. Make sure the NPC uses a different bed (assign one) if he/she has to sleep in the same cell otherwise the NPC could use the "rent" bed. To copy the script: Select it and select copy. Go to the script editor (CS) and select new. Press CTRL and V together. Green[/HR] Scriptname StSrShc08TheRustyGuarRoomRental short rent short rentday short rentmonth short cleanupRR short setup begin gamemode if ( rent == 1 ) if ( setup == 0 ) set rentday to GameDay set rentmonth to GameMonth set setup to 1 StSrShc08RentDoor.unlock StSrShc08RentBed.SetOwnership else if ( GameDay != rentday ) set cleanupRR to 1 elseif ( GameMonth != rentmonth ) set cleanupRR to 1 endif endif if ( Player.GetinCell Steadhelm08Basement == 0 ) if ( CleanupRR == 1 ) set CleanupRR to 2 endif endif if ( CleanupRR == 2 ) set rent to 0 set setup to 0 set rentday to 0 set cleanupRR to 0 set rentmonth to 0 StSrShc08RentDoor.SetOpenState 0 StSrShc08RentDoor.lock 30 StSrShc08RentBed.SetOwnership StSrShc08Sten endif endif end Poster has attached these images (downsized versions): RE: Scripting and quests for Reich Parkeep and Steadhelm. - sandor - 11-22-2007 Fourth topic. Scripted Conversation. Use the ST esm v2.78 or higher. I refer to the "StSrTheaterQ" quest and the "StSrTheater2" cell. How to proceed.
|