Editing Hello World

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 4: Line 4:
=== PreRequisites ===
=== PreRequisites ===
# Install Creation Kit (From the [http://download.cdp.bethesda.net/BethesdaNetLauncher_Setup.exe Bethesda.net] launcher)
# Install Creation Kit (From the [http://download.cdp.bethesda.net/BethesdaNetLauncher_Setup.exe Bethesda.net] launcher)
# Update Fallout 4 to [[Enable Loose Files]]
# Update Fallout 4 to [http://www.creationkit.com/fallout4/index.php?title=Enable_Loose_Files Enable Loose Files]
# Update Fallout 4 to [[Enable Debug Logging]]
# Update Fallout 4 to [http://www.creationkit.com/fallout4/index.php?title=Enable_Debug_Logging Enable Debug Logging]


=== Steps ===
=== Steps ===
:1. Load Fallout 4 Resources
:1.   Load Fallout 4 Resources
::* Start Creation Kit
::* Start Creation Kit
::* File -> Data... -> Double Click Fallout4.esm
::* File -> Data... -> Double Click Fallout4.esm
Line 22: Line 22:
::* Hit [Apply]
::* Hit [Apply]


:3. Create a [[Message]]
:3. Create a Message


::* Within the left pane of the [[Object Window]], expand the [[:Category:Miscellaneous| Miscellaneous]] category.
::* Within the left pane of the "Object Window", Expand "Miscellaneous"
::* Click On/Highlight "Message"
::* Click On/Highlight "Message"
::* Double Click "Blank Message" in the right pane
::* Double Click "Blank Message" in the right pane
Line 35: Line 35:
::** Hit [YES] when asked if you wish to create a new Form
::** Hit [YES] when asked if you wish to create a new Form


:4. Create a [[Quest]]
:4. Create a Quest
 
::The best way to introduce content into the game is by creating a new Quest that adds the content or performs various actions.
::The best way to introduce content into the game is by creating a new Quest that adds the content or performs various actions.


::* Within the left pane of the [[Object Window]], expand the [[:Category:Character| Character]] category.
::* Within the left pane of the "Object Window", Expand "Character"
::* Click On/Highlight "Quest"
::* Click On/Highlight "Quest"
::* Within the right pane of the Object Window, Right-Click the background and select "New"
::* Within the right pane of the "Object Window", Right-Click the background and select "New"
::** ID : HelloWorldQuest
::** ID : HelloWorldQuest
::** ''NOTE : "Start Game Enabled" and "Run Once" are checked. For this example, the default values are fine.''
::** ''NOTE : "Start Game Enabled" and "Run Once" are checked. For this example, the default values are fine.''
::** Hit [OK] ''NOTE : Scripts are not enabled until the quest is created''
::** Hit [OK] ''NOTE : Scripts are not enabled until the quest is created''


:5. Create a Script for the [[Quest]] and inject the HelloWorld [[Message]]
:5. Create a Script for the Quest and inject the HelloWorld Message


::* Within the left pane of the "Object Window", Make sure "Character" -> "Quest" is selected  
::* Within the left pane of the "Object Window", Make sure "Character" -> "Quest" is selected  
Line 68: Line 69:
:::'' NOTE: Spacing is important. If you are pasting from this page, paste into NotePad first to eliminate format and then paste into the CK edit window.
:::'' NOTE: Spacing is important. If you are pasting from this page, paste into NotePad first to eliminate format and then paste into the CK edit window.


<source lang="papyrus">
  Event OnInit()
  Event OnInit()
   pHelloWorld.Show()
   pHelloWorld.Show()
   Debug.MessageBox("Hello from a Debug MessageBox!")
   Debug.MessageBox("Hello from a Debug MessageBox!")
  EndEvent
  endEvent
</source>




Line 105: Line 104:
:2. Avoid Debug.MessageBox   
:2. Avoid Debug.MessageBox   


::When scripts are archived into release archives, the Creation Kit will strip out all [[Debug Script]] methods such as Debug.MessageBox, Debug.TraceAndBox, etc... This example creates and injects a MESSAGE object because it is technically required to get "Hello World" to show up in a released mod.  You can not rely on Debug methods (specifically the message box function) as part of a mod.  
::When scripts are compiled into release archives, the Creation Kit will strip out all [http://www.creationkit.com/fallout4/index.php?title=Debug_Script Debug] methods such as Debug.MessageBox, Debug.TraceAndBox, etc... This example creates and injects a MESSAGE object because it is technically required to get "Hello World" to show up in a released mod.  You can not rely on Debug methods (specifically the message box function) as part of a mod.  


=== If things aren't working ===
=== If things aren't working ===


:Make sure you enabled loose files. A common mistake is to edit the wrong INI file. Make sure you edit the file under Documents/My Games/Fallout 4.
:Make sure you enabled loose files. A common mistake is to edit the wrong INI file. Make sure you edit the file under Documents/My Games/Fallout 4.

Please note that all contributions to the Fallout4 CreationKit Wiki are considered to be released under the Creative Commons Attribution-ShareAlike (see FalloutCK:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)