Difference between revisions of "Bendu and S M Nodes"

805 bytes added ,  06:30, 18 February 2015
imported>Lmstearn
imported>Lmstearn
 
(17 intermediate revisions by the same user not shown)
Line 15: Line 15:
*Completion of the "Intermediate Quest Design" series with particular focus on the [[http://www.creationkit.com/Bethesda_Tutorial_Story_Manager Story Manager]].
*Completion of the "Intermediate Quest Design" series with particular focus on the [[http://www.creationkit.com/Bethesda_Tutorial_Story_Manager Story Manager]].


*Having a working copy of the Bendu Quest that will either activate by the Startquest command through console or with "Start Game enabled" checked off.
*A working copy of the Bendu Quest that will either activate by the Startquest command through console or with "Start Game enabled" checked off.


*A brief look at the [[http://www.creationkit.com/SM_Event_Node wiki description of the topic]].
*A brief look at the [[http://www.creationkit.com/SM_Event_Node wiki description of the topic]].
Line 28: Line 28:
==The Nodes==
==The Nodes==


*Load up the quest and navigate to the Keyword entry under Miscellaneous in the Object Browser. Right click somewhere in the RH pane, New, and type the name of a keyword, in this case: ''GSQ01Keyword''.
*Load up the quest and navigate to the Keyword entry under the Miscellaneous category in the Object Browser. Right click somewhere in the RH pane, New, and type the name of a keyword, in this case: ''GSQ01Keyword''.




*From the Character entry choose SM Event Node and double click on Script Event. Right click and create a new Branch node. It will be stacked by default. This will appear below all other entries. I gave it a name of ''GSQ01BranchStart''.
*From the Character category in the Object Browser choose SM Event Node and double click on Script Event. Right click and create a new Branch node. It will be checked as '''stacked''' by default. The new node will appear below all other entries. I gave it a name of ''GSQ01BranchStart''.




Line 37: Line 37:




*Right click on ''GSQ01BranchStart'' and select '''New Quest Node'''. Give this a name of something like ''GSQ01Start''. The GSQ part will at some stage appear as lower case for some reason. I checked '''Num quests to run''' and left it at 1. Ensure the '''Stacked''' Bullet is checked and locate at the base of the page the '''Shared''' checkbox and click. On lower resolutions this requires some sorcery.
*Right click on ''GSQ01BranchStart'' and select '''New Quest Node'''. Give this a name of something like ''GSQ01Start''. The GSQ part will at some stage appear as lower case for some reason. I checked '''Num quests to run''' and left it at 1. Ensure the '''Stacked''' Bullet is checked and, at the base of the page locate the '''Shared''' checkbox and click it. On lower resolutions accessing the bottom requires some sorcery.




*Right click on the '''GSQ01Start Node''' Conditions area and implement a new condition with function ''GetEventData''. The Function Parameters will be from top-down: ''GetIsId'', ''Keyword'', and ''GSQ01Keyword''. Click Ok out.
*Right click on the '''GSQ01Start Node''' Conditions area and implement a new condition with function ''GetEventData''. The function parameters will be from top-down: ''GetIsId'', ''Keyword'', and ''GSQ01Keyword''. Click Ok out.




Line 46: Line 46:




*This will bring up the quest tab, which is quite a useful shortcut, actually. Select the '''Quest Data''' tab and from the event drop-down list choose '''Script Event'''. Notice that the '''Start Game Enabled''' box is now greyed out. Now Ok out of all windows back to the main CK window and save.
This will bring up the quest tab, which serves as quite a useful shortcut to it, actually


{{WarningBox|It's important to '''remove''' an attached quest before deleting a node.}}
*Select the '''Quest Data''' tab and from the event drop-down list choose '''Script Event'''. Notice that the '''Start Game Enabled''' box is now greyed out. Now Ok out of all windows back to the main CK window and save.
Now that the '''Node''' has been set up with the minimum amount of information required to activate the quest, let's work on our '''Script Event'''.


==The Quest Script==
==The Quest Script==
Line 68: Line 76:




{{InDepth|<nowiki>All of the parameters excepting akLoc are unused here and can be removed,  
{{ProTip|Even though the quest may be stopped and/or in a disabled state, the mod is still active,
so GSQ01KeywordLocal.SendStoryEvent(akLoc = MixWaterMill) would work fine.
 
Leaving them in shows how this function can work in relatively complex scenarios.</nowiki>}}
and the SendStoryEvent will transmit the data from the trigger zone to the node stack via the quest script.}}
 
 
{{InDepth|All of the parameters excepting akLoc are unused here and can be removed,  
so <nowiki>GSQ01KeywordLocal.SendStoryEvent(akLoc = MixWaterMill)</nowiki> would work fine.
 
Including them here shows the potential capabilities of this function in more complex quest trigger scenarios.}}




Line 93: Line 107:




*Locate and edit the FarmhouseDoor01 object on the exterior of the MixwaterMill Workers House. Click the scripts tab and Add a new script. Call it ''StartingGSQ01Quest''.
*Locate and edit the '''FarmhouseDoor01''' object on the exterior of the MixwaterMill Workers House. Click the scripts tab and Add a new script. Call it ''StartingGSQ01Quest''.




Line 112: Line 126:
     QF_GSQ01_01000D62 tempGSQ01 = GetGSQ01 as QF_GSQ01_01000D62
     QF_GSQ01_01000D62 tempGSQ01 = GetGSQ01 as QF_GSQ01_01000D62
     tempGSQ01.GSQ01Story()
     tempGSQ01.GSQ01Story()
    tempGSQ01=None
     EndFunction
     EndFunction
</source>
</source>
Line 137: Line 152:
Unfortunately Quest doesn't match and it won't compile because there is no implicit casting of ''GetGSQ01'' to ''QF_GSQ01_01000D62''
Unfortunately Quest doesn't match and it won't compile because there is no implicit casting of ''GetGSQ01'' to ''QF_GSQ01_01000D62''


It's also worth noting that code with such methods of casting only operate within '''Function'''s.
 
We expect the variable ''tempGSQ01'' to be used just once, so it's good practice to clear any persistent reference to the local ''GetGSQ01'' by "nulling" ''tempGSQ01'' after ''GSQ01Story'' is called.




{{ProTip|For more detailed info on casting refer [http://www.cipscis.com/skyrim/tutorials/externalaccess.aspx here].


{{ProTip|For a better picture of how script objects are organized in the CK, check out [http://www.creationkit.com/Category:Script_Objects this].}}
For a better picture of how script objects are organized in the CK, check [http://www.creationkit.com/Category:Script_Objects this] out.}}




*Save the script. Our task is done and the modifications are ready for testing.
*Save the script. Our task is done and the modifications are ready for Bendu.


== Notes ==
== Notes ==
Anonymous user