Difference between revisions of "Toggle Workshop Menu"

193 bytes added ,  12:00, 1 June 2020
imported>0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
(Created page with "= Overview = This tutorial creates a custom Holotape to turn on and off a workshop menu. We'll be creating a simple toggle on and off system that will show a visual of the...")
 
imported>0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 
(4 intermediate revisions by the same user not shown)
Line 5: Line 5:
Our plugin is going to be using [[Identifier_Reference#Namespaces|Namespaces]] for data folder organization purposes so there is a little more work and double-checking than when not using one. The methodology behind this is that it makes archiving the scripts for upload much easier and creates organization for both the mod creator and mod user.
Our plugin is going to be using [[Identifier_Reference#Namespaces|Namespaces]] for data folder organization purposes so there is a little more work and double-checking than when not using one. The methodology behind this is that it makes archiving the scripts for upload much easier and creates organization for both the mod creator and mod user.


NOTE: This will not actually [[AddItem|add]] the holotape to the player's inventory. That is beyond the scope of this tutorial.
NOTE: This will not actually [[AddItem_-_ObjectReference|add]] the holotape to the player's inventory. That is beyond the scope of this tutorial.


'''The reader will learn:'''
'''The reader will learn:'''
* How to create a [[Global_Variable]]
* How to create a [[Global]]
* How to create a [[Terminal]] for use with holotapes
* How to create a [[Terminal]] for use with holotapes
* How to create and condition terminal entries
* How to create and condition terminal entries
Line 14: Line 14:
* How to create a conditioned workshop recipe
* How to create a conditioned workshop recipe


= Creating the Global Variable =
= Creating the Global =


*In the Object Window, navigate to Miscellaneous > Global Variable.
*In the Object Window, navigate to Miscellaneous > Global.
*Right click in the list of global variables and select "New".
*Right click in the list of global variables and select "New".


The window brings up the Global Variable form.
The window brings up the Global form.


*Give the global a memorable name. For purposes of this tutorial, is called <code>OLT_HolotapeToggle</code>.
*Give the global a memorable name. For purposes of this tutorial, is called <code>OLT_HolotapeToggle</code>.
*Leave the value at 0. This will be our default value for the plugin and everything will be conditioned around this number.
*Leave the value at 0.0000. This will be our default value for the plugin and everything will be conditioned around this number.
*Click "Ok" to save the record.
*Click "Ok" to save the record.


Our global variable is set up and ready for use.
[[File:Tut_globalholotape.PNG]]
 
 
Our global is set up and ready for use.
*Save your plugin in.
*Save your plugin in.
[[File:Tut_globalholotape.PNG]]


= Creating the Holotape Terminal =
= Creating the Holotape Terminal =
Line 35: Line 36:
Right click in the list of terminals and select "New".
Right click in the list of terminals and select "New".


[[Models]] and [[Marker]]s are not necessary for holotape terminal entries. You can leave these blank.
[[Model_File]]s and Markers are not necessary for holotape terminal entries. You can leave these blank.
If you wish the terminal to have default [[Keyword]]s, click "Make Wall Terminal" or "Make Desk Terminal". The Keywords box will autofill with the appropriate defaults.
If you wish the terminal to have default [[Keyword]]s, click "Make Wall Terminal" or "Make Desk Terminal". The Keywords box will autofill with the appropriate defaults.


Line 130: Line 131:
'''Menu Entry 4'''
'''Menu Entry 4'''
*Select Index 4 [x] Menu Item OFF.
*Select Index 4 [x] Menu Item OFF.
*Navigate to Item Conditions > Right click "Paste Conditions".
*Navigate to Item Conditions > Right click "Paste Conditions". No changes are necessary.
*Double-click the condition to bring up the menu.
*Change Value to 1.0000.
*Click "Ok" to save the condition.
*Click "Ok" to save the condition.


Line 219: Line 218:


==Compling Papyrus==
==Compling Papyrus==
Now let's write the actual fragment. It uses [[SetValue]] to set the Global Variable.
Now let's write the actual fragment. It uses [[SetValue_-_GlobalVariable]] to set the Global Variable.


'''Menu Entry 1'''
'''Menu Entry 1'''
Line 272: Line 271:


= Creating the Workshop Object =
= Creating the Workshop Object =
COBJs for full menus or individual menu items can be toggled. Keyword-controlled menus will need a global placed on every COBJ with the same menu keyword to effectively turn off that menu. Formlist-controlled menus should only need the global placed on the primary menu COBJ.
For purposes of this tutorial, we'll be duplicating an existing workshop item in order to create our conditioned recipe for it.
For purposes of this tutorial, we'll be duplicating an existing workshop item in order to create our conditioned recipe for it.


Line 282: Line 283:


= Creating the Workshop Object Recipe =
= Creating the Workshop Object Recipe =
Now that we have our item, let's create the recipe.  The recipe we're creating will be toggling on and off from the Ball Track Menu. But you can condition any menu.
Now that we have our item, let's create the recipe.  The recipe we're creating will be toggling on and off from the Ball Track Menu.


*Select OLT_workshop_PictureFrame02A
*Select OLT_workshop_PictureFrame02A