Difference between revisions of "Getting started creating mods using GECK"

From Nexus Mods Wiki
Jump to: navigation, search
(TIP Merchant Inventory: update)
(TIP Best Practice Sharing Variables between Scripts: added)
 
(84 intermediate revisions by 2 users not shown)
Line 25: Line 25:
 
</div>
 
</div>
  
There is a lot of unique vocabulary related to creating mods in the following material, such as the distinction between "meshes", the 3D framework of objects (saved as '''Nif''' files); and "textures", the surface "skin" over the "mesh framework" (saved as '''DDS''' files).  [http://www.darkcreations.org/testg/wiki/Main_Page The Elder Scrolls Texture Guide] (TESTG) site has a [http://www.darkcreations.org/testg/wiki/Glossary glossary] and several pages devoted to explaining these to new mod creators and users.  Rather than explaining them here, please reference that site when you need clarification.  (This article does a lot of that: referral to other existing resources.  Why reinvent the wheel?)
+
There is a lot of unique vocabulary related to creating mods in the following material, such as the distinction between "meshes", the 3D framework of objects (saved as '''Nif''' files); and "textures", the surface "skin" over the "mesh framework" (saved as '''DDS''' files).  [http://web.archive.org/web/20170713081056/http://www.darkcreations.org/testg/wiki/Main_Page The Elder Scrolls Texture Guide] (TESTG) site has a [http://web.archive.org/web/20170713081056/http://www.darkcreations.org/testg/wiki/Glossary glossary] and several pages devoted to explaining these to new mod creators and users.  Rather than explaining them here, please reference that site when you need clarification.  (This article does a lot of that: referral to other existing resources.  Why reinvent the wheel?)
  
 
== <span id="Programs_and_Tools"></span>Programs and Tools ==
 
== <span id="Programs_and_Tools"></span>Programs and Tools ==
Line 80: Line 80:
 
* [http://www.gimp.org/ GIMP: GNU Image Manipulation Program] (freeware.) A cross-platform image (texture) editor available for GNU/Linux, OS X, Windows and more operating systems.  Provides extensions through integration with many programming languages including '''Scheme, Python, Perl,''' and more.  The result is a high level of customization as demonstrated by the large number of scripts and plug-ins created by the community.  
 
* [http://www.gimp.org/ GIMP: GNU Image Manipulation Program] (freeware.) A cross-platform image (texture) editor available for GNU/Linux, OS X, Windows and more operating systems.  Provides extensions through integration with many programming languages including '''Scheme, Python, Perl,''' and more.  The result is a high level of customization as demonstrated by the large number of scripts and plug-ins created by the community.  
 
* [http://www.nexusmods.com/newvegas/mods/61538/? Hairs - Eyes - Races Auto - Patcher] (Mod.) Extracts all the hair / eyes / races records from every plugin loaded in your load order - then, it rewrites the list of eyes and hairs for every race found. So, if you untick / unflag a hair mod from your load order, these records won't be loaded by the game itself and consequently won't be found by this mod because they don't exist.
 
* [http://www.nexusmods.com/newvegas/mods/61538/? Hairs - Eyes - Races Auto - Patcher] (Mod.) Extracts all the hair / eyes / races records from every plugin loaded in your load order - then, it rewrites the list of eyes and hairs for every race found. So, if you untick / unflag a hair mod from your load order, these records won't be loaded by the game itself and consequently won't be found by this mod because they don't exist.
* [http://www.darkcreations.org/testg/wiki/Category:VWD-OB LOD/VWD Overview] TESTG site wiki.
+
* [http://web.archive.org/web/20170713081056/http://www.darkcreations.org/testg/wiki/Category:VWD-OB LOD/VWD Overview] TESTG site wiki.
 
:* [http://www.nexusmods.com/newvegas/mods/58562 FNVLODGen] "View While Distant (VWD)"/"Level Of Detail (LOD)" landscape ''object'' generation tool.
 
:* [http://www.nexusmods.com/newvegas/mods/58562 FNVLODGen] "View While Distant (VWD)"/"Level Of Detail (LOD)" landscape ''object'' generation tool.
 
:* [http://www.nexusmods.com/newvegas/mods/61035/? Ultimate resolution landscape LODs and generator TES4LL] landscape ''mesh'' and ''texture'' LOD generation tool.
 
:* [http://www.nexusmods.com/newvegas/mods/61035/? Ultimate resolution landscape LODs and generator TES4LL] landscape ''mesh'' and ''texture'' LOD generation tool.
 
* [http://www.autodesk.com/products/maya/overview Maya] (1 month free trial, $185/month or $1470/year subscriptions, 3 yr student/educator license.)  Animation, modeling, simulation, and rendering software by '''AutoDesk'''.
 
* [http://www.autodesk.com/products/maya/overview Maya] (1 month free trial, $185/month or $1470/year subscriptions, 3 yr student/educator license.)  Animation, modeling, simulation, and rendering software by '''AutoDesk'''.
 
* [http://store.steampowered.com/app/441770/MindTex_2/ MindTex2] ($20) by '''Frozen Flame'''.  MindTex is a '''normal map''' generation utility for game developers and 3d professionals. Built to rival the competition in quality without the steep price, whether you want to generate a ''normal'', ''height'', ''specular'', ''gloss'', ''self-illumination'', ''occlusion'', or ''reflection map'', you can easily do it in seconds flat from a single source texture with MindTex.
 
* [http://store.steampowered.com/app/441770/MindTex_2/ MindTex2] ($20) by '''Frozen Flame'''.  MindTex is a '''normal map''' generation utility for game developers and 3d professionals. Built to rival the competition in quality without the steep price, whether you want to generate a ''normal'', ''height'', ''specular'', ''gloss'', ''self-illumination'', ''occlusion'', or ''reflection map'', you can easily do it in seconds flat from a single source texture with MindTex.
 +
* [http://www.nexusmods.com/newvegas/mods/66826 Mod Kit - Resource for Modders] by '''pixelhate'''.  Some nif & textures used as references in various Modding situations, including the "invisible activator".
 
* [http://www.nexusmods.com/newvegas/mods/64746 NIF tangents and binormals updater] (freeware) by '''zilav'''.  A command line tool to batch update tangents/binormals in Oblivion, Fallout 3, New Vegas, Skyrim, Skyrim Special Edition and Fallout 4 format NIF meshes.  The one in '''NifSkope''' doesn't handle degenerate normals, such as if your NIF has a lot of texture tiling. It also gives all around better results especially for people who use '''Blender''' and cannot reset the normals and smooth them because it lacks the features to do so.  
 
* [http://www.nexusmods.com/newvegas/mods/64746 NIF tangents and binormals updater] (freeware) by '''zilav'''.  A command line tool to batch update tangents/binormals in Oblivion, Fallout 3, New Vegas, Skyrim, Skyrim Special Edition and Fallout 4 format NIF meshes.  The one in '''NifSkope''' doesn't handle degenerate normals, such as if your NIF has a lot of texture tiling. It also gives all around better results especially for people who use '''Blender''' and cannot reset the normals and smooth them because it lacks the features to do so.  
 
* [http://niftools.sourceforge.net/wiki/NifSkope NifSkope] (freeware.) A graphical program that allows you to open NIF files, view their contents, edit them, and write them back out again. You can use it to quickly make changes to specific properties of a NIF file such as changing the texture, adding translucency, and more. A 3D view of the contents of the NIF file allows you to preview your changes instantly. You can even create texture templates, and import & export OBJ files. (Note: This link is the latest release and may not be the best choice for FO3/FNV.  A fully compatible version of this tool (v1.0.22) is already included in the '''Blender v2.49b package''' linked here.)  
 
* [http://niftools.sourceforge.net/wiki/NifSkope NifSkope] (freeware.) A graphical program that allows you to open NIF files, view their contents, edit them, and write them back out again. You can use it to quickly make changes to specific properties of a NIF file such as changing the texture, adding translucency, and more. A 3D view of the contents of the NIF file allows you to preview your changes instantly. You can even create texture templates, and import & export OBJ files. (Note: This link is the latest release and may not be the best choice for FO3/FNV.  A fully compatible version of this tool (v1.0.22) is already included in the '''Blender v2.49b package''' linked here.)  
Line 128: Line 129:
 
:* [http://www.nexusmods.com/skyrim/mods/33271/? BAIN User Defined Language for Notepad++] by The_Catman
 
:* [http://www.nexusmods.com/skyrim/mods/33271/? BAIN User Defined Language for Notepad++] by The_Catman
 
:* [http://www.nexusmods.com/newvegas/mods/62793/? Notepad++ Syntax Highlighter] (freeware) by '''DoctaSax'''. "Language" Plugin for GECK editor syntax.
 
:* [http://www.nexusmods.com/newvegas/mods/62793/? Notepad++ Syntax Highlighter] (freeware) by '''DoctaSax'''. "Language" Plugin for GECK editor syntax.
 +
* [http://www.nexusmods.com/newvegas/mods/67395 RuntimeScriptProfiler] by '''lStewieAl - shadeMe'''.  An NVSE plugin to profile script execution. Ported from '''shadeMe''''s '''Oblivion''' plugin.
  
 
=== <span id="Sound_and_Voice_Tools"></span>Sound and Voice Tools ===
 
=== <span id="Sound_and_Voice_Tools"></span>Sound and Voice Tools ===
Line 140: Line 142:
 
* [http://www.nexusmods.com/skyrim/mods/60733/? Tree LOD billboard creator for xLODGen] by zilav
 
* [http://www.nexusmods.com/skyrim/mods/60733/? Tree LOD billboard creator for xLODGen] by zilav
 
* [http://www.nexusmods.com/newvegas/mods/34703/? xEdit/FNVEdit] (freeware.) A generic tool called '''xEdit''' which is renamed for working with specific games.  The latest "stable" release is on the Nexus, generally under the game name version or as "TES5Edit".
 
* [http://www.nexusmods.com/newvegas/mods/34703/? xEdit/FNVEdit] (freeware.) A generic tool called '''xEdit''' which is renamed for working with specific games.  The latest "stable" release is on the Nexus, generally under the game name version or as "TES5Edit".
:* [http://afkmods.iguanadons.net/index.php?/topic/3750-wipz-tes5edit/& xEdit discussion page] contains links to latest '''''UPDATES''''' "development/test" and '''''DOWNLOAD''''' "experimental (bleeding edge)" versions.
+
:* [https://www.afkmods.com/index.php?/topic/3750-wipz-tes5edit/& xEdit discussion page] contains links to latest '''''UPDATES''''' "development/test" and '''''DOWNLOAD''''' "experimental (bleeding edge)" versions.
 
:* [http://tes5edit.github.io/docs/index.html Tome of xEdit] Current Online manual for all games.
 
:* [http://tes5edit.github.io/docs/index.html Tome of xEdit] Current Online manual for all games.
 
:* [http://www.nexusmods.com/newvegas/mods/38413/? xEdit/FNVEdit Training Manual] (PDF.) Older docs that generally apply to all '''xEdit''' versions for other games.
 
:* [http://www.nexusmods.com/newvegas/mods/38413/? xEdit/FNVEdit Training Manual] (PDF.) Older docs that generally apply to all '''xEdit''' versions for other games.
Line 263: Line 265:
  
 
"Base ID is the number assigned to a template for an object that is used to create many instances of that object. For example all bottle caps in the game have exactly the same Base ID. This ID is used in scripts or the console with commands that create new instances of an object, like ''additem'' or ''placeatme''." - [http://fallout.gamepedia.com/Form_ID Form-ID on The Vault wiki].  You could think of it as the "parent" of each "child reference".  Any change made to a Base-ID affects '''''every''''' reference back to that Base-ID.  Which is why you need to make a "copy" of a Base-ID and change it's Editor-ID (which forces a change to the Form-ID) when you need to make a variation of an object.  Otherwise you are changing ALL instances of that object in the game.  (Don't try to change a Form-ID directly yourself.  Let the GECK handle it.)
 
"Base ID is the number assigned to a template for an object that is used to create many instances of that object. For example all bottle caps in the game have exactly the same Base ID. This ID is used in scripts or the console with commands that create new instances of an object, like ''additem'' or ''placeatme''." - [http://fallout.gamepedia.com/Form_ID Form-ID on The Vault wiki].  You could think of it as the "parent" of each "child reference".  Any change made to a Base-ID affects '''''every''''' reference back to that Base-ID.  Which is why you need to make a "copy" of a Base-ID and change it's Editor-ID (which forces a change to the Form-ID) when you need to make a variation of an object.  Otherwise you are changing ALL instances of that object in the game.  (Don't try to change a Form-ID directly yourself.  Let the GECK handle it.)
 +
 +
''Base forms'' (another way of referring collectively to "Base-IDs") are fine to use in scripts, by the way.  They're just used in different situations by various functions.  For example: The ''StopQuest'' function will always operate on the ''base form'' of the quest.  The same with anything involving [http://geckwiki.com/index.php?title=Form_List Form Lists].  But you wouldn't want to use a ''base form'' when you only want to affect a specific instance ("reference") of an object.  AGAIN: Actions on a ''base form'' affect ALL instances of that form.
  
 
"A Reference ID is a FormID assigned automatically to a Reference [instance] by the GECK when an object is placed in the Render Window [in the right pane of the GECK].  Reference IDs are required to uniquely identify each instance of an object in-game. The Form ID column of the Cell View window lists Reference IDs" - GECK Glossary.
 
"A Reference ID is a FormID assigned automatically to a Reference [instance] by the GECK when an object is placed in the Render Window [in the right pane of the GECK].  Reference IDs are required to uniquely identify each instance of an object in-game. The Form ID column of the Cell View window lists Reference IDs" - GECK Glossary.
Line 273: Line 277:
  
 
Note it is the ''persistent flag'' on the Reference that is mandatory in order for a RefID to become included in the search list for scripts/targets/whatever.  (See [http://geck.foesmm.org/index.php/Creating_a_New_Persistent_Reference GECK: Creating New Persistent Reference].)  Otherwise the list of refs to search through would be way too huge and cause engine lag.
 
Note it is the ''persistent flag'' on the Reference that is mandatory in order for a RefID to become included in the search list for scripts/targets/whatever.  (See [http://geck.foesmm.org/index.php/Creating_a_New_Persistent_Reference GECK: Creating New Persistent Reference].)  Otherwise the list of refs to search through would be way too huge and cause engine lag.
 +
 +
<span id="MapIsNotTerrain"></span>
 +
====The Map is not the Terrain and the ID is not the Record Number====
 +
 +
It is common to refer to the text form of the "IDs" for records ("Editor-ID", "Rec-ID", "Form-ID", and "Base-ID") as if they were the record identifiers used by the engine.  These are "labels" given (or not) by each mod author when they create the record solely for the benefit of us "numerically challenged humans".  For this reason, it is assumed they must be unique between plugins.  While this is a good practice, and something to be encouraged for the benefit of those searching out records by those references in tools such as '''GECK''' or '''xEdit''', it is important to understand that, like a "map", the text labels for those records are not the actual "terrain"; nor the "record number" actually used by the game engine.  It can't afford to leave something that critical up to fallible humans.  The '''GECK''' automatically assigns "record numbers" sequentially when you create a new record, and the "mod index" hexadecimal pair at the beginning of that record, consisting of the "current load order index" of the plugin makes it unique between plugins.  (See [http://fallout.wikia.com/wiki/Help:Form_IDs Help:Form IDs] for an explanation of how to interpret the "mod index" from a Form-ID or record number.)
 +
 +
Think about that for a minute.  The '''GECK''' only knows about plugin files you chose to load for that editting session.  Typically that will consist of the "FalloutNV" EXE and ESM, possibly some DLC if your plugin requires assets from it, and the plugin you are working on.  How is it going to know what other plugin "ID" text labels there are to determine yours are unique?  From one session to another you might load a different series of plugins.  It can't predict that "load order" for certain, and the '''GECK''' itself doesn't care.  Which is why the "mod index" couplet at the beginning of the record number is so clever and crucial to ensure uniqueness between plugins. 
 +
 +
This is proven out by examining any record in '''xEdit''': the "ID" label is a text data field within the record, just like any other "value".  (For example: the "Script" record variable "SLSD - Local Variable Data" identifies each "variable name" based upon it's "index value" within an array of variables specific to that script with the "text name" stored as "SCVR - Name" data.  You have to identify the "record number" before you can determine the "text name"; and not the other way around.)  A test was conducted to confirm that the text "Ref-ID" label did not have to actually be "unique" between plugins.  The same "Ref-ID" label was given to the same object in two different plugins, and the game had no problems differentiating between the two.  Not even when one plugin removed the "persistent object" by the "Ref-ID" they had in common, the same object from the other plugin was unaffected.  It did not matter if one plugin was made dependent upon the other.  Because they were records from different plugins, the engine could tell them apart.
 +
 +
Consequently, always bear in mind that when someone is speaking in terms of one of the forms of "ID", they are often meaning "as a way of identifying the specific record number".
 +
  
 
<span id="Tip-refVar"></span>
 
<span id="Tip-refVar"></span>
 +
 
====TIP Reference Variables explained====
 
====TIP Reference Variables explained====
 
: Thanks to '''vforvic''' of the Nexus "Fallout 3 Mod Talk" forum for the basis of the following:
 
: Thanks to '''vforvic''' of the Nexus "Fallout 3 Mod Talk" forum for the basis of the following:
Line 495: Line 512:
 
:*Set "Max Linear Velocity" to "1068".  
 
:*Set "Max Linear Velocity" to "1068".  
 
:*Set "Max Angular Velocity" to "31.5700".   
 
:*Set "Max Angular Velocity" to "31.5700".   
:Now the weapon should drop to the ground.  
+
:The weapon should now drop to the ground. NOTE: If you don't see these options either you are looking under the wrong '''node''' or are using a version of '''NifSkope''' other than the one recommended up under the [[#Programs_and_Tools|Programs and Tools]] section.
 +
:''Mopp shapes'' are used for '''static collisions''' (i.e. anything that doesn't move: like fences, walls, etc.). They can be used for movable objects, but are far more performance intensive (depends on the collision poly count) than '''convex''' or '''box''' shapes.
 +
 
 +
:The ''BSXFlags'' entry is crucial to this behavior.  It must be found / placed under the '''BSFadeNode''' in '''NifSkope'''.  You need to have the '''Use BSFadeNode Root''' option checked in your "paint" type program when exporting the NIF. (It's on the upper right area of the '''NIF Export''' options of '''Blender'''.)
  
:For other object types, look in NIF.XML located in the '''Blender foundation\blender\.blender\scripts\bpymodules\pyffi\formats\nif\''' folder or the '''NifSkope''' documentation files in the "Doc" folder of it's installation folder. Search for ''bhkRigidBody''. It has a good listing and some simple explanations of the options.  
+
:For other object types, look in NIF.XML located in the '''Blender foundation\blender\.blender\scripts\bpymodules\pyffi\formats\nif\''' folder or the '''NifSkope''' documentation files in the "Doc" folder of it's installation folder. Search for ''bhkRigidBody''. It has a good listing and some simple explanations of the options.
 
</div>  
 
</div>  
 
&nbsp;
 
&nbsp;
  
 
<span id="Tip-HeadPartsRotated"></span>
 
<span id="Tip-HeadPartsRotated"></span>
 +
 
==== TIP Head Parts Rotated ====
 
==== TIP Head Parts Rotated ====
 
It's not known why head parts changed between FO3 and FNV, considering that so much else in the game engine is identical, but they did. If you port a head part (hat, glasses, facemask, etc) from FO3 to FNV or from FNV to FO3, or make a new open helmet/hat/head accessory that uses a existing mesh, whether it's a simply a clone or a retexture, it tends to equip sideways (rotated by 90 degrees).
 
It's not known why head parts changed between FO3 and FNV, considering that so much else in the game engine is identical, but they did. If you port a head part (hat, glasses, facemask, etc) from FO3 to FNV or from FNV to FO3, or make a new open helmet/hat/head accessory that uses a existing mesh, whether it's a simply a clone or a retexture, it tends to equip sideways (rotated by 90 degrees).
Line 555: Line 576:
 
<span id="MashingMeshes"></span>
 
<span id="MashingMeshes"></span>
 
==== TIP Mashing Meshes ====
 
==== TIP Mashing Meshes ====
:Thanks to '''madmongo''', '''M48A5''', and 'RoyBatterian'''of the Nexus Fallout "New Vegas Mod Troubleshooters" forum for the basis of the following:'''  
+
:Thanks to '''madmongo''', '''M48A5''', and '''RoyBatterian''' of the Nexus Fallout "New Vegas Mod Troubleshooters" forum for the basis of the following:'''  
 
<div class="boilerplate metadata" id="Notice_Box" style="margin:0px 10px 10px 10px;  border:1px dashed #DAA520;  color: lightgray;  background-color:#333333;  padding:3px;  word-wrap: break-word">Suppose for example you want to place the model of a particular pistol into a holster for display purposes. (This "pistol" will not be usable. It's for aesthetic purposes only.) Some call this process "mashing" two meshes together (e.g. mashing the pistol into the holster). The process is similar for other sorts of "mashing".  
 
<div class="boilerplate metadata" id="Notice_Box" style="margin:0px 10px 10px 10px;  border:1px dashed #DAA520;  color: lightgray;  background-color:#333333;  padding:3px;  word-wrap: break-word">Suppose for example you want to place the model of a particular pistol into a holster for display purposes. (This "pistol" will not be usable. It's for aesthetic purposes only.) Some call this process "mashing" two meshes together (e.g. mashing the pistol into the holster). The process is similar for other sorts of "mashing".  
 
The basic procedure is first go into '''NifSkope''' and remove all of the unneeded "animations" and "collision" and such so that you are left with just the (in this instance: "weapon") source mesh. Save that to some new nif (you can delete this temporary nif later).
 
The basic procedure is first go into '''NifSkope''' and remove all of the unneeded "animations" and "collision" and such so that you are left with just the (in this instance: "weapon") source mesh. Save that to some new nif (you can delete this temporary nif later).
Line 572: Line 593:
  
 
(You can do the same basic thing to make a wearable rifle slung over your back. Just edit the rifle's mesh so that it is located on the back where you want it, and weight it 100 percent to the spine bone. If I recall correctly, the spine bone you want is just the one called spine, not spine1 or spine2.)
 
(You can do the same basic thing to make a wearable rifle slung over your back. Just edit the rifle's mesh so that it is located on the back where you want it, and weight it 100 percent to the spine bone. If I recall correctly, the spine bone you want is just the one called spine, not spine1 or spine2.)
 +
 +
'''aghjax''' adds:
 +
<div class="boilerplate metadata" id="Notice_Box" style="margin:0px 10px 10px 10px;  border:1px dashed #DAA520;  color: lightgray;  background-color:#666666;  padding:3px;  word-wrap: break-word">
 +
When your '''NifSkoped''' mashup CTDs: "You very likely broke some branch dependencies. You have to compare them to a working NIF preferably from the [sources] you used to see what is out of place. And make sure you don't have duplicate ''Scene Roots''."
 +
</div>
 
</div>  
 
</div>  
 
&nbsp;
 
&nbsp;
  
 
<span id="Tip-MovableObjects"></span>
 
<span id="Tip-MovableObjects"></span>
 +
 
==== TIP Movable or Static custom objects in cell ====
 
==== TIP Movable or Static custom objects in cell ====
 
:Thanks to '''madmongo''', '''davidlallen''', and '''Tefnacht''' of the Nexus Fallout "New Vegas Mod Talk" forum for the basis of the following:  
 
:Thanks to '''madmongo''', '''davidlallen''', and '''Tefnacht''' of the Nexus Fallout "New Vegas Mod Talk" forum for the basis of the following:  
Line 706: Line 733:
  
 
Assuming you want to make your own landscape from scratch, the first step is just creating the world space. Click on "World | World Spaces" in the GECK, and when that form comes up, just click "New" on the left hand side to give your new region a name, and fill in the blanks. Exit out of that, and save your mod, because the next step will usually crash the GECK.
 
Assuming you want to make your own landscape from scratch, the first step is just creating the world space. Click on "World | World Spaces" in the GECK, and when that form comes up, just click "New" on the left hand side to give your new region a name, and fill in the blanks. Exit out of that, and save your mod, because the next step will usually crash the GECK.
 +
 +
<span id="Tip-WorldspaceHiLites"></span>
 +
==== Highlights of the Worldspace ====
 +
: Thanks to '''madmongo''' of the Nexus Fallout "New Vegas GECK and Modders" forum for the basis of the following:
 +
<div name="Note Box" class="boilerplate metadata" id="Notice Box"
 +
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 +
background-color:#333333;padding:3px;
 +
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 +
">This is a summary of various points raised elsewhere in this section for quick reference.  Some details may vary.  Be conservative.
 +
 +
* If I remember correctly, the maximum map size is 128x128 cells. It might be 128x64. Weird things start to happen if you go over that size.
 +
 +
* Keep all land height above 14,000 or you can have LOD issues.
 +
 +
* If you are using the landscape editor, be gentle. If you try to shape the landscape too quickly, you tend to create landscape tears.
 +
 +
* If you have water, don't forget to add a water texture in your worldspace. "Data\Textures\Water\wastelandwaterpotomac.dds" tends to work well for many different water types (river, lake, etc). I've never tried to make ocean water with it though.
 +
 +
* If you ever get an error where it says that part of the landscape height is out of bounds, the '''GECK''' will helpfully tell you that it can fix it. It can't. Your landscape is totally hosed at that point. Hopefully you saved an earlier version of your mod to go back to.
 +
 +
* If you make an ESP larger than 16 MB and you add something with a reference ID number of some sort to it, you will break your mod. The '''GECK''' will NOT give you any error whatsoever when you do so. When you try to load your mod, you'll crash the game. When you try to load the mod in the '''GECK''' to fix it, you'll crash the '''GECK'''. Hope you saved an earlier version of your mod somewhere that you can go back to.
 +
 +
* There are several ways to avoid the 16 MB bug.
 +
 +
:* The first is to create your landscape first, then place all objects into the worldspace, create all interiors, etc. After all that is done, then paint your landscape, add navmeshes, conversations/quests, etc. Landscape, navmeshes, and quest things can all be safely added above the 16 MB boundary. This works well enough for fairly simple mods.
 +
 +
:* The second way involves setting your '''GECK''' up in networked developer mode, which is not how most people set it up.  This has instructions for setting your '''GECK''' up in networked mode. There are some errors in these instructions, but as far as I am aware, they are the best instructions you'll find anywhere on the net:
 +
::* [http://geckwiki.com/index.php?title=Version_Control Version Control].
 +
 +
:* In networked mode, the 16 MB bug still applies. So create your worldspace, check that in to version control, then add stuff, and check those changes in. When you do this, the '''GECK''' will automatically place ID values below the 16 MB boundary. I'm sure there are still size limits in there somewhere, but I have yet to hit them using this method, even in mods that contain multiple worldspaces.
 +
 +
* The '''GECK''' tends to crash when working with larger mods anyway, so keeping the bulk of your mod checked in to version control and only working on small bits of it helps fairly dramatically in preventing '''GECK''' crashes.
 +
 +
* In the regions section of the '''GECK''', there is an option to automatically navmesh the entire region. You may find this tempting, but DO NOT EVER USE THIS FEATURE. It is the most broken thing in the '''GECK''' that I have found yet to date. I did actually get it to correctly navmesh a region once. And only once. It was a fairly simple landscape and there wasn't much on it yet. SCOLS make the navmesher crash. Sometimes it will navmesh inside the region boundaries, sometimes, for no reason whatsoever, it will navmesh OUTSIDE your region boundaries instead of inside. Either way, if it screws up, it completely borks your entire navmesh for the entire worldspace. It also tends to crash in an endless loop constantly popping up a box with the error message "Get Jean!" over and over until you kill the '''GECK''' in the task manager.
 +
 +
* Instead, the best you can do with navmeshing is to use the automatic navmesher for a single cell. When you click on the navmesh toolbar to bring it up, the cell auto navmesher is the first question mark from the left, just to the right of the finalize checkmark button. In the navmesh dialog, click the check box to enable height map generation mode, uncheck remove overlapping and remove thin areas, and you'll get about the best performance that you can out of it. A 64x64 worldspace is 4,096 cells. If you can use the auto navmesher to do 4 cells per minute, that's 1,024 minutes, or a bit over 17 hours just clicking on the navmesh button over and over and over and over. If you don't use heightmap generation mode, the navmesher has a tendency to fail to navmesh across bumpy roads and easily walkable surfaces.  (If you set the auto navmesher to '''Height Map Only''' mode, it works a lot faster and a lot better, and will usually navmesh across roads just fine. It will still navmesh across fences though.)
 +
 +
* The '''GECK''' will not render your worldspace unless there is something in it. But it's really hard to put something in it if you can't see anything. It's kind of a catch 22. I usually drop the little airplane into it, which I delete later. After that, go to an interior cell so you can get the render window to work properly again, then go to your little plane, and now finally you can see your new landscape. When editing your new landscape, always go to a part of your worldspace that has something in it first. If the first thing the '''GECK''' has to render is a section of worldspace with no objects in it, it goes right back to the render bug where you don't see anything except a gray blob (I think it's actually rendering water everywhere, stupid '''GECK'''...).
 +
 +
* If you paint your landscape or use the raise/lower tool in the render window (not the worldspace height editor), you can end up with black squares just outside of the area you were editing. Those black squares will be persistent, in that you can move away from them and they'll still be there when you come back, but they aren't really there. It's just yet another '''GECK''' bug.
 +
 +
Welcome to the buggiest parts of the '''GECK'''. Save often. Keep backups.
 +
</div>
 
   
 
   
 
<span id="Tip-CenterOn"></span>
 
<span id="Tip-CenterOn"></span>
Line 765: Line 835:
 
background-color:#333333;padding:3px;
 
background-color:#333333;padding:3px;
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
">When either creating or editing a worldspace, you need to generate LOD ("Level of Detail") mesh and textures to reflect those changes.  But first you need to be sure you understand the difference between VWD (View While Distant) and LOD (Level of Detail).  See the [http://www.darkcreations.org/testg/wiki/Category:VWD-OB LOD/VWD Overview] page on "The Elder Scrolls Texture Guide (TESTG)" site.  (The "FNV" version of "TES4LODGen" mentioned there is [http://www.nexusmods.com/newvegas/mods/58562 FNVLODGen], and along with [http://www.nexusmods.com/newvegas/mods/61035/? Ultimate resolution landscape LODs and generator TES4LL] can be used as an alternative to creating LODs in the '''GECK'''.  The "LOD/VWD Overview" page provides a TES4LL process sequence.)
+
">When either creating or editing a worldspace, you need to generate LOD ("Level of Detail") mesh and textures to reflect those changes.  But first you need to be sure you understand the difference between VWD (View While Distant) and LOD (Level of Detail).  See the [http://web.archive.org/web/20170713081056/http://www.darkcreations.org/testg/wiki/Category:VWD-OB LOD/VWD Overview] page on "The Elder Scrolls Texture Guide (TESTG)" site.  (The "FNV" version of "TES4LODGen" mentioned there is [http://www.nexusmods.com/newvegas/mods/58562 FNVLODGen], and along with [http://www.nexusmods.com/newvegas/mods/61035/? Ultimate resolution landscape LODs and generator TES4LL] can be used as an alternative to creating LODs in the '''GECK'''.  The "LOD/VWD Overview" page provides a TES4LL process sequence.)
  
 
The following articles provide guidance on using the '''GECK''' to generate LOD files:  
 
The following articles provide guidance on using the '''GECK''' to generate LOD files:  
Line 771: Line 841:
 
* [http://geckwiki.com/index.php/World_LOD World LOD] GECKWiki page.
 
* [http://geckwiki.com/index.php/World_LOD World LOD] GECKWiki page.
 
* [http://www.truancyfactory.com/tutorials/fallout3/fallout_lod.html Generating LOD Data for Custom Worldspaces in Fallout 3]
 
* [http://www.truancyfactory.com/tutorials/fallout3/fallout_lod.html Generating LOD Data for Custom Worldspaces in Fallout 3]
 +
 +
Make sure your "ground level" is above the "water heightmap" or your LODs will be "gray blobs".  (See [[#TIP_Static_Water_goes_into_Interior_cells_only|TIP Static Water goes into Interior cells only]].)
  
 
The folders used for LOD output files are laid out on the description page of "FNVLODGen".  The key to finding those for yours would be looking for subfolders with the name of "''yourworldspace''".
 
The folders used for LOD output files are laid out on the description page of "FNVLODGen".  The key to finding those for yours would be looking for subfolders with the name of "''yourworldspace''".
Line 1,039: Line 1,111:
 
=== Animation ===
 
=== Animation ===
 
[When linking to a Video, be sure to check the page sidebar for additional, related subject videos.]
 
[When linking to a Video, be sure to check the page sidebar for additional, related subject videos.]
* [http://www.nexusmods.com/fallout3/mods/21983/? ACCESS: Animated Computers Consoles Electronics and Security Systems Resource] Resource Mod.
 
 
* [http://www.nexusmods.com/oblivion/mods/28326/? Adult Animation Tutorial For Noobs] by '''Coronerra'''.
 
* [http://www.nexusmods.com/oblivion/mods/28326/? Adult Animation Tutorial For Noobs] by '''Coronerra'''.
 +
* [http://www.nexusmods.com/fallout3/mods/21983/? Animated Computers Consoles Electronics and Security Systems (ACCESS)] FO3 Resource and PDF Tutorial.
 
* [http://www.nexusmods.com/fallout3/mods/9700/? Artorp Object Animation Tutorial] Video and Blender KF files.
 
* [http://www.nexusmods.com/fallout3/mods/9700/? Artorp Object Animation Tutorial] Video and Blender KF files.
 
* [[Avoiding_Blender_animation_pitfalls|Avoiding Blender animation pitfalls]] Nexus Wiki article.
 
* [[Avoiding_Blender_animation_pitfalls|Avoiding Blender animation pitfalls]] Nexus Wiki article.
Line 1,053: Line 1,125:
 
* [http://www.nexusmods.com/newvegas/mods/48521/? Weapon Animation Tutorial] PDF by '''Toasty Fresh'''.
 
* [http://www.nexusmods.com/newvegas/mods/48521/? Weapon Animation Tutorial] PDF by '''Toasty Fresh'''.
 
* [http://www.nexusmods.com/newvegas/mods/63770/? Nifskope Testing Skeleton] by clanky4. Mod for testing animations in NifSkope only.
 
* [http://www.nexusmods.com/newvegas/mods/63770/? Nifskope Testing Skeleton] by clanky4. Mod for testing animations in NifSkope only.
 +
* [http://www.nexusmods.com/newvegas/mods/66968 Weapon Animation Patching Tutorial] PDF with separate "screenshots" file by '''benja'''.
  
 
<span id="Tip-AnimationSummary"></span>
 
<span id="Tip-AnimationSummary"></span>
Line 1,231: Line 1,304:
  
 
You can now continue to import or create what you want with nothing else in the display.
 
You can now continue to import or create what you want with nothing else in the display.
 +
</div>
 +
 +
<span id="Tip-BlenderBlackTexture"></span>
 +
==== TIP Imported NIF texture appears Black ====
 +
: Thanks to '''madmongo''' of the Nexus Fallout "New Vegas GECK and Modders" forum for the basis of the following:
 +
<div name="Note Box" class="boilerplate metadata" id="Notice Box"
 +
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 +
background-color:#333333;padding:3px;
 +
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 +
">Mesh files (*.NIF) internally point to the texture file (*.DDS) designed for them.  The "vanilla" and DLC game art assets (both mesh and texture files) are stored in "Bethesda Software Archive (BSA)" files instead of under the game "Data" folder tree while using the same folder structure.  (Some mod's do this as well.)  As '''Blender''' has no idea what a BSA file is, it can't find the texture file to display it.  If '''Blender''' can't find the texture file, it just shows the image with a "black" texture.  In order to see the textures for your mesh while looking at it in '''Blender''' you will have to extract the texture file(s) from the BSA into the appropriate folder under "Data\textures" first.  Be careful to extract such files to some other location than the game "Data" folder first, and then manually copy them to the correct "Data" folder to avoid accidents.
 
</div>
 
</div>
  
 
<span id="Tip-NoobBlender"></span>
 
<span id="Tip-NoobBlender"></span>
 +
 
====TIP New to Blender====
 
====TIP New to Blender====
 
: Thanks to '''madmongo''' of the Nexus Fallout "New Vegas GECK and Modders" forum for the basis of the following.
 
: Thanks to '''madmongo''' of the Nexus Fallout "New Vegas GECK and Modders" forum for the basis of the following.
Line 1,460: Line 1,544:
 
* [http://www.nexusmods.com/fallout3/mods/5506 CMF Companion Tutorial] RTF by '''Darkfirebird CMF'''.
 
* [http://www.nexusmods.com/fallout3/mods/5506 CMF Companion Tutorial] RTF by '''Darkfirebird CMF'''.
 
* [http://forums.nexusmods.com/index.php?/topic/900821-fnv-companion-tutorial/ FNV Companion Tutorial] Forum Thread by '''trilioth'''.
 
* [http://forums.nexusmods.com/index.php?/topic/900821-fnv-companion-tutorial/ FNV Companion Tutorial] Forum Thread by '''trilioth'''.
 +
* [http://geckwiki.com/index.php/Adding_items_to_vendors GECK: Adding items to vendors] Wiki tutorial.
 
* [http://www.youtube.com/playlist?list=PLo2FGzSVbkcPedlm9zZ981YvUy7DoSQew GECK: Companion Tutorial playlist by cgy95] Video series.
 
* [http://www.youtube.com/playlist?list=PLo2FGzSVbkcPedlm9zZ981YvUy7DoSQew GECK: Companion Tutorial playlist by cgy95] Video series.
 
* [http://geck.technodeep.net/index.php/Creating_a_new_vendor GECK: Creating a new vendor] Wiki tutorial.
 
* [http://geck.technodeep.net/index.php/Creating_a_new_vendor GECK: Creating a new vendor] Wiki tutorial.
Line 1,487: Line 1,572:
 
</div>
 
</div>
  
<span id="Tip-GetDistance"></span>
+
<span id="TIP-AIPackageBasics"></span>
 +
==== TIP AI Package Basics ====
 +
<div name="Note Box" class="boilerplate metadata" id="Notice Box"
 +
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 +
background-color:#333333;padding:3px;
 +
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 +
">You need to understand the difference between an [http://geckwiki.com/index.php?title=GetCurrentAIPackage AIPackage] and an [http://geckwiki.com/index.php?title=GetCurrentAIProcedure AIProcedure].  Also, check out the [http://geckwiki.com/index.php?title=Category:AI_Functions Category:AI Functions] to understand the less obvious things you can do with them.  (Take the time to read the linked wiki pages.)
 +
 
 +
First you have to chose the correct type of [http://geckwiki.com/index.php?title=Category:Packages Package] to use; investigating how each is intended to be used and actually functions in practice for your purposes.  Remember: only one '''Package''' will run on any given Actor at a time; but that package can have several '''Procedures''' within it to deal with different circumstances.  While there is overlap between the two, note that '''Procedures''' is a longer list.  Don't get ahead of yourself: work on and refine each '''Procedure''' by itself before you attempt to combine them into a comprehensive '''Package'''.  (You will use "condition flags" to control which gets used when.  More on this later.)
 +
 
 +
For example: "Stalking" would be a '''Procedure''' that is more than just a simple "follower" script because you want the Actor to try to remain unnoticed. For one thing, you might want to use an "Escort" or "Guard" base package instead of "Follow". "Sneaking" is inherently slower than normal movement, but NPCs "cheat" by "teleporting" when they get too far away from the target they are following.  (You  might not have noticed this unless you checked on companions behind yourself frequently in rough terrain.)  But you might find you need to shift in and out of "sneak" mode.  Various '''Target Followers''' may affect what you need for the effective trailing distance to avoid having aggressive ones attacking your "stalker".
 +
 
 +
Once you get that functional, you might want a "flee" '''Procedure''' that will keep that Actor at a proper distance from the '''Target''' without losing track of them so it can resume "following".  A "special case" to test is if your "stalker" is fleeing while the '''Target''' changes cells.  In which case, what are you going to have your "stalker" do to "pick up the scent" of their '''Target''' again?
 +
 
 +
When the Actor gets far enough from the '''Target''', they then might need a '''Procedure''' to find somewhere to "hide" (break line-of-sight from the '''Target'''), wait a reasonable amount of time for any followers to stop "searching for enemies", and then resume the "Follow" / "Stalk" AI procedure.
 +
 
 +
AI packages are in a [http://geckwiki.com/index.php?title=AI_Packages_Tab priority list] of "conditions".  ("Conditions" are just variables, often called "flags", you define and set to control things.  A common use is a "do once" variable in a "quest" script.  You are going to need to "set" and "clear" a number of them for this to indicate when to use only one procedure or package at a time.)  The first package that meets all of it's conditions as "true" then is used.  While the [http://geckwiki.com/index.php?title=AddScriptPackage AddScriptPackage] and [http://geckwiki.com/index.php?title=RemoveScriptPackage RemoveScriptPackage] functions might seem appropriate to  generally use, they have major limitations.  (See [[#TIP_Using_AI_Packages|TIP Using AI Packages]] and the linked description for more details on this.)  Just adding a package does not place the package within the [http://geckwiki.com/index.php?title=AI_Packages_Tab priority list]; instead it overrides the list for immediate implementation but goes away once completed and won't matter after that as it's conditions are never evaluated after that point.  Typically you will want to place your package in the [https://geckwiki.com/index.php?title=AI_Packages_Tab AI Packages Tab] list of packages for your "stalker" Actor, set the appropriate "conditional flag variables", and use the "Evaluate Package" (EVP) function to cause the list to be processed again to determine which is now the "first true" package.  Note that you do not use EVP with '''AddScriptPackage'''.  That function performs the equivalent immediately when called.
 +
 
 +
Each '''Package''' needs to consider that it may encounter conditions that require another '''Package''' or '''Procedure''' to take precedence and execute.  You do not simply "resume" an AI package where you left off.  It starts over whatever the current situation is when it gets invoked.  That could be in a completely different cell than where it left off.  This is why it is important to keep your "condition flags" current and updated as things change.
 +
 
 +
See also:
 +
* [[#TIP_AI_Packages_and_Distance|TIP AI Packages and Distance]]
 +
* [[#TIP_Making_NPCs_move_aka_AI_Packages|TIP Making NPCs move aka AI Packages]]
 +
</div>
 +
 
 +
<span id="Tip-GetDistance"></span>
 +
 
 
====TIP AI Packages and Distance====
 
====TIP AI Packages and Distance====
 
: Thanks to '''EPDGaffney''' of the Nexus Fallout "New Vegas GECK and Modders" forum for the basis of the following:
 
: Thanks to '''EPDGaffney''' of the Nexus Fallout "New Vegas GECK and Modders" forum for the basis of the following:
Line 1,672: Line 1,783:
  
 
<span id="Tip-NPCMovement"></span>
 
<span id="Tip-NPCMovement"></span>
====TIP Making NPCs move ''aka '''AI Packages'''''====
+
====TIP Making NPCs move aka AI Packages====
 
: Thanks to '''madmongo''', '''EPDGaffney''', and '''FiftyTifty''' of the Nexus FalloutNV 'New Vegas GECK and Modders' and '''kingbeast88''' of the 'New Vegas Mod Troubleshooting' sub-forums for the following basic summary of how to get NPCs to move:
 
: Thanks to '''madmongo''', '''EPDGaffney''', and '''FiftyTifty''' of the Nexus FalloutNV 'New Vegas GECK and Modders' and '''kingbeast88''' of the 'New Vegas Mod Troubleshooting' sub-forums for the following basic summary of how to get NPCs to move:
 
<div name="Note Box" class="boilerplate metadata" id="Notice Box"  
 
<div name="Note Box" class="boilerplate metadata" id="Notice Box"  
Line 1,686: Line 1,797:
 
See also [http://geckwiki.com/index.php/How_Are_Packages_Evaluated How Are Packages Evaluated].
 
See also [http://geckwiki.com/index.php/How_Are_Packages_Evaluated How Are Packages Evaluated].
  
 +
===== Following =====
 
So, if you want your NPC to '''Follow''' you, it's necessary to script the following in the NPC's conversation quest (replace "MyNPCREF" with the NPC's actual Ref-ID, obviously):
 
So, if you want your NPC to '''Follow''' you, it's necessary to script the following in the NPC's conversation quest (replace "MyNPCREF" with the NPC's actual Ref-ID, obviously):
 
<div name="Note Box" class="boilerplate metadata" id="Notice Box"  
 
<div name="Note Box" class="boilerplate metadata" id="Notice Box"  
Line 1,731: Line 1,843:
 
Note that you want to set variables to enable your packages, and also clear variables to stop the other packages from trying to run. You want to set it up so that the only condition that evaluates to '''true''' is the one that's for the package you want the NPC to run. For example: if you want the NPC to follow the "default" package, you need to enable the '''IsFollowingDefault''' variable while disabling both the '''IsFollowingLong''' and the '''Wait''' package variables.
 
Note that you want to set variables to enable your packages, and also clear variables to stop the other packages from trying to run. You want to set it up so that the only condition that evaluates to '''true''' is the one that's for the package you want the NPC to run. For example: if you want the NPC to follow the "default" package, you need to enable the '''IsFollowingDefault''' variable while disabling both the '''IsFollowingLong''' and the '''Wait''' package variables.
  
 +
===== Conversations =====
 
The ''HasBeenHired'' variable would be used to enable or disable various conversation options, and would also be set when the NPC is hired and cleared when the NPC is fired (and again, an ''.EVP'' would be done to get the character to ''sandbox'' when not hired so they don't just stand there like an idiot).
 
The ''HasBeenHired'' variable would be used to enable or disable various conversation options, and would also be set when the NPC is hired and cleared when the NPC is fired (and again, an ''.EVP'' would be done to get the character to ''sandbox'' when not hired so they don't just stand there like an idiot).
  
Line 1,742: Line 1,855:
 
The way this was done in the vanilla game (and the [[:File:EPDGaffney_AIPackage-GoingHome.png|AIPackage-GoingHome_Fig-01]] image here) was using quest variables, whereas '''trilioth''''s tutorial uses script variables.  Follow the tutorial, as based on the preceding steps you should have these variables in your object script, not your quest script.  The way you create the package is the same otherwise.  (See [[:File:EPDGaffney_AIPackage-GoingHome.png|AIPackage-GoingHome_Fig-01]].  {{Thumbnail_enlargement_message}})
 
The way this was done in the vanilla game (and the [[:File:EPDGaffney_AIPackage-GoingHome.png|AIPackage-GoingHome_Fig-01]] image here) was using quest variables, whereas '''trilioth''''s tutorial uses script variables.  Follow the tutorial, as based on the preceding steps you should have these variables in your object script, not your quest script.  The way you create the package is the same otherwise.  (See [[:File:EPDGaffney_AIPackage-GoingHome.png|AIPackage-GoingHome_Fig-01]].  {{Thumbnail_enlargement_message}})
  
<span style="text-align: left; color: red; background-color:#fff5f5;">(WARNING: There is a bug in GECK on versions of Windows after Win7 that causes the columns under the "Conditions" tab to be collapsed to the left and appear to not be present.  Accessing this field in the "AI Package" form consistently causes this bug to trigger, and it then affects other "list box" type fields in other forms.  Please see the [[#Issue:_GECK_is_missing_text_in_fields|Issue: GECK is missing text in fields]] entry for suggestions on dealing with this.)</span>
+
<span style="text-align: left; color: red; background-color:#fff5f5;">(WARNING: There is a bug in '''GECK''' on versions of '''Windows''' after Win7 that causes the columns under the "Conditions" tab to be collapsed to the left and appear to not be present.  Accessing this field in the "AI Package" form consistently causes this bug to trigger, and it then affects other "list box" type fields in other forms.  Please see the [[#Issue:_GECK_is_missing_text_in_fields|Issue: GECK is missing text in fields]] entry for suggestions on dealing with this.)</span>
  
For '''Patrol''' packages your NPC needs to be linked to your first "X marker" in the navmeshed patrol path.  (See the [[#Tip-NavMeshExteriors|TIP: Navmeshing Exterior cells.]])  All "X markers" in the patrol path need a ''unique ID'', need to be ''persistent'', and linked to each other in the succession you wish it traversed. "Idle markers" can be used but need ''duration'' times set and need to be made ''persistent''.
+
===== Package Types =====
 +
For '''Patrol''' packages your "Patrol Leader" NPC needs to be linked to your first "X marker" in the navmeshed patrol path.  (See the [[#Tip-NavMeshExteriors|TIP: Navmeshing Exterior cells.]])  All "X markers" in the patrol path need a ''unique ID'', need to be ''persistent'', and linked to each other in the succession you wish it traversed. "Idle markers" can be used but need ''duration'' times set and need to be made ''persistent''.  Patrol packages might be buggy with idle markers: they worked in Fallout 3, but in the experience of mod creators have issues in '''New Vegas'''.  For parties of more than one Actor, the remainder should "Guard" the "Patrol Leader" in order to react to threats to that Leader.
  
To make a new '''Patrol''' package with a unique ID: Just edit a base package to your liking; then change the Editor-ID name.  GECK will create a new form.  Make sure the package type is '''Patrol''', the ''starting location'' is a linked reference (e.g. "X marker"), and flagged ''repeatable''. Then give the NPC the new package and link your NPC to the first marker in the patrol path.
+
To make a new '''Patrol''' package with a unique ID: Just edit a base package to your liking; then change the Editor-ID name.  '''GECK''' will create a new form.  Make sure the package type is '''Patrol''', the ''starting location'' is a linked reference (e.g. "X marker"), and flagged ''repeatable''. Then give the NPC the new package and link your NPC to the first marker in the patrol path.
  
 
An NPC not waking up from sleep is an indication the time schedule conflicts with another package.  All it should need is a package type of '''Sleep''', a ''schedule time'' and ''duration'' (do not allow the times to overlap with other packages), flag enable ''fallout behavior'' & for ''location'': the ''name of a cell'' or a linked reference (which needs to be selected) or a ''near reference'' (if you have multiple beds for instance and don't care which they use).
 
An NPC not waking up from sleep is an indication the time schedule conflicts with another package.  All it should need is a package type of '''Sleep''', a ''schedule time'' and ''duration'' (do not allow the times to overlap with other packages), flag enable ''fallout behavior'' & for ''location'': the ''name of a cell'' or a linked reference (which needs to be selected) or a ''near reference'' (if you have multiple beds for instance and don't care which they use).
  
'''Exterior sandbox''' type packages need a package type of ''sandbox'', and a ''wander location'' set with a ''radius''.  Set whatever flags you want in: ''allowed behavior'', enabled ''fallout behavior'' in flags, and a non overlapping time scheduled.
+
''Sandboxing'' chooses things completely at random, including just standing where they are and picking idles from the idle manager.  '''Exterior sandbox''' type packages need a package type of ''sandbox'', and a ''wander location'' set with a ''radius'', rather than just in a particular cell.  Set whatever flags you want in: ''allowed behavior'', enabled ''fallout behavior'' in flags, and a non overlapping time scheduled.
 +
 
 +
You'll also want to avoid locking/unlocking doors in ''packages'', as this is completely broken and unreliable in '''New Vegas'''.
  
When you send someone away (i.e. "no longer hired" or "go home"), set the "GoHome" package to be a "sandbox" type instead of "travel", and they will automatically run off to the "home" location to sandbox there.  The game scripts often teleport actors to that location first when they want to avoid encountering "hostiles" enroute.  Be sure you first set the conditions you are using as appropriate (i.e. "not hired", "available for hire", etc.) before an ".evp" command to take immediate effect.
+
When you send someone away (i.e. "no longer hired" or "go home"), set the "GoHome" package to be a "sandbox" type instead of "travel", and they will automatically run off to the "home" location to sandbox there.  The game scripts often teleport actors to that location first when they want to avoid encountering "hostiles" enroute.  Be sure you first set the conditions you are using as appropriate (i.e. "not hired", "available for hire", etc.) before an ".EVP" command to take immediate effect.
  
 
Be very careful using "[http://geck.technodeep.net/index.php/AddScriptPackage AddScriptPackage] <packagename>". In practice, whenever an NPC teleports (fast travel, goes through a door, etc) they tend to stop running whatever AI package was added through '''AddScriptPackage''', and then use a suitable sandbox package. It's a useful function for some things, but it won't work in cases like this (traversing cells).
 
Be very careful using "[http://geck.technodeep.net/index.php/AddScriptPackage AddScriptPackage] <packagename>". In practice, whenever an NPC teleports (fast travel, goes through a door, etc) they tend to stop running whatever AI package was added through '''AddScriptPackage''', and then use a suitable sandbox package. It's a useful function for some things, but it won't work in cases like this (traversing cells).
Line 1,758: Line 1,874:
 
If your NPCs take off for parts unknown when following a package, make sure you have a "North Marker" placed in the cell.
 
If your NPCs take off for parts unknown when following a package, make sure you have a "North Marker" placed in the cell.
  
To make the NPC go back to Goodsprings (for example), you need a package that sends him there. The condition for the package will be similar to "<CompanionREF>.HasBeenHired == 0". You don't necessarily need to make an Xmarker the destination. You can have the package be a sandbox inside the "Goodsprings Saloon" cell if you want. Then he'll just sandbox around inside the Saloon whenever he isn't hired and he'll go back there if you fire him.
+
To make the NPC go back to Goodsprings (for example), you need a package that sends him there. The condition for the package will be similar to "<CompanionREF>.HasBeenHired == 0". You don't necessarily need to make an Xmarker the destination. You can have the package be a sandbox inside the "Goodsprings Saloon" cell if you want. Then he'll just ''sandbox'' around inside the Saloon whenever he isn't hired and he'll go back there if you fire him.
 
See also [[#TIP-AIPackages|TIP: Using AI Packages.]]
 
See also [[#TIP-AIPackages|TIP: Using AI Packages.]]
 +
 +
===== Teleporting and Following Navmeshes =====
 +
In order  for a companion to ''teleport'' to you when you go through a door (or otherwise ''teleport'' elsewhere, as when using '''Fast Travel'''), all the companion needs is to be set as ''your companion'', i.e. you executed the script command '''SetPlayerTeammate 1'''.
 +
 +
Additionally, for a companion to follow you, the companion needs to have a ''follow package'' and that package needs a conditional variable on it which is "true", and all other packages that the companion has need conditions that are "false" at the same time so that they will not run instead of the ''follow package''.
 +
 +
For example. let's say your NPC has a ''follow package'' and a ''wait package'', and a variable '''npc_following''' and a variable '''npc_waiting'''. The ''follow package'' has the condition '''"if npc_following = 1"''' and the ''wait package'' has the condition '''"if npc_waiting = 1"'''. If you '''"set npc_following to 1"''' and '''"set npc_waiting to 0"''', and then execute an '''EVP''' command on the NPC, then they should follow you. If you want them to ''wait'', '''"set npc_following to 0"''' and '''"set npc_waiting to 1"'''. If you accidentally set both variables to 1 then either package could execute (depending upon their sequence in the packages list), so the NPC might follow you or they might not. If you accidentally set both variables to 0 then the companion will not do anything.
 +
 +
The other thing that might stop a companion from moving is if they aren't on a valid '''Navmesh'''. If the area that they are in isn't '''Navmeshed''', then they will just stand there.
 
</div>
 
</div>
  
Line 1,839: Line 1,964:
 
<span id="Tip-FaceFeatures"></span>
 
<span id="Tip-FaceFeatures"></span>
 
====TIP Switching Custom Facial Features====
 
====TIP Switching Custom Facial Features====
: Thanks to '''rikkurikku''' of the Nexus Fallout "New Vegas GECK and Modders" forum for the basis of the following:
+
: Thanks to '''rikkurikku''' and '''Budong''' of the Nexus Fallout "New Vegas GECK and Modders" forum for the basis of the following:
 
<div name="Note Box" class="boilerplate metadata" id="Notice Box"  
 
<div name="Note Box" class="boilerplate metadata" id="Notice Box"  
 
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 
background-color:#333333;padding:3px;
 
background-color:#333333;padding:3px;
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
">For example: Let us say you want to switch between the normal actor's face, and one that is "bloodied".  Set up your "bloody" face version texture as a different race and use the ''[http://geckwiki.com/index.php/SetRace SetRace]'' function to switch, followed by "Update3D" to refresh the display in-game.  This applies to both the Player and NPCs.  See [[#TIP: Custom Race & Skin Textures|TIP: Custom Race & Skin Textures]] regarding creating a "custom race" and the appropriate folders.<br>
+
">For example: Let us say you want to switch between the normal actor's face, and one that is "bloodied".  Set up your "bloody" face version texture as a different race and use the JIP ''[http://geckwiki.com/index.php/SetRace SetRace]'' function to switch, followed by "Update3D" to refresh the display in-game.  This applies to both the Player and NPCs.  See [[#TIP: Custom Race & Skin Textures|TIP: Custom Race & Skin Textures]] regarding creating a "custom race" and the appropriate folders.<br>
When switching among custom facial features (such as eyes or hair), switch to a "vanilla" feature first, and then switch to a new "custom" look.  The GECK gets confused if you try to switch straight from one custom feature to another.
+
 
 +
'''Budong''' added:<br>
 +
If you want to ensure compatibility for everyone, you can accomplish the same thing entirely without needing the JIP NVSE Plugin.  Set up one race for your "healthy" NPC, and another race for the "injured" NPC.  Link them to one another via the ''YoungerRace'' and ''OlderRace'' options in the '''RaceEditor''', then call the ''AgeRace'' function to visually clobber/heal them. Entirely vanilla and will work for everyone.
 +
 
 +
When switching among custom facial features (such as eyes or hair), switch to a "vanilla" feature first, and then switch to a new "custom" look.  The '''GECK''' gets confused if you try to switch straight from one custom feature to another.<br>
 
</div>
 
</div>
  
Line 1,857: Line 1,986:
 
">If you create the NPC in an ESP, you can run into the infamous "head/body mismatch" bug. There are some settings you can change that fix the bug on some computers, but if you want it to work on all systems, define the NPC in an ESM file.
 
">If you create the NPC in an ESP, you can run into the infamous "head/body mismatch" bug. There are some settings you can change that fix the bug on some computers, but if you want it to work on all systems, define the NPC in an ESM file.
 
* See also sections [[#Dialogue & Lip-synch|Dialogue & Lip-synch]] and [[#Scripting|Scripting]] for related info.</div>
 
* See also sections [[#Dialogue & Lip-synch|Dialogue & Lip-synch]] and [[#Scripting|Scripting]] for related info.</div>
 +
 +
<span id="Tip-TempCompanion"></span>
 +
==== TIP Turn a Temporary Companion into a Permanent one ====
 +
: Thanks to '''madmongo''' of the Nexus Fallout "New Vegas GECK and Modders" forum for the basis of the following:
 +
<div name="Note Box" class="boilerplate metadata" id="Notice Box"
 +
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 +
background-color:#333333;padding:3px;
 +
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 +
">Supposing you want to turn a "temporary" quest companion into a permanent one (for example '''Corporal Halford''').  How would you go about it?
 +
 +
The recommended tutorial, which includes using a companion wheel, is: [http://www.nexusmods.com/newvegas/mods/45278 Advanced Companion creation guide with Companion Wheel].  Since the NPC already exists and has a quest for hiring, you don't need to make the hiring quest part of the tutorial.  Make sure you use the existing functions as shown in the tutorial instead of creating your own. Those functions are what makes the companion wheel work.  See also [[#TIP_Companion_Wheel|TIP Companion Wheel]].
 +
 +
When I made a companion out of '''Corporal Betsy''' I found it easiest to make a duplicate and then swap out the duplicate <span style="color: red; background-color:#fff5f5;">once the vanilla quests were done</span>. The advantage of this is that you don't have to hack into the existing quests and dialog, other than to add the hiring option (which triggers the swap) at the appropriate conversation stage.
 +
</div>
  
 
<span id="TIP-AIPackages"></span>
 
<span id="TIP-AIPackages"></span>
Line 1,875: Line 2,018:
 
* If the AI Package has a "schedule" or timing (''start time'' and ''duration'') to it's events, make sure that schedule does not overlap or conflict with any other package assigned to the NPC.  A scheduling conflict will prevent either package from running.
 
* If the AI Package has a "schedule" or timing (''start time'' and ''duration'') to it's events, make sure that schedule does not overlap or conflict with any other package assigned to the NPC.  A scheduling conflict will prevent either package from running.
  
 +
* Be aware that for Actors with the "No Low Level Processing (LLP)" flag set: The Actor does not update its AI unless the player is in the same cell as it.
 +
<div name="Note Box" class="boilerplate metadata" id="Notice Box"
 +
style="margin:0px 10px 10px 30px;border:1px dashed #DAA520;color: lightgray;
 +
background-color:#333333;padding:3px;
 +
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 +
">LLP behaves differently, depending on whether the object is persistent or not, and on whether the object is in an interior or an exterior cell:
 +
 +
* Persistent in an interior: All functions should always work reliably.
 +
* Persistent in an exterior: If the Actor is in the same cell, or the cell is currently buffered (i.e. within loaded ''uGrids'') - all functions should always work reliably. Otherwise, some functions will fail (example: GetParentCell).
 +
* Non-persistent in either an interior or an exterior: If the cell is currently buffered - all functions should always work reliably. Otherwise, all functions will always fail.
 +
 +
Keep in mind an Actor may not be unloaded immediately when changing cells, while persistent ones and quest NPCs marked in their base form will process more frequently.
 +
 +
If you place an actor in the world with the '''GECK''' and mark that REF as persistent - then they are persistent regardless of the LLP setting. They can always be referenced by a script.
 +
 +
You can use the '''JIP LN NVSE''' function [http://geckwiki.com/index.php/SetPersistent SetPersistent] to set a non-persistent (dynamic, aka "spawned") reference to persistent at runtime.
 +
 +
You might want to also be aware of and test for an Actor's "processing level" with the [http://geckwiki.com/index.php/GetActorProcessingLevel GetActorProcessingLevel] function.
 +
</div>
 
See also [[#Tip-NPCMovement|TIP: Making NPCs move (aka "AI Packages").]]
 
See also [[#Tip-NPCMovement|TIP: Making NPCs move (aka "AI Packages").]]
 
</div>
 
</div>
Line 1,941: Line 2,103:
 
</div>
 
</div>
  
<span id="Tip-Translators"></span>
+
<span id="Tip-BatchLips"></span>
====TIP Conversation or Quest system====
+
==== TIP Batch Lip file generation ====
: Thanks to '''madmongo''' of the Nexus Fallout "New Vegas GECK and Modders" forum for the following:
+
: Thanks to '''EPDGaffney''' of the Nexus Fallout "New Vegas GECK and Modders" forum for the basis of the following:
 
<div name="Note Box" class="boilerplate metadata" id="Notice Box"  
 
<div name="Note Box" class="boilerplate metadata" id="Notice Box"  
 
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 
background-color:#333333;padding:3px;
 
background-color:#333333;padding:3px;
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
">The conversation/quest system for Fallout New Vegas seems like nonsense until you realize it evolved out of the conversation/quest system for Morrowind. In Morrowind, different people could say the same topics, and most of it wasn't voiced; so it made a lot of sense to group things by '''quests''' and '''topics''' instead of by '''speaker'''.
+
">So, the lads at the "New California" mod team happened upon an incredibly useful bit of information regarding a hidden functionality for batch generation of LIP files.  The way it works is:
 +
 
 +
[[File:GECKFacialAnimation menu.PNG|thumbnail|100px|GECK Facial Animation menu image]]
 +
# Set up all your WAV files in advance, with the correct names and formatting so that they would be "previewable" in the '''GECK''' for the relevant lines of dialogue.
 +
#: Then, once they're all done, you can do the batch process.
 +
# This step is required for '''MO/MO2''' users. <span style="color:green;background-color:#FFFFFF;">If not using '''MO/MO2''' or a similar "empty Data folder" mod manager, you probably don't need to worry about this step as the folders should already be there under "Data\Sound\Voice".</span>
 +
#: If you are using '''MO/MO2''', go into your vanilla '''Fallout New Vegas Data''' folder and then make all the hierarchies (e.g. "Fallout New Vegas\Data\Sound\Voice\NewCalifornia.esm\PBODocIsaakVoiceType"), but the audio files don't need to be moved from your '''MO/MO2''' folder.
 +
#:[[File:GECKFacialRecreate prompt.PNG|thumbnail|100px|GECK Recreate Facials prompt image]]
 +
#: <span style="color:red;background-color:#FFFFFF;">This was only tested for '''MO2''', but it probably works for other "empty Datafolder" managers such as '''MO'''.  Because '''MO''' and '''MO2''' load everything virtually, it makes sense that the '''GECK''' doesn't know where to put the LIP files unless you make the hierarchy in the vanilla folder.  Users should be able to make LIP files the normal way (individually) as long as the folder structure is there in the vanilla Data folder.</span>
 +
# Whether you skip '''Step 2''' or not, now click on the '''GECK''' menu bar ''Gameplay | Facial Animation... '' option.  (See [[:File:GECKFacialAnimation menu.PNG|GECK Facial Animation menu image]].  {{Thumbnail_enlargement_message}})
 +
# You'll be asked: "Do you want to forcibly recreate all facial animation files", and you'll want to choose the "Yes" button.  (See [[:File:GECKFacialRecreate prompt.PNG|GECK Recreate Facials prompt image]].  {{Thumbnail_enlargement_message}})
 +
# The GECK will put up a progress bar and then appear to freeze as it processes in the background.  After the better part of an hour, it should be finished.  However, in practice, it does the last Form-IDs first, meaning after the first couple of minutes it has probably finished with what was needed, and could be force-quit if desired.  They didn't actually try that; but it crashed on its own once and everything seemed fine.
  
What this means for FNV is that some dialog is spread out through a lot of different quests. If you want to edit '''Doc Mitchell''''s dialog during your initial character creation, for example, that's in the various ''VCGxx'' quests (''VCG01'', ''VCG02'', etc). His healing options are in ''VDoctors'', the same quest as for all of the other wasteland doctors. If you right click on '''Doc Mitchell''''s ID in the GECK and select "Use Info", you'll get a list of topics where his ID is used.
+
:: <span style="color:red;background-color:#FFFFFF;">Dialogue topics that are technically vanilla but are modified to add new dialogue, even for characters that are added by a new ESM/ESP; most notably '''GREETING''' but also any of the combat lines or the iron sights one(s), unfortunately have very low Form-IDs, and as such will be among the last to be generated by this batch process.</span>  Probably easier to do those manually unless you plan to set '''GECK''' to do its work and then leave your PC alone for a bit.
 +
</div>
 +
 
 +
<span id="Tip-Translators"></span>
 +
 
 +
====TIP Conversation or Quest system====
 +
: Thanks to '''madmongo''' of the Nexus Fallout "New Vegas GECK and Modders" forum for the following:
 +
<div name="Note Box" class="boilerplate metadata" id="Notice Box"
 +
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 +
background-color:#333333;padding:3px;
 +
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 +
">The conversation/quest system for Fallout New Vegas seems like nonsense until you realize it evolved out of the conversation/quest system for Morrowind. In Morrowind, different people could say the same topics, and most of it wasn't voiced; so it made a lot of sense to group things by '''quests''' and '''topics''' instead of by '''speaker'''.
 +
 
 +
What this means for FNV is that some dialog is spread out through a lot of different quests. If you want to edit '''Doc Mitchell''''s dialog during your initial character creation, for example, that's in the various ''VCGxx'' quests (''VCG01'', ''VCG02'', etc). His healing options are in ''VDoctors'', the same quest as for all of the other wasteland doctors. If you right click on '''Doc Mitchell''''s ID in the GECK and select "Use Info", you'll get a list of topics where his ID is used.
 +
 
 +
Being part of a ''faction'' and using an existing ''voice type'' is enough to trigger a lot of the dialog in-game. If you only want your Actor to say what you have scripted them to say, and only that, then give them a unique ''voice type''.  Otherwise, generic dialog may get triggered unexpectedly
 
</div>
 
</div>
  
 
<span id="TIP-CuttingLipFiles"></span>
 
<span id="TIP-CuttingLipFiles"></span>
 +
 
====Tip Cutting Lip files to match dialog====
 
====Tip Cutting Lip files to match dialog====
 
:  Thanks to '''madmongo''' of the Nexus Fallout "New Vegas GECK and Modders" forum for the basis of the following:
 
:  Thanks to '''madmongo''' of the Nexus Fallout "New Vegas GECK and Modders" forum for the basis of the following:
Line 2,048: Line 2,237:
 
<span id="TIP-RandomNPCcomments"></span>
 
<span id="TIP-RandomNPCcomments"></span>
 
====Tip Random NPC Comments====
 
====Tip Random NPC Comments====
 +
: Thanks to '''Mktavish''' of the '''Nexus Fallout New Vegas GECK and Modders''' forum for the basis of the following:
 
<div name="Note Box" class="boilerplate metadata" id="Notice Box"  
 
<div name="Note Box" class="boilerplate metadata" id="Notice Box"  
 
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
Line 2,056: Line 2,246:
 
If the 150 char limit isn't enough then add another 150 char block in the Response field.
 
If the 150 char limit isn't enough then add another 150 char block in the Response field.
 
On the Topic text (at the top) say something like: "Do you have any info on this place?".  Flag it as a top level dialogue; then the priority will determine where it shows in the list of options after their "Greeting".
 
On the Topic text (at the top) say something like: "Do you have any info on this place?".  Flag it as a top level dialogue; then the priority will determine where it shows in the list of options after their "Greeting".
If you're not within the maximum distance to any marker then that option shouldn't show up as a dialogue option for the player. - Source: Mktavish, Nexus forums
+
If you're not within the maximum distance to any marker then that option shouldn't show up as a dialogue option for the player.
 +
</div>
 +
 
 +
: '''Budong''' added the following alternative method:
 +
<div name="Note Box" class="boilerplate metadata" id="Notice Box"
 +
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 +
background-color:#333333;padding:3px;
 +
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 +
">NPC is running this script, which basically waits and does nothing until a random amount of time has passed and then forces the NPC to say something to the Player.
 +
 
 +
<pre>
 +
float m_banterTimer
 +
float m_banterThreshold
 +
 
 +
BEGIN GameMode
 +
  if m_banterTimer < m_banterThreshold
 +
    set m_banterTimer to m_banterTimer + GetSecondsPassed
 +
  else
 +
    set m_banterTimer to 0
 +
    set m_banterThreshold to GetRandomPercent*4
 +
    SayTo player LocationBanter;
 +
  endif ; banterTimer
 +
END</pre>
 +
 
 +
Then put all the NPC's banter dialog into the topic called LocationBanter.  The '''location-specific responses''' all have a condition using the '''GetInCell''' function to tie them to specific places and are at the top of the topic's stack so they evaluate first but only trigger when the Player is at a specific location; they're also flagged with "once per day" so you don't get spammed by them. The bonus to this method is that you can have '''generic non-location-specific''' dialog at the BOTTOM of the topic's stack, so if the Player is NOT at a landmark, the NPC still makes amusing observations every now and again. (Plus you are not forced into dropping new objects in cells all over the game; it's just the script and the dialog.  Nice and tidy, easy to manage.)
 
</div>
 
</div>
  
 
<span id="Tip-SayOnce"></span>
 
<span id="Tip-SayOnce"></span>
 +
 
==== TIP '''Say Once''' use ====
 
==== TIP '''Say Once''' use ====
 
: Thanks to '''Mktavish''' of the Nexus Fallout "New Vegas GECK and Modders" forum for the basis of the following:
 
: Thanks to '''Mktavish''' of the Nexus Fallout "New Vegas GECK and Modders" forum for the basis of the following:
Line 2,077: Line 2,292:
 
background-color:#333333;padding:3px;
 
background-color:#333333;padding:3px;
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
">Certain bits of dialog are standard, but have to be added from the correct tab in the '''Quest Stages'''.
+
">NOTE: Dialog ''quests'' must be checkboxed to "start enabled".  If the ''quest'' isn't "active" the ''topics'' will not be available.
 +
 
 +
Certain bits of dialog are standard, but have to be added from the correct tab in the '''Quest Stages'''.
 
See the following references:
 
See the following references:
 
* [http://geckwiki.com/index.php/Quest_and_Dialogue_Tutorial Quest and Dialogue Tutorial], in particular the "Dialogue Topics" section.
 
* [http://geckwiki.com/index.php/Quest_and_Dialogue_Tutorial Quest and Dialogue Tutorial], in particular the "Dialogue Topics" section.
Line 2,116: Line 2,333:
 
: This information is compiled from a number of threads, guides, and articles by authors such as '''DrakeTheDragon''', '''throttlekitty''', '''Ghogiel''', '''scanti''', and '''Skree000'''.  It is an overview at best.
 
: This information is compiled from a number of threads, guides, and articles by authors such as '''DrakeTheDragon''', '''throttlekitty''', '''Ghogiel''', '''scanti''', and '''Skree000'''.  It is an overview at best.
  
 +
* [http://www.nexusmods.com/newvegas/mods/66932 Generating EGM files for Headwear and Hairs] PDF tutorial by '''Roy Batty'''.
 
* [http://www.nexusmods.com/oblivion/mods/9360 The Conformulator] Mod Tool.
 
* [http://www.nexusmods.com/oblivion/mods/9360 The Conformulator] Mod Tool.
 
* [[Working with Skyrim head TRIs|Working with Skyrim head TRIs]] (Wiki) for additional tutorials and resources.
 
* [[Working with Skyrim head TRIs|Working with Skyrim head TRIs]] (Wiki) for additional tutorials and resources.
 
* [http://oblivion.nexusmods.com/mods/20166 Head06 Resource] Oblivion Mod by '''Throttlekitty''' as a reference example.
 
* [http://oblivion.nexusmods.com/mods/20166 Head06 Resource] Oblivion Mod by '''Throttlekitty''' as a reference example.
 +
 +
Hair NIFs usually have two models inside of them, one called Hat and one called NoHat. Adjust your alternate hairstyle's Hat model so that it doesn't clip through any hat you want the Actor to wear.
  
 
The heads of characters and NPCs in Bethesda games are created using the builtin [http://facegen.com/index.htm FaceGen] tool, which is a licensed '''Singular Immersion ''FaceGen Modeler'''''.  According to the FaceGen site "Customizer" tool [http://facegen.com/customizer_help.htm user manual] the resulting information is stored in the following files.
 
The heads of characters and NPCs in Bethesda games are created using the builtin [http://facegen.com/index.htm FaceGen] tool, which is a licensed '''Singular Immersion ''FaceGen Modeler'''''.  According to the FaceGen site "Customizer" tool [http://facegen.com/customizer_help.htm user manual] the resulting information is stored in the following files.
Line 2,131: Line 2,351:
 
EGM, EGT, and TRI extension files are in turn are used to construct "OBJ" (whole head mesh) files.  This is because "faces", "hair", and "helmets" have to be able to "morph" or "conform" to the underlying "head" mesh.  Different heads can be used with the same body to provide the customized faces of PlayerCharacters.
 
EGM, EGT, and TRI extension files are in turn are used to construct "OBJ" (whole head mesh) files.  This is because "faces", "hair", and "helmets" have to be able to "morph" or "conform" to the underlying "head" mesh.  Different heads can be used with the same body to provide the customized faces of PlayerCharacters.
  
Note that everything related to the head must be placed in a BSA for it to be processed properly by the game engine.  Otherwise the "loose files" do not get "conformed" to the head mesh properly.  (Use the "BSArch" tool linked in the [[#Packaging_Tools|Packaging Tools]] section to '''''create/update''''' your BSA file.)
+
'''Note that everything related to the head must be placed in a BSA for it to be processed properly by the game engine.''' Otherwise the "loose files" do not get "conformed" to the head mesh properly.  (Use the "BSArch" tool linked in the [[#Packaging_Tools|Packaging Tools]] section to '''''create/update''''' your BSA file.)
  
 
<div name="Note Box" class="boilerplate metadata" id="Notice Box"  
 
<div name="Note Box" class="boilerplate metadata" id="Notice Box"  
Line 2,504: Line 2,724:
 
=== LOD Generation ===
 
=== LOD Generation ===
 
[When linking to a Video, be sure to check the page sidebar for additional, related subject videos.]
 
[When linking to a Video, be sure to check the page sidebar for additional, related subject videos.]
* [http://www.darkcreations.org/testg/wiki/Category:VWD-OB TESTG: LOD/VWD Overview] Wiki.
+
* [http://web.archive.org/web/20170713081056/http://www.darkcreations.org/testg/wiki/Category:VWD-OB TESTG: LOD/VWD Overview] Wiki.
 
* [http://www.nexusmods.com/newvegas/mods/58562/? FNVLODGen/xLODGen] Tool by '''zilav'''.
 
* [http://www.nexusmods.com/newvegas/mods/58562/? FNVLODGen/xLODGen] Tool by '''zilav'''.
 
* [http://www.nexusmods.com/skyrim/mods/60733/? Tree LOD billboard creator for xLODGen] Tool by '''zilav'''.
 
* [http://www.nexusmods.com/skyrim/mods/60733/? Tree LOD billboard creator for xLODGen] Tool by '''zilav'''.
Line 2,523: Line 2,743:
 
* [[LOD_Generation_For_New_Vegas_and_Fallout_3|GECK: LOD Generation For New Vegas and Fallout 3]] Wiki.
 
* [[LOD_Generation_For_New_Vegas_and_Fallout_3|GECK: LOD Generation For New Vegas and Fallout 3]] Wiki.
 
* [http://www.nexusmods.com/newvegas/mods/61206/? LOD additions and improvements] Resource mod.
 
* [http://www.nexusmods.com/newvegas/mods/61206/? LOD additions and improvements] Resource mod.
: NOTE: The GECK LOD generation process uses "decimation" to create it's "low polygon meshes" for LOD/VWD.  Please read the TESTG site sub-topic [http://www.darkcreations.org/testg/wiki/Category:VWD-OB#The_problem_with_LOD.2FVWD_files The problem with LOD/VWD files] about why this is believed to be less effective than that used in later games such as '''Skyrim'''.
+
: NOTE: The GECK LOD generation process uses "decimation" to create it's "low polygon meshes" for LOD/VWD.  Please read the TESTG site sub-topic [http://web.archive.org/web/20170713081056/http://www.darkcreations.org/testg/wiki/Category:VWD-OB#The_problem_with_LOD.2FVWD_files The problem with LOD/VWD files] about why this is believed to be less effective than that used in later games such as '''Skyrim'''.
  
 
<span id="Tip-LODGen"></span>
 
<span id="Tip-LODGen"></span>
Line 2,531: Line 2,751:
 
background-color:#333333;padding:3px;
 
background-color:#333333;padding:3px;
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
">Even the casual user of the tool '''xLODGen''' should read the [http://www.darkcreations.org/testg/wiki/Category:VWD-OB TESTG: LOD/VWD Overview] article and the thread [http://taleoftwowastelands.com/content/fnvlodgen TTW: FNVLODGen] to gain an understanding of what is involved.  Among other things the later thread points out that the "green billboards and trees" are deliberately added by '''xLODGen''' to flag that they are missing textures (sort of like the red "!" to flag missing meshes, but specific to LOD).  '''xLODGen''' lists them in it's log when generating LOD.<br>
+
">Even the casual user of the tool '''xLODGen''' should read the [http://web.archive.org/web/20170713081056/http://www.darkcreations.org/testg/wiki/Category:VWD-OB TESTG: LOD/VWD Overview] article and the thread [http://taleoftwowastelands.com/content/fnvlodgen TTW: FNVLODGen] to gain an understanding of what is involved.  Among other things the later thread points out that the "green billboards and trees" are deliberately added by '''xLODGen''' to flag that they are missing textures (sort of like the red "!" to flag missing meshes, but specific to LOD).  '''xLODGen''' lists them in it's log when generating LOD.<br>
 
The resulting '''xLODGen.esp''' file needs to remain in your load order.  It should be regenerated whenever you add or remove "background" meshes and textures, as the "load order" affects the "quads" constructed to stitch together the distant view.</div>
 
The resulting '''xLODGen.esp''' file needs to remain in your load order.  It should be regenerated whenever you add or remove "background" meshes and textures, as the "load order" affects the "quads" constructed to stitch together the distant view.</div>
  
Line 2,540: Line 2,760:
  
 
==== ESM and ESP Files ====
 
==== ESM and ESP Files ====
'''Master''' Files (those with a ".ESM" extension - e.g. '''Fallout3.esm''') and '''Plugin''' files ("TES files" or "mods" for short - files with a ".ESP" - e.g., '''Fallout3mod.esp''') are the core data files of Bethesda games.  A master file acts as a database of all of the data for the world, including object data, dialogue, gameplay settings, object placements, AI settings, landscape, script commands, cells, etc. The '''GECK''' is the tool we use to view and edit master files and plugins for the "Fallout 3" and "Fallout: New Vegas" series.
+
'''Master''' Files (those with a ".ESM" extension - e.g. '''Fallout3.esm''') and '''Plugin''' files ("TES files" or "mods" for short - files with a ".ESP" - e.g., '''Fallout3mod.esp''') are the core data files of Bethesda games.  A master file acts as a database of all of the data for the world, including object data, dialogue, game settings, object placements, AI settings, landscape, script commands, cells, etc. The '''GECK''' is the primary tool we use to create, view, and edit master files and plugins for the "Fallout 3" and "Fallout: New Vegas" series.
  
 
(However, not all game data files are '''Master''' and '''Plugin''' files. Textures, meshes, sounds, videos, etc. are all part of the full game. More about these files elsewhere.)
 
(However, not all game data files are '''Master''' and '''Plugin''' files. Textures, meshes, sounds, videos, etc. are all part of the full game. More about these files elsewhere.)
  
'''Master''' files and '''Plugins''' are largely identical in format, but have some important distinctions in practice. The main practical difference is that '''GECK''' will not (natively) create '''Master''' files. Nor will it allow '''Plugin''' files to modify other '''Plugin''' files.  (The '''Extender''' and '''PowerUp''' addons overcome this limitation.)  See the [http://geckwiki.com/index.php/Category:Data_Files GECK: Data Files] entry for more.
+
'''Master''' files and '''Plugins''' are largely identical in format, but have some important distinctions in practice. The main practical difference is that '''GECK''' will not (natively) create '''Master''' files. Nor will it allow '''Plugin''' files to modify other '''Plugin''' files.  (The '''Extender''' and '''PowerUp''' addons overcome this limitation.) However, be aware that when you change an ESP to an ESM, you can only do this properly in '''xEdit/FNVEdit''' so that the '''ONAM''' record is generated; otherwise overrides to cells will not work.  Additionally references by packages to ''markers'' and other scripted objects need to be '''''persistent''''' or they will not work in an ESM. See the [http://geckwiki.com/index.php/Category:Data_Files GECK: Data Files] entry for more.
 +
 
 +
It sometimes helps to think of using ".ESM" files to ''add new things'', and ".ESP" files to ''change existing things or modify existing areas''.  Depending on how you create your "ESM", it might not modify existing things in-game. In other words, if there is an existing navmesh, an "ESP" will overwrite that navmesh, but an "ESM" might not. Similarly, if your "ESM" deletes an object (like a rock) it might work as an "ESP" but the rock might still be there as an "ESM".
 +
 
 +
It is possible for more than one '''Plugin''' file to ''depend'' upon the same '''Master''' file.  They don't even have to be by the same author.  Such '''Plugins''' are called ''dependencies''.  '''xEdit''' (aka '''FNVEdit''') is the primary tool used to identify and manipulate such "master/dependent" relationships.  (See the wiki article [[Missing_Masters|Missing Masters]].  '''LOOT''' can also detect such dependencies, but not alter them.)  It can also be used to edit the values of specific records, and to create "compatibility" and "merge" patch files.  (See the wiki [[Merged_Plugin_Guidelines_for_Personal_Use|Merged Plugin Guidelines for Personal Use]] article.)
  
It is possible for more than one '''Plugin''' file to ''depend'' upon the same '''Master''' fileThey don't even have to be by the same author. Such '''Plugins''' are called ''dependencies''.  '''xEdit''' (aka '''FNVEdit''') is the primary tool used to identify such "master/dependent" relationships. (See the wiki article [[Missing_Masters|Missing Masters]].)
+
If you have a problem with navmeshes after converting an ESP to an ESM, the problem likely is the original navmesh was deleted and your edit needs to be changed to an ''override'' (using '''xEdit/FNVEdit'''), then '''refinalized''' in '''GECK'''.  A navmesh in the ESP will also eventually stop working. It is a known bug in the '''Gamebryo Engine''' and was not fixed until later in '''Skyrim''''s life ('''Creator Engine''').
  
 
<span id="Tip-ESMOnly"></span>
 
<span id="Tip-ESMOnly"></span>
Line 2,565: Line 2,789:
 
* Once your mod (as an ESP file) is done: if you then convert it to an ESM using '''FNVedit''' (by toggling the "ESM" field flag of the "File Header") and saving, and YOU DO ABSOLUTELY NOTHING ELSE TO IT, it will work. (That's in caps because it's important).
 
* Once your mod (as an ESP file) is done: if you then convert it to an ESM using '''FNVedit''' (by toggling the "ESM" field flag of the "File Header") and saving, and YOU DO ABSOLUTELY NOTHING ELSE TO IT, it will work. (That's in caps because it's important).
  
* Once you change your ESP into an "ESM" in the ''file header'' of '''FNVEdit''', make sure you change the file extension to ESM to match.  '''FNVEdit''' loads files based upon their extension and timestamp, period.  It doesn't care about the internal ESM flag on ESP extension files; they get loaded after other ESMs.  Besides, it confuses your customers: the players.
+
* Once you change your ESP into an "ESM" in the ''file header'' of '''FNVEdit''', make sure you change the file extension to ESM to match.  '''FNVEdit''' loads files based upon their extension and timestamp, period.  (But other games may ignore those same attributes and load based upon the "plugins.txt" file sequence.)  Both '''FNVEdit''' and the game engine don't care about the internal ESM flag on ESP extension files; they get loaded after other ESMs.  Fortunately '''LOOT''' does detect such internally flagged ESP files and sorts them with the rest of the actual ESM files.  And since version 4 of '''xEdit''', it's "Sort Masters" option automatically matches them to the current "load order".  Besides, using a different extension from the purpose of the plugin confuses your customers: the players.
  
* If you have something like an NPC or a package or pretty much anything in an ESM, and something modifies that NPC/package/whatever in another ESP or another ESM, do not ever change the NPC/package/whatever in the original ESM afterwards. That can really corrupt your mod. You'll also save yourself a lot of headaches if you don't modify things in another ESP/ESM. In other words, if you have an NPC defined in an ESM, but then you place the NPC in the game in an ESP, do not modify the original NPC definition (Base-ID form) in the ESP. You can modify your ''reference'' in the ESP all you want. Just don't modify the original NPC definition.  (If that sentence confuses you, please see the [[#GECK_Form-ID,_Base-ID,_Ref-ID,_and_Editor-ID|GECK Form-ID, Base-ID, Ref-ID, and Editor-ID]] section again for the distinctions.)
+
* If you have something like an NPC or an AI package or pretty much anything in an ESM, and something modifies that NPC/package/whatever in another ESP or another ESM, do not ever change the NPC/package/whatever in the original ESM afterwards. That can really corrupt your mod. You'll also save yourself a lot of headaches if you don't modify things in another ESP/ESM. In other words, if you have an NPC defined in an ESM, but then you place the NPC in the game in an ESP, do not modify the original NPC definition (Base-ID form) in the ESP. You can modify your ''reference'' in the ESP all you want. Just don't modify the original NPC definition.  (If that sentence confuses you, please see the [[#GECK_Form-ID,_Base-ID,_Ref-ID,_and_Editor-ID|GECK Form-ID, Base-ID, Ref-ID, and Editor-ID]] section again for the distinctions.)
  
 
* Any NPC you define in an ESP will likely suffer from the infamous "mismatched head/body texture" bug (e.g. a head with one skin texture on a body with a different skin texture). Some people think that all you need to do is edit your INI files and you can fix this bug, but while that works for some mods and people, the solution doesn't work for others. If you don't want your NPCs to have mismatched skin textures, and you want it to be done reliably so it works for everyone, you need to define the NPCs in an ESM, period.  Take the time to plan ahead.
 
* Any NPC you define in an ESP will likely suffer from the infamous "mismatched head/body texture" bug (e.g. a head with one skin texture on a body with a different skin texture). Some people think that all you need to do is edit your INI files and you can fix this bug, but while that works for some mods and people, the solution doesn't work for others. If you don't want your NPCs to have mismatched skin textures, and you want it to be done reliably so it works for everyone, you need to define the NPCs in an ESM, period.  Take the time to plan ahead.
Line 2,608: Line 2,832:
 
* [[Gimp_create_old_weathered_posters_and_other_images|Gimp: create old weathered posters and other images]] Wiki.
 
* [[Gimp_create_old_weathered_posters_and_other_images|Gimp: create old weathered posters and other images]] Wiki.
 
==== How to ''do something'' ====
 
==== How to ''do something'' ====
 +
 +
<span id="Tip-GMSTs"></span>
 +
===== How to change '''Game Settings''' aka '''GMSTs''' =====
 +
: Thanks to '''punchbattle''' of the Nexus Fallout "New Vegas Mod Talk" forum for the basis of the following:
 +
<div name="Note Box" class="boilerplate metadata" id="Notice Box"
 +
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 +
background-color:#333333;padding:3px;
 +
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 +
">As one might expect, the game has many variables it uses in various functions and algorithms.  Where are these and how can you change them?  They can be altered using either [http://www.nexusmods.com/newvegas/mods/34703/? xEdit/FNVEdit] (freeware) to edit '''GMST''' records or the '''GECK''' to change "Game Settings".
 +
 +
Example: Change "decapitation rates".
 +
Making your own mod file:
 +
# Open the '''GECK''', then go to the upper left menu and click "File | Data..."
 +
# A list of ".ESM" files should pop up. Check the box next to '''FalloutNV.esm''' and uncheck any other box that might be checked.  (If this is an annoying problem with the DLCS, please see [[#Issue_-_GECK_does_not_automatically_select_FalloutNV_or_some_DLC_ESM_file|Issue - GECK does not automatically select FalloutNV or some DLC ESM file]].)
 +
# Highlight FalloutNV.esm, then click "Set as Active File", and press OK
 +
# Once it's done loading up, you should be ready to start editing!
 +
[But first: change the filename to "make it your own".]
 +
 +
Editing '''Game Settings''' in the '''GECK''':
 +
# Click "Gameplay | Settings...".
 +
# A window should pop up with a long list of game variables. You can type things into the '''Filter''' field to see specific variables.
 +
 +
These are the ones you're looking for in this example:
 +
* '''iCombatDismemberPartChance'''
 +
* '''iMessCrippledLimbExplodeBonus'''
 +
* '''iMessIntactLimbDismemberChance'''
 +
* '''iMessIntactLimbExplodeBonus'''
 +
* '''iMessTargetedLimbExplodeBonus'''
 +
* '''iMessTorsoExplodeChance'''
 +
 +
It is believed that '''iCombatDismemberPartChance''' is the base chance a limb will ''dismember'', and the '''iMess...''' values kick in if you have the ''Bloody Mess'' perk. Just put in whatever values you think feel right, and see how things go. It may take a couple of tweaks before you get it exactly where you want it to be.
 +
</div>
  
 
===== How to create a challenge =====
 
===== How to create a challenge =====
Line 2,616: Line 2,872:
  
 
===== How to create a perk =====
 
===== How to create a perk =====
* [[How_to_create_a_perk|How to create a perk]] Wiki.
+
* [http://youtu.be/BLRFMVQkpFQ GECK Tutorial - Perk (Ability)] Video by '''Seddon4494'''.
 +
* [http://youtu.be/62bHp1_PIdk GECK Tutorial - Perk (Entry Point)] Video by '''Seddon4494'''.
 +
* [[How_to_create_a_perk|How to create a perk]] Wiki article.
  
 
===== How to create a Primative ''activators'' ''trigger volumes'' ''multibounds and occlusion planes'' =====
 
===== How to create a Primative ''activators'' ''trigger volumes'' ''multibounds and occlusion planes'' =====
Line 2,695: Line 2,953:
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 
">Suppose you want an NPC's "home" to be changeable to a new location.  You can either place different xMarkers at the potential sites, or use a "creature" that is initially "disabled" for your Marker.  Static objects like the default XMarker object cannot be moved, but a "persistent creature" set as a "quest object" can be moved and assigned as a "marker".  Then drop the "marker/creature" in the new "home" cell. "Creature" positions are always updated in the game, whereas static objects are not, so you don't need to use the "enable/disable" trick to update their location.  You then assign a "GoHome" travel AI Package to the marker as it's destination, and another "sandbox behavior" AI Package to let it wander the immediate area of the marker.  See the wiki article [http://geck.technodeep.net/index.php/Bethsoft_Tutorial_NPC_population GECK: Bethsoft Tutorial NPC population].</div>
 
">Suppose you want an NPC's "home" to be changeable to a new location.  You can either place different xMarkers at the potential sites, or use a "creature" that is initially "disabled" for your Marker.  Static objects like the default XMarker object cannot be moved, but a "persistent creature" set as a "quest object" can be moved and assigned as a "marker".  Then drop the "marker/creature" in the new "home" cell. "Creature" positions are always updated in the game, whereas static objects are not, so you don't need to use the "enable/disable" trick to update their location.  You then assign a "GoHome" travel AI Package to the marker as it's destination, and another "sandbox behavior" AI Package to let it wander the immediate area of the marker.  See the wiki article [http://geck.technodeep.net/index.php/Bethsoft_Tutorial_NPC_population GECK: Bethsoft Tutorial NPC population].</div>
 +
 +
<span id="NVSEPlugins"></span>
 +
==== NVSE Plugins ====
 +
Unfortunately there is neither documentation nor tutorials on creating an NVSE Plugin.  The only advice is to use the older, freeware '''IDA 5.0 Disassembler''' by [http://www.hex-rays.com/products/decompiler/ Hex-Rays] for 32-bit executables, which is hosted on the [http://www.scummvm.org/news/20180331/ ScummVM] site, and your knowledge of "C-like" programming languages.  From that page:
 +
<blockquote>
 +
    A recent discussion [Mar 2018] about the most recent IDA Disassembler freeware 7.0 revealed that it no longer supports disassembling older DOS and Windows executables. This is obviously a problem for potential contributors, as well as potential GSoC students wanting to reverse engineer an old adventure game or RPG for their project. The obvious solution is to provide an earlier freeware version that still supports them.
 +
    Consulting with Hex-Rays, they're kindly consented for us to host one of the earlier IDA freeware versions, for those in the future who wish to use it.
 +
</blockquote>
  
 
==== PAINTdotNET ''Normal Maps'' ====
 
==== PAINTdotNET ''Normal Maps'' ====
Line 2,709: Line 2,975:
 
XML is a "data definition" structure, based upon a "data schema" which was defined by Bethesda.  They didn't publish their "schema", but some things have been learned about it.  However, without a published scheme, you must either use only elements found in other XML files, or be willing to experiment.
 
XML is a "data definition" structure, based upon a "data schema" which was defined by Bethesda.  They didn't publish their "schema", but some things have been learned about it.  However, without a published scheme, you must either use only elements found in other XML files, or be willing to experiment.
 
* [http://www.w3schools.com/xml/ W3School's XML Tutorial] Wiki.  Covers various XML standards such as Ajax, DOM, XPath, XSLT, XQuery, DTD, Schema, and Services.
 
* [http://www.w3schools.com/xml/ W3School's XML Tutorial] Wiki.  Covers various XML standards such as Ajax, DOM, XPath, XSLT, XQuery, DTD, Schema, and Services.
* [http://cs.elderscrolls.com/index.php?title=Category:Oblivion_XML Category:Oblivion XML] Wiki (Oblivion).
+
* [http://cs.elderscrolls.com/index.php?title=Category:Oblivion_XML Category:Oblivion XML] Wiki (Oblivion, but still applies to FO3 and FNV).
 +
* [http://content3.uesp.net/wiki/Tes4Mod:Oblivion_XML/Traits Tes4Mod:Oblivion XML/Traits] Wiki (Oblivion, but still applies to FO3 and FNV).
 
* [http://www.loverslab.com/topic/53411-reading-ui-hud-xml-files/ Reading UI & HUD XML files] by '''DoctaSax''' (Adults (18+)Only site).  Covers XML Basics.
 
* [http://www.loverslab.com/topic/53411-reading-ui-hud-xml-files/ Reading UI & HUD XML files] by '''DoctaSax''' (Adults (18+)Only site).  Covers XML Basics.
 
* [http://qxmledit.org/ QXmlEdit] (freeware) XML Editor.  Note the tutorials on this site are regarding the tool's features; not XML in general.
 
* [http://qxmledit.org/ QXmlEdit] (freeware) XML Editor.  Note the tutorials on this site are regarding the tool's features; not XML in general.
Line 2,755: Line 3,022:
 
:::* '''tenpenny'''
 
:::* '''tenpenny'''
 
::* '''npc''' (by type of actor): ''WAV'' '''mono''' files.
 
::* '''npc''' (by type of actor): ''WAV'' '''mono''' files.
::* '''voc''' (sound effect "voices"): ''WAV'' '''mono''' files.
+
::* '''voc''' (sound effect "voices"): ''WAV'' '''mono''' files.  These can be "broadcast" from radios or speakers with the ''playsound'' function in the ''menumode for terminals''.  The sound file length controls the timing.
:* '''voices''' (Data\Sound\voice): dialog.  ''OGG'' and ''LIP'' '''mono''' files.
+
:* '''voices''' (Data\Sound\voice): dialog.  ''OGG'' and ''LIP'' '''mono''' files.  These are "spoken" by Actors as "talking head" dialog.  The '''LIP''' file controls the timing.
  
 
<span id="TIP-AddingASound"></span>
 
<span id="TIP-AddingASound"></span>
Line 2,810: Line 3,077:
 
* '''Seddon'''s video guide on how to make a station is a good one, but its major flaw is that he was operating under the presumption that ''mono WAV'' files were required.  '''You''' must make the above calling convention adjustments if using ''MP3'' or ''stereo'' files instead.
 
* '''Seddon'''s video guide on how to make a station is a good one, but its major flaw is that he was operating under the presumption that ''mono WAV'' files were required.  '''You''' must make the above calling convention adjustments if using ''MP3'' or ''stereo'' files instead.
 
* '''DorostheConqueror'''s text-based guide is slightly more comprehensive than Seddon's if I recall, but suffers from the same ''mono WAV'' file presumption, and the same adjustments apply.
 
* '''DorostheConqueror'''s text-based guide is slightly more comprehensive than Seddon's if I recall, but suffers from the same ''mono WAV'' file presumption, and the same adjustments apply.
 +
* NOTE: Radio stations are similar to dialog in that their ''quests'' must be checkboxed to "start enabled".  If the ''quest'' isn't "active" the ''topics/songs'' will not play.
 
</div>
 
</div>
  
<span id="Tip-BattleMusic"></span>
+
<span id="Tip-MusicAndDialog"></span>
====TIP Replacing Battle Music====
+
==== TIP Music and Dialog ====
: Thanks to '''KadoDragon''' and '''DaemonGrin''' of the Nexus Fallout "New Vegas Mod Talk" forum for the basis of the following:
+
: Thanks to '''Glenrhee''' of the Nexus Fallout "New Vegas GECK and Modders" forum for the basis of the following:
 +
<div name="Note Box" class="boilerplate metadata" id="Notice Box"
 +
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 +
background-color:#333333;padding:3px;
 +
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 +
">When you have the problem of your added music won't fade or mute during dialog, probably you have not encoded it correctly.
 +
# The music has to be in '''mono .wav''' format.
 +
# It has to be in a CBR (constant bit rate) of 256 or less. Most audio editing programs let you choose to export it this way.
 +
# It'll sound louder '''out-of-game''' than '''in-game''', so don't lower the volume too much on it.
 +
Now your music should automatically get quieter when in dialog.
 +
</div>
 +
 
 +
<span id="Tip-BattleMusic"></span>
 +
 
 +
====TIP Replacing Battle Music====
 +
: Thanks to '''KadoDragon''' and '''DaemonGrin''' of the Nexus Fallout "New Vegas Mod Talk" forum for the basis of the following:
 
<div name="Note Box" class="boilerplate metadata" id="Notice Box"  
 
<div name="Note Box" class="boilerplate metadata" id="Notice Box"  
 
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
Line 3,020: Line 3,303:
 
* [http://www.nexusmods.com/newvegas/mods/56009/? Jokerine's Misc Resources Tutorials and Novac Bungalow: NifSkope Texture Paths by Jokerine] Mod PDF.
 
* [http://www.nexusmods.com/newvegas/mods/56009/? Jokerine's Misc Resources Tutorials and Novac Bungalow: NifSkope Texture Paths by Jokerine] Mod PDF.
 
* [http://www.nexusmods.com/newvegas/mods/64746 NIF tangents and binormals updater] Command line tool to batch update tangents/binormals.
 
* [http://www.nexusmods.com/newvegas/mods/64746 NIF tangents and binormals updater] Command line tool to batch update tangents/binormals.
 +
* [http://www.nexusmods.com/newvegas/mods/56203/? Material and Texture Animations in NifSkope - Tutorial] PDF/DOC download.
 
* [http://niftools.sourceforge.net/wiki/NifSkope NifSkope Wiki] Wiki.
 
* [http://niftools.sourceforge.net/wiki/NifSkope NifSkope Wiki] Wiki.
 
* [http://forums.nexusmods.com/index.php?/topic/984792-tutorial-working-with-the-nicontrollermanager/ NifSkope: Working with the NiControllerManager] Forum Thread.  Alternate images available [http://www.mediafire.com/file/p0srsyrfuaszevp/Tutorial.zip here].
 
* [http://forums.nexusmods.com/index.php?/topic/984792-tutorial-working-with-the-nicontrollermanager/ NifSkope: Working with the NiControllerManager] Forum Thread.  Alternate images available [http://www.mediafire.com/file/p0srsyrfuaszevp/Tutorial.zip here].
 
* [http://www.nexusmods.com/newvegas/mods/45444/? Tutorials on Screenshots, NifSkope, Outfit creation and Posing by jonas opines] Mod.
 
* [http://www.nexusmods.com/newvegas/mods/45444/? Tutorials on Screenshots, NifSkope, Outfit creation and Posing by jonas opines] Mod.
 
* [http://www.nexusmods.com/newvegas/mods/63770/? Nifskope Testing Skeleton] by clanky4. Mod for testing animations in NifSkope only.
 
* [http://www.nexusmods.com/newvegas/mods/63770/? Nifskope Testing Skeleton] by clanky4. Mod for testing animations in NifSkope only.
 +
 +
<span id="Tip-AttachLightSource"></span>
 +
==== TIP Attaching a light source to a mesh ====
 +
: Thanks to '''MonsterMonkey''' of the Nexus Fallout "New Vegas Mod Talk" forum for the basis of the following:
 +
<div name="Note Box" class="boilerplate metadata" id="Notice Box"
 +
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 +
background-color:#333333;padding:3px;
 +
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 +
">So, you have an existing mesh that needs a light source added to illuminate only a portion of it.  How do you go about it?
 +
* Open your mesh in '''NifSkope''', and attach a "new node > ''bsvaluenode''" where you want the light source.
 +
* Now you'll have to open the '''GECK''', and find ''AddonNodes''.
 +
: ''AddonNodes'' are particle meshes that can use a light source.
 +
* ''AddonNodes'' have an '''Index number'''.  You 'll need this '''Index number''' in '''NifSkope''', so make note of the one you want.
 +
* Now go to '''NifSkope''', and in the ''bsvaluenode'' entry you created, go to the "value" line and write the related '''Index number''' of the ''AddonNode'' you want the mesh to use.
 +
The thread [http://forums.nexusmods.com/index.php?/topic/4522240-attaching-light-to-mesh/ Attaching light to mesh?] has an example of the before and after effect on an image.
 +
</div>
 +
 +
<span id="Tip-ConvertNIFHeader"></span>
 +
 +
==== TIP Convert NIF header ====
 +
: Thanks to '''pixelhate''' of the Nexus Fallout "New Vegas Mod Troubleshooting" forum for the basis of the following:
 +
<div name="Note Box" class="boilerplate metadata" id="Notice Box"
 +
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 +
background-color:#333333;padding:3px;
 +
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 +
">When you want to change the header of your custom mesh from "NiNode" to "BSFadenode" (because it prevents your object from moving, etc.) or vice versa:
 +
Select the '''NiNode''', <Right Click>, select "Block | Convert", and choose your node type.
 +
</div>
  
 
<span id="Tip-ModelMashups"></span>
 
<span id="Tip-ModelMashups"></span>
Line 3,055: Line 3,367:
 
A: The model determines the lighting in this game.  I'm asking, in the vanilla game was it seamless?  I don't mean the 2D ".dds" texture file; I'm asking, did it look seamless in-game?  [No, it doesn't.]
 
A: The model determines the lighting in this game.  I'm asking, in the vanilla game was it seamless?  I don't mean the 2D ".dds" texture file; I'm asking, did it look seamless in-game?  [No, it doesn't.]
  
(For any unfamiliar graphics related terms, please see the [http://www.darkcreations.org/testg/wiki/Glossary TESTG Glossary].)
+
(For any unfamiliar graphics related terms, please see the [http://web.archive.org/web/20170713081056/http://www.darkcreations.org/testg/wiki/Glossary TESTG Glossary].)
  
 
So, the way it works is an object is lit dependent upon several factors.  The first is the ''normal map'' and its ''alpha channel''.  Obviously, you're telling me these are all the same texture, so that's not the problem here but it is certainly something to be aware of.  The ''normal map'' behaves as you expect, and its ''alpha channel'' is used as the ''specular map''.  Generally, you want that ''specular map'' to be mostly dark, down to drawing distinctly different effects in-game from a portion of a ''specular map'' that is 5% bright and 8% bright, for example (that is, 0% is pitch black, and bringing the RGB values all up 5% from 0 is 5%).
 
So, the way it works is an object is lit dependent upon several factors.  The first is the ''normal map'' and its ''alpha channel''.  Obviously, you're telling me these are all the same texture, so that's not the problem here but it is certainly something to be aware of.  The ''normal map'' behaves as you expect, and its ''alpha channel'' is used as the ''specular map''.  Generally, you want that ''specular map'' to be mostly dark, down to drawing distinctly different effects in-game from a portion of a ''specular map'' that is 5% bright and 8% bright, for example (that is, 0% is pitch black, and bringing the RGB values all up 5% from 0 is 5%).
Line 3,149: Line 3,461:
 
* [http://www.cipscis.com/fallout/tutorials/beginners.aspx CIPSCIS: Scripting for Beginners] HTML Tutorial.  Does not support "script extender" syntax.
 
* [http://www.cipscis.com/fallout/tutorials/beginners.aspx CIPSCIS: Scripting for Beginners] HTML Tutorial.  Does not support "script extender" syntax.
 
* [http://code.tutsplus.com/tutorials/top-15-best-practices-for-writing-super-readable-code--net-8118 Top 15 Best Practices for Writing Super Readable Code] HTML.
 
* [http://code.tutsplus.com/tutorials/top-15-best-practices-for-writing-super-readable-code--net-8118 Top 15 Best Practices for Writing Super Readable Code] HTML.
 +
* [http://www.nexusmods.com/newvegas/mods/67395 RuntimeScriptProfiler] by '''lStewieAl - shadeMe'''.  An NVSE plugin to profile script execution. Ported from '''shadeMe''''s '''Oblivion''' plugin.  Use this to check how efficient your script is when running.
  
 
[When linking to a Video, be sure to check the page sidebar for additional, related subject videos.]
 
[When linking to a Video, be sure to check the page sidebar for additional, related subject videos.]
* [http://geck.foesmm.org/index.php/Category:Conditions GECK Category: Conditions] Wiki.
+
* [http://geckwiki.com/index.php/Category:Conditions GECK Category: Conditions] Wiki.
* [http://geck.technodeep.net/index.php/Category:Tutorials GECK Category: Tutorials page] Wiki.
+
* [http://geckwiki.com/index.php/Category:Tutorials GECK Category: Tutorials page] Wiki.
* [http://geck.foesmm.org/index.php/Adding_an_Options_Menu GECK: Adding an Options Menu Tutorial]
+
* [http://geckwiki.com/index.php/Adding_an_Options_Menu GECK: Adding an Options Menu Tutorial]
* [http://geck.technodeep.net/index.php/Bethsoft_Tutorial_Basic_Quest GECK: Bethsoft Tutorial Basic Quest]
+
* [http://geckwiki.com/index.php?title=Bethsoft_Tutorial_Basic_Quest GECK: Bethsoft Tutorial Basic Quest]
 
* [http://www.nexusmods.com/newvegas/mods/45278/? GECK: Companion by Caprius] Mod.
 
* [http://www.nexusmods.com/newvegas/mods/45278/? GECK: Companion by Caprius] Mod.
* [http://geck.foesmm.org/index.php/List_of_Global_Variables GECK: Global Variable]
+
* [http://geckwiki.com/index.php/List_of_Global_Variables GECK: Global Variable]
 
* [http://youtu.be/3Bauvvmo31g GECK: Making a Counter by Seddon4494] (for tracking scripts.) Video.
 
* [http://youtu.be/3Bauvvmo31g GECK: Making a Counter by Seddon4494] (for tracking scripts.) Video.
* [http://geck.technodeep.net/index.php/Notes GECK: Notes]
+
* [http://geckwiki.com/index.php/Notes GECK: Notes]
 
* [http://www.youtube.com/watch?v=zDE4yHOz0cQ GECK: Script to Spawn/Enable NPCs at a Certain Time] Video.
 
* [http://www.youtube.com/watch?v=zDE4yHOz0cQ GECK: Script to Spawn/Enable NPCs at a Certain Time] Video.
* [http://geck.technodeep.net/index.php/Scripting_for_Beginners GECK: Scripting for Beginners] Wiki.
+
* [http://geckwiki.com/index.php/Scripting_for_Beginners GECK: Scripting for Beginners] Wiki.
 
* [http://www.youtube.com/watch?v=APnz-qdQxfQ Tutorial - Scripting Notes] Video by '''Seddon4494'''.
 
* [http://www.youtube.com/watch?v=APnz-qdQxfQ Tutorial - Scripting Notes] Video by '''Seddon4494'''.
 
* [http://www.youtube.com/watch?v=RLrV-R_0hnY Making something happen every day] Video by '''Seddon4494'''.
 
* [http://www.youtube.com/watch?v=RLrV-R_0hnY Making something happen every day] Video by '''Seddon4494'''.
Line 3,167: Line 3,480:
 
:* [http://www.gribbleshnibit.com/projects/NVSEDocs/# NVSE Documentation] by gribbleshnibit.
 
:* [http://www.gribbleshnibit.com/projects/NVSEDocs/# NVSE Documentation] by gribbleshnibit.
 
:* [http://geck.bethsoft.com/index.php?title=MessageBoxEx NVSE MessageBoxEx function] Wiki.
 
:* [http://geck.bethsoft.com/index.php?title=MessageBoxEx NVSE MessageBoxEx function] Wiki.
:* [http://geck.foesmm.org/index.php/Con_SCOF NVSE: Con_SCOF]
+
:* [http://geckwiki.com/index.php/Con_SCOF NVSE: Con_SCOF]
:* [http://geck.foesmm.org/index.php/Debug_Dumps NVSE: Debug Dumps]
+
:* [http://geckwiki.com/index.php/Debug_Dumps NVSE: Debug Dumps]
 
:* [http://www.cipscis.com/fallout/tutorials/detecting_keypresses.aspx NVSE: Detecting Keypresses] Wiki.
 
:* [http://www.cipscis.com/fallout/tutorials/detecting_keypresses.aspx NVSE: Detecting Keypresses] Wiki.
:* [http://geck.foesmm.org/index.php/SetDebugMode NVSE: SetDebugMode]
+
:* [http://geckwiki.com/index.php/SetDebugMode NVSE: SetDebugMode]
 
* [http://fallout.gamepedia.com/Pip-Boy_3000 Pipboy Tabs]
 
* [http://fallout.gamepedia.com/Pip-Boy_3000 Pipboy Tabs]
 
* [http://cs.elderscrolls.com/index.php?title=Performance_Problems TES: Script Performance Problems] TES Construction Set Wiki.  Some things on this site are obsolete information as regards the GECK.
 
* [http://cs.elderscrolls.com/index.php?title=Performance_Problems TES: Script Performance Problems] TES Construction Set Wiki.  Some things on this site are obsolete information as regards the GECK.
Line 3,217: Line 3,530:
 
Using commas to separate function parameters is actually preferable, especially when you use advanced NVSE scripting (CO, arrays, UDFs with dynamically constructed parameters in the call line). Much like extensive use of parentheses, it not only keeps things more readable for yourself, but prevents errors at compile or at run time. It isn't usually needed for simple code, but it's a good practice to get into for when it is needed, so let's please not advise against doing it.</div>
 
Using commas to separate function parameters is actually preferable, especially when you use advanced NVSE scripting (CO, arrays, UDFs with dynamically constructed parameters in the call line). Much like extensive use of parentheses, it not only keeps things more readable for yourself, but prevents errors at compile or at run time. It isn't usually needed for simple code, but it's a good practice to get into for when it is needed, so let's please not advise against doing it.</div>
  
<span id="Tip-VariablePrefixes"></span>
+
<span id="Tip-ShareVariables"></span>
==== '''TIP Best Practice''' Type prefixes for Variables ====
+
==== '''TIP Best Practice''' Sharing Variables between Scripts ====
: Thanks to '''EPDGaffney''' of the Nexus Fallout "New Vegas GECK and Modders" forum for the basis of the following:
+
: Thanks to the contributors to the [http://www.loverslab.com/topic/4320-fallout-new-vegas-geck-scripting-help-101/ Fallout New Vegas GECK & Scripting Help 101] forum on the (Age 18+ gated) "LoversLab.com" site for the basis of the following:
 
<div name="Note Box" class="boilerplate metadata" id="Notice Box"  
 
<div name="Note Box" class="boilerplate metadata" id="Notice Box"  
 
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 
background-color:#333333;padding:3px;
 
background-color:#333333;padding:3px;
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
">It's easy to get confused as to what sort of values are "valid" for any given variable once you get beyond a simple script, especially if it was defined elsewhere than the current script.  When you "declare" a variable, you give it a "type" which determines both which sorts of values it can accept and how they are stored. If it's expecting a "reference" then you can't assign it a "number" or "string".  Experienced programmers have learned it's a "best practice" to use "type prefixes" in front of their variable names to help keep them straight.
+
">When you want to share variables across more than one script, create a simple "Quest" with a name indicating it's purpose (e.g. "<MyCurrentQuest>VAR").  It doesn't need to do anything (i.e. it can be completely empty), but you need to enable the "StartGame enabled" checkbox.
 +
 
 +
Then create a new script to be run when that Quest starts, so name it something related like "<MyCurrentQuest>VARScript", and use the "Script Type" drop down list at the top right of the "Script Edit" shortcut icons to designate it as "Quest" type.
 +
 
 +
Now define any variables you want to use across more than one script or permit others to read for other Mods.
 +
 
 +
Important points to remember:
 +
* As a general practice: Declare all your variables at the top. If you declare them all over the place when you need them, you'll eventually regret it.
 +
 
 +
* Variables declared OUTSIDE the BEGIN blocks retain their value between runs, and in save games. Variables declared INSIDE a BEGIN block will be reset to 0 each time the script is runIn this "variable declaration script" you do not need or want any "BEGIN/END" blocks.
 +
 +
* Prefix your variable with their "function type" to avoid confusion when using them in other scripts.
 +
 
 +
* Use "floats" (floating decimal values) or "ints" (integer values), but never "shorts".  The less you have to type the better, and using a "non-int" alias in the '''GECK''' language will cause confusion among those who know another programming language.  Don't expect a "short" to roll over at 32767 or 65535; it will roll over at 2-billion-something just like a regular signed integer.
  
These "type prefixes" are lowercase letters that go before a capitalized variable name, denoting a specific programming use for that variable.
+
* Use prefixes for ''usage'' and ''functionality'', not "datatype".
  
* b - A ''boolean'' (aka "''bool''") is a variable that can be only true (set to 1) or false (set to 0).  We don't have true ''bools'' in this '''GECK''' programming language, but variables that a programmer knows will only ever be set to true or false can be referred to as a ''bool'' and its name can be chosen accordingly for organizational purposes.  They are technically defined as the short/integer variety of '''type'''.
+
* All numeric vars in the '''GECK''' language are signed (can be negative).
  
: Example:
+
* When naming variables, try to be consistent. You don't need to adhere to any naming scheme other than what you like but stay consistent with whatever you do choose to use. Many programmers are "Hungarian Camel Case" users (e.g. "int iMyCount", "short sTheValue", "ref rTheNPC", etc.) following [http://en.wikipedia.org/wiki/Hungarian_notation#Systems_vs._Applications_Hungarian Hungarian notation].
<pre>
 
short bFoundJohn
 
int bFoundJohn
 
</pre>
 
* f - a ''float'' is a variable that can store numbers that are in between integers.  Essentially, numbers that can have decimal values (e.g. "1.001"). Some functions will return a number that is in between two integers, and if you want to store that value as a variable for use in your script, it generally must be declared as a ''float'' variable. A popular one is '''GetSecondsPassed''' for example.
 
  
: Example:
+
* Strive to always put constants on the LEFT. "if (0 == foo)" is preferable to "if (foo == 0)". This is more important in other languages, but it's because statements are evaulated from left to right across a line of code. The practice comes from the C languages, where the first time you write "if (foo = 0)" when you meant "if (foo == 0)" you'll understand why.
<pre>
 
float fTimer
 
</pre>
 
* i - an ''int'' variable is the same as a ''short'' variable, but we only use the 'i' prefix so that we can use the 's' prefix to denote a ''string'' variable, which we'll talk about in a minute. ''Int/short'' variables can only be integers, or whole numbers.  If you try to use one to store a value that should be a ''float'', it may round down (truncate) to the nearest whole number or it may just not work.  These are the most common variables for our use.
 
  
: Example:
+
* Use parenthesis generously, but judiciously. You can almost never have too many.
<div name="Simulated code box" class="boilerplate metadata" id="Warning Notice"  
+
 
style="margin:0px 10px 10px 30px; border:1px dashed #DAA520; color: lightgray; background-color:#424242; padding:3px;"
+
* Indent your code consistently (makes bug hunting easier). Settle on using spaces or tabs (spaces are heavily preferred as tab stops can vary in spacing on the same line) and stick to it.  If you expect to indent a lot, try to use no fewer than two spaces for readability.
/* Remove the next four 'white-space' lines to restore default white-space processing. */
+
 
white-space: pre-wrap;      /* css-3 */
+
* Try to be ''explicit'' at all times rather than ''implicit''.  Assuming that version X treats something one way can burn you when version Y changes the default behavior.  A good example is using a function without prefacing it with "Player.". While this may be assumed to be true, it can easily not be true depending on situation. So if you mean to run something on the player, be explicit and say so... never trust implicit compiler/interpreter behavior.
white-space: -moz-pre-wrap;  /* Mozilla, since 1999 */
+
 
white-space: -pre-wrap;      /* Opera 4-6 */
+
* Just because you can change something doesn't mean you should. There are tons of globals and gamesettings that can be altered with almost no effort on your part ... with horrible side effects and consequences for everyone else. Try to ALWAYS consider what repercussions your changes could have for other scripters and other modders.  Always try to remember that your playstyle isn't more or less important than everyone else's playstyle. Be considerate in your choices whenever possible.
white-space: -o-pre-wrap;    /* Opera 7+ */
+
 
 +
* If you've created a mod and find yourself whining about how many bugs your users complain about and you end up spending a ton of time on support ... well, stop putting so many bugs into your mods!  Just remember one word: testing, testing, testing, testing, testing, testing, testing, testing, testing, testing, testing, TESTING. Each hour spent testing will eliminate 5+ hours of support. Well worth the time and effort.
 +
 
 +
* Document your mod somewhere.  Maybe not in the scripts themselves (due to size limits), but somewhere. Coming back to a mod you made two years ago can be harder than writing it from scratch. The more documentation you have, the easier maintaining a mod will be.
 +
 
 +
* Understand the block types and what functions can and should and can't and should NOT be used in each one. You can easily block thread execution with the wrong function and freeze a quest. Always give your code time to actually work. Many functions take longer than 1 pass (1 frame) to run. If in doubt, create stages and allow your script time to breathe.  (See [[#TIP_Block_Types_Multiple_vs_Single_Frame_processing|TIP Block Types Multiple vs Single Frame processing]].)
 +
 
 +
* NEVER NEVER NEVER use a local variable in a '''result script''' if you plan on it retaining a value. That includes ''quest stages, dialogue or any other small fragment of code'' that isn't in a script file. All of these scripts erase their variables after execution.  Also, these fragment scripts act on top of other variables, replacing their scope. So if you have a global named '''iMyCount''' and you declare '''int iMyCount''' in a fragment, you are blocking the global and replacing it with your variable while that fragment is running.  Whenever possible, avoid using local variables in a fragment unless they're "fire and forget" variables that do not need to retain any information.
 +
 
 +
There are many more tips from experienced scripters in that thread.  Check it out.
 +
</div>
 +
 +
<span id="Tip-VariablePrefixes"></span>
 +
 
 +
==== '''TIP Best Practice'''  Type prefixes for Variables ====
 +
: Thanks to '''EPDGaffney''' of the Nexus Fallout "New Vegas GECK and Modders" forum for the basis of the following:
 +
<div name="Note Box" class="boilerplate metadata" id="Notice Box"  
 +
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 +
background-color:#333333;padding:3px;
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
">
+
">It's easy to get confused as to what sort of values are "valid" for any given variable once you get beyond a simple script, especially if it was defined elsewhere than the current script.  When you "declare" a variable, you give it a "type" which determines both which sorts of values it can accept and how they are stored.  If it's expecting a "reference" then you can't assign it a "number" or "string".  Experienced programmers have learned it's a "best practice" to use "type prefixes" in front of their variable names to help keep them straight.
int DoOnce<br>
+
 
int iDoOnce<br>
+
These "type prefixes" are lowercase letters that go before a capitalized variable name, denoting a specific programming use for that variable.
int bDoOnce<br>
+
 
short DoOnce<br>
+
* b - A ''boolean'' (aka "''bool''") is a variable that can be only true (set to 1) or false (set to 0)We don't have true ''bools'' in this '''GECK''' programming language, but variables that a programmer knows will only ever be set to true or false can be referred to as a ''bool'' and its name can be chosen accordingly for organizational purposesThey are technically defined as the short/integer variety of '''type'''.
short iRaidersKilled ; (probably the number of raiders player killed)<br>
 
int bRaidersKilled  ; (probably if the player's killed all the designated raiders, or if they've killed at least one, depending on what you want)
 
</div>
 
* s - a ''string'' variable is a weird oneIt's text, and requires special treatment.  It tends to be stuff the scripting language doesn't really understand and just takes on faith that you do.  You probably won't work with these for a whileIn general, the content of a ''string'' variable is for "human consumption"(such as a message or note) rather than use by the script/program.
 
  
:Example:
+
: Example:
 
<div name="Simulated code box" class="boilerplate metadata" id="Warning Notice"  
 
<div name="Simulated code box" class="boilerplate metadata" id="Warning Notice"  
 
style="margin:0px 10px 10px 30px; border:1px dashed #DAA520; color: lightgray; background-color:#424242; padding:3px;"
 
style="margin:0px 10px 10px 30px; border:1px dashed #DAA520; color: lightgray; background-color:#424242; padding:3px;"
Line 3,272: Line 3,603:
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 
">
 
">
string_var sDogName ; whatever the player typed for a dog's name at some point in your quest, so that it can appear in notes<br>
+
short bFoundJohn
string_var sBone    ; whatever bone/node in the .nif model is relevant to the script for whatever reason
+
int bFoundJohn
 
</div>
 
</div>
* a - ''array'' variables are incredible, but an "advanced" techniqueIt's a steep learning curve but they're easy once you've passed thatThey are basically like form lists, but they are made dynamically at run-time via script.
+
* f - a ''float'' is a variable that can store numbers that are in between integers.  Essentially, numbers that can have decimal values (e.g. "1.001")Some functions will return a number that is in between two integers, and if you want to store that value as a variable for use in your script, it generally must be declared as a ''float'' variableA popular one is '''GetSecondsPassed''' for example.
  
 
: Example:
 
: Example:
Line 3,287: Line 3,618:
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 
">
 
">
array_var aNCR  ; maybe every actor in the area that is in an NCR faction, or maybe every NCR actor in the entire game, including all loaded mods<br>
+
float fTimer
array_var aEntry ; this is a standard array variable that could be called anything and still work, but it's typically the name given to a short-lived variable that is used during any number of operations carried out on the larger array that contains all the stuff in the group you're working on.
 
 
</div>
 
</div>
 
+
* i - an ''int'' variable is the same as a ''short'' variable, but we only use the 'i' prefix so that we can use the 's' prefix to denote a ''string'' variable, which we'll talk about in a minute.  ''Int/short'' variables can only be integers, or whole numbersIf you try to use one to store a value that should be a ''float'', it may round down (truncate) to the nearest whole number or it may just not workThese are the most common variables for our use.
: <span style="color: red; background-color:#fff5f5;">WARNING: Mixing up ''references'' and ''base objects'', especially when assigning them to arrays, is one of the most common and lethal mistakes in '''Gamebryo''' scripting.  Always double check what the '''''type''''' of value any function you are using to assign them to an array is returning.  Unfortunate results can become baked into save game files, causing bloatThe only remedy in such cases seems to be deletion of the ".nvse" file for the "save game" when it occurs, which will affect other mods which depend upon information saved in it with unpredictable results.</span>
 
 
 
* r - ''reference'' variables store a reference to an instance of an object placed in the game worldThis is often an actor or a specific object that you'll need to refer to later in your script.
 
  
 
: Example:
 
: Example:
Line 3,305: Line 3,632:
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 
">
 
">
ref rSelf  ; often used in '''GetSelf''' operations for functions that may require it, like some uses of '''PushActorAway''' or '''KillActor'''<br>
+
int DoOnce<br>
ref rTarget  ; often the choice for functions like '''GetOwnerLastTarget'''
+
int iDoOnce<br>
</div>
+
int bDoOnce<br>
: Note you can use a different prefix with the same variable name (e.g. see the various "DoOnce" definitions under "i - integer"), and the '''GECK''' will treat them as distinct, separate entities. (But note "short DoOnce" and "int DoOnce" are not unique variable names.  They are defining the same variable name to the same type.)  However, that can get very confusing after awhile and is not recommended as a casual practice.  But it can have it's place.
+
short DoOnce<br>
 +
short iRaidersKilled ; (probably the number of raiders player killed)<br>
 +
int bRaidersKilled  ; (probably if the player's killed all the designated raiders, or if they've killed at least one, depending on what you want)
 +
</div>
 +
* s - a ''string'' variable is a weird one.  It's text, and requires special treatment.  It tends to be stuff the scripting language doesn't really understand and just takes on faith that you do.  You probably won't work with these for a while.  In general, the content of a ''string'' variable is for "human consumption"(such as a message or note) rather than use by the script/program.
 +
 
 +
:Example:
 +
<div name="Simulated code box" class="boilerplate metadata" id="Warning Notice"
 +
style="margin:0px 10px 10px 30px; border:1px dashed #DAA520; color: lightgray; background-color:#424242; padding:3px;"
 +
/* Remove the next four 'white-space' lines to restore default white-space processing. */
 +
white-space: pre-wrap;      /* css-3 */
 +
white-space: -moz-pre-wrap;  /* Mozilla, since 1999 */
 +
white-space: -pre-wrap;      /* Opera 4-6 */
 +
white-space: -o-pre-wrap;    /* Opera 7+ */
 +
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 +
">
 +
string_var sDogName ; whatever the player typed for a dog's name at some point in your quest, so that it can appear in notes<br>
 +
string_var sBone    ; whatever bone/node in the .nif model is relevant to the script for whatever reason
 +
</div>
 +
* a - ''array'' variables are incredible, but an "advanced" technique.  It's a steep learning curve but they're easy once you've passed that.  They are basically like form lists, but they are made dynamically at run-time via script.
 +
 
 +
: Example:
 +
<div name="Simulated code box" class="boilerplate metadata" id="Warning Notice"
 +
style="margin:0px 10px 10px 30px; border:1px dashed #DAA520; color: lightgray; background-color:#424242; padding:3px;"
 +
/* Remove the next four 'white-space' lines to restore default white-space processing. */
 +
white-space: pre-wrap;      /* css-3 */
 +
white-space: -moz-pre-wrap;  /* Mozilla, since 1999 */
 +
white-space: -pre-wrap;      /* Opera 4-6 */
 +
white-space: -o-pre-wrap;    /* Opera 7+ */
 +
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 +
">
 +
array_var aNCR  ; maybe every actor in the area that is in an NCR faction, or maybe every NCR actor in the entire game, including all loaded mods<br>
 +
array_var aEntry ; this is a standard array variable that could be called anything and still work, but it's typically the name given to a short-lived variable that is used during any number of operations carried out on the larger array that contains all the stuff in the group you're working on.
 +
</div>
 +
 
 +
: <span style="color: red; background-color:#fff5f5;">WARNING: Mixing up ''references'' and ''base objects'', especially when assigning them to arrays, is one of the most common and lethal mistakes in '''Gamebryo''' scripting.  Always double check what the '''''type''''' of value any function you are using to assign them to an array is returning.  Unfortunate results can become baked into save game files, causing bloat.  The only remedy in such cases seems to be deletion of the ".nvse" file for the "save game" when it occurs, which will affect other mods which depend upon information saved in it with unpredictable results.</span>
 +
 
 +
* r - ''reference'' variables can store either a ''reference form'' or a ''base form''.  ''Base forms'' are the original "template" form as it was created in '''GECK''', BEFORE placing it in the game world.  ''Reference forms'' are specific instances of a ''base form'' AFTER they have been placed in the game world.  (There can be many ''reference forms'' of the same ''base form''.)  Their relationship to ''reference variables'' is that of a specific actor or object that you'll need to refer to later in your script.  (See the [[#GECK_Form-ID_Base-ID_Ref-ID_and_Editor-ID|GECK Form-ID Base-ID Ref-ID and Editor-ID]] section.)
 +
 
 +
: Example:
 +
<div name="Simulated code box" class="boilerplate metadata" id="Warning Notice"
 +
style="margin:0px 10px 10px 30px; border:1px dashed #DAA520; color: lightgray; background-color:#424242; padding:3px;"
 +
/* Remove the next four 'white-space' lines to restore default white-space processing. */
 +
white-space: pre-wrap;      /* css-3 */
 +
white-space: -moz-pre-wrap;  /* Mozilla, since 1999 */
 +
white-space: -pre-wrap;      /* Opera 4-6 */
 +
white-space: -o-pre-wrap;    /* Opera 7+ */
 +
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 +
">
 +
ref rSelf  ; often used in '''GetSelf''' operations for functions that may require it, like some uses of '''PushActorAway''' or '''KillActor'''<br>
 +
ref rTarget  ; often the choice for functions like '''GetOwnerLastTarget'''
 +
</div>
 +
Note you can use a different prefix with the same variable name (e.g. see the various "DoOnce" definitions under "i - integer"), and the '''GECK''' will treat them as distinct, separate entities. (But note "short DoOnce" and "int DoOnce" are not unique variable names.  They are defining the same variable name to the same type.)  However, that can get very confusing after awhile and is not recommended as a casual practice.  But it can have it's place.
 +
</div>
 +
 
 +
<span id="Tip-SaveBloat"></span>
 +
 
 +
==== Tip '''Best Practice''' Avoiding Save Game Bloat ====
 +
<div name="Note Box" class="boilerplate metadata" id="Notice Box"
 +
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 +
background-color:#333333;padding:3px;
 +
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 +
">'''LuthienAnarion''' (of the '''JIP LN NVSE Plugin''') reports the game saves data about every reference in every cell you have ever visited.  Save files are supposed to get larger and larger as you explore more and more locations (called "bloat"), and their size is something the player should not normally concern themselves with.  (Save Files in the tens of MB are common.)  Bloat is less of a problem for '''FO3/FNV''' than it is for '''Skyrim''' because scripts are not included in the save game files.  However, script authors should still try to avoid adding to it wherever possible using the following '''best practices'''.
 +
 
 +
[http://geckwiki.com/index.php?title=Ar_Null Ar Null]: As of '''NVSE 4.6.2''', arrays defined in [http://geckwiki.com/index.php?title=User_Defined_Function UDF] scripts are cleaned up automatically, '''but those held in other scripts are not'''. Therefore it is essential to use ''Ar_Null'' to clear any local array variables when other scripts terminate to avoid save game bloat.
 +
 
 +
[http://geckwiki.com/index.php?title=Sv_Destruct Sv_Destruct] the local string variables or they can cause save game bloat.
 +
 
 +
[http://geckwiki.com/index.php?title=Disable Disable] does not remove references from the game, just stops them from rendering. Do not rely on ''Disable'' to prevent savegame bloat by removing references.
 +
 
 +
[http://geckwiki.com/index.php?title=MarkForDelete MarkForDelete] should be used to remove '''temporary references''' from the game.  '''GECK''' Editor placed objects cannot be deleted.
 +
 
 +
Excessive use of ''repeatable quest stages'' causes load time problems in some cases. The effect should be apparent after only a few hours of play. Low quest delays seem to affect it. '''Roy Batterian''' (of '''TTW''', '''4GB Patcher''', and 30+ mods) has never been able to determine the exact circumstances under which it occurs so he has just quit using them and uses functions instead.  ''Quest stages'' are "save baked", so perhaps this is behind it.
 +
 
 +
[http://geckwiki.com/index.php?title=PlaceAtMe PlaceAtMe] and [http://geckwiki.com/index.php?title=PlaceLeveledActorAtMe PlaceLeveledActorAtMe] should be used sparingly, as they do create '''temporary references''', so once the player leaves the loaded cell and they are unloaded they will still remain in the save file as scripts cannot run on them to delete or reference them.
 +
 
 +
Actors should be ''spawned'' with '''spawn markers'''; having them initially disabled and then enabled will cause them to spawn immediately. If you want to do "waves of enemies" you can disable the '''spawn marker''' again and run resurrect on it (provided the spawned actor is dead and the marker is persistent), and then re-enable it.
 +
 
 +
''PlaceAtMe'' can also cause various '''havok''' problems like invincible creatures that have '''effect shaders''' and other weirdness: the '''Reavers''' in the "presidential metro" of '''Fallout 3''' is a good example of this bug.  It can also cause crashing due to memory problems and other stuff.  (See any mods with waves of enemies created this way; e.g. '''Someguy2000''''s '''The Better Angels''' exhibits this issue).
 +
 
 +
Tons of lootable items also cause save bloat as the state of the items is "baked" when they are taken.
 +
 
 +
Dropped items get "save baked" too, so it's best to put them in a container.
 +
 
 +
There is also the '''GECKWiki''' article [http://geckwiki.com/index.php?title=Causes_of_CTDs Causes of CTDs] authors should be aware of as well.
 +
</div>
 +
 
 +
<span id="Tip-CheckVariables"></span>
 +
 
 +
==== TIP Assigning and Testing variables ====
 +
: Thanks to '''Mktavish''' of the Nexus Fallout "New Vegas GECK and Modders" forum for the basis of the following:
 +
<div name="Note Box" class="boilerplate metadata" id="Notice Box"
 +
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 +
background-color:#333333;padding:3px;
 +
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 +
">Assigning a value to a variable and then attempting to use that variable immediately afterwards usually doesn't work reliably.  This is because the game engine appears to need at least one frame between the assignment and then being able to have that assigned value available in the variable in the same "action block" (e.g. "GameMode", etc. block).
 +
 
 +
The solution is to first check if the variable is set to other than it's default, and if not to then set the variable, and process the "true" condition the next frame.  For example:
 +
<div name="Note Box" class="boilerplate metadata" id="Notice Box"
 +
style="margin:0px 10px 10px 10px; border:1px dashed #DAA520; color: lightgray; background-color:#424242; padding:3px;
 +
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 +
">short DoOnce
 +
Begin GameMode
 +
: if (DoOnce > 1)
 +
: ; Already done once, so leave immediately.
 +
:: Return
 +
: elseif (DoOnce == 0)
 +
:: set DoOnce to 1 ; to be processed next frame
 +
: else
 +
: ; do whatever when the value of "DoOnce" is "1", including calling another script (e.g. "QuestScript") if needed.
 +
:: set DoOnce to 2 ; signal this has already been done.
 +
: endif
 +
end</div>
 +
 
 +
Other variations on this idea can be implemented as well.  A timer can be implemented if longer than one frame's delay seems to be needed.  Remember that "GameMode" block processing is cumulative in effect from frame to frame.
 +
 
 +
Note that there are only 3 [http://geckwiki.com/index.php/Category:Blocktypes blocktypes] that will continually read the code lines in successive frames:
 +
* [http://geckwiki.com/index.php/GameMode GameMode]
 +
* [http://geckwiki.com/index.php/MenuMode MenuMode]
 +
* [http://cs.elderscrolls.com/index.php?title=ScriptEffectUpdate ScriptEffectUpdate]
 +
Each having specific circumstances when they are running.  All other blocks (e.g. "On<Event>") are one frame occurrence events.  See also [[#Tip-BlockTypeProcessing|TIP: Block Types (Multiple vs Single Frame processing)]].
 +
</div>
 +
 
 +
<span id="Tip-LeveledLists"></span>
 +
 
 +
==== TIP Adding Items to Actors ''aka Leveled Lists'' ====
 +
: Thanks to '''Ladez''' of the Nexus Fallout "New Vegas Mod Talk" forum for the basis of the following:
 +
<div name="Note Box" class="boilerplate metadata" id="Notice Box"
 +
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 +
background-color:#333333;padding:3px;
 +
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 +
">So you've created this fantastic new item (weapon / armor / clothing, etc.) and want it to start appearing in the merchant inventories or NPC loot.  How to go about it without manually placing it in every individual's inventory is the question.
 +
 
 +
The answer is "[http://geckwiki.com/index.php/LeveledItem leveled lists]".  These are lists which can populate inventories of actors when the Player has attained a specified level of experience.  The subject is addressed in the Nexus Forum thread [http://forums.nexusmods.com/index.php?/topic/2219064-adding-items-to-levelled-listsgra Adding Items to Levelled Lists/GRA] and should answer most of your questions, but here is the summary.
 +
 
 +
The basic process is covered in the GECK Wiki under the topic "[http://geckwiki.com/index.php/Adding_items_to_vendors Adding items to vendors]".  Note that avoiding incompatibilities with other mods requires using one of the following three methods:
 +
# create a new container owned by the NPC;
 +
# create a quest/script to add the items to the NPC's existing vendor container;
 +
# create a quest/script to add the items to a vendor's leveled item list.
 +
 
 +
The third method is recommended by experienced mod makers, especially for Actors who are not "merchants", as the best way to assure compatibility with other mods.  Remember: an Actor is it's own "container" and can use anything in it's inventory if the "Use Inventory" checkbox is enabled.  Consider the term "vendor" as a specific example of an "Actor".
 +
 
 +
You need to identify which leveled lists are being used by the Actors you want to have your items, and then add the items to at least one of those lists.  Different "groups" of Actors in different locations (even members of the same faction) may use different lists.
 +
* Find a likely "LeveledCharacter"/NPC under "Actors", "< Double-click >" on the entry to "Edit" it and view the contents of the "Inventory".  Items that appear with a "green box" icon are lists which appear under the "Items" category as "Leveled Item" entries.  For example:
 +
: Under "NPC" is the Editor-ID "188NCRTrooperA", whose inventory contains "CondKnifeLoot" (a "Leveled Item").
 +
: You will find "Leveled Items" under the "Object Window | Items" category.  If you "< Right-click >" on the entry for a "Leveled Item" (such as "CondKnifeLoot") and select the "Use Info" property, you can see what utilizes that item.  Scroll down that list and you want the ones of type "LVLI", which are "Leveled Lists".
 +
<div name="Note Box" class="boilerplate metadata" id="Notice Box"
 +
style="margin:0px 10px 10px 30px;border:1px dashed #DAA520;color: lightgray;
 +
background-color:#333333;padding:3px;
 +
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 +
">'''EPDGaffney''' expanded: When you select the "Use Info" property of an item, you see the "Count" and "Users" columns.  Levelled items will always have a "Count" of "0" because "Count" is how many instances/references are placed in the game cells, as opposed to a container.  Because levelled items can never be placed anywhere but a container (including an Actor of course), they will always have "0" in that column.  "Count" from the "Use Info" property is the same as "Count" in the "Object Window".
 +
 
 +
What makes this really confusing is that you have "Levelled Items" nested inside of other "Lists" inside of other "Lists" and so on, and these can eventually be tracked to a template actor, who has a "Use Count" of "0" because the items are never placed in the game but whose template inventory is used by 100 actors.  Meaning that levelled item with a (Use) "Count" of "0" and 1 "User" will in fact (potentially) be in 100 inventories once you start playing the game.
 +
 
 +
That said, a high "Use Info" Count is going to be reliable in that the item will turn up in the game for sure.  But just look at different merchant inventories to see what's really the best way to go in choosing a list for generally adding your item to the game.</div>
 +
* "Form Lists" are under the GECK "Object Window | Miscellaneous" category.  Find a likely list, "< Double-click >" on the entry to "Edit" it and view the contents of the list to determine how suitable it is for your purposes.  DO NOT manually add your new item directly to this list.  Use one of the three methods above.
 +
 
 +
Note that by default it takes 72 hours in-game for an Actor's "inventory" to get recalculated (updated from a "leveled list").  You can force the inventory to "reset" by calling the [http://geckwiki.com/index.php/ResetInventory ResetInventory] function on the container reference, but remember that "all previously added, removed, or calculated objects will be lost".  See the GECK Wiki entry on "[http://geckwiki.com/index.php/Force_an_actor_to_equip_new_stuff Force an actor to equip new stuff]" as well.
 +
 
 +
The vanilla GECK function is "[http://geckwiki.com/index.php/AddItemToLeveledList AddItemToLeveledList]". As the wiki says: <blockquote>
 +
"This should be used in the RARE case where we want to add an item to a Leveled Item list that already exists in the ESM. Its primary use is for modifying lists from the base game in downloadable content. In most cases you should add items to form lists in the editor object windows. This is for those special cases where you want to alter the contents of a list at runtime or want to change it without putting it in your ESP/ESM file. Once altered using this function, it will persist in the save game data.
 +
 
 +
It can not be undone."
 +
</blockquote>
 +
 
 +
The "Lutana" extension to NVSE (now part of the "JIP LN NVSE" plugin) has the following "leveled list" functions which are preferred as overcoming the drawbacks of the vanilla GECK functions.
 +
* [http://geckwiki.com/index.php/LeveledListAddForm LeveledListAddForm]
 +
* [http://geckwiki.com/index.php/LeveledListRemoveForm LeveledListRemoveForm]
 +
* [http://geckwiki.com/index.php/LeveledListReplaceForm LeveledListReplaceForm]
 +
* [http://geckwiki.com/index.php/LeveledListClear LeveledListClear]
 +
 
 +
So, scripting added items with functions such as ''LeveledListAddForm'' needs to be done every time the game is started.  Most do it at "launch", but it can be done at every "reload" instead.  The vanilla function ''AddItemToLeveledList'' by contrast will save in the "save game" data.  It's not necessarily a bad function if you know how to use it (with a ''bDoOnce'' condition check most likely).  But likewise, modders need to know that the '''Lutana''' functions must be done each session/game load.  Items already spawned will of course remain in inventories if the '''Lutana''' function is called just once, but the items will never turn up anywhere else once the game is closed unless the function is called again next time.
 +
 
 +
Always test from a "new game" file instead of a save game from a play session.
 
</div>
 
</div>
  
<span id="Tip-CheckVariables"></span>
+
<span id="Tip-Conditionals"></span>
 
+
==== TIP Basic '''conditional test''' syntax ====
==== TIP Assigning and Testing variables ====
 
: Thanks to '''Mktavish''' of the Nexus Fallout "New Vegas GECK and Modders" forum for the basis of the following:
 
 
<div name="Note Box" class="boilerplate metadata" id="Notice Box"  
 
<div name="Note Box" class="boilerplate metadata" id="Notice Box"  
 
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 
background-color:#333333;padding:3px;
 
background-color:#333333;padding:3px;
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
">Assigning a value to a variable and then attempting to use that variable immediately afterwards usually doesn't work reliablyThis is because the game engine appears to need at least one frame between the assignment and then being able to have that assigned value available in the variable in the same "action block" (e.g. "GameMode", etc. block).
+
">A "[http://geckwiki.com/index.php/Category:Conditions conditional statement]" (an "IF" is the basic form) consists of a "test condition" (e.g. "<this test must be 'true'>"), '''possibly''' followed by yet another "compound conditional test" which may be regarded as "Either/'''OR'''" '''''or''''' "'''AND'''/Also MUST BE TRUE", all in a single statement which is then followed (in the GECK: on the next line) by the statements to be executed if the overall combined conditional statement is "true" in all respectsThat's a mouthful, but simply put all tests in the same statement must evaluate to 'true' for the statement to be true.  (Qualifier: Only one of the pair of "individual tests" in an '''OR''' "compound conditional test" must be 'true'.)  See [[#TIP:_GECK_parses_the_entire_line_before_evaluating|TIP: GECK parses the entire line before evaluating]].
 +
 +
The question of "encapsulation" (see [[# TIP:_Best_Practice_-_Encapsulation_-_Parens,_Brackets,_and_Braces|TIP: Best Practice - Encapsulation - Parens, Brackets, and Braces]]) most commonly arises with "compound conditional tests".  You could safely use "(parens)" to enclose the basic test, as in: 'If (IsModLoaded "mod.esp")' in the example below, but in general a "''function''" (i.e. "IsModLoaded") followed by a single parameter (i.e. "mod.esp") doesn't require it unless you are getting errors.  ''Functions'' that require more than a single parameter usually do need encapsulation; the type of enclosing characters depending upon the type of function.  "(Parens)" are most common and generally safest when in doubt.  Liberal use of "(parens)" with "compound conditional tests" ensures they are resolved correctly: (e.g. "If (<condition1> OR <condition2>)" means only one of either condition has to be 'true' for the statement to be 'true'.  Whereas "If (<condition1> AND <condition2>)" means both individual conditions must be 'true' for the statement to be 'true'.  You can mix compound conditionals (e.g. "If ( (<test1>) AND (<test2>) OR (<test3>) )" can be misinterpreted; whereas "If ( (<test1>) AND ((<test2>) OR (<test3>)) )" is unambiguous (spaces added for clarify grouping): either <test2> or <test3> can be true, but at least one of them must be true along with <test1> for the entire statement to be 'true'.  If either <test1>, or both of <test2> and <test3> are false, then the statement fails.  However, such can be difficult to debug.  "Compound conditionals" are just another form of "nested conditionals" combined into a single statement.  (See [[#TIP:_Debugging_Compound_Conditionals|TIP: Debugging Compound Conditionals]].) They are best used when you are concerned about the size of your script.  (See [[#TIP:_Script_Size_limit|TIP: Script Size limit]].)
  
The solution is to first check if the variable is set to other than it's default, and if not to then set the variable, and process the "true" condition the next frameFor example:
+
For every "condition" you are checking to be "true" you are also (at least implying) there is a "false" condition that will occur if the test failsThe "conditional block" is made up of the "conditional statement" and is terminated by an appropriate "end" statement (i.e. for an "if" that is an "endif"). Some forms of conditional blocks (such as the "If") permit additional conditional tests to be conducted if the first fails (I.e. "ElseIf <condition>" statements) and a single (optional) "Else" (all is "false") section for when all earlier tests fail.  This basic structure is more fully known as the "If ...( ElseIf) ... (Else) ... EndIf" (aka "If/Else") block where the parentheses indicated the statement is (optional).  But for every "IF" there must be a concluding "ENDIF".  (Notice the different use of case in these various examples.  This is to show that case of the statements, commands, and functions is not important, but adopting a consistent pattern will help to make your script more readable. The case of "parameters" however, may be of importance so it's always worth paying attention to.)
<div name="Note Box" class="boilerplate metadata" id="Notice Box"  
+
style="margin:0px 10px 10px 10px; border:1px dashed #DAA520; color: lightgray; background-color:#424242; padding:3px;
+
So, here is an example of a basic "conditional test":
word-wrap: break-word;      /* Internet Explorer 5.5+ */
+
<pre>
">short DoOnce
+
If IsModLoaded "mod.esp"
Begin GameMode
+
  <some code to run when that mod plugin file is loaded>
: if (DoOnce > 1)
+
; Else - do nothing
: ; Already done once, so leave immediately.
+
EndIf
:: Return
+
</pre>
: elseif (DoOnce == 0)
 
:: set DoOnce to 1 ; to be processed next frame
 
: else
 
: ; do whatever when the value of "DoOnce" is "1", including calling another script (e.g. "QuestScript") if needed.
 
:: set DoOnce to 2 ; signal this has already been done.
 
: endif
 
end</div>
 
  
Other variations on this idea can be implemented as wellA timer can be implemented if longer than one frame's delay seems to be neededRemember that "GameMode" block processing is cumulative in effect from frame to frame.
+
If the test for "mod.esp" fails, the code that follows is skipped down to the "EndIf" statement and resumes processing with the next statement afterwards.  If the test for "mod.esp" succeeds, then all the lines that follow (down to the "EndIf") are then executed in sequence.
 +
 
 +
(I prefer to document implied "Else" statements with comments (the ";" causes everything else on the line to be ignored) in the code so I know that I did consider the implication and what I thought would happen; in case things turn out differently later on.  The implied "Else" here is "do nothing if this mod fails to be loaded".)
 +
 
 +
Note the use of indentation.  This gets to be very important later on as you develop "nested conditions", such as:
 +
<pre>
 +
If <condition1>
 +
  some code if <condition1> is true
 +
  If <condition2>
 +
    some additional code only if <condition2> is true (in addition to <condition1> or we never get here)
 +
  ; Else - do nothing if <condition2> fails
 +
  EndIf
 +
Else ; <condition1> failed - <condition2> was never tested
 +
  <code when <condition1> fails>
 +
EndIf
 +
</pre>
 +
 
 +
Indenting the beginning and ending statements of "blocks" to the same level helps ensure you have correctly matched them up(This is one of the most common syntax errors preventing a script from compiling, and hard to track down otherwise.)
 +
 
 +
An "if / elseif /else" structure is a way of handling a series of specific situations where only one condition can be true (or false) and you want to ensure you have covered all the possibilities.  So think of it conceptually as:
 +
<pre>
 +
If ("test condition1" is "true") then
 +
  take action1
 +
ElseIf ("test condition2" is "true") then
 +
  take action2
 +
ElseIf (as many "test conditions" as needed)
 +
  ...
 +
Else ;no anticipated conditions are true
 +
  take some alternative action indicating "no anticipated result"
 +
EndIf ;this test block is done
 +
</pre>
 +
 
 +
You should always consider what to do if your initial "condition test" fails.  This is where the other statements ("ElseIf" and "Else") come into play.  (They are considered to be part of the same "If / EndIf" block at the same level of nesting, and cannot appear on their own.) Even if you decide to "do nothing", it is helpful to both yourself and others to employ either an explicit or implied "Else" statement which either displays a message to that effect or simply has a comment just so you know what you anticipated at that point when reviewing the code at a later point in time when you may have forgotten details.
 +
 
 +
Use an "ElseIf" only if you want to "test" before you do something in the case where that "condition" may have alternate values.  Otherwise use a simple "Else".
 +
 +
If you do not want to take any action if none of those "test conditions" are true, but don't need to do something when they all fail, then you don't need an "Else" at all.  However, it is often a good idea to place a "debug" message in an "Else" section to indicate that the tests all failed, at least until you know that part of the script is working as intended.  Otherwise the tests all fail and the "EndIf" terminates the test block with no actions or message and "falls through" to the next line of code; which can give a false impression of "success".
 +
 +
The main point is that an "ElseIF" requires another test condition.  An "Else" will only process if no other "If" or "ElseIf" statements were true.  It is a "failsafe" for indicating that the test section was processed.
  
Note that there are only 3 [http://geckwiki.com/index.php/Category:Blocktypes blocktypes] that will continually read the code lines in successive frames:
+
Finally, note that ''"let < var > :="'' is '''NVSE''' syntax.  (Vanilla uses ''"set < var> to < value >"'' syntax.You must have '''NVSE''' loaded when running the GECK (use the '''GECK Extender''': link under [[#Programs_and_Tools|Programs and Tools]]) to use it, (and specify '''NVSE''' as a requirement for your mod if you publish it) or you will get a ''compiler error'' and your users will not be able to get the mod to function correctly without it.  Don't let that stop you as almost everyone has '''NVSE''' installed anyway, but it is important to realize.
* [http://geckwiki.com/index.php/GameMode GameMode]
 
* [http://geckwiki.com/index.php/MenuMode MenuMode]
 
* [http://cs.elderscrolls.com/index.php?title=ScriptEffectUpdate ScriptEffectUpdate]
 
Each having specific circumstances when they are runningAll other blocks (e.g. "On<Event>") are one frame occurrence events. See also [[#Tip-BlockTypeProcessing|TIP: Block Types (Multiple vs Single Frame processing)]].
 
 
</div>
 
</div>
  
<span id="Tip-LeveledLists"></span>
+
<span id="BlockTypeProcessing"></span>
  
==== TIP Adding Items to Actors ''aka Leveled Lists'' ====
+
==== TIP Block Types ''Multiple vs Single Frame processing'' ====
: Thanks to '''Ladez''' of the Nexus Fallout "New Vegas Mod Talk" forum for the basis of the following:
 
 
<div name="Note Box" class="boilerplate metadata" id="Notice Box"  
 
<div name="Note Box" class="boilerplate metadata" id="Notice Box"  
 
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 
background-color:#333333;padding:3px;
 
background-color:#333333;padding:3px;
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
">So you've created this fantastic new item (weapon / armor / clothing, etc.) and want it to start appearing in the merchant inventories or NPC lootHow to go about it without manually placing it in every individual's inventory is the question.
+
">When creating a script it is important to use the correct "[http://geckwiki.com/index.php/Blocktype Block Type]" to contain it. A "block" is bounded by a "Begin <type mode>" line and an "End" line.  The most commonly used is the "GameMode" block, but many beginning script authors don't know why that is the caseIt has to do with the issue of "single frame" versus "multiple frame" processing of the scripts within a given block type.
  
The answer is "[http://geckwiki.com/index.php/LeveledItem leveled lists]".  These are lists which can populate inventories of actors when the Player has attained a specified level of experience.  The subject is addressed in the Nexus Forum thread [http://forums.nexusmods.com/index.php?/topic/2219064-adding-items-to-levelled-listsgra Adding Items to Levelled Lists/GRA] and should answer most of your questions, but here is the summary.
+
The term "frame" here is used very much the same as in "frames per second (FPS)" rendered on the displayBut for a script, it is more accurate to think of it as a single "pass" of the game engine through the code within a block.
  
The basic process is covered in the GECK Wiki under the topic "[http://geckwiki.com/index.php/Adding_items_to_vendors Adding items to vendors]".  Note that avoiding incompatibilities with other mods requires using one of the following three methods:
+
A "single frame" block type only gets one pass through it's code when it gets triggered. This means if the code is structured such that it needs to be processed multiple times to get the correct result, but is placed in a "single frame" block type, it will not produce a correct result.  It only gets one "pass through" for evaluation.  Such blocks do not retain "intermediate result (temporary) values" in variables between calls.  Every time it is called, it is starting from a "clean slate".  Even it's "locally defined variables" (those defined within that script) have been reset to null values.  Only "[http://geckwiki.com/index.php/List_of_Global_Variables Global Variables]" or those "inherited" (defined in another script (typically a "quest script"), which in turn calls the script in question), can pass values between "scripts" or "frames".  (This "range of visibility" of variables between different parts of the code is called the "[http://en.wikipedia.org/wiki/Scope_(computer_science) scope]" of the variable.)
# create a new container owned by the NPC;
 
# create a quest/script to add the items to the NPC's existing vendor container;
 
# create a quest/script to add the items to a vendor's leveled item list.
 
  
The third method is recommended by experienced mod makers, especially for Actors who are not "merchants", as the best way to assure compatibility with other mods. Remember: an Actor is it's own "container" and can use anything in it's inventory if the "Use Inventory" checkbox is enabled. Consider the term "vendor" as a specific example of an "Actor".
+
There are only three "multiple frame" block types, which retain "intermediate result values" between successive frames:
 +
* [http://geckwiki.com/index.php/GameMode GameMode]
 +
* [http://geckwiki.com/index.php/MenuMode MenuMode]
 +
* [http://cs.elderscrolls.com/index.php?title=ScriptEffectUpdate ScriptEffectUpdate]
 +
Each having specific circumstances when they are running. All other blocks (e.g. "On<Event>") are one frame occurrence events.  
  
You need to identify which leveled lists are being used by the Actors you want to have your items, and then add the items to at least one of those lists.  Different "groups" of Actors in different locations (even members of the same faction) may use different lists.
+
Consequently, if your code requires a "loop" structure or more than one pass through it's conditional logic to get the final result, it must be moved out of a "single frame" block and into a "multiple frame" type.  "Loops" are easy to spot; "conditional logic trees" can sometimes be trickier. Some things to watch out for:
* Find a likely "LeveledCharacter"/NPC under "Actors", "< Double-click >" on the entry to "Edit" it and view the contents of the "Inventory".  Items that appear with a "green box" icon are lists which appear under the "Items" category as "Leveled Item" entries.  For example:
 
: Under "NPC" is the Editor-ID "188NCRTrooperA", whose inventory contains "CondKnifeLoot" (a "Leveled Item").
 
: You will find "Leveled Items" under the "Object Window | Items" category.  If you "< Right-click >" on the entry for a "Leveled Item" (such as "CondKnifeLoot") and select the "Use Info" property, you can see what utilizes that itemScroll down that list and you want the ones of type "LVLI", which are "Leveled Lists".
 
<div name="Note Box" class="boilerplate metadata" id="Notice Box"
 
style="margin:0px 10px 10px 30px;border:1px dashed #DAA520;color: lightgray;
 
background-color:#333333;padding:3px;
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 
">'''EPDGaffney''' expanded: When you select the "Use Info" property of an item, you see the "Count" and "Users" columns.  Levelled items will always have a "Count" of "0" because "Count" is how many instances/references are placed in the game cells, as opposed to a container.  Because levelled items can never be placed anywhere but a container (including an Actor of course), they will always have "0" in that column.  "Count" from the "Use Info" property is the same as "Count" in the "Object Window".
 
  
What makes this really confusing is that you have "Levelled Items" nested inside of other "Lists" inside of other "Lists" and so on, and these can eventually be tracked to a template actor, who has a "Use Count" of "0" because the items are never placed in the game but whose template inventory is used by 100 actors.  Meaning that levelled item with a (Use) "Count" of "0" and 1 "User" will in fact (potentially) be in 100 inventories once you start playing the game.
+
* "Gateway" conditions, such as "If bDoOnce == 0".  This implies a second pass is required for the occassion when "bDoOnce == 1" logic to get applied.  If "bDoOnce" is defined "globally" or "inherited", then it will retain it's value between calls, so it is not automatically disqualified from a "single frame" block type, but if defined "locally" then it will always be "0".
  
That said, a high "Use Info" Count is going to be reliable in that the item will turn up in the game for sure.  But just look at different merchant inventories to see what's really the best way to go in choosing a list for generally adding your item to the game.</div>
+
* Any logic depending upon a conditional test using a locally defined variableSuch a test is only valid if the value of the variable is assigned during that initial pass and ALL actions depending upon that value are performed in that same passThis means only one code branch of an "If ... ElseIf ... Else ... EndIf" logic tree will be processed.
* "Form Lists" are under the GECK "Object Window | Miscellaneous" categoryFind a likely list, "< Double-click >" on the entry to "Edit" it and view the contents of the list to determine how suitable it is for your purposes.  DO NOT manually add your new item directly to this listUse one of the three methods above.
 
  
Note that by default it takes 72 hours in-game for an Actor's "inventory" to get recalculated (updated from a "leveled list").  You can force the inventory to "reset" by calling the [http://geckwiki.com/index.php/ResetInventory ResetInventory] function on the container reference, but remember that "all previously added, removed, or calculated objects will be lost". See the GECK Wiki entry on "[http://geckwiki.com/index.php/Force_an_actor_to_equip_new_stuff Force an actor to equip new stuff]" as well.
+
By bearing in mind "single" versus "multiple" frame block types, some "unexplained" code behavior can be understood and rectified.
 +
</div>
  
The vanilla GECK function is "[http://geckwiki.com/index.php/AddItemToLeveledList AddItemToLeveledList]". As the wiki says: <blockquote>
+
<span id="Tip-CompilingScripts"></span>
"This should be used in the RARE case where we want to add an item to a Leveled Item list that already exists in the ESM. Its primary use is for modifying lists from the base game in downloadable content. In most cases you should add items to form lists in the editor object windows. This is for those special cases where you want to alter the contents of a list at runtime or want to change it without putting it in your ESP/ESM file. Once altered using this function, it will persist in the save game data.
 
  
It can not be undone."
+
==== TIP Compiling Scripts ====
</blockquote>
 
 
 
The "Lutana" extension to NVSE (now part of the "JIP LN NVSE" plugin) has the following "leveled list" functions which are preferred as overcoming the drawbacks of the vanilla GECK functions.
 
* [http://geckwiki.com/index.php/LeveledListAddForm LeveledListAddForm]
 
* [http://geckwiki.com/index.php/LeveledListRemoveForm LeveledListRemoveForm]
 
* [http://geckwiki.com/index.php/LeveledListReplaceForm LeveledListReplaceForm]
 
* [http://geckwiki.com/index.php/LeveledListClear LeveledListClear]
 
 
 
So, scripting added items with functions such as ''LeveledListAddForm'' needs to be done every time the game is started.  Most do it at "launch", but it can be done at every "reload" instead.  The vanilla function ''AddItemToLeveledList'' by contrast will save in the "save game" data.  It's not necessarily a bad function if you know how to use it (with a ''bDoOnce'' condition check most likely).  But likewise, modders need to know that the '''Lutana''' functions must be done each session/game load.  Items already spawned will of course remain in inventories if the '''Lutana''' function is called just once, but the items will never turn up anywhere else once the game is closed unless the function is called again next time.
 
 
 
Always test from a "new game" file instead of a save game from a play session.
 
</div>
 
 
 
<span id="Tip-Conditionals"></span>
 
==== TIP Basic '''conditional test''' syntax ====
 
 
<div name="Note Box" class="boilerplate metadata" id="Notice Box"  
 
<div name="Note Box" class="boilerplate metadata" id="Notice Box"  
 
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 
background-color:#333333;padding:3px;
 
background-color:#333333;padding:3px;
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
">A "[http://geckwiki.com/index.php/Category:Conditions conditional statement]" (an "IF" is the basic form) consists of a "test condition" (e.g. "<this test must be 'true'>"), '''possibly''' followed by yet another "compound conditional test" which may be regarded as "Either/'''OR'''" '''''or''''' "'''AND'''/Also MUST BE TRUE", all in a single statement which is then followed (in the GECK: on the next line) by the statements to be executed if the overall combined conditional statement is "true" in all respectsThat's a mouthful, but simply put all tests in the same statement must evaluate to 'true' for the statement to be true(Qualifier: Only one of the pair of "individual tests" in an '''OR''' "compound conditional test" must be 'true'.)  See [[#TIP:_GECK_parses_the_entire_line_before_evaluating|TIP: GECK parses the entire line before evaluating]].
+
">You may notice error messages that report "script is not compiled".  This may cause some confusion, so to clarify the situation:<br>
   
+
The GECK ''compiles'' a script when saving it. This means it turns the "human readable" instructions into binary "machine code".  This is more efficient for the game engine to process.  Editing and saving a script individually is the preferred method of ''compiling''.  A script that is not ''compiled'' will still run as long as it is properly constructed; without any errors.  But ''compiling'' is usually the only way to ensure the script is error free.<br>
The question of "encapsulation" (see [[# TIP:_Best_Practice_-_Encapsulation_-_Parens,_Brackets,_and_Braces|TIP: Best Practice - Encapsulation - Parens, Brackets, and Braces]]) most commonly arises with "compound conditional tests". You could safely use "(parens)" to enclose the basic test, as in: 'If (IsModLoaded "mod.esp")' in the example below, but in general a "''function''" (i.e. "IsModLoaded") followed by a single parameter (i.e. "mod.esp") doesn't require it unless you are getting errors.  ''Functions'' that require more than a single parameter usually do need encapsulation; the type of enclosing characters depending upon the type of function"(Parens)" are most common and generally safest when in doubt.  Liberal use of "(parens)" with "compound conditional tests" ensures they are resolved correctly: (e.g. "If (<condition1> OR <condition2>)" means only one of either condition has to be 'true' for the statement to be 'true'.  Whereas "If (<condition1> AND <condition2>)" means both individual conditions must be 'true' for the statement to be 'true'.  You can mix compound conditionals (e.g. "If ( (<test1>) AND (<test2>) OR (<test3>) )" can be misinterpreted; whereas "If ( (<test1>) AND ((<test2>) OR (<test3>)) )" is unambiguous (spaces added for clarify grouping): either <test2> or <test3> can be true, but at least one of them must be true along with <test1> for the entire statement to be 'true'. If either <test1>, or both of <test2> and <test3> are false, then the statement fails.  However, such can be difficult to debug.  "Compound conditionals" are just another form of "nested conditionals" combined into a single statement.  (See [[#TIP:_Debugging_Compound_Conditionals|TIP: Debugging Compound Conditionals]].)  They are best used when you are concerned about the size of your script.  (See [[#TIP:_Script_Size_limit|TIP: Script Size limit]].)
+
If you can't exit your GECK session, it's usually because you failed to actually save/compile a script due to an error.  If you are not using the '''GECK''' '''Extender''' or '''Powerup''' plugin (see the [[#Programs_and_Tools|Programs and Tools]] section), this can happen without any error message being displayed to indicate it failedYou may find yourself forced to revert to a backup or remove the script which refuses to compileTake precautions.<br>
 +
<span style="margin:0px 10px 10px 0px; border:1px solid #cc3333; color: red;
 +
background-color:#fff5f5;padding:3px;
 +
/* Remove the next four 'white-space' lines to restore default white-space processing. */
 +
white-space: pre-wrap;      /* css-3 */
 +
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
 +
white-space: -pre-wrap;      /* Opera 4-6 */
 +
white-space: -o-pre-wrap;    /* Opera 7+ */
 +
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 +
">WARNING: There is a ''compile all'' command in the GECK script editor, but it compiles ALL the scripts that are currently loaded into the GECK ('''including by default''' all, numbering in the thousands, from the vanilla ESMs), regardless of their source plugin INTO YOUR PLUGIN, which will consequently override those scripts in any other pluginThis is best avoided (as in '''"never used"''') unless you really understand all the ramifications.</span>
 +
</div>
  
For every "condition" you are checking to be "true" you are also (at least implying) there is a "false" condition that will occur if the test fails.  The "conditional block" is made up of the "conditional statement" and is terminated by an appropriate "end" statement (i.e. for an "if" that is an "endif").  Some forms of conditional blocks (such as the "If") permit additional conditional tests to be conducted if the first fails (I.e. "ElseIf <condition>" statements) and a single (optional) "Else" (all is "false") section for when all earlier tests fail.  This basic structure is more fully known as the "If ...( ElseIf) ... (Else) ... EndIf" (aka "If/Else") block where the parentheses indicated the statement is (optional).  But for every "IF" there must be a concluding "ENDIF".  (Notice the different use of case in these various examples.  This is to show that case of the statements, commands, and functions is not important, but adopting a consistent pattern will help to make your script more readable.  The case of "parameters" however, may be of importance so it's always worth paying attention to.)
+
<span id="Tip-CorpseOddness"></span>
 
So, here is an example of a basic "conditional test":
 
<pre>
 
If IsModLoaded "mod.esp"
 
  <some code to run when that mod plugin file is loaded>
 
; Else - do nothing
 
EndIf
 
</pre>
 
  
If the test for "mod.esp" fails, the code that follows is skipped down to the "EndIf" statement and resumes processing with the next statement afterwardsIf the test for "mod.esp" succeeds, then all the lines that follow (down to the "EndIf") are then executed in sequence.
+
==== TIP ''Corpses'' are not Actors or Objects ====
 +
: Thanks to '''EPDGaffney''' of the Nexus Fallout "New Vegas GECK and Modders" forum for the basis of the following:
 +
<div name="Note Box" class="boilerplate metadata" id="Notice Box"
 +
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 +
background-color:#333333;padding:3px;
 +
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 +
">Trying to get a ''Trigger Box'' to react to a "corpse" falling through it fails to workApparently "dead actors" are not considered by the game engine to be either '''Actors''' or '''Objects''' as far as functions and events depending upon one or the other are concerned.
 +
</div>
  
(I prefer to document implied "Else" statements with comments (the ";" causes everything else on the line to be ignored) in the code so I know that I did consider the implication and what I thought would happen; in case things turn out differently later on.  The implied "Else" here is "do nothing if this mod fails to be loaded".)
+
<span id="Tip-CompoundConditionals"></span>
 +
==== TIP Debugging Compound Conditionals ====
 +
<div name="Note Box" class="boilerplate metadata" id="Notice Box"  
 +
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 +
background-color:#333333;padding:3px;
 +
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 +
">Here's a programming tip for when a compound conditional (multiple tests on the same line) is not working as expected: split it up into nested conditions.  An "ElseIf" is equivalent to an "OR (||)" compound (assuming the "[do something]" portion is identical in both the "If" and "ElseIf" portions of the block), and each nested "If" statement is equivalent to an "AND (&&)" compound.
  
Note the use of indentation. This gets to be very important later on as you develop "nested conditions", such as:
+
So, using the example: "If (GetHitLocation == 1 || GetHitLocation == 2) && (rTarget.GetDead != 1) && (rTarget.GetIsCreature != 1)", change it into:
 
<pre>
 
<pre>
If <condition1>
+
If (GetHitLocation == 1 || GetHitLocation == 2)
  some code if <condition1> is true
+
    ; NVSE required: PrintD (string:expression), DBPrintC (formatted string)
  If <condition2>
+
    DBPrintC "Script [HeadshotAmmoSCRIPT], GetHitLocation = [%g].", GetHitLocation
     some additional code only if <condition2> is true (in addition to <condition1> or we never get here)
+
 
  ; Else - do nothing if <condition2> fails
+
    If (rTarget.GetDead != 1)
  EndIf
+
        ; NVSE required: PrintD (string:expression), DBPrintC (formatted string)
Else ; <condition1> failed - <condition2> was never tested
+
        PrintD "Script [HeadshotAmmoSCRIPT], rTarget.GetDead = [" + $(rTarget.GetDead) + "]."
  <code when <condition1> fails>
+
 
EndIf
+
        If (rTarget.GetIsCreature != 1)
 +
            ; NVSE required: PrintD (string:expression), DBPrintC (formatted string)
 +
            PrintD "Script [HeadshotAmmoSCRIPT], rTarget.GetIsCreature = [" + $(rTarget.GetIsCreature) + "]."
 +
 
 +
            ForceActorValue Health 0
 +
        Else ; (Can be dropped if you just want it to totally fail.)
 +
            ; [do something]
 +
        Endif
 +
     Else; (Can be dropped if you just want it to totally fail.)
 +
        ; [do something]
 +
    Endif
 +
Else
 +
    ; [do something]
 +
EndIf  
 
</pre>
 
</pre>
 +
Insert "debug messages" (examples given) as required to pin down what values your conditions are actually testing.  That should quickly isolate what is not as expected.  (I just repeat the '; NVSE required' comment line to remind myself of the required syntax differences with each line.  Not required otherwise.)
  
Indenting the beginning and ending statements of "blocks" to the same level helps ensure you have correctly matched them up.  (This is one of the most common syntax errors preventing a script from compiling, and hard to track down otherwise.)
+
Use the game console "bat <filename>" command to run a "batch file" similar to this ("_MyDebug.bat") to trigger the debug print statements when testing.  You can type any series of console commands (one per line) into a Notepad or other plaintext editor file and save as a simple DOS text file.  The filename extension doesn't matter, and can be dropped when entering the command as the console ignores it if found, but the standard for all "batch files" is ".bat".  The file should be placed in the game root folder (where the game EXE file is found).  If the filename includes "spaces" then you need to enclose it in double quotation marks (i.e. type <bat "_My Debug File">).  See also: [[#Tip-Debugging|TIP: Debugging data to file.]]
 +
* _MyDebug.bat:
 +
<pre>
 +
con_SCOF "_MyDebug.log" ; Output console messages to file "_MyDebug.log" in current directory
 +
DBMode 1 65            ; "Enable Debug mode" command using decimal mod index
 +
                        ; Most common reason for failure: incorrect decimal mod index for <ModPluginName>
 +
                        ; NVSE required: PrintD (string:expression), DBPrint[C] (formatted string)
 +
DBPrintC "Starting log for mod index 65(0x41) (<ModPluginName>) ..."  ; descriptive initialization message
 +
</pre>
 +
Without that "Enable Debug mode" command the debug print statements won't actually do anything normallyThe "semicolon" (;) signals an ignored comment from that point to the end of the line, but is not required except to explain the purpose of each command.
  
Finally, note that ''"let < var > :="'' is '''NVSE''' syntax(Vanilla uses ''"set < var> to < value >"'' syntax.)  You must have '''NVSE''' loaded when running the GECK (use the '''GECK Extender''': link under [[#Programs_and_Tools|Programs and Tools]]) to use it, (and specify '''NVSE''' as a requirement for your mod if you publish it) or you will get a ''compiler error'' and your users will not be able to get the mod to function correctly without it.  Don't let that stop you as almost everyone has '''NVSE''' installed anyway, but it is important to realize.
+
Place your "batch file" in the game root folder (where the "FalloutNV.exe" file is found)The filename begins with an "underscore" (_) so it will be sorted to the top of the file list, making it easy to locate.</div>
</div>
 
  
<span id="BlockTypeProcessing"></span>
+
<span id="Tip-Debugging"></span>
==== TIP Block Types ''Multiple vs Single Frame processing'' ====
+
==== TIP Debugging data to file ====
 +
: Thanks to '''DoctaSax''' of the Nexus Fallout "New Vegas GECK and Modders" forum for help with the following.
 
<div name="Note Box" class="boilerplate metadata" id="Notice Box"  
 
<div name="Note Box" class="boilerplate metadata" id="Notice Box"  
 
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 
background-color:#333333;padding:3px;
 
background-color:#333333;padding:3px;
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
">When creating a script it is important to use the correct "[http://geckwiki.com/index.php/Blocktype Block Type]" to contain it. A "block" is bounded by a "Begin <type mode>" line and an "End" line.  The most commonly used is the "GameMode" block, but many beginning script authors don't know why that is the case.  It has to do with the issue of "single frame" versus "multiple frame" processing of the scripts within a given block type.
+
">The built-in mechanism for debugging is to display messages to the console (or HUD) screen.  The console has a [http://geck.bethsoft.com/index.php?title=ToggleDebugText ToggleDebugText] function, which toggles an extra debug display to the console with 23 screens of data that can be paged through using the < Scroll Lock > key.<br>
 +
There is a list of "designer" debug tools, many of which are disabled in the retail version but may have been or eventually will be provided in a "script extender", listed for posterity here:
 +
* [http://geck.bethsoft.com/index.php?title=Category:Designer_Debug_Tools Designer Debug Tools].
 +
* [http://geck.bethsoft.com/index.php?title=Category:Console_Functions Console Functions]
  
The term "frame" here is used very much the same as in "frames per second (FPS)" rendered on the displayBut for a script, it is more accurate to think of it as a single "pass" of the game engine through the code within a block.
+
To enable the console, make sure the ''bAllowConsole=1'' setting is in your game INI file.  The console can then be accessed in-game by toggling the 'tilde key' (the actual key can be <~>, <º>, <¬>, <|>,<^>, <\>, <§>, etc., depending on your keyboard layout), usually found near the "1" key across the top of most keyboards.  The console prompt will appear as a single blank line in the lower left-hand corner of your screen. You can scroll the console output using the "Page Up" and "Page Down" keys. The console is not case sensitive: entering any of "tdt" or "TDT" or "TdT" will toggle the debugging text.  More general information on the console can be found on the [http://en.uesp.net/wiki/Oblivion:Console UESP wiki] and holds true for later games.  Use "#" anywhere on a line to make everything after that symbol into a comment.<br>
 +
<br>
 +
The forum article [http://www.nextgenupdate.com/forums/skyrim/560544-pc-skyrim-console-script-bat-file-compilation.html Skyrim Console Script/Bat File Compilation] is a tutorial with lots of information and ideas that can (with the appropriate changes) be used for other games.<br>
 +
<br>
 +
If you use NVSE (at least while developing/testing your scripts), you can use the [http://geck.foesmm.org/index.php/SetDebugMode SetDebugMode] command from FOSE (all of which are supported by NVSE) as a toggle for debug messages.<br>
 +
Then you can test if this mode has been enabled in your script with: <pre>if GetDebugMode ... endif</pre> or control the output to only appear by using commands with built-in checks such as [https://geck.foesmm.org/index.php/DebugPrint DebugPrint] or [https://geck.foesmm.org/index.php/PrintDebug PrintDebug].<br>
 +
Note the distinction between these two types of commands.<br>
 +
* The "DebugPrint" command, like "PrintToConsole" ([http://geck.foesmm.org/index.php/Print PrintC]), only accepts a string with optional "string format" specifiers as parameters (e.g. "my string: %g", iSomeNumber).<br>
 +
* The "PrintD/PrintDebug" command on the other hand, like [http://geck.foesmm.org/index.php/Print Print], requires "string expressions": concatenated strings, string-returning functions, or [http://geck.foesmm.org/index.php/ToString ToString]'ed forms and numbers.<br>
 +
* Don't mix the two types of message string formats. So it's either:
 +
<pre>
 +
set iStage to GetStage <Quest EditorID>
 +
DBPrintC "Failed blah blah [%g], QStage [%g].", <Quest EditorID>.<QuestVariable>, iStage
 +
</pre>
 +
or<br>
 +
<pre>
 +
PrintD "Failed blah blah bark = [" + $(<Quest EditorID>.<QuestVariable>) + "], QStage [" + $(GetStage etc- + "']."
 +
</pre><br>
 +
* Other forms of "Print" has similar distinct requirements for their messagesPay attention to their description's syntax.<br>
 +
<br>
 +
Often you want to know the state of various elements that are not stored in variables, for output.  A fairly common example of this is to print the current "Stage" in a "Quest".  You can use the "GetStage <Quest EditorID>" function in a conditional statement (e.g. ''If ( GetStage VT47 == 10 )'', but that by itself won't work as a parameter to a "PrintC" command.  Fortunately NVSE v4 added the [http://geck.foesmm.org/index.php/ToString ToString] function (abbreviated as the "$" symbol) which can be used to turn an "expression" into a string value (e.g. <span style="margin:0px 10px 10px 10px; border:1px dashed #DAA520; color: lightgray; background-color:#333333; padding:3px;">PrintD "Active Quest [" + $(GetActiveQuest) + "Stage = [" + $(GetStage <Quest EditorID>) + "]."</span>).  Note the spaces separating the string concatenation "+" symbols are required.  Also that the "GetActiveQuest" function returns a ''RefID'' which is normally not printable but "$" converts into a string.<br>
 +
<br>
 +
Sometimes simply displaying messages to the screen or console is not sufficient to trace a problem.  NVSE provides a number of functions enabling you to dump debugging information to a text file.  These functions, and examples of how to use them, are listed on the GECK wiki under the subject [http://geck.bethsoft.com/index.php?title=Debug_Dumps Debug Dumps].  They all reference sending messages to the "console".  You need to first use the [http://geck.foesmm.org/index.php/Con_SCOF Con_SCOF] command to redirect console messages to a text file instead.<br>
 +
<br>
 +
When you need to send a sequence of commands to the console one immediately after the other, it is often useful to put them (one per line) into a plaintext "batch" file (e.g. "'''enabledebugfile.txt'''") placed in the game root folder, the same folder as the game executable (i.e. "<path>\common\Fallout New Vegas"), and use the console command "bat <filename>" (no extension and without the quotes) to run it (e.g. "bat '''enabledebugfile'''").<br>
 +
Example ''''enabledebugfile.txt'''' file:<br>
 +
<pre>con_SCOF "_Debug.log"  # "_" is to cause the file to sort to beginning of Windows Explorer filenames
 +
DBMode 1 61                # '61' is 'mod index' in decimal
 +
DBPrintC "Starting log for mod index 61(0x3D) (<mod name>) ..."</pre>
 +
</div>
  
A "single frame" block type only gets one pass through it's code when it gets triggered. This means if the code is structured such that it needs to be processed multiple times to get the correct result, but is placed in a "single frame" block type, it will not produce a correct result.  It only gets one "pass through" for evaluation. Such blocks do not retain "intermediate result (temporary) values" in variables between calls.  Every time it is called, it is starting from a "clean slate".  Even it's "locally defined variables" (those defined within that script) have been reset to null values.  Only "[http://geckwiki.com/index.php/List_of_Global_Variables Global Variables]" or those "inherited" (defined in another script (typically a "quest script"), which in turn calls the script in question), can pass values between "scripts" or "frames". (This "range of visibility" of variables between different parts of the code is called the "[http://en.wikipedia.org/wiki/Scope_(computer_science) scope]" of the variable.)
+
<span id="Tip-DismemberingCorpse"></span>
 +
==== TIP Dismembering a corpse ====
 +
: Thanks to '''madmongo''' of the Nexus Fallout "New Vegas GECK and Modders" forum for the following.
 +
<div name="Note Box" class="boilerplate metadata" id="Notice Box"  
 +
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 +
background-color:#333333;padding:3px;
 +
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 +
">According to the game [lore], there were a bunch of people beheaded in Nipton, but there were no beheaded bodies. So I created a bunch of NPCs and had them immediately get beheaded as soon as they spawned. This is the script I used:
 +
<pre>
 +
scn zzMongoBeheadedScript
  
There are only three "multiple frame" block types, which retain "intermediate result values" between successive frames:
+
Begin GameMode
* [http://geckwiki.com/index.php/GameMode GameMode]
+
    If (GetDead == 0)
* [http://geckwiki.com/index.php/MenuMode MenuMode]
+
        Kill zzMongoCrucDead1REF 1 -1
* [http://cs.elderscrolls.com/index.php?title=ScriptEffectUpdate ScriptEffectUpdate]
+
    Endif
Each having specific circumstances when they are running. All other blocks (e.g. "On<Event>") are one frame occurrence events.  
+
End</pre>
 +
Just give this script, or rather your modified version of it, to your NPC in the dialog box where you define the NPC, under the ID and name. You probably know this already, but just making sure.
  
Consequently, if your code requires a "loop" structure or more than one pass through it's conditional logic to get the final result, it must be moved out of a "single frame" block and into a "multiple frame" type.  "Loops" are easy to spot; "conditional logic trees" can sometimes be trickier. Some things to watch out for:
+
{The "kill" command is a shorthand name for the [http://geck.technodeep.net/index.php/KillActor KillActor] function.  You could use the "[ActorRef].command" syntax to make it explicitly clear who is the object of the command (being affected by it).  When the script is attached to an NPC via dialog, they become the implied "ActorRef".  Think of the "[ActorRef].command" syntax as "[subject].action [parameters]".  The "[]" are used to indicate it is an "optional" component of the function.}
  
* "Gateway" conditions, such as "If bDoOnce == 0".  This implies a second pass is required for the occassion when "bDoOnce == 1" logic to get applied. If "bDoOnce" is defined "globally" or "inherited", then it will retain it's value between calls, so it is not automatically disqualified from a "single frame" block type, but if defined "locally" then it will always be "0".
+
'''zzMongoCrucDead1REF''' is one of the beheaded NPCs. Basically, by using him as the killer, he gets blamed for all of the deaths and not the player or anyone else (prevents any factions from getting angry at the player or with other factions). "1" is the dismembered part, which in this case is the head. You'll want to change this for your exploded NPC. "-1" is the cause of death, which you will want to change to "0" for {an} explosion. The documentation for {the function} [http://geck.technodeep.net/index.php/GetCauseofDeath GetCauseofDeath] has a list of values for the cause of death.
  
* Any logic depending upon a conditional test using a locally defined variableSuch a test is only valid if the value of the variable is assigned during that initial pass and ALL actions depending upon that value are performed in that same pass.  This means only one code branch of an "If ... ElseIf ... Else ... EndIf" logic tree will be processed.
+
There are ready-to-use scripts available for several combinations of dismemberments in the GECK alreadyTo use them, drop a new cubic activator in the cell where you want to use it and point it to one of the "GenericDismembermentXXX" base forms. Then set its linked reference to the corpse that you want to dismember.
 
 
By bearing in mind "single" versus "multiple" frame block types, some "unexplained" code behavior can be understood and rectified.
 
 
</div>
 
</div>
  
<span id="Tip-CompilingScripts"></span>
+
<span id="Tip-Dispel"></span>
 
+
==== TIP Dispel Effect ====
==== TIP Compiling Scripts ====
+
: Thanks to '''DoctaSax''' of the Nexus Fallout "New Vegas GECK and Modders" forum for the basis of the following:
 
<div name="Note Box" class="boilerplate metadata" id="Notice Box"  
 
<div name="Note Box" class="boilerplate metadata" id="Notice Box"  
 
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 
background-color:#333333;padding:3px;
 
background-color:#333333;padding:3px;
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
">You may notice error messages that report "script is not compiled".  This may cause some confusion, so to clarify the situation:<br>
+
">A [http://geck.technodeep.net/index.php/Dispel Dispel] function call often doesn't take effect immediatelyThere is also a risk the spell will stick on any creature for which the code doesn't apply (depending upon the type of duration set, of course).  The following is a "good practice" trick for scripted spells (aka [http://geck.technodeep.net/index.php/Actor_Effect Actor Effect]) to keep in mind.
The GECK ''compiles'' a script when saving it. This means it turns the "human readable" instructions into binary "machine code". This is more efficient for the game engine to process. Editing and saving a script individually is the preferred method of ''compiling''.  A script that is not ''compiled'' will still run as long as it is properly constructed; without any errors.  But ''compiling'' is usually the only way to ensure the script is error free.<br>
 
If you can't exit your GECK session, it's usually because you failed to actually save/compile a script due to an error.  If you are not using the '''GECK''' '''Extender''' or '''Powerup''' plugin (see the [[#Programs_and_Tools|Programs and Tools]] section), this can happen without any error message being displayed to indicate it failedYou may find yourself forced to revert to a backup or remove the script which refuses to compile.  Take precautions.<br>
 
<span style="margin:0px 10px 10px 0px; border:1px solid #cc3333; color: red;
 
background-color:#fff5f5;padding:3px;
 
/* Remove the next four 'white-space' lines to restore default white-space processing. */
 
white-space: pre-wrap;      /* css-3 */
 
white-space: -moz-pre-wrap;  /* Mozilla, since 1999 */
 
white-space: -pre-wrap;      /* Opera 4-6 */
 
white-space: -o-pre-wrap;    /* Opera 7+ */
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 
">WARNING: There is a ''compile all'' command in the GECK script editor, but it compiles ALL the scripts that are currently loaded into the GECK ('''including by default''' all, numbering in the thousands, from the vanilla ESMs), regardless of their source plugin INTO YOUR PLUGIN, which will consequently override those scripts in any other plugin.  This is best avoided (as in '''"never used"''') unless you really understand all the ramifications.</span>
 
</div>
 
  
<span id="Tip-CorpseOddness"></span>
+
At the end of your ''ScriptEffectStart'' Block:
 +
<pre>
 +
else
 +
  set DoOnce to 2 ; (or some appropriate value)
 +
endif</pre>
  
==== TIP ''Corpses'' are not Actors or Objects ====
+
and at the top of your ''ScriptEffectUpdate'' Block:
: Thanks to '''EPDGaffney''' of the Nexus Fallout "New Vegas GECK and Modders" forum for the basis of the following:
+
<pre>
 +
if DoOnce == 2
 +
  dispel <YourSpell/ActorEffect>
 +
  return
 +
endif
 +
</pre>
 +
</div>
 +
 
 +
<span id="Tip-EventHandler"></span>
 +
==== TIP Do not overlook '''EventHandlers''' ====
 
<div name="Note Box" class="boilerplate metadata" id="Notice Box"  
 
<div name="Note Box" class="boilerplate metadata" id="Notice Box"  
 
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 
background-color:#333333;padding:3px;
 
background-color:#333333;padding:3px;
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
">Trying to get a ''Trigger Box'' to react to a "corpse" falling through it fails to workApparently "dead actors" are not considered by the game engine to be either '''Actors''' or '''Objects''' as far as functions and events depending upon one or the other are concerned.
+
">
 +
When you want to do something affecting multiple Actors, such as providing a particular dialog option or behavior, instead of editing their scripts directly consider using an '''NVSE''' [http://geck.technodeep.net/index.php/Event_Handling Event Handler] instead (functionality added by '''NVSE 4.6+''').
 +
 
 +
'''EventHandlers''' provide the very powerful ability to "trick" the game engine into supplementing or overriding the limitations of the standard GECK "On<Event>" functions such as "OnAdd", "OnActivate", or "OnEquip" into running a script to emulate something else in a "User Defined Function" (UDF)A simple example of this is the "Note EventHandler" script and UDF in [[#Tip-Notes|TIP: Passing a 'Note' to the player]], which is using this technique to "trick" the engine into running a script as if the note had been triggered by an "OnEquip" or "OnActivate" function without ever using either command. In this example instance: by a mouse click or key press in a menu instead.  See also [[#Tip-HotKeyEventHandler|Tip: EventHandler-HotKey]].
 +
 
 +
Note that just using an '''EventHandler''' isn't sufficient.  The normal activation Event will still need to occur, usually by way of the [http://geckwiki.com/index.php/Activate Activate] function in your UDF. You have to disable interaction with the target Actor first if you want to prevent dialog, somehow.  With '''JIP LN NVSE''' you can use the [http://geckwiki.com/index.php/SetInteractionDisabled SetInteractionDisabled] function.
 +
 
 +
'''EventHandlers''' on objects are invoked ''BEFORE'' the actual Event happens; hence the different timing for them compared to normal script blocks like "OnEquip" or "OnAdd".  Pay particular attention to any "Notes" on the function description pages for those Events, such as "OnAdd" requiring ''"an item to remain in the new container for at least one frame after it is added in order for the block to trigger"''.  You may need to use the '''JIP LN NVSE''' function [http://geckwiki.com/index.php/SetGameMainLoopCallback SetGameMainLoopCallback] (aka ''Callback'') to delay the execution of the Event trigger block by the number of frames you specify. (From experience, you need at least 2 frames of delay between taking an item and running a script on that item.  You will need to use [http://geckwiki.com/index.php/Auxiliary_Variables Auxiliary Variables] (aka ''Aux Vars''), by way of [http://geckwiki.com/index.php/AuxVarSetRef AuxiliaryVariableSetRef] to pass the Reference to the ''Callback'' function.)
 +
 
 +
The mod creator should not be concerned about using "script extenders" and their plugins.  Other than providing notice to the downloader of their mod that such plugins are required, there are no "downsides" to using them as far as the game engine is concerned; and they provide fixes to some deep level engine bugs as well as needed functionality that can only be provided by something working at that level (which mods can't).  Almost any load order with more than a dozen mods is likely to already require their use.  They are a mod creator asset, providing enhanced capabilities.  '''Utilize them.'''
 +
 
 +
Please see the article [http://www.loverslab.com/topic/39417-tutorial-nvse4-part-5-event-handlers-user-defined-events-udes/ NVSE4+: Event Handlers & User-Defined Events (UDEs) - Part 5] by '''DoctaSax''' for details.
 
</div>
 
</div>
  
<span id="Tip-CompoundConditionals"></span>
+
<span id="Tip-HotKeyEventHandler"></span>
==== TIP Debugging Compound Conditionals ====
+
 
 +
==== Tip EventHandler for HotKey ====
 +
: Thanks to '''FiftyTifty''' of the Nexus Fallout "New Vegas Mod Talk" forum for the basis of the following:
 
<div name="Note Box" class="boilerplate metadata" id="Notice Box"  
 
<div name="Note Box" class="boilerplate metadata" id="Notice Box"  
 
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 
background-color:#333333;padding:3px;
 
background-color:#333333;padding:3px;
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
">Here's a programming tip for when a compound conditional (multiple tests on the same line) is not working as expected: split it up into nested conditions. An "ElseIf" is equivalent to an "OR (||)" compound (assuming the "[do something]" portion is identical in both the "If" and "ElseIf" portions of the block), and each nested "If" statement is equivalent to an "AND (&&)" compound.
+
">Please see the article [http://www.loverslab.com/topic/39417-tutorial-nvse4-part-5-event-handlers-user-defined-events-udes/ NVSE4+: Event Handlers & User-Defined Events (UDEs) - Part 5] by DoctaSax for details first.
 +
: Required knowledge:
 +
:* UDFs, blocktypes, forms and refs
 +
: Also required:
 +
:* NVSE 4.6+
 +
 
 +
CIPCIS' method in [http://www.cipscis.com/fallout/tutorials/detecting_keypresses.aspx NVSE: Detecting Keypresses] is not ideal, as it uses '''GameMode''' for the bulk of the scripting. The point of having event handlers, is to only process code when we need to, rather than every frame or every few seconds.
  
So, using the example: "If (GetHitLocation == 1 || GetHitLocation == 2) && (rTarget.GetDead != 1) && (rTarget.GetIsCreature != 1)", change it into:
+
To get a "HotKey EventHandler" to work, you make two scripts. One is the "EventHandlerRegistration" script you attach to the quest, so you can detect the keypress: that has a very barebones '''GameMode''' block, which then readies the event handler.
 
<pre>
 
<pre>
If (GetHitLocation == 1 || GetHitLocation == 2)
+
scn MyHotkeyEventScript
    ; NVSE required: PrintD (string:expression), DBPrintC (formatted string)
+
short bDone
    DBPrintC "Script [HeadshotAmmoSCRIPT], GetHitLocation = [%g].", GetHitLocation
 
  
     If (rTarget.GetDead != 1)
+
Begin GameMode
         ; NVSE required: PrintD (string:expression), DBPrintC (formatted string)
+
     if bDone == 0                                        ; Eventhandler has not previously been set
        PrintD "Script [HeadshotAmmoSCRIPT], rTarget.GetDead = [" + $(rTarget.GetDead) + "]."
+
         SetOnKeyDownEventHandler MyEventUDFScript 1 210  ; Establish the Eventhandler for the "<Insert>" key.
 
+
         set bDone to 1                                   ; Eventhandler has now been set, so this code will be skipped next frame
         If (rTarget.GetIsCreature != 1)
+
    endif
            ; NVSE required: PrintD (string:expression), DBPrintC (formatted string)
+
End
            PrintD "Script [HeadshotAmmoSCRIPT], rTarget.GetIsCreature = [" + $(rTarget.GetIsCreature) + "]."
+
</pre>
 
+
You then point it to the second, "User-Defined Event" script you made, which is the one that does all the work. If you look at the first example "EventHandlerRegistration" script ('''MyHotkeyEventScript''') attached to the quest, it calls the following line:
            ForceActorValue Health 0
+
<pre>
        Else ; (Can be dropped if you just want it to totally fail.)
+
SetOnKeyDownEventHandler MyEventUDFScript 1 210
            ; [do something]
 
        Endif
 
    Else; (Can be dropped if you just want it to totally fail.)
 
        ; [do something]
 
    Endif
 
Else
 
    ; [do something]
 
EndIf
 
 
</pre>
 
</pre>
Insert "debug messages" (examples given) as required to pin down what values your conditions are actually testing.  That should quickly isolate what is not as expected.  (I just repeat the '; NVSE required' comment line to remind myself of the required syntax differences with each line.  Not required otherwise.)
+
The "User-Defined Event" script '''MyEventUDFScript''' is the one that does the bulk of the processing. The "1" parameter means we want to enable the event handler, and "210" parameter is the scancode for the "<Insert>" key.  (See the wiki article [[#DirectX_Scancodes_And_How_To_Use_Them|DirectX Scancodes And How To Use Them]] for a list of the DirectX scancode keys.)
  
Use the game console "bat <filename>" command to run a "batch file" similar to this ("_MyDebug.bat") to trigger the debug print statements when testing.  You can type any series of console commands (one per line) into a Notepad or other plaintext editor file and save as a simple DOS text file.  The filename extension doesn't matter, and can be dropped when entering the command as the console ignores it if found, but the standard for all "batch files" is ".bat".  The file should be placed in the game root folder (where the game EXE file is found). If the filename includes "spaces" then you need to enclose it in double quotation marks (i.e. type <bat "_My Debug File">).  See also: [[#Tip-Debugging|TIP: Debugging data to file.]]
+
The '''MyEventUDFScript''' has to follow the basic structure of a "User Defined Function" (UDF).<br>
* _MyDebug.bat:
+
Example:
 
<pre>
 
<pre>
con_SCOF "_MyDebug.log" ; Output console messages to file "_MyDebug.log" in current directory
+
scn MyEventUDFScript
DBMode 1 65            ; "Enable Debug mode" command using decimal mod index
+
int iKeyID ; this is the keypress that triggered the EventHandler (e.g. scancode "210": the "<Insert>" key)
                        ; Most common reason for failure: incorrect decimal mod index for <ModPluginName>
+
; Other variable definitions as required
                        ; NVSE required: PrintD (string:expression), DBPrint[C] (formatted string)
+
 
DBPrintC "Starting log for mod index 65(0x41) (<ModPluginName>) ..."  ; descriptive initialization message
+
Begin Function {iKeyID}
 +
  ; Main processing logic for when the triggering key is pressed goes here.
 +
End Function
 
</pre>
 
</pre>
Without that "Enable Debug mode" command the debug print statements won't actually do anything normally.  The "semicolon" (;) signals an ignored comment from that point to the end of the line, but is not required except to explain the purpose of each command.
+
It's a more difficult concept to understand than to implement.
 +
</div>
  
Place your "batch file" in the game root folder (where the "FalloutNV.exe" file is found).  The filename begins with an "underscore" (_) so it will be sorted to the top of the file list, making it easy to locate.</div>
+
<span id="Tip-GameDaysPassedBug"></span>
 
+
==== TIP GameDaysPassed Bug ====
<span id="Tip-Debugging"></span>
+
: Thanks to '''Asterra''' and '''DoctaSax''' of the Nexus Fallout "New Vegas GECK and Modders" forum for the basis of the following:
==== TIP Debugging data to file ====
+
<div name="Note Box" class="boilerplate metadata" id="Notice Box"  
: Thanks to '''DoctaSax''' of the Nexus Fallout "New Vegas GECK and Modders" forum for help with the following.
+
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
<div name="Note Box" class="boilerplate metadata" id="Notice Box"  
 
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 
 
background-color:#333333;padding:3px;
 
background-color:#333333;padding:3px;
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
">The built-in mechanism for debugging is to display messages to the console (or HUD) screen.  The console has a [http://geck.bethsoft.com/index.php?title=ToggleDebugText ToggleDebugText] function, which toggles an extra debug display to the console with 23 screens of data that can be paged through using the < Scroll Lock > key.<br>
+
"><span style="margin:0px 10px 10px 100px;border:1px solid #00C600;color: green;
There is a list of "designer" debug tools, many of which are disabled in the retail version but may have been or eventually will be provided in a "script extender", listed for posterity here:
+
background-color:#fff5f5;padding:3px;
* [http://geck.bethsoft.com/index.php?title=Category:Designer_Debug_Tools Designer Debug Tools].
+
word-wrap: break-word;      /* Internet Explorer 5.5+ */
* [http://geck.bethsoft.com/index.php?title=Category:Console_Functions Console Functions]
+
">NOTE: This bug is now fixed in the game engine by the '''JIP LN NVSE''' plugin (linked under the [[#Programs_and_Tools|Programs and Tools section]]).</span>
  
To enable the console, make sure the ''bAllowConsole=1'' setting is in your game INI file.  The console can then be accessed in-game by toggling the 'tilde key' (the actual key can be <~>, <º>, <¬>, <|>,<^>, <\>, <§>, etc., depending on your keyboard layout), usually found near the "1" key across the top of most keyboards.  The console prompt will appear as a single blank line in the lower left-hand corner of your screen. You can scroll the console output using the "Page Up" and "Page Down" keys. The console is not case sensitive: entering any of "tdt" or "TDT" or "TdT" will toggle the debugging text.  More general information on the console can be found on the [http://en.uesp.net/wiki/Oblivion:Console UESP wiki] and holds true for later games.  Use "#" anywhere on a line to make everything after that symbol into a comment.<br>
+
''GameDaysPassed'' is a GECK "base type" [http://geck.foesmm.org/index.php/List_of_Global_Variables Global Variable] used to return the number of days that have passed "in-game".  However, it has been found to become inaccurate over time (more quickly if the timescale is adjusted to anything other than the default of 30) and eventually to fail to advance at allThis causes problems with many vanilla and mod scripts; particularly in "Hardcore Mode" where the sudden advance can cause instant, unexpected death.
<br>
 
The forum article [http://www.nextgenupdate.com/forums/skyrim/560544-pc-skyrim-console-script-bat-file-compilation.html Skyrim Console Script/Bat File Compilation] is a tutorial with lots of information and ideas that can (with the appropriate changes) be used for other games.<br>
 
<br>
 
If you use NVSE (at least while developing/testing your scripts), you can use the [http://geck.foesmm.org/index.php/SetDebugMode SetDebugMode] command from FOSE (all of which are supported by NVSE) as a toggle for debug messages.<br>
 
Then you can test if this mode has been enabled in your script with: <pre>if GetDebugMode ... endif</pre> or control the output to only appear by using commands with built-in checks such as [https://geck.foesmm.org/index.php/DebugPrint DebugPrint] or [https://geck.foesmm.org/index.php/PrintDebug PrintDebug].<br>
 
Note the distinction between these two types of commands.<br>
 
* The "DebugPrint" command, like "PrintToConsole" ([http://geck.foesmm.org/index.php/Print PrintC]), only accepts a string with optional "string format" specifiers as parameters (e.g. "my string: %g", iSomeNumber).<br>
 
* The "PrintD/PrintDebug" command on the other hand, like [http://geck.foesmm.org/index.php/Print Print], requires "string expressions": concatenated strings, string-returning functions, or [http://geck.foesmm.org/index.php/ToString ToString]'ed forms and numbers.<br>
 
* Don't mix the two types of message string formats. So it's either:
 
<pre>
 
set iStage to GetStage <Quest EditorID>
 
DBPrintC "Failed blah blah [%g], QStage [%g].", <Quest EditorID>.<QuestVariable>, iStage
 
</pre>
 
or<br>
 
<pre>
 
PrintD "Failed blah blah bark = [" + $(<Quest EditorID>.<QuestVariable>) + "], QStage [" + $(GetStage etc- + "']."
 
</pre><br>
 
* Other forms of "Print" has similar distinct requirements for their messages.  Pay attention to their description's syntax.<br>
 
<br>
 
Often you want to know the state of various elements that are not stored in variables, for output.  A fairly common example of this is to print the current "Stage" in a "Quest".  You can use the "GetStage <Quest EditorID>" function in a conditional statement (e.g. ''If ( GetStage VT47 == 10 )'', but that by itself won't work as a parameter to a "PrintC" command.  Fortunately NVSE v4 added the [http://geck.foesmm.org/index.php/ToString ToString] function (abbreviated as the "$" symbol) which can be used to turn an "expression" into a string value (e.g. <span style="margin:0px 10px 10px 10px; border:1px dashed #DAA520; color: lightgray; background-color:#333333; padding:3px;">PrintD "Active Quest [" + $(GetActiveQuest) + "Stage = [" + $(GetStage <Quest EditorID>) + "]."</span>).  Note the spaces separating the string concatenation "+" symbols are required.  Also that the "GetActiveQuest" function returns a ''RefID'' which is normally not printable but "$" converts into a string.<br>
 
<br>
 
Sometimes simply displaying messages to the screen or console is not sufficient to trace a problem.  NVSE provides a number of functions enabling you to dump debugging information to a text fileThese functions, and examples of how to use them, are listed on the GECK wiki under the subject [http://geck.bethsoft.com/index.php?title=Debug_Dumps Debug Dumps].  They all reference sending messages to the "console".  You need to first use the [http://geck.foesmm.org/index.php/Con_SCOF Con_SCOF] command to redirect console messages to a text file instead.<br>
 
<br>
 
When you need to send a sequence of commands to the console one immediately after the other, it is often useful to put them (one per line) into a plaintext "batch" file (e.g. "'''enabledebugfile.txt'''") placed in the game root folder, the same folder as the game executable (i.e. "<path>\common\Fallout New Vegas"), and use the console command "bat <filename>" (no extension and without the quotes) to run it (e.g. "bat '''enabledebugfile'''").<br>
 
Example ''''enabledebugfile.txt'''' file:<br>
 
<pre>con_SCOF "_Debug.log"  # "_" is to cause the file to sort to beginning of Windows Explorer filenames
 
DBMode 1 61                # '61' is 'mod index' in decimal
 
DBPrintC "Starting log for mod index 61(0x3D) (<mod name>) ..."</pre>
 
</div>
 
  
<span id="Tip-DismemberingCorpse"></span>
+
"The nature of [the problem] seems to be that single-precision floating point math is only accurate up to so many digits, 7 to 8, depending. Sleep, wait and fast travel update the var by sufficiently high values to never go unnoticed. But during gamemode ''GameDaysPassed'' [(GDP)] is updated by tiny fractions, every frame. That means that every frame, it should be updated by something close to TimeScale / (FPS * 86400). At 30 timescale and 30 FPS, that's 0.0000157407407407 (etc.); 0.000005787037037 (etc.) at FPS 60.
==== TIP Dismembering a corpse ====
 
: Thanks to '''madmongo''' of the Nexus Fallout "New Vegas GECK and Modders" forum for the following.
 
<div name="Note Box" class="boilerplate metadata" id="Notice Box"
 
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 
background-color:#333333;padding:3px;
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 
">According to the game [lore], there were a bunch of people beheaded in Nipton, but there were no beheaded bodies. So I created a bunch of NPCs and had them immediately get beheaded as soon as they spawned. This is the script I used:
 
<pre>
 
scn zzMongoBeheadedScript
 
  
Begin GameMode
+
"If you add it to the existing GDP value, then even at day 1 in the game (day 6, isn't it?), the result of this addition, stored in the GDP var, will only be reliably accurate until 6 digits after the decimal point. The var itself could store more precise data, but it's the calculation that is inaccurate and the result of that is what's being stored. So it may only accurately apply an increase of 0.000005 at 60 FPS or 0.000015 at 30. The following digits of the GDP value will be very much random, and each time the increase is added, it just results in new randomness beyond those digits, possibly rolling over to a higher digit and affecting its accuracy too.
    If (GetDead == 0)
 
        Kill zzMongoCrucDead1REF 1 -1
 
    Endif
 
End</pre>
 
Just give this script, or rather your modified version of it, to your NPC in the dialog box where you define the NPC, under the ID and name. You probably know this already, but just making sure.
 
  
{The "kill" command is a shorthand name for the [http://geck.technodeep.net/index.php/KillActor KillActor] function.  You could use the "[ActorRef].command" syntax to make it explicitly clear who is the object of the command (being affected by it).  When the script is attached to an NPC via dialog, they become the implied "ActorRef".  Think of the "[ActorRef].command" syntax as "[subject].action [parameters]".  The "[]" are used to indicate it is an "optional" component of the function.}
+
"Then, when GDP hits 10, or 100, the whole problem becomes much larger because from then on only 5, or 4, digits behind the decimal point are theoretically reliable, and because of earlier inaccuracies that happened over time, it's hard to trust them either.
  
'''zzMongoCrucDead1REF''' is one of the beheaded NPCs. Basically, by using him as the killer, he gets blamed for all of the deaths and not the player or anyone else (prevents any factions from getting angry at the player or with other factions). "1" is the dismembered part, which in this case is the head. You'll want to change this for your exploded NPC. "-1" is the cause of death, which you will want to change to "0" for {an} explosion. The documentation for {the function} [http://geck.technodeep.net/index.php/GetCauseofDeath GetCauseofDeath] has a list of values for the cause of death.
+
"The sad part is that all numeric variables in FNV are actually stored as double-precision, but math involving any var is single-precision."
  
There are ready-to-use scripts available for several combinations of dismemberments in the GECK alreadyTo use them, drop a new cubic activator in the cell where you want to use it and point it to one of the "GenericDismembermentXXX" base forms. Then set its linked reference to the corpse that you want to dismember.
+
The mod [http://www.nexusmods.com/newvegas/mods/63880/? Timescale Pacemaker] by '''Asterra''' was developed specifically to address this issueIt has since been corrected in the game engine by [http://www.nexusmods.com/newvegas/mods/58277/? JIP LN NVSE Plugin] v51.60 or later.</div>
</div>
 
  
<span id="Tip-Dispel"></span>
+
<span id="Tip-ParsingLines"></span>
==== TIP Dispel Effect ====
+
==== TIP GECK parses the entire line before evaluating ====
: Thanks to '''DoctaSax''' of the Nexus Fallout "New Vegas GECK and Modders" forum for the basis of the following:
+
: Thanks to '''DoctaSax''' of the Nexus Fallout "New Vegas GECK and Modders" forum for the following.
 
<div name="Note Box" class="boilerplate metadata" id="Notice Box"  
 
<div name="Note Box" class="boilerplate metadata" id="Notice Box"  
 
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 
background-color:#333333;padding:3px;
 
background-color:#333333;padding:3px;
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
">A [http://geck.technodeep.net/index.php/Dispel Dispel] function call often doesn't take effect immediatelyThere is also a risk the spell will stick on any creature for which the code doesn't apply (depending upon the type of duration set, of course).  The following is a "good practice" trick for scripted spells (aka [http://geck.technodeep.net/index.php/Actor_Effect Actor Effect]) to keep in mind.
+
">Bear in mind when using compound conditions [&& (and), || (or); see [http://geck.foesmm.org/index.php/Category:Conditions GECK Category: Conditions]] that the GECK parses the entire line at onceFor instance:
 
+
<pre>If (IsFormValid rActor) && (IsReference rActor)</pre>
At the end of your ''ScriptEffectStart'' Block:
+
can crash your  script if ''rActor'' doesn't hold a valid form, because ''IsReference'' will freak out over it and the ''IsFormValid'' check does nothing to prevent it. You need to break that line up into two:
 
<pre>
 
<pre>
else
+
if IsFormValid rActor
  set DoOnce to 2 ; (or some appropriate value)
+
  if IsReference rActor</pre>
endif</pre>
+
Geck script processes an entire line: substituting the result values from functions, and then determines the "true/false" result of any conditionals last, so if the ref var holds an invalid form or none at all, it will be passed to ''IsReference'' in a compound conditional line.  The ''IsFormValid'' conditional check in the same line doesn't stop that - the only way to prevent it is to split up the line.  Overall it's good practice to stagger your validity checks to separate lines as this becomes an issue if you use a function with ref syntax in such lines.
 +
</div>
  
and at the top of your ''ScriptEffectUpdate'' Block:
+
<span id="Tip-PCHealth"></span>
<pre>
+
==== TIP Get Actor Health functions ====
if DoOnce == 2
+
<div class="boilerplate metadata" id="Notice_Box" style="margin:0px 10px 10px 10px;  border:1px dashed #DAA520;  color: lightgray;  background-color:#333333;  padding:3px;  word-wrap: break-word">Bear the following in mind when attempting to determine the health of any actor:
  dispel <YourSpell/ActorEffect>
+
*'''[ActorRef].GetHealthPercentage''' is unreliable as it's determined from "base health" and sometimes returns values over 1.0 (100%).
  return
+
*'''[ActorRef].GetAV ''Health''''' returns the current, modified health value (not the maximum).  It takes into consideration permanent effects (e.g. perks) as they contribute to your "health pool".
endif
+
*'''[ActorRef].GetBaseAV ''Health''''' returns the base value with no consideration for permanent (e.g. "Life Giver" perk) or temporary effects (eg. Buffout).
</pre>
+
*'''[ActorRef].GetPermAV ''< StatName >''''' returns include permanent effects (e.g. Perks like "Tag!", and from Skill Books), but no bonus from situational perks, equipped items, drugs, etc..
</div>
+
*'''[ActorRef].ResetHealth''' Restores the actor's health and cures crippling damage.
 +
*No function known at the moment can return the max value with temporary effects.
 +
 
 +
Please see the '''GECKWiki''' [http://geckwiki.com/index.php/ActorValue ActorValue] page regarding the "Damage Pool" and that determining an Actor's current health is a multistage process. It looks like "GetAV Health" is what you want to track current damage, as [http://geckwiki.com/index.php/DamageActorValue DamageActorValue] function implies that it does reflect the "Damage Pool" from frame to frame.
 +
</div>  
 +
&nbsp;
  
<span id="Tip-EventHandler"></span>
+
<span id="Tip-GBOvsGBF"></span>
==== TIP Do not overlook '''EventHandlers''' ====
+
==== TIP Level Lists and ''GetBaseObject'' versus ''GetBaseForm'' ====
 +
: Thanks to '''EPDGaffney''', '''DoctaSax''', and '''Mktavish''' of the Nexus Fallout "New Vegas GECK and Modders" forum for the basis of the following:
 
<div name="Note Box" class="boilerplate metadata" id="Notice Box"  
 
<div name="Note Box" class="boilerplate metadata" id="Notice Box"  
 
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 
background-color:#333333;padding:3px;
 
background-color:#333333;padding:3px;
 +
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 +
">According to the [http://geckwiki.com/index.php/Main_Page GECKWiki]:<br>
 +
<div name="Simulated code box" class="boilerplate metadata" id="Warning Notice"
 +
style="margin:0px 10px 10px 10px; border:1px dashed #DAA520; color: lightgray; background-color:#424242; padding:3px;
 +
/* Remove the next four 'white-space' lines to restore default white-space processing. */
 +
white-space: pre-wrap;      /* css-3 */
 +
white-space: -moz-pre-wrap;  /* Mozilla, since 1999 */
 +
white-space: -pre-wrap;      /* Opera 4-6 */
 +
white-space: -o-pre-wrap;    /* Opera 7+ */
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 
">
 
">
When you want to do something affecting multiple Actors, such as providing a particular dialog option or behavior, instead of editing their scripts directly consider using an '''NVSE''' [http://geck.technodeep.net/index.php/Event_Handling Event Handler] instead (functionality added by '''NVSE 4.6+''').
+
There are three types of level lists in Fallout 3 (& New Vegas):
 +
* [http://geckwiki.com/index.php/LeveledCreature Leveled Creatures],
 +
* [http://geckwiki.com/index.php/LeveledCharacter Leveled Characters], and
 +
* [http://geckwiki.com/index.php/LeveledItem Leveled Items].
 +
Refer to the individual pages for details about each of them.
 +
In general, a leveled list allows the choice of object or actor to be dependent on the level of the player relative to the [http://geckwiki.com/index.php/Encounter_Zone Encounter Zone]. Therefore as the player grows in level, the actor or object generated changes. Loot in containers is better. Creatures and NPCs encountered are tougher.
 +
* [http://geckwiki.com/index.php/GetBaseObject GetBaseObject] Returns the base object id of the calling reference.  Will return the leveled character/creature Actor form if called on references spawned by one.  {The Form-ID will actually be an ''object'' that contains a list of other leveled Actors.}  Use ''GetBaseForm'' to return the Actor "base form" instead.
 +
* [http://geckwiki.com/index.php/Gbf GetBaseForm] (A function added by NVSE) Returns the actual base form of a leveled calling reference.  {Meaning it goes within the list of the calling leveled object, and finds the Base-ID template of the leveled object it picked at random from that list. Hence this would have to be called in scripting, after the leveled item reference loads.}</div>
  
'''EventHandlers''' provide the very powerful ability to "trick" the game engine into supplementing or overriding the limitations of the standard GECK "On<Event>" functions such as "OnAdd", "OnActivate", or "OnEquip" into running a script to emulate something else in a "User Defined Function" (UDF).  A simple example of this is the "Note EventHandler" script and UDF in [[#Tip-Notes|TIP: Passing a 'Note' to the player]], which is using this technique to "trick" the engine into running a script as if the note had been triggered by an "OnEquip" or "OnActivate" function without ever using that command; in this example instance by a mouse click or key press in a menuSee also [[#Tip-HotKeyEventHandler|Tip: EventHandler-HotKey]].
+
The trouble with any actor templated to a leveled list is that their Base Object (''GetBaseObject'', aka GBO) is not static, but dynamic (i.e. if you called ''GetBaseObject'' on the ref in-game you would get a Form-ID that starts with FF (255).  This explains the problem with some of the debug readouts, in that ''IsInList'' called on the reference won't match the base form that is stored in the GECK. To get that base form, you'd need ''GetBaseForm'' (GBF) and look it up in the list with ''ListGetFormIndex''This is "normal behavior" for GBO: i.e. when an actor's base form is directly templated to a levelled list.  Some instances, however, seem to be templated to another actor form which in turn is templated to a levelled list. (There really is no limit to how many levels of templating that can go on, except the restraint of the person making the NPCs.) That may explain the base object not returning as dynamic in some instances, and so, being checked off correctly by ''IsInList''This is an area not extensively explored.
  
Note that just using an '''EventHandler''' isn't sufficientThe normal activation event will still need to occur. You have to disable interaction with the target Actor first if you want to prevent dialog, somehow.  With '''JIP LN NVSE''' you can use the "SetInteractionDisabled" function.
+
Recall (from the [[#GECK Form-ID, Base-ID, Ref-ID, and Editor-ID|GECK Form-ID, Base-ID, Ref-ID, and Editor-ID]] section) that the "Base ID is the number assigned to a template for an object that is used to create many instances of that object." And "the Reference ID is the unique ID of an individual object (unlike the Base ID, which is an ID for an object template)" that is placed in the game world.
  
'''EventHandlers''' on objects are invoked ''before'' the actual event happens; hence the different timing for them compared to script blocks like "OnEquip".
+
In other words:  GBO returns the "Leveled" Base-ID (from the leveled list in the instance under consideration).  And that can be stored in a reference variable.  GBF goes into the list within the "Leveled" Base-ID and gets the root Base-ID that was the template of the leveled object.  That can also be stored in a reference variable but is not actually a "Ref-ID" and cannot be used as one, as it has no specific object.  (The "reference" / '''Ref-ID''' is expected to contain active characteristics, such as world location, current stats, etc. of a specific object instance in the game world.)
  
The mod creator should not be concerned about using "script extenders" and their plugins. Other than providing notice to the downloader of their mod that such are required, there are no "downsides" to using them as far as the game engine is concerned; and they provide fixes to some deep level engine bugs that can only be provided by something working at that level (which mods can't).  Almost any load order with more than a dozen mods is likely to already require their use.  They are a mod creator asset, providing enhanced capabilities.  Utilize them.
+
[http://geckwiki.com/index.php/GetSelf GetSelf] returns a Ref-ID that you can store in a reference variable, referring to the specific instance of it in-game.  ''GetSelf'' is only useful when this information is accessed externally, or when the scripted reference's Ref-ID needs to be passed as a parameter to a function like [http://geckwiki.com/index.php/PushActorAway PushActorAway].  This can be a problem with inventory objects because they are destroyed regularly.
 
 
Please see the article [http://www.loverslab.com/topic/39417-tutorial-nvse4-part-5-event-handlers-user-defined-events-udes/ NVSE4+: Event Handlers & User-Defined Events (UDEs) - Part 5] by DoctaSax for details.
 
 
</div>
 
</div>
  
<span id="Tip-HotKeyEventHandler"></span>
+
<span id="Tip-InteriorRadio"></span>
==== Tip EventHandler for HotKey ====
+
==== TIP Limit Radio Range to multiple Interior Cells ====
: Thanks to '''FiftyTifty''' of the Nexus Fallout "New Vegas Mod Talk" forum for the basis of the following:
+
: Thanks to '''EPDGaffney''' and '''user826''' of the Nexus Fallout "New Vegas GECK and Modders" forum for the basis of the following:
 
<div name="Note Box" class="boilerplate metadata" id="Notice Box"  
 
<div name="Note Box" class="boilerplate metadata" id="Notice Box"  
 
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 
background-color:#333333;padding:3px;
 
background-color:#333333;padding:3px;
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
">Please see the article [http://www.loverslab.com/topic/39417-tutorial-nvse4-part-5-event-handlers-user-defined-events-udes/ NVSE4+: Event Handlers & User-Defined Events (UDEs) - Part 5] by DoctaSax for details first.
+
">In order to limit a Radio Broadcast to only be heard when the Player is inside a cluster of linked interior cells, you need to set the ''Talking Activator'' to ''Broadcast Range Type = Linked Interiors'' in the first cell.  (Place the ''Activator'' out of reach and sight to hide it from the player.)  You then use ''[http://geckwiki.com/index.php/Bethsoft_Tutorial_Finalize_and_Connect Teleport Doors]'' as usual to link the interior cells together for the Radio Broadcast.
: Required knowledge:
 
:* UDFs, blocktypes, forms and refs
 
: Also required:
 
:* NVSE 4.6+
 
  
CIPCIS' method in [http://www.cipscis.com/fallout/tutorials/detecting_keypresses.aspx NVSE: Detecting Keypresses] is not ideal, as it uses '''GameMode''' for the bulk of the scripting. The point of having event handlers, is to only process code when we need to, rather than every frame or every few seconds.
+
You may find it preferable to use a set of "hidden, dummy doors" to provide the Radio Broadcast linkageBe sure to flag such doors to be "Hidden from Local Map".
 
 
To get a "HotKey EventHandler" to work, you make two scripts. One is the "EventHandlerRegistration" script you attach to the quest, so you can detect the keypress: that has a very barebones '''GameMode''' block, which then readies the event handler.  
 
<pre>
 
scn MyHotkeyEventScript
 
short bDone
 
 
 
Begin GameMode
 
    if bDone == 0                                        ; Eventhandler has not previously been set
 
        SetOnKeyDownEventHandler MyEventUDFScript 1 210 ; Establish the Eventhandler for the "<Insert>" key.
 
        set bDone to 1                                  ; Eventhandler has now been set, so this code will be skipped next frame
 
    endif
 
End
 
</pre>
 
You then point it to the second, "User-Defined Event" script you made, which is the one that does all the work. If you look at the first example "EventHandlerRegistration" script ('''MyHotkeyEventScript''') attached to the quest, it calls the following line:
 
<pre>
 
SetOnKeyDownEventHandler MyEventUDFScript 1 210
 
</pre>
 
The "User-Defined Event" script '''MyEventUDFScript''' is the one that does the bulk of the processing. The "1" parameter means we want to enable the event handler, and "210" parameter is the scancode for the "<Insert>" key.  (See the wiki article [[#DirectX_Scancodes_And_How_To_Use_Them|DirectX Scancodes And How To Use Them]] for a list of the DirectX scancode keys.)
 
 
 
The '''MyEventUDFScript''' has to follow the basic structure of a "User Defined Function" (UDF).<br>
 
Example:
 
<pre>
 
scn MyEventUDFScript
 
int iKeyID ; this is the keypress that triggered the EventHandler (e.g. scancode "210": the "<Insert>" key)
 
; Other variable definitions as required
 
 
 
Begin Function {iKeyID}
 
  ; Main processing logic for when the triggering key is pressed goes here.
 
End Function
 
</pre>
 
It's a more difficult concept to understand than to implement.
 
 
</div>
 
</div>
  
<span id="Tip-GameDaysPassedBug"></span>
+
<span id="Tip-Mannequins"></span>
==== TIP GameDaysPassed Bug ====
+
==== TIP Mannequins ''aka static Actors'' ====
: Thanks to '''Asterra''' and '''DoctaSax''' of the Nexus Fallout "New Vegas GECK and Modders" forum for the basis of the following:
+
: Thanks to '''b0bulat0r''' of the Nexus Fallout "New Vegas GECK and Modders" forum for the basis of the following:
 
<div name="Note Box" class="boilerplate metadata" id="Notice Box"  
 
<div name="Note Box" class="boilerplate metadata" id="Notice Box"  
 
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 
background-color:#333333;padding:3px;
 
background-color:#333333;padding:3px;
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
"><span style="margin:0px 10px 10px 100px;border:1px solid #00C600;color: green;
+
">A "mannequin" is nothing more than an Actor that doesn't move: no idle poses, sandbox, travel packages, etc..  All it takes is adding an "OnLoad" script with the line "SetActorsAI 0", e.g.:
background-color:#fff5f5;padding:3px;
+
<pre>
 +
Begin OnLoad
 +
  SetActorsAI 0
 +
End
 +
</pre>
 +
</div>
 +
 
 +
<span id="Tip-MasterDependencies"></span>
 +
==== TIP Master Dependency Checking ====
 +
: Thanks to '''miguick''' of the Nexus Fallout "New Vegas GECK and Modders" forum for the basis of the following:
 +
<div name="Note Box" class="boilerplate metadata" id="Notice Box"
 +
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 +
background-color:#333333;padding:3px;
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
">NOTE: This bug is now fixed in the game engine by the '''JIP LN NVSE''' plugin (linked under the [[#Programs_and_Tools|Programs and Tools section]]).</span>
+
">When the game starts you may want to check for items introduced in DLCs (e.g. "HonestHearts") and store the results in a list.
  
''GameDaysPassed'' is a GECK "base type" [http://geck.foesmm.org/index.php/List_of_Global_Variables Global Variable] used to return the number of days that have passed "in-game".  However, it has been found to become inaccurate over time (more quickly if the timescale is adjusted to anything other than the default of 30) and eventually to fail to advance at allThis causes problems with many vanilla and mod scripts; particularly in "Hardcore Mode" where the sudden advance can cause instant, unexpected death.
+
'''NVSE''''s ''[http://geck.technodeep.net/index.php/IsModLoaded IsModLoaded] "HonestHearts.esm"'' and ''[http://geck.technodeep.net/index.php/GetFormFromMod GetFormFromMod] "HonestHearts.esm" "xxxxxx"'' can't go wrong for such a thing.  (The quotation marks around the ''pluginName'' and ''hexFormID'' strings are required.) Where "xxxxxx" are the last 6 digits of the FormIDs of the records you are concerned about.  The GECK displays them in a minimized column that you can stretch.
 +
</div>
  
"The nature of [the problem] seems to be that single-precision floating point math is only accurate up to so many digits, 7 to 8, depending. Sleep, wait and fast travel update the var by sufficiently high values to never go unnoticed. But during gamemode ''GameDaysPassed'' [(GDP)] is updated by tiny fractions, every frame. That means that every frame, it should be updated by something close to TimeScale / (FPS * 86400). At 30 timescale and 30 FPS, that's 0.0000157407407407 (etc.); 0.000005787037037 (etc.) at FPS 60.
+
<span id="Tip-ModAdditionsList"></span>
 
+
==== TIP Mod Additions list ====
"If you add it to the existing GDP value, then even at day 1 in the game (day 6, isn't it?), the result of this addition, stored in the GDP var, will only be reliably accurate until 6 digits after the decimal point. The var itself could store more precise data, but it's the calculation that is inaccurate and the result of that is what's being stored. So it may only accurately apply an increase of 0.000005 at 60 FPS or 0.000015 at 30. The following digits of the GDP value will be very much random, and each time the increase is added, it just results in new randomness beyond those digits, possibly rolling over to a higher digit and affecting its accuracy too.
+
: Thanks to '''DoctaSax''' of the Nexus Fallout "New Vegas Mod Talk" forum for the basis of the following:
 
 
"Then, when GDP hits 10, or 100, the whole problem becomes much larger because from then on only 5, or 4, digits behind the decimal point are theoretically reliable, and because of earlier inaccuracies that happened over time, it's hard to trust them either.
 
 
 
"The sad part is that all numeric variables in FNV are actually stored as double-precision, but math involving any var is single-precision."
 
 
 
The mod [http://www.nexusmods.com/newvegas/mods/63880/? Timescale Pacemaker] by '''Asterra''' was developed specifically to address this issue.  It has since been corrected in the game engine by [http://www.nexusmods.com/newvegas/mods/58277/? JIP LN NVSE Plugin] v51.60 or later.</div>
 
 
 
<span id="Tip-ParsingLines"></span>
 
==== TIP GECK parses the entire line before evaluating ====
 
: Thanks to '''DoctaSax''' of the Nexus Fallout "New Vegas GECK and Modders" forum for the following.
 
 
<div name="Note Box" class="boilerplate metadata" id="Notice Box"  
 
<div name="Note Box" class="boilerplate metadata" id="Notice Box"  
 
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 
background-color:#333333;padding:3px;
 
background-color:#333333;padding:3px;
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
">Bear in mind when using compound conditions [&& (and), || (or); see [http://geck.foesmm.org/index.php/Category:Conditions GECK Category: Conditions]] that the GECK parses the entire line at once. For instance:
+
">Sometimes you want to know about all the additions of a particular type (such as 'weapons' for example) that a specific mod adds to the game.
<pre>If (IsFormValid rActor) && (IsReference rActor)</pre>
+
 
can crash your  script if ''rActor'' doesn't hold a valid form, because ''IsReference'' will freak out over it and the ''IsFormValid'' check does nothing to prevent it. You need to break that line up into two:
+
With the '''JIP LN NVSE''' plugin (which now since v40 incorporates the "Lutana" extensions) this is quite easy.  Use a combination of the [http://geck.technodeep.net/index.php/GetModIndex GetModIndex] and [http://geck.technodeep.net/index.php/GetLoadedTypeArray GetLoadedTypeArray] functions with [http://geck.technodeep.net/index.php/Form_Type_IDs Form Type IDs] code '40' ('Weapons'):
 
<pre>
 
<pre>
if IsFormValid rActor
+
array_var aWeapons
  if IsReference rActor</pre>
+
int iIndex
Geck script processes an entire line: substituting the result values from functions, and then determines the "true/false" result of any conditionals last, so if the ref var holds an invalid form or none at all, it will be passed to ''IsReference'' in a compound conditional line.  The ''IsFormValid'' conditional check in the same line doesn't stop that - the only way to prevent it is to split up the line.  Overall it's good practice to stagger your validity checks to separate lines as this becomes an issue if you use a function with ref syntax in such lines.
+
 
 +
let iIndex := GetModIndex "<TheMod>.esp"
 +
let aWeapons := GetLoadedTypeArray 40, iIndex
 +
</pre>
 
</div>
 
</div>
  
<span id="Tip-PCHealth"></span>
+
<span id="Tip-NPCWpnChoice"></span>
==== TIP Get Actor Health functions ====
+
==== TIP NPC Weapon Choice ====
<div class="boilerplate metadata" id="Notice_Box" style="margin:0px 10px 10px 10px; border:1px dashed #DAA520; color: lightgray; background-color:#333333; padding:3px; word-wrap: break-word">Bear the following in mind when attempting to determine the health of any actor:
+
: Thanks to '''EPDGaffney''' of the Nexus Fallout "New Vegas GECK and Modders" forum for the basis of the following:
*'''[ActorRef].GetHealthPercentage''' is unreliable as it's determined from "base health" and sometimes returns values over 1.0 (100%).
+
<div name="Note Box" class="boilerplate metadata" id="Notice Box"  
*'''[ActorRef].GetAV ''Health''''' returns the current, modified health value (not the maximum).  It takes into consideration permanent effects (e.g. perks) as they contribute to your "health pool".
+
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
*'''[ActorRef].GetBaseAV ''Health''''' returns the base value with no consideration for permanent (e.g. "Life Giver" perk) or temporary effects (eg. Buffout).  
+
background-color:#333333;padding:3px;
*'''[ActorRef].GetPermAV ''< StatName >''''' returns include permanent effects (e.g. Perks like "Tag!", and from Skill Books), but no bonus from situational perks, equipped items, drugs, etc..
+
word-wrap: break-word;      /* Internet Explorer 5.5+ */
*'''[ActorRef].ResetHealth''' Restores the actor's health and cures crippling damage.
+
">When trying to force an NPC to use particular combat tactics (such a choice of Weapon) under specific circumstances, remember that the higher cyclic "Damage Per Second" (DPS) rate of the Weapon is what governs their choice; not the base "Damage" inflicted per shot. {For Armor, it's "Damage Resistance" (DR) that governs.}  This is hard-coded into the game engine.
*No function known at the moment can return the max value with temporary effects.  
 
  
Please see the '''GECKWiki''' [http://geckwiki.com/index.php/ActorValue ActorValue] page regarding the "Damage Pool" and that determining an Actor's current health is a multistage process. It looks like "GetAV Health" is what you want to track current damage, as [http://geckwiki.com/index.php/DamageActorValue DamageActorValue] function implies that it does reflect the "Damage Pool" from frame to frame.
+
Consequently, in order to force the NPC to switch weapons, you may need to temporarily remove their current weapon and any alternative choices you don't want them to use, saving both the baseform of the removed weapon(s) and any timer using either a [http://geck.technodeep.net/index.php/Category:Tokens Token] or JIP's [https://geckwiki.com/index.php/Category:Auxiliary-Variable_Functions_(JIP) Auxvars] on the NPC in order to restore them after circumstances change again.  (Essentialy this is the same as the "reverse pickpocket" trick to cause an NPC to switch gear so you can steal what they had been wearing.)  See [[#TIP:_Timers|TIP: Timers]] regarding limitations which necessitate this "Token" or "AuxVars" approach.
</div>  
+
</div>
&nbsp;
 
  
<span id="Tip-GBOvsGBF"></span>
+
<span id="Tip-Transformations"></span>
==== TIP Level Lists and ''GetBaseObject'' versus ''GetBaseForm'' ====
+
==== TIP Object Transformation ====
: Thanks to '''EPDGaffney''', '''DoctaSax''', and '''Mktavish''' of the Nexus Fallout "New Vegas GECK and Modders" forum for the basis of the following:
+
: Thanks to '''madmongo''' of the Nexus Fallout "New Vegas GECK and Modders" forum for the basis of the following:
 
<div name="Note Box" class="boilerplate metadata" id="Notice Box"  
 
<div name="Note Box" class="boilerplate metadata" id="Notice Box"  
 
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 
background-color:#333333;padding:3px;
 
background-color:#333333;padding:3px;
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
">According to the [http://geckwiki.com/index.php/Main_Page GECKWiki]:<br>
+
">Suppose you are trying to make a '''Wild Wasteland''' mod where "something" (say a generic army truck) is changed to "something else" (such as a UFO) only if you have '''Wild Wasteland''' as a perk.
<div name="Simulated code box" class="boilerplate metadata" id="Warning Notice"  
+
 
style="margin:0px 10px 10px 10px; border:1px dashed #DAA520; color: lightgray; background-color:#424242; padding:3px;
+
The general way to do something like this is add your army truck and your UFO both to where you want them. Then you have something like an '''xmarker''' that acts as an ''enable parent''. If the '''xmarker''' is initially enabled, then you want the truck to use the '''xmarker''' as an ''enable parent'' as-is, but you want the UFO to be enabled opposite of the '''xmarker''' (there's a check box for this on the ''enable parent'' tab of the reference form). As you continue to add things (aliens, etc) have their ''enable parent'' also be the same '''xmarker'''.
/* Remove the next four 'white-space' lines to restore default white-space processing. */
+
 
white-space: pre-wrap;      /* css-3 */
+
The '''xmarker''' starts out enabled, so your truck and whatever else is using that '''xmarker''' is enabled and visible. As soon as you disable the '''xmarker''', the truck (and everything else that was enabled) is now disabled and disappears, and the UFO (and everything else) that is using the '''xmarker''' as opposite now becomes enabled.
white-space: -moz-pre-wrap;  /* Mozilla, since 1999 */
+
 
white-space: -pre-wrap;      /* Opera 4-6 */
+
So now that everything switches in and out based on whether or not your '''xmarker''' is enabled or disabled, the last piece of this is to actually enable or disable that '''xmarker'''.  To do this, all you need is a trigger with a script that detects whether or not the player has the '''Wild Wasteland''' perk, and disable your '''xmarker''' if they do. You are going to want your trigger area large enough that it will disable your truck and enable the UFO before the player gets too close to it so that the player won't see the transition.
white-space: -o-pre-wrap;    /* Opera 7+ */
+
</div>
 +
 
 +
<span id="TIP-MsgVariable"></span>
 +
 
 +
==== TIP Pass a variable number into a script message ====
 +
<div name="Note Box" class="boilerplate metadata" id="Notice Box"  
 +
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 +
background-color:#333333;padding:3px;
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 
">
 
">
There are three types of level lists in Fallout 3 (& New Vegas):
+
* Read the "Formatting messages" section in the GECK article on the [http://geck.bethsoft.com/index.php?title=ShowMessage ShowMessage] functionFor an integer: use "%.0f" or "%g". Include the formatting switch in the text in the message form, like this:<pre>"The winning number was %g."</pre>
* [http://geckwiki.com/index.php/LeveledCreature Leveled Creatures],
+
* Then pass the script variable to the ShowMessage function along with the message, like this:
* [http://geckwiki.com/index.php/LeveledCharacter Leveled Characters], and
+
<pre>
* [http://geckwiki.com/index.php/LeveledItem Leveled Items].
+
  set iWinningNumber to GetRandomPercent
Refer to the individual pages for details about each of them.
+
  ShowMessage WinnerMessage, iWinningNumber</pre>
In general, a leveled list allows the choice of object or actor to be dependent on the level of the player relative to the [http://geckwiki.com/index.php/Encounter_Zone Encounter Zone]. Therefore as the player grows in level, the actor or object generated changes. Loot in containers is better. Creatures and NPCs encountered are tougher.
+
* Here's an example with [http://geck.bethsoft.com/index.php?title=MessageBoxEx NVSE], which allows you to show messages without creating a new message form. NVSE also supports a number of extra switches that can't be used in ordinary message forms.
* [http://geckwiki.com/index.php/GetBaseObject GetBaseObject] Returns the base object id of the calling reference.  Will return the leveled character/creature Actor form if called on references spawned by one{The Form-ID will actually be an ''object'' that contains a list of other leveled Actors.}  Use ''GetBaseForm'' to return the Actor "base form" instead.
+
:<pre>MessageBoxEx "The winning number was %g.", iWinningNumber</pre>
* [http://geckwiki.com/index.php/Gbf GetBaseForm] (A function added by NVSE) Returns the actual base form of a leveled calling reference.  {Meaning it goes within the list of the calling leveled object, and finds the Base-ID template of the leveled object it picked at random from that list. Hence this would have to be called in scripting, after the leveled item reference loads.}</div>
 
 
 
The trouble with any actor templated to a leveled list is that their Base Object (''GetBaseObject'', aka GBO) is not static, but dynamic (i.e. if you called ''GetBaseObject'' on the ref in-game you would get a Form-ID that starts with FF (255).  This explains the problem with some of the debug readouts, in that ''IsInList'' called on the reference won't match the base form that is stored in the GECK. To get that base form, you'd need ''GetBaseForm'' (GBF) and look it up in the list with ''ListGetFormIndex''.  This is "normal behavior" for GBO: i.e. when an actor's base form is directly templated to a levelled list.  Some instances, however, seem to be templated to another actor form which in turn is templated to a levelled list. (There really is no limit to how many levels of templating that can go on, except the restraint of the person making the NPCs.) That may explain the base object not returning as dynamic in some instances, and so, being checked off correctly by ''IsInList''.  This is an area not extensively explored.
 
 
 
Recall (from the [[#GECK Form-ID, Base-ID, Ref-ID, and Editor-ID|GECK Form-ID, Base-ID, Ref-ID, and Editor-ID]] section) that the "Base ID is the number assigned to a template for an object that is used to create many instances of that object."  And "the Reference ID is the unique ID of an individual object (unlike the Base ID, which is an ID for an object template)" that is placed in the game world.
 
 
 
In other words:  GBO returns the "Leveled" Base-ID (from the leveled list in the instance under consideration).  And that can be stored in a reference variable.  GBF goes into the list within the "Leveled" Base-ID and gets the root Base-ID that was the template of the leveled object.  That can also be stored in a reference variable but is not actually a "Ref-ID" and cannot be used as one, as it has no specific object.  (The "reference" / '''Ref-ID''' is expected to contain active characteristics, such as world location, current stats, etc. of a specific object instance in the game world.)
 
 
 
[http://geckwiki.com/index.php/GetSelf GetSelf] returns a Ref-ID that you can store in a reference variable, referring to the specific instance of it in-game.   ''GetSelf'' is only useful when this information is accessed externally, or when the scripted reference's Ref-ID needs to be passed as a parameter to a function like [http://geckwiki.com/index.php/PushActorAway PushActorAway].  This can be a problem with inventory objects because they are destroyed regularly.
 
 
</div>
 
</div>
  
<span id="Tip-InteriorRadio"></span>
+
<span id="Tip-Notes"></span>
==== TIP Limit Radio Range to multiple Interior Cells ====
+
==== TIP Passing a '''Note''' to the player ====
: Thanks to '''EPDGaffney''' and '''user826''' of the Nexus Fallout "New Vegas GECK and Modders" forum for the basis of the following:
+
: Thanks to '''EPDGaffney''' of the Nexus Fallout "New Vegas GECK and Modders" forum for the basis of the following:
 
<div name="Note Box" class="boilerplate metadata" id="Notice Box"  
 
<div name="Note Box" class="boilerplate metadata" id="Notice Box"  
 
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 
background-color:#333333;padding:3px;
 
background-color:#333333;padding:3px;
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
">In order to limit a Radio Broadcast to only be heard when the Player is inside a cluster of linked interior cells, you need to set the ''Talking Activator'' to ''Broadcast Range Type = Linked Interiors'' in the first cell.  (Place the ''Activator'' out of reach and sight to hide it from the player.) You then use ''[http://geckwiki.com/index.php/Bethsoft_Tutorial_Finalize_and_Connect Teleport Doors]'' as usual to link the interior cells together for the Radio Broadcast.
+
">This is a bit lengthy because it covers more than simply commands and functions, but concepts and how to implement them.  Unlike the tutorials listed, this tip is about how to pass a "note" to the Player directly or display it outside of the Pip-boy "Notes" tab.  (The concepts presented here similarly apply to passing along "recipes"See also [[#Tip-Recipes|TIP: Passing a 'Recipe' to the player]] in that instance.)
 +
 
 +
* The "Note" object:
  
You may find it preferable to use a set of "hidden, dummy doors" to provide the Radio Broadcast linkageBe sure to flag such doors to be "Hidden from Local Map".
+
From a modder’s perspective, it’s important to be aware that [http://geck.technodeep.net/index.php/Notes GECK: Notes] are different to standard itemsThey store text, and that text will not receive an [http://geck.technodeep.net/index.php/Inventory_Reference inventory reference] like other ''objects'' / "pick-ups" and can never be dropped (though they can be removed in several less standard ways).  Additionally, "notes" can’t have a script attached to them directly, though there are several workarounds available.  (Most of the tutorials listed on the subject are addressing these workarounds.)
</div>
 
  
<span id="Tip-Mannequins"></span>
+
However, like normal "pick-ups", "notes" can be assigned a model (mesh file) and an inventory ''icon'' that will be visible when being taken from a container (and '''not''' in the player’s Pip-Boy), when the mod creator has placed them in such containers.  Any model can be chosen, but it must have ''collision'' in order to be "picked up".  "Holotape" and "paper" models are most common.  If the "note" is to be "picked up" as a model outside of a container in the game world, no icon is necessary; and if the "note" is never to be seen in the game world, no model is neededIf it would not be seen in a container or in a cell, then it wouldn't need either one.
==== TIP Mannequins ''aka static Actors'' ====
+
 
: Thanks to '''b0bulat0r''' of the Nexus Fallout "New Vegas GECK and Modders" forum for the basis of the following:
+
"Notes" can be displayed in a ''terminal'' as well, and via the ''terminal form'' can be configured to be added to the player’s Pip-Boy upon reading them there, or not be added.
<div name="Note Box" class="boilerplate metadata" id="Notice Box"  
 
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 
background-color:#333333;padding:3px;
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 
">A "mannequin" is nothing more than an Actor that doesn't move: no idle poses, sandbox, travel packages, etc.All it takes is adding an "OnLoad" script with the line "SetActorsAI 0", e.g.:
 
<pre>
 
Begin OnLoad
 
  SetActorsAI 0
 
End
 
</pre>
 
</div>
 
  
<span id="Tip-MasterDependencies"></span>
+
[[File:EPDGaffney_NoteObject.png|thumbnail|100px|NoteObject]]
==== TIP Master Dependency Checking ====
+
Once in the Pip-Boy, "Notes" are one of four things: text, an image, a voice, or a sound.  (See the figure [[:File:EPDGaffney_NoteObject.png|NoteObject]]. {{Thumbnail_enlargement_message}})
: Thanks to '''miguick''' of the Nexus Fallout "New Vegas GECK and Modders" forum for the basis of the following:
 
<div name="Note Box" class="boilerplate metadata" id="Notice Box"
 
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 
background-color:#333333;padding:3px;
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 
">When the game starts you may want to check for items introduced in DLCs (e.g. "HonestHearts") and store the results in a list.
 
  
'''NVSE''''s ''[http://geck.technodeep.net/index.php/IsModLoaded IsModLoaded] "HonestHearts.esm"'' and ''[http://geck.technodeep.net/index.php/GetFormFromMod GetFormFromMod] "HonestHearts.esm" "xxxxxx"'' can't go wrong for such a thing(The quotation marks around the ''pluginName'' and ''hexFormID'' strings are required.)  Where "xxxxxx" are the last 6 digits of the FormIDs of the records you are concerned about.  The GECK displays them in a minimized column that you can stretch.
+
It's often easiest to take an existing "note" item that shares the model you wish to use and then change the '''EditorID''' to make a new object. That way all the associated mesh and icon/texture files are already linkedOtherwise you have to unpack them from the BSA as the '''GECK Editor''' doesn't look there for those files.
</div>
+
{{BSA Extraction Warning}}
  
<span id="Tip-ModAdditionsList"></span>
+
* Scripting with "Notes":
==== TIP Mod Additions list ====
 
: Thanks to '''DoctaSax''' of the Nexus Fallout "New Vegas Mod Talk" forum for the basis of the following:
 
<div name="Note Box" class="boilerplate metadata" id="Notice Box"  
 
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 
background-color:#333333;padding:3px;
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 
">Sometimes you want to know about all the additions of a particular type (such as 'weapons' for example) that a specific mod adds to the game.
 
  
With the '''JIP LN NVSE''' plugin (which now since v40 incorporates the "Lutana" extensions) this is quite easy.  Use a combination of the [http://geck.technodeep.net/index.php/GetModIndex GetModIndex] and [http://geck.technodeep.net/index.php/GetLoadedTypeArray GetLoadedTypeArray] functions with [http://geck.technodeep.net/index.php/Form_Type_IDs Form Type IDs] code '40' ('Weapons'):
+
To add a "note" directly to the player’s [http://fallout.gamepedia.com/Pip-Boy_3000 Pipboy], use the ''[http://geck.technodeep.net/index.php/AddNote AddNote] <NoteID reference>'' function. Unless the "note" is ever meant to be added in some other way (e.g. as an object dropped into the game world), a "note" added in this way will never be seen in the game world or any container and thus requires no icon or model.
<pre>
 
array_var aWeapons
 
int iIndex
 
  
let iIndex := GetModIndex "<TheMod>.esp"
+
To trigger an '''OnAdd''' event when acquiring a "note", as one may be accustomed to doing with other items, a workaround is required.  A ‘dummy’ "item" must be placed in the game world or a container, and this item can’t be a "note" item.  It must be a separate form, which can be named the same as the relevant note (but can’t share the same '''EditorID'''), and this item can have a script attached to it with an '''OnAdd''' script block.  Then just drop it in a cell (the video [http://www.youtube.com/watch?v=APnz-qdQxfQ Tutorial - Scripting Notes] Video by '''Seddon4494''' covers three basic methods of accomplishing this); or use ''[http://geck.technodeep.net/index.php/AddNote AddNote] <NoteID reference>'' in a (running) script somewhere (such as a dialog ''End Result Script'') to proactively get it into the Player's inventory instead of waiting for the Player to pick up the ''item''.  (See the figure [[:File:EPDGaffney_NoteObject.png|NoteObject]].  {{Thumbnail_enlargement_message}})
let aWeapons := GetLoadedTypeArray 40, iIndex
+
You can (if you wish; it's not required) then have your script remove the ‘dummy’ "item" (whose only purpose is to provide a flexible anchor for the note) from their inventory, and add the text/image/sound of the note (e.g. "FCRaiderNote" in the example below) to the player. It will then appear in their Pipboy "Data" tab under "Notes".
</pre>
 
</div>
 
  
<span id="Tip-NPCWpnChoice"></span>
+
For more on the subject see the [http://geck.technodeep.net/index.php/Bethsoft_Tutorial_Basic_Quest Bethsoft Tutorial Basic Quest] article.
==== TIP NPC Weapon Choice ====
 
: Thanks to '''EPDGaffney''' of the Nexus Fallout "New Vegas GECK and Modders" forum for the basis of the following:
 
<div name="Note Box" class="boilerplate metadata" id="Notice Box"
 
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 
background-color:#333333;padding:3px;
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 
">When trying to force an NPC to use particular combat tactics (such a choice of Weapon) under specific circumstances, remember that the higher cyclic "Damage Per Second" (DPS) rate of the Weapon is what governs their choice; not the base "Damage" inflicted per shot. {For Armor, it's "Damage Resistance" (DR) that governs.}  This is hard-coded into the game engine.
 
  
Consequently, in order to force the NPC to switch weapons, you may need to temporarily remove their current weapon and any alternative choices you don't want them to use, saving both the baseform of the removed weapon(s) and any timer using either a [http://geck.technodeep.net/index.php/Category:Tokens Token] or JIP's [https://geckwiki.com/index.php/Category:Auxiliary-Variable_Functions_(JIP) Auxvars] on the NPC in order to restore them after circumstances change again.  (Essentialy this is the same as the "reverse pickpocket" trick to cause an NPC to switch gear so you can steal what they had been wearing.) See [[#TIP:_Timers|TIP: Timers]] regarding limitations which necessitate this "Token" or "AuxVars" approach.
+
Example script attached to the game world "item" (e.g. the "holotape"):<pre>
</div>
+
  begin OnAdd Player        ; Run when player picks up 'misc. item'
 +
    AddNote FCRaiderNote    ; Give note to player
 +
    SetStage COLOMQ1 10    ; Start/set quest 'COLOMQ1' at stage 10
 +
    RemoveMe                ; Remove 'misc. item'
 +
  end
 +
</pre>
  
<span id="TIP-MsgVariable"></span>
+
* Using Message Functions:
==== TIP Pass a variable number into a script message ====
 
<div name="Note Box" class="boilerplate metadata" id="Notice Box"
 
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 
background-color:#333333;padding:3px;
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 
">
 
* Read the "Formatting messages" section in the GECK article on the [http://geck.bethsoft.com/index.php?title=ShowMessage ShowMessage] function.  For an integer: use "%.0f" or "%g".  Include the formatting switch in the text in the message form, like this:<pre>"The winning number was %g."</pre>
 
* Then pass the script variable to the ShowMessage function along with the message, like this:
 
<pre>
 
  set iWinningNumber to GetRandomPercent
 
  ShowMessage WinnerMessage, iWinningNumber</pre>
 
* Here's an example with [http://geck.bethsoft.com/index.php?title=MessageBoxEx NVSE], which allows you to show messages without creating a new message form. NVSE also supports a number of extra switches that can't be used in ordinary message forms.
 
:<pre>MessageBoxEx "The winning number was %g.", iWinningNumber</pre>
 
</div>
 
  
<span id="Tip-Notes"></span>
+
Though the traditional method of viewing a "note" is by way of clicking on them in the '''Pip-boy''', "notes" are currently very unwieldy unless they're short.  A mod using the concept of an "EventHandler" (see "Employing an EventHandler" below) to detect when the player clicks/presses a key or gamepad button on a note in the '''Pip-boy''' could theoretically change that if someone wanted, or someone could add readable books this way, or any number of things.  Such can make use of the improved ''message functions'' available to us by way of [http://nvse.silverlock.org/ New Vegas Script Extender (NVSE)] and [http://rd.nexusmods.com/newvegas/mods/58277 JIP LN NVSE Plugin] mods; which now include:
==== TIP Passing a '''Note''' to the player ====
+
* [http://geckwiki.com/index.php/MessageEx MessageEx] (NVSE)
: Thanks to '''EPDGaffney''' of the Nexus Fallout "New Vegas GECK and Modders" forum for the basis of the following:
+
* [http://geckwiki.com/index.php/MessageBoxEx MessageBoxEx] (NVSE)
<div name="Note Box" class="boilerplate metadata" id="Notice Box"
+
* [http://geckwiki.com/index.php/MessageExAlt MessageExAlt] (JIP LN)
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
+
* [http://geckwiki.com/index.php/MessageBoxExAlt MessageBoxExAlt] (JIP LN)
background-color:#333333;padding:3px;
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 
">This is a bit lengthy because it covers more than simply commands and functions, but concepts and how to implement them. Unlike the tutorials listed, this tip is about how to pass a "note" to the Player directly or display it outside of the Pip-boy "Notes" tab. (The concepts presented here similarly apply to passing along "recipes".  See also [[#Tip-Recipes|TIP: Passing a 'Recipe' to the player]] in that instance.)
 
  
* The "Note" object:
+
(However, as these constantly are updated and added to, the mod creator is advised to search the list of functions on the [http://geckwiki.com/index.php/Main_Page Community Wiki] site lists of [http://geckwiki.com/index.php/Complete_List_of_Functions_in_NVSE NVSE] and [http://geck.technodeep.net/index.php/Category:Functions_(JIP) JIP LN] functions.  The "official" Bethesda GECK Wiki is not getting those updates to it's function list.)
  
From a modder’s perspective, it’s important to be aware that [http://geck.technodeep.net/index.php/Notes GECK: Notes] are different to standard items.  They store text, and that text will not receive an [http://geck.technodeep.net/index.php/Inventory_Reference inventory reference] like other ''objects'' / "pick-ups" and can never be dropped (though they can be removed in several less standard ways).  Additionally, "notes" can’t have a script attached to them directly, though there are several workarounds available.  (Most of the tutorials listed on the subject are addressing these workarounds.)
+
'''MessageEx''' and '''MessageBoxEx''' are NVSE functions and allow one to pass the text directly, which is very convenient, but they don't give any options and '''MessageBoxEx''' does not offer the ability to "title" the message.  The other two are JIP functions that improve upon this greatly.
 
 
However, like normal "pick-ups", "notes" can be assigned a model (mesh file) and an inventory ''icon'' that will be visible when being taken from a container (and '''not''' in the player’s Pip-Boy), when the mod creator has placed them in such containers.  Any model can be chosen, but it must have ''collision'' in order to be "picked up".  "Holotape" and "paper" models are most common.  If the "note" is to be "picked up" as a model outside of a container in the game world, no icon is necessary; and if the "note" is never to be seen in the game world, no model is needed.  If it would not be seen in a container or in a cell, then it wouldn't need either one.
 
 
 
"Notes" can be displayed in a ''terminal'' as well, and via the ''terminal form'' can be configured to be added to the player’s Pip-Boy upon reading them there, or not be added.
 
 
 
[[File:EPDGaffney_NoteObject.png|thumbnail|100px|NoteObject]]
 
Once in the Pip-Boy, "Notes" are one of four things: text, an image, a voice, or a sound.  (See the figure [[:File:EPDGaffney_NoteObject.png|NoteObject]].  {{Thumbnail_enlargement_message}})
 
 
 
It's often easiest to take an existing "note" item that shares the model you wish to use and then change the '''EditorID''' to make a new object. That way all the associated mesh and icon/texture files are already linked.  Otherwise you have to unpack them from the BSA as the '''GECK Editor''' doesn't look there for those files.
 
{{BSA Extraction Warning}}
 
 
 
* Scripting with "Notes":
 
 
 
To add a "note" directly to the player’s [http://fallout.gamepedia.com/Pip-Boy_3000 Pipboy], use the ''[http://geck.technodeep.net/index.php/AddNote AddNote] <NoteID reference>'' function.  Unless the "note" is ever meant to be added in some other way (e.g. as an object dropped into the game world), a "note" added in this way will never be seen in the game world or any container and thus requires no icon or model.
 
 
 
To trigger an '''OnAdd''' event when acquiring a "note", as one may be accustomed to doing with other items, a workaround is required.  A ‘dummy’ "item" must be placed in the game world or a container, and this item can’t be a "note" item.  It must be a separate form, which can be named the same as the relevant note (but can’t share the same '''EditorID'''), and this item can have a script attached to it with an '''OnAdd''' script block.  Then just drop it in a cell (the video [http://www.youtube.com/watch?v=APnz-qdQxfQ Tutorial - Scripting Notes] Video by '''Seddon4494''' covers three basic methods of accomplishing this); or use ''[http://geck.technodeep.net/index.php/AddNote AddNote] <NoteID reference>'' in a (running) script somewhere (such as a dialog ''End Result Script'') to proactively get it into the Player's inventory instead of waiting for the Player to pick up the ''item''.  (See the figure [[:File:EPDGaffney_NoteObject.png|NoteObject]].  {{Thumbnail_enlargement_message}})
 
You can (if you wish; it's not required) then have your script remove the ‘dummy’ "item" (whose only purpose is to provide a flexible anchor for the note) from their inventory, and add the text/image/sound of the note (e.g. "FCRaiderNote" in the example below) to the player. It will then appear in their Pipboy "Data" tab under "Notes".
 
 
 
For more on the subject see the [http://geck.technodeep.net/index.php/Bethsoft_Tutorial_Basic_Quest Bethsoft Tutorial Basic Quest] article.
 
 
 
Example script attached to the game world "item" (e.g. the "holotape"):<pre>
 
  begin OnAdd Player        ; Run when player picks up 'misc. item'
 
    AddNote FCRaiderNote    ; Give note to player
 
    SetStage COLOMQ1 10    ; Start/set quest 'COLOMQ1' at stage 10
 
    RemoveMe                ; Remove 'misc. item'
 
  end
 
</pre>
 
 
 
* Using Message Functions:
 
 
 
Though the traditional method of viewing a "note" is by way of clicking on them in the '''Pip-boy''', "notes" are currently very unwieldy unless they're short.  A mod using the concept of an "EventHandler" (see "Employing an EventHandler" below) to detect when the player clicks/presses a key or gamepad button on a note in the '''Pip-boy''' could theoretically change that if someone wanted, or someone could add readable books this way, or any number of things.  Such can make use of the improved ''message functions'' available to us by way of [http://nvse.silverlock.org/ New Vegas Script Extender (NVSE)] and [http://rd.nexusmods.com/newvegas/mods/58277 JIP LN NVSE Plugin] mods; which now include:
 
* [http://geckwiki.com/index.php/MessageEx MessageEx] (NVSE)
 
* [http://geckwiki.com/index.php/MessageBoxEx MessageBoxEx] (NVSE)
 
* [http://geckwiki.com/index.php/MessageExAlt MessageExAlt] (JIP LN)
 
* [http://geckwiki.com/index.php/MessageBoxExAlt MessageBoxExAlt] (JIP LN)
 
 
 
(However, as these constantly are updated and added to, the mod creator is advised to search the list of functions on the [http://geckwiki.com/index.php/Main_Page Community Wiki] site lists of [http://geckwiki.com/index.php/Complete_List_of_Functions_in_NVSE NVSE] and [http://geck.technodeep.net/index.php/Category:Functions_(JIP) JIP LN] functions.  The "official" Bethesda GECK Wiki is not getting those updates to it's function list.)
 
 
 
'''MessageEx''' and '''MessageBoxEx''' are NVSE functions and allow one to pass the text directly, which is very convenient, but they don't give any options and '''MessageBoxEx''' does not offer the ability to "title" the message.  The other two are JIP functions that improve upon this greatly.
 
  
 
With the '''MessageBoxExAlt''' function (as of JIP version 53.60) it is now possible to pass a dummy, non-script form as the UDF script argument, in which case no script will be invoked when a button (or key) is pressed.  This will mean that you can use that same blank form for every message box that you want to give a title but don't need buttons for it.  The UDF script is where you would implement button functionality, and it's far quicker than vanilla.  Only one such "dummy UDF script" per mod would be needed in the case where you desired to use a message box with a title but no buttons and pass the text directly as a string.
 
With the '''MessageBoxExAlt''' function (as of JIP version 53.60) it is now possible to pass a dummy, non-script form as the UDF script argument, in which case no script will be invoked when a button (or key) is pressed.  This will mean that you can use that same blank form for every message box that you want to give a title but don't need buttons for it.  The UDF script is where you would implement button functionality, and it's far quicker than vanilla.  Only one such "dummy UDF script" per mod would be needed in the case where you desired to use a message box with a title but no buttons and pass the text directly as a string.
Line 4,307: Line 4,758:
 
[When linking to a Video, be sure to check the page sidebar for additional, related subject videos.]
 
[When linking to a Video, be sure to check the page sidebar for additional, related subject videos.]
 
* [http://wiki.nexusmods.com/index.php/Category:Texturing Texturing Category on Nexus] Wiki.  A large collection of articles on the subject.
 
* [http://wiki.nexusmods.com/index.php/Category:Texturing Texturing Category on Nexus] Wiki.  A large collection of articles on the subject.
* [http://www.darkcreations.org/testg/wiki/Main_Page The Elder Scrolls Texture Guide (TESTG)] Wiki.  A glossary of terminology and summary of various basic aspects related to texture replacements, along with a collection of "The Elder Scrolls" game mods of that nature.  Designed for players rather than mod creators, but useful for beginners.
+
* [http://web.archive.org/web/20170713081056/http://www.darkcreations.org/testg/wiki/Main_Page The Elder Scrolls Texture Guide (TESTG)] Wiki.  A glossary of terminology and summary of various basic aspects related to texture replacements, along with a collection of "The Elder Scrolls" game mods of that nature.  Designed for players rather than mod creators, but useful for beginners.
 
* [http://forums.getpaint.net/index.php?/forum/28-textures/ Paint.net Tutorials] Forum.
 
* [http://forums.getpaint.net/index.php?/forum/28-textures/ Paint.net Tutorials] Forum.
 
* [http://www.youtube.com/channel/UChSDb-rgM7QrW6QvZjOy-VA Paint.net tutorial] Video series by '''yakobelt'''.
 
* [http://www.youtube.com/channel/UChSDb-rgM7QrW6QvZjOy-VA Paint.net tutorial] Video series by '''yakobelt'''.
Line 4,358: Line 4,809:
 
background-color:#333333;padding:3px;
 
background-color:#333333;padding:3px;
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
">(For an explanation of the specific terms used here, please see the [http://www.darkcreations.org/testg/wiki/Glossary Glossary] page of the TESTG wiki site.)
+
">(For an explanation of the specific terms used here, please see the [http://web.archive.org/web/20170713081056/http://www.darkcreations.org/testg/wiki/Glossary Glossary] page of the TESTG wiki site.)
  
 
Suppose you want the '''normal map''' of a texture to provide as much detail as possible.  The key is understanding that it is working on two layers: the RGB "color" one which gives you the surface relief; and the ''Alpha channel'' one which gives you the ''Specularity''.
 
Suppose you want the '''normal map''' of a texture to provide as much detail as possible.  The key is understanding that it is working on two layers: the RGB "color" one which gives you the surface relief; and the ''Alpha channel'' one which gives you the ''Specularity''.
Line 4,383: Line 4,834:
  
 
'''Paint.Net''' doesn't treat ''Alpha channel'' as a different layer, so it's more difficult to work with. If you are messing around with ''Alpha channel'' stuff, '''GIMP''' is the better choice, IMHO.</div>
 
'''Paint.Net''' doesn't treat ''Alpha channel'' as a different layer, so it's more difficult to work with. If you are messing around with ''Alpha channel'' stuff, '''GIMP''' is the better choice, IMHO.</div>
 +
</div>
 +
 +
<span id="Tip-TextureTransparency"></span>
 +
==== TIP Saving Texture (DDS) with Transparency ====
 +
: Thanks to '''madmongo''' of the Nexus Fallout "New Vegas GECK and Modders" forum for the basis of the following:
 +
<div name="Note Box" class="boilerplate metadata" id="Notice Box"
 +
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 +
background-color:#333333;padding:3px;
 +
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 +
">When having difficulty getting a texture file to save with "transparency" (e.g. with '''Paint.Net''' for example), try the following.
 +
# Save in the DXT5 file format from your paint program's "save dds file options".  (See the [http://www.buckarooshangar.com/flightgear/tut_dds.html Working with DDS/DXT Files] (HTML article) by Gary "Buckaroo" Neely regarding the differences in the various DXT formats.)
 +
# Open the mesh NIF file in '''NifSkope''' and add the ''NiAlpha'' property to the ''NiTriStrips'' of the mesh that uses the texture.
 
</div>
 
</div>
  
Line 4,392: Line 4,855:
 
* [http://www.nexusmods.com/newvegas/images/104855/?changePreference=3 Guide - Blender and NifSkope weapon] by '''SGTbayk47'''.
 
* [http://www.nexusmods.com/newvegas/images/104855/?changePreference=3 Guide - Blender and NifSkope weapon] by '''SGTbayk47'''.
 
* [[Simple_vanilla_ironsights|Simple vanilla ironsights]] Wiki.
 
* [[Simple_vanilla_ironsights|Simple vanilla ironsights]] Wiki.
 +
* [http://www.nexusmods.com/newvegas/mods/66532 Tammer's Guide to NIF-Bashing] PDF and images tutorial by '''mc_tammer '''.
 
* [[Texturing_weapons_-_video_tutorial|Texturing weapons - video tutorial]] Video link in the wiki article.
 
* [[Texturing_weapons_-_video_tutorial|Texturing weapons - video tutorial]] Video link in the wiki article.
 +
* [http://www.nexusmods.com/newvegas/mods/66968 Weapon Animation Patching Tutorial] PDF with separate "screenshots" file by '''benja'''.
  
 
<span id="Tip-GECKWpnCTD"></span>
 
<span id="Tip-GECKWpnCTD"></span>
Line 4,469: Line 4,934:
 
* [http://www.truancyfactory.com/tutorials/fallout3/fallout_worldspace.html Fallout3 World Space] by '''truancyfactory'''. HTML with images.
 
* [http://www.truancyfactory.com/tutorials/fallout3/fallout_worldspace.html Fallout3 World Space] by '''truancyfactory'''. HTML with images.
 
* [http://www.creationkit.com/index.php?title=Bethesda_Tutorial_Navmesh Bethesda Tutorial: Navmesh] Wiki.
 
* [http://www.creationkit.com/index.php?title=Bethesda_Tutorial_Navmesh Bethesda Tutorial: Navmesh] Wiki.
* [http://afkmods.iguanadons.net/index.php?/topic/3337-skyrim-fixing-navmesh-deletion-using-tes5edit/ Fixing Navmesh deletion using TES5Edit by '''Arthmoor'''.] Thread.
+
* [https://www.afkmods.com/index.php?/topic/3337-skyrim-fixing-navmesh-deletion-using-tes5edit/ Fixing Navmesh deletion using TES5Edit by '''Arthmoor'''.] Thread.
 
* [http://www.youtube.com/watch?v=Q-ZQtgveKaM Fixing Deleted Navmesh with TES5edit by '''soupdragon'''] Video.
 
* [http://www.youtube.com/watch?v=Q-ZQtgveKaM Fixing Deleted Navmesh with TES5edit by '''soupdragon'''] Video.
 
* [http://www.youtube.com/watch?v=babuNn5pzsw Filter for (find) Deleted Navmeshes with TES5edit by '''soupddragon'''] Video.
 
* [http://www.youtube.com/watch?v=babuNn5pzsw Filter for (find) Deleted Navmeshes with TES5edit by '''soupddragon'''] Video.
Line 4,482: Line 4,947:
 
white-space: -o-pre-wrap;    /* Opera 7+ */
 
white-space: -o-pre-wrap;    /* Opera 7+ */
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
">
+
">
<span id="CleaningNavMeshDeletion"; style="color: red; background-color:#333333;">WARNING:</span> Do NOT use any of these methods to ''clean the deleted navmeshes'' in the official ESMs.  This will do more harm than good. "Official ESMs" refers to the DLC by the game publisher.
+
<span id="CleaningNavMeshDeletion"; style="color: red; background-color:#333333;">WARNING:</span> Do NOT use any of these methods to ''clean the deleted navmeshes'' in the official ESMs.  This will do more harm than good. "Official ESMs" refers to the DLC by the game publisher.
</div>
+
</div>
 +
 
 +
<span id="Tip-WorldMap"></span>
 +
==== TIP Creating a new '''world map''' ====
 +
<div name="Note Box" class="boilerplate metadata" id="Notice Box"
 +
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 +
background-color:#333333;padding:3px;
 +
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 +
">All "world maps" are based upon a "bitmap image" in ".dds" format.  Depending upon how "original" your worldspace territory is, you may be able to find "satellite images" or "heightmap" or other sources whose copyright permits you to create a "derivative work" by scanning/converting into a bitmap image format.  Otherwise you will probably have to take screenshots of the various "render windows" of your unique worldspace in '''GECK''' and stitch the results together into a single image for use as described below.
 +
 
 +
'''Ptolemy''' by '''Alan Broad''' (included in the mod [https://www.nexusmods.com/newvegas/mods/57245/? Ptolemy Maps for New Vegas]), being purpose-built for games like The Elder Scrolls, not only came with the Morrowind map but served as a tool for creating game maps from bitmap images. It included a simple but robust suite of tools for creating and organizing locations based on their type, faction, importance, etc.  It was used to create the FNV maps included in that mod.
 +
 
 +
In addition, there is the wiki article [http://wiki.tesnexus.com/index.php/Oblivion_custom_in-game_map Oblivion custom in-game map] which is a short tutorial describing one method of creating a working world map for your worldspace in Oblivion.  As the same game engine is used for both, the process should work for FNV.  Just don't select anything in the "Parent Worldspace" field.
 +
 
 +
A more complete tutorial on the overall process is [http://www.truancyfactory.com/tutorials/fallout3/fallout_worldspace.html Creating a Custom Worldspace for Fallout 3] by '''truancyfactory'''.
 +
</div>
 +
 
 +
=== Packaging Mods for Installation ===
 +
Once you have created (and tested) your mod, you still aren't done.  You have to "package" the ESM & ESP files, and all related "assets" into a structure suitable for installation.  And given that there are more than one "mod manager" in use by people, this requires some forethought.  Once you have created your "mod package", you then have to "publish" it on the Internet, presumably to the "Nexus Mods" site which is the assumption here.
 +
 
 +
Note: If you package your mod into an "executable installer" (so it has a ".exe" extension), it cannot be installed with a "mod manager".  They can only deal with packages in '''7Zip''', '''ZIP''', or '''RAR''' archive formats.  You would have to "run" the installer executable first so it unpacked the package into a folder, and then manually move the contents of that folder to the correct locations under "Data".
 +
 
 +
[When linking to a Video, be sure to check the page sidebar for additional, related subject videos.]
 +
* [http://wiki.nexusmods.com/index.php/Category:Using_the_Nexus_sites Category: Using the Nexus sites] Wiki page has articles on:
 +
:* [[Blank_thumbnail_images | Blank thumbnail images]] Wiki
 +
:* [[Compressing_your_images_before_uploading | Compressing your images before uploading]] Wiki
 +
:* [[Formating_and_BBCode_in_Descriptions | Formatting and BBCode in Descriptions]] Wiki
 +
:* [[How_to_convert_images_with_MS_Paint | How to convert images with MS Paint]] Wiki
 +
:* [[How_to_crop_images_with_MS_Paint | How to crop images in MS Paint]] Wiki
 +
:* [[How_to_upload_mods | How to upload mods]] Wiki
 +
:* [[Illegal_Music_Pack_Uploads_and_You | Illegal Music Pack Uploads and You]] Wiki
 +
* [http://zumbs.wordpress.com/2009/11/08/fomm-and-fomods-for-dummies-1/ FOMM and FOMODs for Dummies] by '''Zumbs'''
 +
* [http://www.nexusmods.com/skyrim/mods/75140/? FOMOD Validator] by '''Ganda'''
 +
* [http://www.nexusmods.com/newvegas/mods/44914/? Guide to FOMOD scripting] Mod by '''nyrb''' based on work by '''kaburke'''
 +
* [http://www.nexusmods.com/skyrim/mods/35567/? Mod Publishing Tutorial for Nexus] Mod by '''TheThirdRace'''
 +
* [http://cs.elderscrolls.com/index.php?title=Modding_Etiquette Modding Etiquette] Wiki
 +
* [http://www.nexusmods.com/skyrim/mods/39434/? NMM Installer Tutorial - FOMOD - FOMM] Mod by '''XunAmarox'''
 +
* [http://www.nexusmods.com/skyrim/mods/41440/? NMM ModuleConfig Creator] Mod by '''Twilightassassin'''
 +
* [http://wiki.step-project.com/Guide:Wrye_Bash S.T.E.P. Guide: Wrye Bash] Wiki
 +
:* [[BAIN_an_understanding|BAIN an understanding]]
 +
:* [http://forums.bethsoft.com/topic/1084204-bain-mod-installation-projects/ BAIN Mod installation projects] thread on the Oblivion forum.  Understanding BAIN complex structures aids in scripting installs with other managers.
 +
:* [http://www.nexusmods.com/skyrim/mods/4328/? BAIN Archive Tools - BAT] by Surazal
 +
 +
Re Original images:  You can use screenshots from the game, as long as you are the one who took them, or you use those posted by others with their explicit permission.  When in doubt, see the "Terms of Service" and the image "file" page to check the permissions there.
 +
 
 +
Re Music: If you intend to include externally sourced "music", "voices", or "sounds", see the wiki article [http://wiki.nexusmods.com/index.php/Illegal_Music_Pack_Uploads_and_You Illegal Music Pack Uploads and You].  Unless it is your own original work, it's copyrighted by someone else.  You have to check for permissions.
 +
 
 +
Re REQUIRED: That setting is for linking other mods/plugins that are essential for your mod to work correctly.
 +
 
 +
A video does not fall into that category, as it can only be describing how to install or use your mod.  Your best bet if you feel it is essential people use it for your documentation is to provide that explanation and link it prominently in your description (as well as under the "Video" tab).  (See the wiki [http://wiki.nexusmods.com/index.php/Formating_and_BBCode_in_Descriptions Formatting and BBCode in Descriptions] article.)  However, bear in mind that:
 +
* Not everyone likes or can even watch some videos: e.g. medical conditions; a different native language (not easily translated from a video; while it is from a text file);
 +
* A video is no substitute for written instructions which should be included in a "ReadMe" file.  That link not only explains that position but links to a "ReadMe Generator" program to help you create a "proper" file.
 +
* Most players do not want to read/view anything to get a mod installed.  People (well, most of them) never seem to RTFM.  They assume all they need to do is install, and at most then add it in their mod manager to their current game settings.  They will then turn around and complain your mod is "broken" and demand you fix it NOW.  This is a "fact of life" for mod creators.  Plan for it, and reduce your installation complexity upfront as much as possible.
 +
 +
To that end, learn how to properly package your mod.
  
<span id="Tip-WorldMap"></span>
+
<span id="Tip-BSAFiles"></span>
==== TIP Creating a new '''world map''' ====
+
==== TIP BSA Files ====
 +
: Thanks to '''Zilav''' (of '''xEdit''', '''BSArch''', and '''TTW''' fame) in the Nexus Fallout "New Vegas Technical Support" forum for the basis of the following:
 
<div name="Note Box" class="boilerplate metadata" id="Notice Box"  
 
<div name="Note Box" class="boilerplate metadata" id="Notice Box"  
 
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 
style="margin:0px 10px 10px 10px;border:1px dashed #DAA520;color: lightgray;
 
background-color:#333333;padding:3px;
 
background-color:#333333;padding:3px;
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
 
word-wrap: break-word;      /* Internet Explorer 5.5+ */
">All "world maps" are based upon a "bitmap image" in ".dds" format.  Depending upon how "original" your worldspace territory is, you may be able to find "satellite images" or "heightmap" or other sources whose copyright permits you to create a "derivative work" by scanning/converting into a bitmap image formatOtherwise you will probably have to take screenshots of the various "render windows" of your unique worldspace in '''GECK''' and stitch the results together into a single image for use as described below.
+
">If you have a large number of "loose" asset files associated with your plugin, consider packaging them into a "Bethesda Software Archive (BSA)" fileThis is how the vanilla game provides most of it's files.  It can provide performance improvements for older systems, as well as keeping the "asset" files of your plugin neatly packaged and separate from those of other mods. As a player, you may find it beneficial to package other mod's loose files into BSAs for your own performance gains.   
 
 
'''Ptolemy''' by '''Alan Broad''' (included in the mod [https://www.nexusmods.com/newvegas/mods/57245/? Ptolemy Maps for New Vegas]), being purpose-built for games like The Elder Scrolls, not only came with the Morrowind map but served as a tool for creating game maps from bitmap images. It included a simple but robust suite of tools for creating and organizing locations based on their type, faction, importance, etc.  It was used to create the FNV maps included in that mod.
 
 
 
In addition, there is the wiki article [http://wiki.tesnexus.com/index.php/Oblivion_custom_in-game_map Oblivion custom in-game map] which is a short tutorial describing one method of creating a working world map for your worldspace in Oblivion.  As the same game engine is used for both, the process should work for FNVJust don't select anything in the "Parent Worldspace" field.
 
  
A more complete tutorial on the overall process is [http://www.truancyfactory.com/tutorials/fallout3/fallout_worldspace.html Creating a Custom Worldspace for Fallout 3] by '''truancyfactory'''.
+
According to the GECKWiki page on [http://geckwiki.com/index.php?title=BSA_Files BSA Files], <span style="color: red;
 +
background-color:#fff5f5;">the GECK doesn't work with BSA files itself.  It requires "loose files".</span>  See that page for other important information.  Things to be aware of:
 +
# A BSA file can only be 2GB in size.  That is, no more than "2^31 = 2,147,483,648 bytes / 1024 = 2,097,152 KB / 1024 = 2048 MB".
 +
# Even though FNV distributes their Meshes and Textures in separate BSA files, they can be combined into one.  The only limitations are the overall file size and that the internal folder structure match that at the top level under "Data" (i.e. "meshes", "textures", "menus", etc.).  (This might not hold true for other games, but was successfully done for TTW.  For example: Fallout 4 has it's own format for ''textures only'' archives, so they are kept separate.)  Use the "Fallout - <name>.BSA" files as guidelines.
 +
# Older BSA tools are not guaranteed to correctly build BSA files suitable for ALL Bethesda games.  (They will probably extract files from them just fine.)  The internal formats have changed from game to game over time and as new discoveries have been unearthed.  [http://www.nexusmods.com/newvegas/mods/64745 BSArch] (by '''Zilav''') is currently the only tool specifically designed to recognize and ''build'' correct BSA archives for all the Bethesda games. However, it is "command line" and does not have a Windows "Graphical User Interface (GUI)".
 +
# You can have multiple BSA files with the same ESP "parent" filename, e.g.:
 +
#* PluginName.ESP
 +
#* PluginName - Textures.BSA
 +
#* PluginName - Textures2.BSA
 +
#: etc.
 +
# The engine loads BSA files that match the significant part of the "base name" (up to the first embedded space or punctuation mark).  If you desire to have "spaces" in the significant part of the base filename, use the "underscore" character (_) instead (e.g. "MY_MOD" for "MY_MOD - Textures.bsa").  The secondary (less significant) portion of the filename after the first embedded space must be unique for each subsequent file.
 +
# Only an ESP can be associated with a BSA.  If the mod does not already include an ESP file, then a "dummy" one must be created using the '''GECK'''.  However, this ESP will take up a slot of the "active plugin cap".  See the '''Skyrim''' thread [http://forums.nexusmods.com/index.php?/topic/4591640-update-bsas-and-you/ BSAs and you] regarding these concerns, always bearing in mind that specifics mentioned there apply to '''Skyrim''' and not necessarily '''FNV'''.  The basics still apply.
 +
#* To create a "master-less dummy ESP": Open the '''GECK''' without loading any files (nothing checked under "File | Data").  Immediately save a "new file" as your dummy ESP name.  This file will have zero bytes and appear to be completely empty.  However, an empty plaintext file will not work instead, so there is something not obvious involved.
 +
#* FYI: '''Oblivion''', '''Fallout 3''' and '''New Vegas''' load archives by partial name matching, so "Mod.esp" will load all archives named "Mod*.bsa" (case insensitive of course in Windows, but not in Linux!) in alphabetical order. The only exception is the main game master plugin; so "FalloutWhatever.bsa" won't be loaded.  However naming after any DLC if available like "HonestHeartsMyAwesomeArchive.bsa" will work and allows to avoid using dummy plugins.
 +
#: '''Morrowind''' has no BSA loading by plugins and loads archives listed in the INI file only.
 +
#: '''Skyrim LE''' loads a single archive by exact name match: "Mod.bsa".
 +
#: '''Skyrim SE''' loads two archives per plugin: "Mod.bsa" and "Mod - Textures.bsa" (it can contain any assets despite the name).
 +
#: '''Fallout 4''' loads "Mod - Main.bsa" and "Mod - Textures.bsa".  (Probably others, but not investigated.)
 +
# Compression in the BSA: Please see that section of the "BSAs and You" thread linked above.
 +
# You may want to compare folder contents between the original mod distributed files folders and the ones you are packing into a BSA.  For comparing folders, suggest [http://winmerge.org/?lang=en WinMerge].  It can compare both files and folders.
 +
# Testing your BSA files will require adding the ESP to the "load order", toggling "ArchiveInvalidadtion", and exercising the game as appropriate to ensure the assets are loaded.  Using a "new game" for testing purposes is recommended.
 
</div>
 
</div>
  
=== Packaging Mods for Installation ===
+
* File Names.
Once you have created (and tested) your mod, you still aren't doneYou have to "package" the ESM & ESP files, and all related "assets" into a structure suitable for installation. And given that there are more than one "mod manager" in use by people, this requires some forethoughtOnce you have created your "mod package", you then have to "publish" it on the Internet, presumably to the "Nexus Mods" site which is the assumption here.
+
While your current mod related filenames undoubtedly make sense to you, it is highly likely they were not named with the player or packaging in mind unless you are quite experienced with supporting modsThe number of mods with the "documentation" in a file simply named "ReadMe.txt" (as if there were no other files with that name, ever) is only slightly less than the total number of mods in existenceThis might work for packaging a mod, but when it is unpacked by a mod manager (which typically place all installed "documentation" into a common "docs" folder) the latest installed will overwrite any already existing with that same name. Similarly, a number of mod plugin files with disconnected names (e.g. "name1.esm", "name2.esp", "patch-x.esp") when installed into a "load order" get separated and lost in the list of filenames and become extremely difficult to associate with each other unless some care is taken to prefix them with a common string such as the mod name or abbreviationAnd without something to tie the mod abbreviation or prefix to the full package name (such as using both in the "ReadMe" filename), it can become impossible to trace backwards from the individual filename to the mod package name.  Listing all the related plugin filenames and their purpose in a "documentation" file is also a reasonable practice for the benefit of both the author and the user.
 
 
Note: If you package your mod into an "executable installer" (so it has a ".exe" extension), it cannot be installed with a "mod manager".  They can only deal with packages in '''7Zip''', '''ZIP''', or '''RAR''' archive formatsYou would have to "run" the installer executable first so it unpacked the package into a folder, and then manually move the contents of that folder to the correct locations under "Data".
 
  
[When linking to a Video, be sure to check the page sidebar for additional, related subject videos.]
+
Consequently, you need to give all the individual files in your package a common prefixLong path and filename combinatons (up to 255 characters) are not a problem for modern operating systems, so don't be afraid to use them if necessary but try to use some restraintThis also means you need to ensure that anything which depends upon knowing those specific filenames (such as BSA files) is also updated.
* [http://wiki.nexusmods.com/index.php/Category:Using_the_Nexus_sites Category: Using the Nexus sites] Wiki page has articles on:
 
:* [[Blank_thumbnail_images | Blank thumbnail images]] Wiki
 
:* [[Compressing_your_images_before_uploading | Compressing your images before uploading]] Wiki
 
:* [[Formating_and_BBCode_in_Descriptions | Formatting and BBCode in Descriptions]] Wiki
 
:* [[How_to_convert_images_with_MS_Paint | How to convert images with MS Paint]] Wiki
 
:* [[How_to_crop_images_with_MS_Paint | How to crop images in MS Paint]] Wiki
 
:* [[How_to_upload_mods | How to upload mods]] Wiki
 
:* [[Illegal_Music_Pack_Uploads_and_You | Illegal Music Pack Uploads and You]] Wiki
 
* [http://zumbs.wordpress.com/2009/11/08/fomm-and-fomods-for-dummies-1/ FOMM and FOMODs for Dummies] by '''Zumbs'''
 
* [http://www.nexusmods.com/skyrim/mods/75140/? FOMOD Validator] by '''Ganda'''
 
* [http://www.nexusmods.com/newvegas/mods/44914/? Guide to FOMOD scripting] Mod by '''nyrb''' based on work by '''kaburke'''
 
* [http://www.nexusmods.com/skyrim/mods/35567/? Mod Publishing Tutorial for Nexus] Mod by '''TheThirdRace'''
 
* [http://cs.elderscrolls.com/index.php?title=Modding_Etiquette Modding Etiquette] Wiki
 
* [http://www.nexusmods.com/skyrim/mods/39434/? NMM Installer Tutorial - FOMOD - FOMM] Mod by '''XunAmarox'''
 
* [http://www.nexusmods.com/skyrim/mods/41440/? NMM ModuleConfig Creator] Mod by '''Twilightassassin'''
 
* [http://wiki.step-project.com/Guide:Wrye_Bash S.T.E.P. Guide: Wrye Bash] Wiki
 
:* [[BAIN_an_understanding|BAIN an understanding]]
 
:* [http://forums.bethsoft.com/topic/1084204-bain-mod-installation-projects/ BAIN Mod installation projects] thread on the Oblivion forum.  Understanding BAIN complex structures aids in scripting installs with other managers.
 
:* [http://www.nexusmods.com/skyrim/mods/4328/? BAIN Archive Tools - BAT] by Surazal
 
   
 
Re Original images:  You can use screenshots from the game, as long as you are the one who took them, or you use those posted by others with their explicit permission.  When in doubt, see the "Terms of Service" and the image "file" page to check the permissions there.
 
 
 
Re Music: If you intend to include externally sourced "music", "voices", or "sounds", see the wiki article [http://wiki.nexusmods.com/index.php/Illegal_Music_Pack_Uploads_and_You Illegal Music Pack Uploads and You].  Unless it is your own original work, it's copyrighted by someone else.  You have to check for permissions.
 
 
 
Re REQUIRED: That setting is for linking other mods/plugins that are essential for your mod to work correctly.
 
 
 
A video does not fall into that category, as it can only be describing how to install or use your mod.  Your best bet if you feel it is essential people use it for your documentation is to provide that explanation and link it prominently in your description (as well as under the "Video" tab).  (See the wiki [http://wiki.nexusmods.com/index.php/Formating_and_BBCode_in_Descriptions Formatting and BBCode in Descriptions] article.)  However, bear in mind that:
 
* Not everyone likes or can even watch some videos: e.g. medical conditions; a different native language (not easily translated from a video; while it is from a text file);
 
* A video is no substitute for written instructions which should be included in a "ReadMe" fileThat link not only explains that position but links to a "ReadMe Generator" program to help you create a "proper" file.
 
* Most players do not want to read/view anything to get a mod installed.  People (well, most of them) never seem to RTFM.  They assume all they need to do is install, and at most then add it in their mod manager to their current game settings. They will then turn around and complain your mod is "broken" and demand you fix it NOW.  This is a "fact of life" for mod creators.  Plan for it, and reduce your installation complexity upfront as much as possible.
 
 
To that end, learn how to properly package your mod. 
 
  
 +
* Packages.
 
Packages can be divided into two categories: "standard" and "private":
 
Packages can be divided into two categories: "standard" and "private":
 
* A "standard" structured package follows the directory structure used by the game: that is vanilla game sub-folders under "Data" (such as "Meshes", "Textures", "Menus", etc.), with possibly additional "mod specific" sub-folders under those (e.g. "Meshes\armor\<ModName>").  Such can be handled by any of the available managers.  Note the current generation of mod managers do not require you to include the "Data" folder itself.  See the wiki article [http://cs.elderscrolls.com/index.php?title=Modding_Etiquette Modding Etiquette].
 
* A "standard" structured package follows the directory structure used by the game: that is vanilla game sub-folders under "Data" (such as "Meshes", "Textures", "Menus", etc.), with possibly additional "mod specific" sub-folders under those (e.g. "Meshes\armor\<ModName>").  Such can be handled by any of the available managers.  Note the current generation of mod managers do not require you to include the "Data" folder itself.  See the wiki article [http://cs.elderscrolls.com/index.php?title=Modding_Etiquette Modding Etiquette].
Line 4,620: Line 5,123:
 
*[http://www.gimp.org/ GIMP: GNU Image Manipulation Program] (freeware.)  
 
*[http://www.gimp.org/ GIMP: GNU Image Manipulation Program] (freeware.)  
 
*[http://www.nexusmods.com/newvegas/mods/61538/? Hairs - Eyes - Races Auto - Patcher by '''Fallout 2AM'''] Mod.  
 
*[http://www.nexusmods.com/newvegas/mods/61538/? Hairs - Eyes - Races Auto - Patcher by '''Fallout 2AM'''] Mod.  
*[http://www.darkcreations.org/testg/wiki/Category:VWD-OB LOD/VWD Overview] TESTG site wiki.  
+
*[http://web.archive.org/web/20170713081056/http://www.darkcreations.org/testg/wiki/Category:VWD-OB LOD/VWD Overview] TESTG site wiki.  
  
 
:
 
:
Line 4,701: Line 5,204:
 
=== Refs [[#Details|Details]] ===
 
=== Refs [[#Details|Details]] ===
  
*[http://afkmods.iguanadons.net/index.php?/topic/4966-wrye-bash-all-games/&page=16 Wrye Bash - All Games] (Thread.)  
+
*[https://www.afkmods.com/index.php?/topic/4966-wrye-bash-all-games/&page=16 Wrye Bash - All Games] (Thread.)  
 
*[http://en.uesp.net/wiki/Tes4Mod:Mod_File_Format Oblivion TES4 Header information] (UESP Wiki.)  
 
*[http://en.uesp.net/wiki/Tes4Mod:Mod_File_Format Oblivion TES4 Header information] (UESP Wiki.)  
 
*[http://en.uesp.net/wiki/Tes5Mod:Mod_File_Format Skyrim TES5 Header information] (UESP Wiki.)  
 
*[http://en.uesp.net/wiki/Tes5Mod:Mod_File_Format Skyrim TES5 Header information] (UESP Wiki.)  
Line 4,821: Line 5,324:
 
*[http://forums.nexusmods.com/index.php?/topic/984792-tutorial-working-with-the-nicontrollermanager/ NifSkope: Working with the NiControllerManager] Forum Thread. Alternate images available [http://www.mediafire.com/file/p0srsyrfuaszevp/Tutorial.zip here].  
 
*[http://forums.nexusmods.com/index.php?/topic/984792-tutorial-working-with-the-nicontrollermanager/ NifSkope: Working with the NiControllerManager] Forum Thread. Alternate images available [http://www.mediafire.com/file/p0srsyrfuaszevp/Tutorial.zip here].  
 
*[http://www.youtube.com/watch?v=Zijo8ly6pyI One minute tutorial on Shape Keys by OneMinute VideoTutorials] Video.  
 
*[http://www.youtube.com/watch?v=Zijo8ly6pyI One minute tutorial on Shape Keys by OneMinute VideoTutorials] Video.  
 +
*[http://www.nexusmods.com/newvegas/mods/66968 Weapon Animation Patching Tutorial] PDF with separate "screenshots" file by '''benja'''.
 
*[http://www.nexusmods.com/newvegas/mods/48521/? Weapon Animation Tutorial] PDF by '''Toasty Fresh'''.  
 
*[http://www.nexusmods.com/newvegas/mods/48521/? Weapon Animation Tutorial] PDF by '''Toasty Fresh'''.  
 
*[[#Tip-AnimationSummary|TIP: Animation Summary.]]  
 
*[[#Tip-AnimationSummary|TIP: Animation Summary.]]  
Line 4,830: Line 5,334:
 
*[[#Tip-AnimationExport|TIP: Animation Exporting.]]  
 
*[[#Tip-AnimationExport|TIP: Animation Exporting.]]  
 
*[[#Tip-KFActorRotation|TIP: KF edit rotates Actors 90° to right.]]  
 
*[[#Tip-KFActorRotation|TIP: KF edit rotates Actors 90° to right.]]  
*[[#Tip-PlayAnimation|TIP: Play an Animation.]]  
+
*[[#Tip-PlayAnimation|TIP: Play an Animation.]]
  
 
=== Refs [[#Armor_.26_Clothes|Armor & Clothes]] ===
 
=== Refs [[#Armor_.26_Clothes|Armor & Clothes]] ===
Line 4,904: Line 5,408:
 
*[http://www.nexusmods.com/fallout3/mods/5506 CMF Companion Tutorial] RTF by '''Darkfirebird CMF'''.  
 
*[http://www.nexusmods.com/fallout3/mods/5506 CMF Companion Tutorial] RTF by '''Darkfirebird CMF'''.  
 
*[http://forums.nexusmods.com/index.php?/topic/900821-fnv-companion-tutorial/ FNV Companion Tutorial] Forum Thread by '''trilioth'''.  
 
*[http://forums.nexusmods.com/index.php?/topic/900821-fnv-companion-tutorial/ FNV Companion Tutorial] Forum Thread by '''trilioth'''.  
 +
*[http://geckwiki.com/index.php/Adding_items_to_vendors GECK: Adding items to vendors] Wiki tutorial.
 
*[http://geck.technodeep.net/index.php/AI_Packages_Tab GECK: AI package]  
 
*[http://geck.technodeep.net/index.php/AI_Packages_Tab GECK: AI package]  
 
*[http://www.youtube.com/playlist?list=PLo2FGzSVbkcPedlm9zZ981YvUy7DoSQew GECK: Companion Tutorial playlist by cgy95] Video series.  
 
*[http://www.youtube.com/playlist?list=PLo2FGzSVbkcPedlm9zZ981YvUy7DoSQew GECK: Companion Tutorial playlist by cgy95] Video series.  
Line 4,935: Line 5,440:
 
*[[#Tip-FaceFeatures|TIP: Switching Custom Facial Features.]]  
 
*[[#Tip-FaceFeatures|TIP: Switching Custom Facial Features.]]  
 
*[[#Tip-MakingNPCs|TIP: Trick with making NPCs.]]  
 
*[[#Tip-MakingNPCs|TIP: Trick with making NPCs.]]  
*[[#TIP-AIPackages|TIP: Using AI Packages.]]  
+
*[[#TIP-AIPackages|TIP: Using AI Packages.]]
  
 
=== Refs [[#Dialogue_.26_Lip-synch|Dialogue & Lip-synch]] ===
 
=== Refs [[#Dialogue_.26_Lip-synch|Dialogue & Lip-synch]] ===
Line 4,994: Line 5,499:
 
=== Refs [[#LOD_Generation|LOD Generation]] ===
 
=== Refs [[#LOD_Generation|LOD Generation]] ===
  
*[http://www.darkcreations.org/testg/wiki/Category:VWD-OB TESTG: LOD/VWD Overview] Wiki.  
+
*[http://web.archive.org/web/20170713081056/http://www.darkcreations.org/testg/wiki/Category:VWD-OB TESTG: LOD/VWD Overview] Wiki.  
 
*[http://www.nexusmods.com/newvegas/mods/58562/? FNVLODGen/xLODGen] Tool by '''zilav'''.  
 
*[http://www.nexusmods.com/newvegas/mods/58562/? FNVLODGen/xLODGen] Tool by '''zilav'''.  
 
*[http://www.nexusmods.com/skyrim/mods/60733/? Tree LOD billboard creator for xLODGen] Tool by '''zilav'''.  
 
*[http://www.nexusmods.com/skyrim/mods/60733/? Tree LOD billboard creator for xLODGen] Tool by '''zilav'''.  
Line 5,173: Line 5,678:
 
:*[http://geck.technodeep.net/index.php/Inventory_Reference GECK: Inventory Reference] Wiki.   
 
:*[http://geck.technodeep.net/index.php/Inventory_Reference GECK: Inventory Reference] Wiki.   
  
*[http://afkmods.iguanadons.net/index.php?/topic/4280-update-bsas-and-you/ BSAs and You] Thread.  
+
*[https://www.afkmods.com/index.php?/topic/4280-update-bsas-and-you/ BSAs and You] Thread.  
 
*[http://fallout.gamepedia.com/Pip-Boy_3000 Pipboy Tabs] Wiki.  
 
*[http://fallout.gamepedia.com/Pip-Boy_3000 Pipboy Tabs] Wiki.  
 
*[http://geck.technodeep.net/index.php/Bethsoft_Tutorial_Basic_Quest Bethsoft Tutorial Basic Quest] Wiki.  
 
*[http://geck.technodeep.net/index.php/Bethsoft_Tutorial_Basic_Quest Bethsoft Tutorial Basic Quest] Wiki.  
Line 5,235: Line 5,740:
  
 
*[http://wiki.nexusmods.com/index.php/Category:Texturing Texturing Category on Nexus] Wiki. A large collection of articles on the subject.  
 
*[http://wiki.nexusmods.com/index.php/Category:Texturing Texturing Category on Nexus] Wiki. A large collection of articles on the subject.  
*[http://www.darkcreations.org/testg/wiki/Main_Page The Elder Scrolls Texture Guide (TESTG)] Wiki. A glossary of terminology and summary of various basic aspects related to texture replacements, along with a collection of "The Elder Scrolls" game mods of that nature. Designed for players rather than mod creators, but useful for beginners.  
+
*[http://web.archive.org/web/20170713081056/http://www.darkcreations.org/testg/wiki/Main_Page The Elder Scrolls Texture Guide (TESTG)] Wiki. A glossary of terminology and summary of various basic aspects related to texture replacements, along with a collection of "The Elder Scrolls" game mods of that nature. Designed for players rather than mod creators, but useful for beginners.  
 
*[http://forums.getpaint.net/index.php?/forum/28-textures/ Paint.net Tutorials] Forum.  
 
*[http://forums.getpaint.net/index.php?/forum/28-textures/ Paint.net Tutorials] Forum.  
 
*[http://www.youtube.com/channel/UChSDb-rgM7QrW6QvZjOy-VA Paint.net tutorial] Video series by '''yakobelt'''.  
 
*[http://www.youtube.com/channel/UChSDb-rgM7QrW6QvZjOy-VA Paint.net tutorial] Video series by '''yakobelt'''.  
Line 5,255: Line 5,760:
 
*[[Simple_vanilla_ironsights|Simple vanilla ironsights]] Wiki.  
 
*[[Simple_vanilla_ironsights|Simple vanilla ironsights]] Wiki.  
 
*[[Texturing_weapons_-_video_tutorial|Texturing weapons - video tutorial by Millenia]] Video link in the wiki article.  
 
*[[Texturing_weapons_-_video_tutorial|Texturing weapons - video tutorial by Millenia]] Video link in the wiki article.  
 +
*[http://www.nexusmods.com/newvegas/mods/66968 Weapon Animation Patching Tutorial] PDF with separate "screenshots" file by '''benja'''.
 
*[[#Tip-GECKWpnCTD|TIP: GECK CTD when editing weapons.]]  
 
*[[#Tip-GECKWpnCTD|TIP: GECK CTD when editing weapons.]]  
*[[#Tip-WeaponAnimations|TIP: Weapon Effect Animations.]]  
+
*[[#Tip-WeaponAnimations|TIP: Weapon Effect Animations.]]
  
 
=== Refs [[#Worldspace_Creation|Worldspace Creation]] ===
 
=== Refs [[#Worldspace_Creation|Worldspace Creation]] ===
Line 5,263: Line 5,769:
 
*[http://www.truancyfactory.com/tutorials/fallout3/fallout_worldspace.html Fallout3 World Space] by '''truancyfactory'''. HTML with images.  
 
*[http://www.truancyfactory.com/tutorials/fallout3/fallout_worldspace.html Fallout3 World Space] by '''truancyfactory'''. HTML with images.  
 
*[http://www.youtube.com/watch?v=babuNn5pzsw Filter for (find) Deleted Navmeshes with TES5edit by '''soupddragon'''] Video.  
 
*[http://www.youtube.com/watch?v=babuNn5pzsw Filter for (find) Deleted Navmeshes with TES5edit by '''soupddragon'''] Video.  
*[http://afkmods.iguanadons.net/index.php?/topic/3337-skyrim-fixing-navmesh-deletion-using-tes5edit/ Fixing Navmesh deletion using TES5Edit by '''Arthmoor'''.] Thread.  
+
*[https://www.afkmods.com/index.php?/topic/3337-skyrim-fixing-navmesh-deletion-using-tes5edit/ Fixing Navmesh deletion using TES5Edit by '''Arthmoor'''.] Thread.  
 
*[http://www.youtube.com/watch?v=Q-ZQtgveKaM Fixing Deleted Navmesh with TES5edit by '''soupdragon'''] Video.  
 
*[http://www.youtube.com/watch?v=Q-ZQtgveKaM Fixing Deleted Navmesh with TES5edit by '''soupdragon'''] Video.  
 
*[http://geck.bethsoft.com/index.php?title=Category:World_Spaces GECK: World Spaces] Wiki.  
 
*[http://geck.bethsoft.com/index.php?title=Category:World_Spaces GECK: World Spaces] Wiki.  

Latest revision as of 01:06, 10 September 2019


Contents

Overview

The following information is primarily taken from the Help starting out thread on the "Fallout New Vegas GECK and Modders" forum. The information is preserved here as an alternative to searching through back posts in that forum for commonly asked questions. Much of the information applies to "Fallout 3 (FO3)" as well, but the focus is on FNV.

This article provides a learning roadmap, a starting point and guide to progression; not a tutorial. Consider it a collection of suggestions and links to more detailed tutorials, articles, videos, and tools. Just from the "Table of Contents" you should get a reasonable idea of the learning curve ahead of you. Don't get discouraged. Tackle things one at a time. Just don't expect to learn everything quickly.

There is a lot of unique vocabulary related to creating mods in the following material, such as the distinction between "meshes", the 3D framework of objects (saved as Nif files); and "textures", the surface "skin" over the "mesh framework" (saved as DDS files). The Elder Scrolls Texture Guide (TESTG) site has a glossary and several pages devoted to explaining these to new mod creators and users. Rather than explaining them here, please reference that site when you need clarification. (This article does a lot of that: referral to other existing resources. Why reinvent the wheel?)

Programs and Tools

GECK Tools

  • Garden of Eden Construction Kit (GECK) (freeware.) The official "game editor" for Fallout 3 and New Vegas. NOTE that when loading files, the one plugin you designate with the "Start as Active" button becomes the one that gets edited and saved when you exit the editor. ALL of the files loaded into the GECK at the same time will automatically become "master files" to the "active file" when it is saved. In particular to this regard, see the NAM files entry.
  • GECK Extender NVSE Plugin. Project to extend GECK functionality and bug fixes. Compatible with all NVSE script extender plugins. (Do not use together with GECK Powerup (nor the Forked version), which it replaces.) Note the optional "Patcher" to make GECK 4GB aware and auto load NVSE is a separate file.
  • GECK 1.4 Powerup NVSE Plugin. (Replaced by GECK Extender. Do not use both together.) Comes in a "standalone" version for the "vanilla" GECK functions, and one for GECK with NVSE functions. It fixes and improves some issues while providing the missing messages when the GECK compiler finds an error or warning, and lets you save a script without compiling it. Considered "essential" by experienced mod creators.
  • There are now two wikis devoted to the GECK: the official one by Bethesda, which is not very well supported and a major pain to update (Five CAPCHAs per post!), and a Modding Community GECKWiki site with everything from the official one but actively updated by the modding community. While most links to the GECK wiki are to the official wiki, be sure to check out the Community one to see the latest info on your topic. Anything related to "Script Extenders" like NVSE or JIP LN NVSE functions will be more current on the Community GECKWiki site.


Image Tools

  • Category:Tools on Nexus Mods wiki has articles on various aspects of the primary tools you will be using. Check it out as well.
  • 3DS Max (1 month free trial, $185/month or $1470/year subscriptions, 3 yr student/educator license.) Commercial product by AutoDesk but the version that works with Nif files isn't free. Versions after 2013 don't seem to work with at least Fallout 4 (according to this thread) using the included official NIF exporter, though there is an unofficial "Figment" exporter plugin fork on GitHub which does seem to work.
  • Blender v2.49b (freeware.) This download includes ALL related files and compatible versions. This is the "complete" package for creating meshes for Bethesda games; including:
Python 2.6.5
Blender NIF Scripts 2.5.5
NifSkope 1.0.22
PyFFI 1.1.5
"Noob to Pro" PDF tutorial.
Check out the "Optional" files section for some additional functionality. Recommended for FO3/FNV.
  • Blender v2.49b Portable by Room207 is also a "complete" package that is preferred by some for it's convenience. Includes:
Python 2.6.6
Pyffi 2.1.11
NIFscripts 2.5.9
True Normals by Anthony D'Agostino
Geom Plugin 0.5
Mesh Ascii Plugin
UDK Scripts
Blender Tools 1.01 by Kormgar
Blender TRI file scripts and Tutorial by Kapaer and Deedes
  • DXTBmp Texture Tool (freeware.) Images can be passed to any Paint program for editing in 24 bit and then re-imported and saved in any of the 16/24/32 bit formats. Transparency (Alpha) channel of textures can be viewed and edited separately from the main image.
  • GIMP: GNU Image Manipulation Program (freeware.) A cross-platform image (texture) editor available for GNU/Linux, OS X, Windows and more operating systems. Provides extensions through integration with many programming languages including Scheme, Python, Perl, and more. The result is a high level of customization as demonstrated by the large number of scripts and plug-ins created by the community.
  • Hairs - Eyes - Races Auto - Patcher (Mod.) Extracts all the hair / eyes / races records from every plugin loaded in your load order - then, it rewrites the list of eyes and hairs for every race found. So, if you untick / unflag a hair mod from your load order, these records won't be loaded by the game itself and consequently won't be found by this mod because they don't exist.
  • LOD/VWD Overview TESTG site wiki.
  • Maya (1 month free trial, $185/month or $1470/year subscriptions, 3 yr student/educator license.) Animation, modeling, simulation, and rendering software by AutoDesk.
  • MindTex2 ($20) by Frozen Flame. MindTex is a normal map generation utility for game developers and 3d professionals. Built to rival the competition in quality without the steep price, whether you want to generate a normal, height, specular, gloss, self-illumination, occlusion, or reflection map, you can easily do it in seconds flat from a single source texture with MindTex.
  • Mod Kit - Resource for Modders by pixelhate. Some nif & textures used as references in various Modding situations, including the "invisible activator".
  • NIF tangents and binormals updater (freeware) by zilav. A command line tool to batch update tangents/binormals in Oblivion, Fallout 3, New Vegas, Skyrim, Skyrim Special Edition and Fallout 4 format NIF meshes. The one in NifSkope doesn't handle degenerate normals, such as if your NIF has a lot of texture tiling. It also gives all around better results especially for people who use Blender and cannot reset the normals and smooth them because it lacks the features to do so.
  • NifSkope (freeware.) A graphical program that allows you to open NIF files, view their contents, edit them, and write them back out again. You can use it to quickly make changes to specific properties of a NIF file such as changing the texture, adding translucency, and more. A 3D view of the contents of the NIF file allows you to preview your changes instantly. You can even create texture templates, and import & export OBJ files. (Note: This link is the latest release and may not be the best choice for FO3/FNV. A fully compatible version of this tool (v1.0.22) is already included in the Blender v2.49b package linked here.)
  • NifSkope v1.3.3 (revision36efdd) (freeware.) A later version than that bundled in the Blender v2.49b package (with EXE and features referred to in many tutorials that are missing in even newer (v2.0+) releases, such as "import/export .OBJ files"). Fully compatible with that Blender package, and more "shader flags" are identified. While both versions of NifSkope can be installed, only one can be used at a time. Recommended for FO3 and FNV (along with the NifTools XML Format version 0.7.0.0, which has the essential "differentiated color for Collision"). Recommended for FO3/FNV.
  • NifTools Wiki (freeware.) 3D package plugins for 3ds Max, Blender, and Maya modelling tools. Note: this link will have the latest release versions. The versions bundled in the Blender v2.49b package are all mutually compatible.
  • The NifTools XML Format (documentation.) Used to extend NifSkope to open files from new games, or better understand files from games which it can already open. Version 0.7.0.0 recommended for FO3/FNV.
  • Paint.NET (freeware.) Image and photo (texture) editing software for Windows, originally based upon the Paint program included as part of Windows, but with many enhanced features such as "layers", special effects, and unlimited history ("undo"). Require Microsoft's .NET Framework 4.6+.

Packaging Tools

  • BAIN Archive Tools - BAT by Surazal
  • BSArch (freeware) by zilav. A command line tool for packing and unpacking Bethesda archives. The most complete support setting the correct flags across the various games.
  • BSAOpt (freeware) Tool for extracting the contents of BSA files. Note this tool unpacks the entire BSA file. It does not easily allow for unpacking a single file.

(See the Skyrim thread BSAs and You for details about the pros and cons of "Bethesda Software Archives" (BSAs), but bear in mind such files in previous games, like Oblivion, FallOut3 and Fallout New Vegas, don't have "strict order" like in Skyrim. Games prior to Skyrim don't support overriding of assets in archives using other archives; only loose files can. If the same resource is contained in several BSA archives, those games won't use it from the last BSA on 100% of occasions. They may grab the resource from a random one of the BSAs containing the same file.)

WARNING! Do not unpack BSAs directly into your game "Data" folder; potentially overwriting any mod files. The tools don't ask you to confirm the overwriting, either. All the hair textures unpacked to "loose files" will go through the head models in that case; because that's what happens when hair is not packed in a BSA. "Best practice" is to unpack to a unique folder (they are large: 1-2GB) and manually drag the desired files to the appropriate "Data" folder as needed.

  • BSAExtractor (BSAE) (freeware) Tool for extracting just one or the entire contents of BSA files. See warning above about unpacking an entire BSA.
  • FNV BSA Decompressor Mod by zilav. Decompresses the Fallout New Vegas BSAs and repacks them into BSAs without zlib compression for performance. Also transcodes the ".OGG" sounds effects to ".WAV" format so they work. It also extracts any MP3 files to loose files because they will not play when in a BSA.
  • FOMM - Forked (freeware) Mod Manager with built-in BSA file extraction and repacking.
  • Note that FOMM has several tools bundled with it. The TESsnip tool in particular is obsolete and has been shown to cause "silent corruption" of save game files as a result. The use of xEdit/FNVEdit is recommended in it's place.
  • FOMM and FOMODS for Dummies article.
  • FOMOD Validator by Ganda

Scripting Tools

  • CIPSCIS Script Validator (freeware.) Allows you to quickly indent your script while simultaneously checking it for several basic errors, many of which are not picked up by the GECK's compiler. It works with Skyrim, Fallout 3, and Fallout New Vegas, but is not "script extender" aware. Includes it's own tutorials.
  • New Vegas Script Extender (NVSE) Site.
  • RuntimeScriptProfiler by lStewieAl - shadeMe. An NVSE plugin to profile script execution. Ported from shadeMe's Oblivion plugin.

Sound and Voice Tools

Misc Other Tools

  • DarNified Forum Community site. Articles and questions on XML for the User Interface (UI) and Menus, primarily about the Oblivion version of DarNUI but there is a section for FO3.
  • Gamesettings profiler Mod. Adds intuitive, app-like, modding tool for debugging, testing, profiling, and dumping\printing to file any numeric GMST (gamesettings) records.
  • Tree LOD billboard creator for xLODGen by zilav
  • xEdit/FNVEdit (freeware.) A generic tool called xEdit which is renamed for working with specific games. The latest "stable" release is on the Nexus, generally under the game name version or as "TES5Edit".

Details

Basic advice is to start with the game Construction Set/Editor (this is usually a separate, free download, not included with the game installation). There is going to be a wiki page for it with tutorials to help get you started, but note that there are unspoken assumptions that you are familiar with concepts introduced on the "Construction Kit"/"game editor" wikis for earlier Bethesda games such as:

(TES5: Skyrim came after all of those (2011) and uses a different variation of the game and script engine.) So, don't neglect those older wikis as resources. Where there appears to be a conflict, assume the later wiki or the one specific to your game is correct.

In addition to the Construction Set/Editor, you'll probably want to get community created editor enhancement tools, like the GECK "Extender" or "PowerUp", "Oblivion Construction Set Extender", etc. These allow you to perform actions not included in the default editor, like edit ESM files without converting them to ESP first, and may also give you better debugging for scripts. These capabilities vary by the tool. On the negative side, such extensions may also annoy the heck out of you with error messages, many of which you don't need/understand and don't care about. But they are always worth looking into.

There are also conversion tools which are required to export the 3D models from your modeling tool into the "NIF" format that Bethesda games use. It is very important to note that the import and export tools only work with certain versions of modeling programs. For Blender, you need version 2.49, which is older than the current version of Blender. The Nexus Oblivion mod Blender linked here is a package that has Blender v2.49 plus all of the NIF tools and includes NifSkope, all of which are the correct versions to use together. You will save yourself a lot of trouble if you install everything from this one package. If you don't, you can run into version problems and things will never work right. Instructions on the correct way to install this combination of tools can be found the wiki article here. (Note where there seems to be a discrepancy in version numbers, stick with the version included in the package.)

"Script Extenders" (SEs) are plugins to the game editors that provide additional functionality features, and were created by the gaming community to overcome perceived shortcomings. Mods the use even one of those SE functions need to specify that the particular SE is now a requirement.

Item (armor, weapons, buildings, etc.) construction and customization requires learning 3D modelling, which is NOT a quick process. You are going to invest a lot of time and patience in learning your tool of choice. The three most common tools used are Blender, "3ds Max" (aka "Max"), and Maya. There is very little discussion about Maya in the forums related to Bethesda games because while it is considered the better choice for animation, "Max" is simpler to grasp and less daunting. Both "Max" and Maya are considered "industry standard" tools, and both will do the job. See these articles for more in depth comparisons if you are going to invest in learning either product:

The Nexus has the Software Programs - 3D Modelling - Blender forum, Software Programs - 3D Modelling - 3ds Max forum, Software Programs - 3D Modelling - Maya forum, and Software Programs - 3D Modelling - Miscellaneous / Other forum areas for discussion about those tools.

The "workflow" on Blender for Nif files is considered more complex than with the others because it often takes you into the Nifskope tool, but read about the Nif Exporter plugin for Max issues in that entry. It is necessary to use the correct version and tools that work with that version of any of these products.

Because it is "free" and the others are quite expensive for most people, Blender is usually at least their first choice. "Blender Noob to Pro" is a good resource for 3D modeling using Blender, and the compatible (not the latest) version is included in that package linked above under Programs and Tools. Consequently, there is a long history of tutorials on all aspects of modelling with Blender. It is well worth the time to refer often to the Blender - Read this first thread as you progress through the learning curve. It has an extensive list of tutorials from Oblivion thru Fallout 3 and more generalized topics which still apply to the basics of modelling in Blender.

For texturing your 3D models, you'll need something that can handle ".dds" files. GIMP and Paint.Net (which is not the Paint that comes with Windows) can both handle ".dds" files. Paint.Net comes with ".dds" support built-in these days. GIMP still needs a plugin. Which program you use is more a matter of personal preference than anything else. Some find GIMP a bit more difficult to use but it also can do some things that Paint.Net can't do. Paint.Net on the other hand is, in the opinion of many, more intuitive and easier to use. Although, now that Paint.Net has a proper normal map generator that actually works available as an add-on, GIMP use tends to be even less frequent now. A lot of it is personal preference, though. Some folks just like GIMP better. Both programs work fine. You can also use Photoshop, but that's not free.

Once you have the 3D model textured (UV mapped) and maybe have generated a normal map for it as well, then you need to export everything. First, read the Working with DDS/DXT Files article by Gary "Buckaroo" Neely to understand the choices in DXT codec to choose among. Blender and the NIF tools don't export a lot of things properly, so then you have to go into NifSkope (which comes with the NIF tools) and fix it. (The proper weight of "bones" in skeletons, along with "shader flags", is almost always wrong, for instance.) Be sure to check that the path given in the mesh to the texture file is in "relative" format. (See How to fix hard-coded texture paths in NIF files.) The default format of the mesh editor's paths may not be "relative".

Once that is done, then go into the game specific Construction Set/Editor and add your custom items to whatever mod you are working on.

Getting back to the GECK, there are a few things that are broken in it. It ships with a spell checker but doesn't include the dictionary, so that's just annoying. (But you can use the language resource files from Fallout 3 as the dictionary.) If you use the GECK "Extender" or "Powerup" you can uncheck the spell checker and disable all of that annoyance at least while you are editing your mod. Unfortunately it won't remember that setting and you'll have to uncheck it the next time you edit your mod as well.

Another thing that is broken is the "lip generator" for dialog. If you have Skyrim or Oblivion you can copy their lip generator from the "sound\processing" folder to GECK's. If you have all of your voice files in place and they work already, in the GECK all you need to do is bring up that dialog in the quest editor. Your WAV file should show up down near the bottom, where it says voice type: MP3, WAV, LIP, LTF, and "path". Click on that to select it, then click on the "from WAV" at the bottom. The "generate lip file" option should now become active and you can click on it. Note that the GECK will not update the information on the screen, so it will still have an N under LIP file even after you have generated it. Close that dialog option and re-open it and then you should see a Y under both the WAV and the LIP. If you record the voice files directly into the GECK (using the record button at the bottom of the dialog window) then when you press save it will automatically generate both the WAV and the LIP files.

Common Problems with GECK

Issue - Where to obtain the GECK

  • Cause: The Construction Kit is a separate download and not automatically installed by Steam. (It is with the GOG DRM-free version.)
  • Solution-1a: You can download the "GECK. - New Vegas Edition" through Steam. It's under the "Library | Tools" tab in the Steam launcher.
  • Solution-1b: Download from the following links:
  • Official GECK Wiki by Bethesda Softworks.
  • GECKWiki Community maintained (more up to date) version of GECK Wiki.
  • FNV 4GB Patcher by Roy Batty - LuthienAnarion. Sets LAA flag specifically to work with Steam versions of FNV and GECK.
  • Recommended: The community developed optional NVSE plugins supplement the GECK, and are considered essential due to the error fixes and additional diagnostic messages (especially for scripts that won't compile) it displays. They require you to launch GECK with NVSE in order to function.
  • Script compiler warnings will now be displayed. Scripts will no longer silently fail to compile.
  • Many other warnings were restored: in cell loader, in NavMesh checker, and so on, more than in 1000 places. [back for testing in 0.1.7.1 beta 1]
  • Adds a special Marker hack which makes RoomMarkers and PortalMarkers visible and transparent in the render window [since 0.1.3].
Unfortunately, cannot make them completely invisible as they should be, but it's better than having to move them all away just to see the cell.
  • You can now save scripts without compiling them (useful if you want to save your script and finish it later).
  • The spell checker can now be enabled and disabled at runtime.
  • Fixed the bug which caused the GECK to crash when user double-clicks on empty space in Form List Editor.
  • The "Edit" menu item in Form List editor will now work.
  • All MessageBox'es will now be in English, regardless of your system's language. This also means that "Cancel" will be replaced by "Yes to all" where intended by GECK developers. [since 0.1.2]
  • ESM are now active and editable directly.
  • ESP used as masters will remain in the masters list.
  • ONAM records in ESM will be preserved. No guarantee new required ONAM will be added. When in doubts, use FNVEdit to update the ONAM records.
  • Enables level 2 LOD generation for large worldspaces
  • Fixes bUseMultibounds = 0 crashes in cells with multibounds
  • Extends GDI handle limit: This cleans up opened windows better when closing them so you can edit for long periods without fear that you won't be able to save your plugin because the GECK can't open any new dialog windows.
  • Help links point to new community maintained wiki: GECKWiki.

Issue - GeckCustom INI file

The "GeckCustom.ini" may not get created in the "C:\Users\<YourAccountName>\Documents\My Games\FalloutNV" folder until you save your first modified file; not merely close GECK as some have reported. NOTE that as you have to run GECK as an "Administrator", the "C:\Users\..." folder with the INI file will be for the "Administrator" account. This can cause confusion as to where to look.

See also the wiki GECK: Tips and Tricks article.

TIP - GECKCustom INI may be missing

TIP - Disable Audio in GECK

TIP - Enable loading multiple master files at once

TIP - Enable more than one copy of the GECK
(or both the FO3 and FNV versions).

TIP - Enable MultiBounds
Thanks to pixelhate of the Nexus Fallout "Mod Talk" forum for the basis of the following:

TIP - Load ENB Series with GECK

TIP - Master files
Thanks to madmongo of the Nexus Fallout "New Vegas Mod Troubleshooting" forum for the basis of the following:

Issue - GECKPrefs INI file

In the "Users" game folder, along with the three INI files generated for your game is the GECKPrefs.INI file. This file gets created when you first start using the GECK, and saves any customizations you make to it's interface (e.g. such as if you change any values for the "map editor" color masking).

The problem that can arise is when your changes don't work out as you intended and you wish to revert to the default values. There is no built-in mechanism to restore the defaults in that file, nor is there a file for the GECK to refer to similar to the "Fallout_default.INI" file. (There may be a "reset" button in the GECK window, but it only affects the current edit session: resetting to the values in effect when the window opened.)

Therefor: it is your responsibility to make a backup of either the initial or your stable customized version of GECKPrefs.INI so you have the default values to refer to. Otherwise, all you can do is delete (or rename) the file and let GECK rebuild it the next time it starts.

Issue - How to get GECK to load with NVSE

  • Cause: "New Vegas Script Extender" is an addon library of functions developed after GECK was "finished", so it doesn't know about the extensions. Without including NVSE, use of commands from that or the older FOSE (which is incorporated) extension will produce script errors of "unrecognized command" preventing compiling and saving them.
The GECK Extender NVSE Plugin with the Optional "Patcher" to make GECK 4GB aware and auto load NVSE is recommended. (Do not use together with GECK Powerup (nor the Forked version), which it replaces.)
While the GECK 1.4 PowerUp for Fallout New Vegas addon comes in both "standalone" and NVSE plugin versions, that does not mean that NVSE is automatically loaded as part of the GECK itself, so it doesn't otherwise recognize those extensions. The suggested method is to use the NVSE Plugin version of PowerUp when also loading NVSE. Then it will automatically be included when your shortcut points to the "nvse_loader.exe". (Replaced by GECK Extender. Do not use both together.)
Note you must launch GECK as an "Administrator" account: no matter if you are also loading "Extender", "NVSE", or the "GECK Power-Up StandAlone"; or only GECK.
  • Solution (for Powerup only):
  • Create a Windows shortcut to the GECK. Name it something to reflect this is for the GECK + (PU or/with NVSE) (e.g. "GECKPU+NVSE").
  • < Right-click > on the shortcut and select "Properties | Shortcut".
  • To load "NVSE" (with or without plugins such as PowerUp or GECK Extender), in the link shortcut "Target:" field put the complete path to the nvse_loader, and include the "target command line":
in double-quotes (because of the embedded spaces in the path.) The "-editor" must be placed outside of the double-quotes of the path so it will be recognized as a "parameter" of the executable.
  • If you use the "Power-Up Standalone" version 0.1.6 or later, in the "Target:" field put the complete path up to and including the target command line:
(This is a change from previous instructions for "Power-Up", as documented in the PU "ReadMe" file.)
  • Select the "Advanced" button on the same "Shortcut" tab, and enable (check) the box "Run as administrator" on the window displayed.
  • Click the "OK" button until the shortcut window closes.
Note that if you add this shortcut to "Steam", it will initially strip off the "-editor" parameter. Be sure to double-check the "Target" within "Steam" for the presence of this parameter.
  • Select the "Advanced" button on the same "Shortcut" tab, and enable (check) the box "Run as administrator" on the window displayed.
  • Click the "OK" button until the shortcut window closes.

Issue - GECK Power-Up or NVSE cannot find GECK

  • Cause: You must launch anything to do with GECK from an "Administrator" account.
  • Create a shortcut, and on the "Properties | Advanced" tab enable (check) the "Run as administrator" box. This will cause you to automatically be prompted to enter a valid Administrator account and password each time you try to run the command so you won't forget.
NOTE: The GECK Extender, which should be used instead of the "GECK Power-Up", includes an optional patch as a separate file to make GECK "4GB aware" and auto load NVSE.

Issue - GECK automatically loads unwanted DLC Masters

Issue - Where to start in creating mods

  • Cause: The GECK is only part of what you need to create mods, and it doesn't have a training manual.

Issue - Where are the Warnings and EditorWarnings text files

They are supposed to be in the game root folder (where the FalloutNV.exe is found).

  • Cause: It appears that Bethesda dropped these output files after FO3.
  • Solution: Instead, the "GECK Power Up" and "GECK Extender" plugins have now provided that functionality. Try setting NVSE to report them.
  • In Data\NVSE\nvse_config.ini, set:
  • In Data\NVSE\nvse_plugin_geckpu_ew.ini there is a "[WARNINGS SELECTION]" followed by a list of hex offsets. Each offset is set to a reporting level, as described at the top of that file. The default (=1) is to both display the warning in a "MessageBox" in the GECK and write it to file. When the nvse_config.ini LogLevel is set between "2" and "5", the warnings are written to the nvse_plugin_geckpu_ew.log file in the game root folder (where the FalloutNV.exe is found).

Issue - GECK crashes upon editing a weapon

"Every time I attempt to use the GECK to edit a weapon it crashes, even when only the main NV master file is selected." This also occurs when "Fallout Character Overhaul" (FCO) is installed.

  • Cause-1: GECK needs to have the LAA flag enabled in order to take advantage of more than 2GB of memory.
  • Solution 1-b: The GECK should also be patched to use up to 4GB of memory (i.e. FNV 4GB Patcher, the NTCore 4GB Patch or their more general CCF Explorer, or the like).
  • Cause-2: This has been traced to the presence of a specific file that is overwritten by "Fallout Character Overhaul" (FCO): eyebrowm.nif in: Data\meshes\characters\hair.
  • Solution-2: Remove the troublesome file when using GECK, and restore it when playing. If you put it into a batch (.cmd) file such as the following to launch GECK you won't forget.
@echo off
cls
::REM As GECK has to be run from an 'Administrator' account, you should launch it from a
::REM   shortcut (.lnk file) that has that "run as" setting in the 'Properties'.  This will
::REM   be run in a separate sub-process window.  Otherwise the 'start' command won't WAIT
::REM   until GECK is done before continuing with this script.
::REM Change the 'set runpgm=' line to point to your GECK shortcut.
set runpgm=C:\Users\Public\Rec\FalloutNV\GeckPU.lnk
::REM Change the 'set gamedir=' line to point to your game install folder.
set gamedir=E:\Games\SteamLibrary\steamapps\common\Fallout New Vegas
::REM Nothing else below this point should need to be changed.
set tgtdir=%gamedir%\Data\meshes\characters\hair
 
pushd "%gamedir%"
if exist "%tgtdir%\eyebrowm.nif"  ren "%tgtdir%\eyebrowm.nif" eyebrowm.nif.hld && @echo SCRIPT: Removed file [eyebrowm.nif]
 
@echo SCRIPT: Manually close the separate window GECK is launched in.  When you do, DO NOT
@echo SCRIPT:   select to 'Terminate batch job' (answer "N") or you won't restore files properly.
start "GECK" /D "%gamedir%" /WAIT cmd /k "%runpgm%"
if exist "%tgtdir%\eyebrowm.nif.hld"  ren "%tgtdir%\eyebrowm.nif.hld" eyebrowm.nif && @echo SCRIPT: Restored file [eyebrowm.nif]
 
:DONE
pause
popd
  • Cause-3: If the GECK seems to "hang" while loading your plugin, this may be due to failing to select other plugins your target plugin requires as "masters", but which are not ESM files and/or not automatically included by GECK.
  • Solution-3: You can use the xEdit/FNVEdit "File Header" to identify all the files that are masters to your plugin, and then be sure to select all of them when loading it into the GECK. Please see the wiki Missing Masters article for details.

Issue - GECK crashes upon loading an exterior cell

Sometimes, after initially creating an "interior" cell, upon trying to work on an "exterior" cell, the GECK crashes when the cell tries to load.

  • Cause: Unknown
  • Mitigation-1a: Make sure you have patched the GECK to be able to use 4GB of memory. The GECK Extender mod includes a separate file download that does this. Some have found it necessary to use the third-party tool 4GB Patch - NTCore instead.
  • Mitigation-1b: Anything in the meshes/textures folder will also load in the GECK. A modded mesh could be causing your CTD. You might find it advantagious to keep different "profiles" or copies of the game "Data" folder (depending upon your "mod manager") so your GECK work "Data" folder only contains the essential files for your mod.
  • Mitigation-1c: Try to avoid loading an exterior cell directly. Instead: load up an "interior" cell, then use a "door teleport" to cause the GECK to load the "exterior" cell (indirectly) for you. This seems to avoid the CTD.

Issue - GECK crashes upon starting

  • Cause-1: You don't have the correct permissions for running GECK.
  • Solution-1: GECK must be "run as administrator".
  1. Navigate to the program folder of the program you want to run (i.e. FalloutNV game root folder).
  2. Right-click the program icon (i.e. the "Geck.exe" file).
  3. Choose Properties.
  4. On the Compatibility tab, select the "Run This Program As An Administrator" option.
  5. Click OK.
  6. If you see a "User Account Control" prompt, accept it.
Now each time you run GECK you will be prompted to enter an "Administrator" account password. If you enter it wrong, GECK won't start.
  • Cause-2: There is not enough available memory in the default 2GB allocated for 32-bit programs. GECK needs to have the LAA flag enabled in order to take advantage of more than 2GB of memory.
  • Cause-3: GECK seems to be overly sensitive to the correct "system compatibility" mode when run on versions of Windows after Vista SP2.
  • Solution-3: Set the "Properties | Compatibility tab" to "Run this program in compatibility mode for: Windows Vista (Service Pack 2)" for both the GECK.EXE and the (PowerUp) GECKPU-NV-14.EXE files.
  • Cause-4: You installed an ENB or the pre-ENB "enhanced shader" mod containing a custom D3D9.DLL file placed in the game folder. The GECK tries to load all of the DLL files it finds when it starts, and it doesn't know what to do with that one: so it crashes.
  • Solution-4: Put the D3D9.DLL file somewhere outside of the Fallout game root folder whenever you want to run the GECK. Make sure to put it back before you start your game; otherwise it will not load. (A "batch file" to handle this that is run when you click on the link to start the GECK is the best way to avoid forgetting this. See Issue: GECK crashes upon editing a weapon for a similar example.)

Issue - GECK crashes upon switching to a different tool

Upon switching from a current operation (e.g. selected an interior cell in the Render Window) to another operation (e.g. "World | Object Palette Editing" or editing an "AI Package") the GECK crashes. The problem is not consistent: erratically occurring.
  • Cause: Unknown. Reported by Vista users as far back as 2008 with FO3 version of GECK.
  • Workaround: Disable the Windows "Tablet PC Optional Components" found under 'control Panel | Programs | "Programs and Features" | "Turn Windows features on or off'. Click the "OK" button and restart Windows. The exact location of that setting may differ in other versions of Windows. This may also be related to enabled "infrared" device settings when there are no such devices in use.

Issue - GECK does not automatically select FalloutNV or some DLC ESM file

Normally, when starting GECK and opening the "File" menu it has automatically "checked" (enabled) the DLC ESM files for loading, but not the "FalloutNV.ESM".

  • Cause: This is controlled by the presence of the "*.nam" files, which by default are present for all the DLC (but not for "FalloutNV.ESM"). If any are not found, that DLC is not automatically selected (enabled) either. These files cause the game to load those DLC even if they are not "active" in the "load order". (It is recommended you rename rather than delete them if you don't want a particular DLC to be loaded.)
  • Solution: The "nam" file contains nothing more than the common name (i.e. "Dead Money") of the respective DLC. When a plaintext "FalloutNV.nam" file (which does not exist by default) with "Fallout New Vegas" as content is created, "FalloutNV.ESM" will be automatically checked (enabled) in GECK's "File" menu just like the DLC.

Issue - GECK does not show Landscape

  • Cause: There is a barely mentioned "shortcut key" combination that toggles the display of Landscape in the "Render Window" when you have an "exterior worldspace" loaded. It does not appear in any menus so it is usually an accidental toggling.
  • Solution: <Shift+L> will toggle the display of the Landscape. (Thanks to VenonXNL for reporting the solution to this "mystery".)

Issue - GECK hates me in general or how to get started working with it

  • Cause: The GECK is frustratingly buggy. It is not intuitive to use. The GECK website makes assumptions that you understand concepts introduced in earlier game Construction Kits (CKs).

TIP - Fallout New Vegas Game Engine Bug List

Issue - GECK will not tell me what is wrong with my script

  • Cause: The GECK does not report problems with scripts, and won't allow a script with errors to be saved.
  • Solution-1: the GECK Extender Plugin re-enables 1220+ Warning, Error, and General messages, in addition to providing more verbose messages and fixing many bugs. (Do not use together with GECK Power-Up (nor the Forked version), which it replaces.)
  • Solution-2: the GECK 1.4 Powerup Plugin comes in a "standalone" version for the "vanilla" GECK functions, and one for GECK with NVSE functions. It fixes and improves some issues while providing the missing messages when the GECK compiler finds an error or warning, and lets you save a script without compiling it. Considered "essential" by mod creators. (Replaced by GECK Extender. Do not use both together.)
  • Solution-3: The CIPSCIS Script Validator allows you to quickly indent your script while simultaneously checking it for several errors, many of which are not picked up by the GECK's compiler. It works with Skyrim, Fallout 3, and Fallout New Vegas. Includes it's own tutorials.

Issue - GECK is missing text in some fields

GECK seems to be missing the text associated with certain columns of AI Package, Dialogue, Effects, and Perks (possibly others) information (Editor ID, Topics, etc.). Typically this is a "list box" type field on the form.

  • Cause: This occurs in the GECK for both "Fallout 3" and "New Vegas". The problem originally appeared following the installation of Microsoft Knowledge Base article 3000850 (a Win8.1 "rollup update"), was fixed by rolling back that update, but then the problem got "baked in" to Win10. The issue causes the column's right border to be shifted to the far left of the field so the column text is not visible. (See the GECK: Collapsed Text Field.
    GECK: Collapsed Text Field Figure
    Click the link/thumbnail to see the enlarged image. Use your browser "<back page>" control to return to this page.)
  • Solution (Partial): This "fix" seems to stick only so long as you do not open an AI Package. Switching between Perks, Effects, and Dialogue condition columns work perfectly if you don't open an AI Package's conditions; but then ALL condition columns become squished for any form you open. The next time you start a GECK session, all will be fine again; but once you open AI Package's conditions the bug remains for the session until you implement the "temporary" or "workaround" solutions in each form.
Set "compatibility mode" for the GECK to "Vista SP2" or "Windows 7 SP 1". (Either seems to work as well.) For example: Right-click on your GECK-NVSE shortcut or the GECK executable directly, chose the Properties | Compatibility tab, Change settings for all users, and select Windows 7, and hit OK. Load up the editor and things should look normal for the first time since upgrading to Windows 10. (See the GECK: Expanded Text Field.
GECK: Expanded Text Field Figure
Click the link/thumbnail to see the enlarged image. Use your browser "<back page>" control to return to this page.)
GECK: Expanding Collapsed Text Field Figure
  • Temporary Solution: Place the mouse cursor in the top left corner of the "blank" field that is missing text until it changes the cursor shape into a "split cross" (column resize) cursor. (See GECK: Expanding Collapsed Text Field. Click the link/thumbnail to see the enlarged image. Use your browser "<back page>" control to return to this page.) Left-click and hold while dragging to the right, and the missing text should be displayed. Continue dragging to the right until everything is shown or the mouse cursor is no longer the "split cross" shape. When you release the mouse button the display field should be corrected. However, this "fix" may not be persistent from one GECK session to another.
  • Workaround: there is a Windows "hotkey" for expanding all columns in the currently active window of Windows Explorer and some programs (including GECK).
  • First you have to select a field with the problem (i.e. the "Conditions" field in the GECK: Collapsed Text Field) in the displayed GECK window,
  • Then press "Ctrl" and the "+" key on the cursor/number-keypad. (The "+" key on the regular keyboard won't have this effect. See GECK: Expanding Collapsed Text Field. Click the link/thumbnail to see the enlarged image. Use your browser "<back page>" control to return to this page.)
Now all columns should be expanded fully by themselves. (See the GECK: Expanded Text Field. Click the link/thumbnail to see the enlarged image. Use your browser "<back page>" control to return to this page.)

Issue - GECK Render Window shows a large gray square in new world space

Created a new world space and set WastelandNV as parent, using land and map data from the parent. Everything seems to be working fine except for a huge gray square covering most of the render window when trying to view the new world space.

  • Cause: The gray square is the water table.
  • Solution: Go to your 0,-0 point, zoom past the gray till you can see your land, and then add a static. Close, save, and then open your world space in GECK again and your land surface should now be visible.

Issue - How do I configure the GECK to do something


GECK and the Active File

Ever since Windows version 3 on a 386, programs have standardized on "File | New" or "File | Open". But not the GECK. This is your first introduction in how un-intuitive the GECK is. It truly is a miserable toolset.

The "active file" is just the file that you are currently editing. Unfortunately, this gets confusing in the GECK.

The way you create a new plugin (ESP) file is you:

  • Open up the GECK,
  • Click "Data",
  • Select any "master files" you want for your new ESP file.

At this point you don't have an active file for editing. But if you are creating a new file, that's what you want to do (yes, it makes no sense). At a minimum you need to have Fallout.ESM selected as a master. The GECK will load the master files (which are usually but not always with an ESM extension), and then you can make your changes, and when you select SAVE, then the GECK will finally prompt you for the name of your new file (which will usually have an ESP extension). Now that you've created a new file, this is your "active file" for this session. Any more changes that you make will all be saved to the same file.

TIP GECK can isolate records in a particular plugin

Thanks to madmongo of the Nexus Fallout "New Vegas Mod Talk" forum for the basis of the following:

TIP Limit to Mod Size

Thanks to madmongo of the Nexus Fallout "New Vegas GECK and Modders" forum for the basis of the following:

TIP Save often

Still the GECK seems to crash if you breathe heavily on it. It really sucks to open your plugin one day and find an entire town you spent a month on, gone: not a brick left and no aliens with probes in sight.

Once you have a file saved, if you want to edit that file later, you just select the files you want to load and make that your "active file" and start the GECK. When you save, all changes will go into the "active file" that you selected. Let's say you want to add resources from another master file to your plugin, like say, from Honest Hearts. If you are creating a new file, you'd check Fallout.ESM and HonestHearts.ESM, but you wouldn't select any active file. Later, when you save, you will be prompted for a new plugin filename that will become your new active file.

Let's say you already created a plugin, but you didn't include Honest Hearts initially, and now you do want to include it. Open the GECK, select "Data", make your plugin the "active file", and also check the HonestHearts.ESM. Once the GECK is up and running, as soon as you save any changes, your plugin will now include HonestHearts.ESM as a "master file", which it will require to be loaded thereafter.

Once you've added a "master file" to your plugin, you can't easily delete it. Well, you can, all you need to do is right click and press "Delete" when you start up your plugin in the GECK, but if you aren't very careful about exactly how you do that, you will completely destroy your plugin and render it unusable. There are ways to remove "master file" requirements in your plugin, but since you are just beginning with the GECK, assume for now that any "master files" you add are needed there forever.

The GECK will let you load multiple ESP files, but where any ESM "master files" that become requirements for your plugin are loaded automatically, the same isn't true for ESP files your plugin becomes dependent upon. Don't add resources from a different esp to your plugin, because that doesn't work. You can only add things to your plugin that come from master files, or things that your plugin adds on its own. There are ways around this, but again, that gets pretty advanced.

GECK Form-ID Base-ID Ref-ID and Editor-ID

An Editor-ID (sometimes called a GECK ID) is a text identifier used to reference persistent objects. It functions similarly to a Form ID, although it is not limited to 8 characters and a hexadecimal character set. It exists for the human user of GECK. The game engine itself is only concerned with Form-IDs. There is a direct "one-to-one" correspondence between an EditorID and a Ref-ID, but for the human only. (Editor-IDs are primarily used to identify objects in the Object window [the left pane of the GECK].) The game engine needs and only recognizes the Form-ID in commands, but they can also be used in scripts along with Editor-IDs. See the GECK Reference page.

Whether you create your own new object or copy and rename an existing one, you want to give it an "Editor-ID" (the human consumption one) that will enable you to quickly locate yours in the Object window.Refrain from beginning the Editor-ID with numbers. While this will tend to sort the name high in the list of objects, GECK will confuse such names with Form-IDs, which it won't find. Most experienced mod creators use a short common prefix, such as their initials or those of the mod, as the way to group their objects. Whatever naming convention you use, it must be unique and not too closely matching that of other mods to avoid confusion.

A Form-ID is anything specific to an object: whether it be Base or Ref. It is a more general term for both.

"A BaseID (or Base ID) is a FormID assigned automatically to an object by the GECK when a new object is created in the Object window. The Form IDs listed in the Object window are Base IDs. A Base ID is only associated with an object template in the editor, never with an instanced object in-game" - GECK glossary.

"Base ID is the number assigned to a template for an object that is used to create many instances of that object. For example all bottle caps in the game have exactly the same Base ID. This ID is used in scripts or the console with commands that create new instances of an object, like additem or placeatme." - Form-ID on The Vault wiki. You could think of it as the "parent" of each "child reference". Any change made to a Base-ID affects every reference back to that Base-ID. Which is why you need to make a "copy" of a Base-ID and change it's Editor-ID (which forces a change to the Form-ID) when you need to make a variation of an object. Otherwise you are changing ALL instances of that object in the game. (Don't try to change a Form-ID directly yourself. Let the GECK handle it.)

Base forms (another way of referring collectively to "Base-IDs") are fine to use in scripts, by the way. They're just used in different situations by various functions. For example: The StopQuest function will always operate on the base form of the quest. The same with anything involving Form Lists. But you wouldn't want to use a base form when you only want to affect a specific instance ("reference") of an object. AGAIN: Actions on a base form affect ALL instances of that form.

"A Reference ID is a FormID assigned automatically to a Reference [instance] by the GECK when an object is placed in the Render Window [in the right pane of the GECK]. Reference IDs are required to uniquely identify each instance of an object in-game. The Form ID column of the Cell View window lists Reference IDs" - GECK Glossary.

"The Reference ID is the unique ID of an individual object (unlike the Base ID, which is an ID for an object template). For example, all the bottle caps created from same Base ID will have different Reference IDs. This ID is used to manipulate existing objects with commands like kill, move to, or prid, for example.

"Any item that is not created by pre-defined game scripts (either original or from mods) will have [a] Reference ID starting with FF to indicate that this item belongs to this particular save game. It is for dynamically generated items, like loot from containers, random encounters or trader's wares." - Form-ID on The Vault wiki

RefID's that mod creators input, are only of assistance in letting the humans know to what the reference applies. You can actually use the FormID hex code value shown to the side in parentheses of the ref-ID field.

Note it is the persistent flag on the Reference that is mandatory in order for a RefID to become included in the search list for scripts/targets/whatever. (See GECK: Creating New Persistent Reference.) Otherwise the list of refs to search through would be way too huge and cause engine lag.

The Map is not the Terrain and the ID is not the Record Number

It is common to refer to the text form of the "IDs" for records ("Editor-ID", "Rec-ID", "Form-ID", and "Base-ID") as if they were the record identifiers used by the engine. These are "labels" given (or not) by each mod author when they create the record solely for the benefit of us "numerically challenged humans". For this reason, it is assumed they must be unique between plugins. While this is a good practice, and something to be encouraged for the benefit of those searching out records by those references in tools such as GECK or xEdit, it is important to understand that, like a "map", the text labels for those records are not the actual "terrain"; nor the "record number" actually used by the game engine. It can't afford to leave something that critical up to fallible humans. The GECK automatically assigns "record numbers" sequentially when you create a new record, and the "mod index" hexadecimal pair at the beginning of that record, consisting of the "current load order index" of the plugin makes it unique between plugins. (See Help:Form IDs for an explanation of how to interpret the "mod index" from a Form-ID or record number.)

Think about that for a minute. The GECK only knows about plugin files you chose to load for that editting session. Typically that will consist of the "FalloutNV" EXE and ESM, possibly some DLC if your plugin requires assets from it, and the plugin you are working on. How is it going to know what other plugin "ID" text labels there are to determine yours are unique? From one session to another you might load a different series of plugins. It can't predict that "load order" for certain, and the GECK itself doesn't care. Which is why the "mod index" couplet at the beginning of the record number is so clever and crucial to ensure uniqueness between plugins.

This is proven out by examining any record in xEdit: the "ID" label is a text data field within the record, just like any other "value". (For example: the "Script" record variable "SLSD - Local Variable Data" identifies each "variable name" based upon it's "index value" within an array of variables specific to that script with the "text name" stored as "SCVR - Name" data. You have to identify the "record number" before you can determine the "text name"; and not the other way around.) A test was conducted to confirm that the text "Ref-ID" label did not have to actually be "unique" between plugins. The same "Ref-ID" label was given to the same object in two different plugins, and the game had no problems differentiating between the two. Not even when one plugin removed the "persistent object" by the "Ref-ID" they had in common, the same object from the other plugin was unaffected. It did not matter if one plugin was made dependent upon the other. Because they were records from different plugins, the engine could tell them apart.

Consequently, always bear in mind that when someone is speaking in terms of one of the forms of "ID", they are often meaning "as a way of identifying the specific record number".


TIP Reference Variables explained

Thanks to vforvic of the Nexus "Fallout 3 Mod Talk" forum for the basis of the following:

TIP Global ref variables Player and PlayerREF

Thanks to DoctaSax of the Nexus Fallout "New Vegas GECK and Modders" forum for the basis of the following:

Custom items

On the other hand, loading in multiple ESP files can be a quick and easy way to copy resources from another plugin into your plugin. Just go into the GECK with the other plugin loaded (as well as yours as the "active file"), make a change to whatever resource you want (you can literally change something and then change it back to what it was, just so you make sure that entry gets flagged as changed), and save your plugin. The changed resource will now be saved to your plugin. You have to be careful with this, as it won't work if the entry you are trying to copy depends on other things in the plugin that you didn't copy. Generally, as someone new to the GECK, you should probably try to avoid doing this, but if you are trying to copy items from another plugin, this is the fastest and easiest way to do it.

The GECK only includes a file as a resource if it's a "master file". If you load an ESP, the GECK won't treat it as a "master file". The GECK will automatically add any "master files" that the other ESP loaded since those will all be loaded into your new editing session when you load both ESP files.

One word of warning. If you want to copy a piece of armor or some other resource from another plugin, load that ESP without making it active, then make a change to the item you want, then save it, and DON'T DO ANYTHING ELSE. Exit out of the GECK, load it with the resource only in your plugin and WITHOUT the other (original) esp loaded, and then use the modified resource in your plugin. If you try to use the resource while the original plugin is still loaded, that can get the GECK confused and it may end up scrambling your plugin as a result.

This copy from one ESP to another will end up including "master files" from the original ESP in your new plugin; so if you don't want them, DON'T just delete them from the GECK data screen when you select your plugin. If you accidentally left something in your plugin from one of those masters in your copied cell, deleting the master will screw up your plugin, so first ensure you have a saved copy and then clean up the "master files" list early. Instead of using GECK for this, load your plugin into xEdit and use the "Clean Masters" function by right-clicking on your plugin and selecting that option from the resulting "context menu". If all your references to those other masters have been removed, it will safely remove those masters. If not, you can use the xEdit script "List records referencing specific plugin.pas" on that plugin to list them in the log window so you can fix them.

Make sure that the item you want is in a loose file (both mesh and texture) and isn't packed into a BSA file. If it is, you'll need to unpack it to properly reference it in your plugin.

(See the Skyrim thread BSAs and You for details about the pros and cons of "Bethesda Software Archives" (BSAs), but bear in mind such files in previous games, like Oblivion, FallOut3 and Fallout New Vegas, don't have "strict order" like in Skyrim. Games prior to Skyrim don't support overriding of assets in archives using other archives; only loose files can. If the same resource is contained in several BSA archives, those games won't use it from the last BSA on 100% of occasions. They may grab the resource from a random one of the BSAs containing the same file.)

WARNING! Do not unpack BSAs directly into your game "Data" folder; potentially overwriting any mod files. The tools don't ask you to confirm the overwriting, either. All the hair textures unpacked to "loose files" will go through the head models in that case; because that's what happens when hair is not packed in a BSA. "Best practice" is to unpack to a unique folder (they are large: 1-2GB) and manually drag the desired files to the appropriate "Data" folder as needed.

Sometimes these extracted textures appear to be almost transparent. This is because their color (aka "diffuse") maps are transparent instead of opaque. You may need to adjust the opaqueness to make things visible.

Plan to start by making simple mods: like maybe adding a house somewhere. Then make simple re-textures of existing objects. If you get that far, then you are ready to start making your own "mesh" models.

If you are making armor or a weapon, the most commonly suggested advice is to start with an existing version that is similar to what you want. That way you'll have an existing model to base your 3D model on that is close to the right size so you can scale your new model appropriately. Depending on what is desired, for armor it is suggested to often start with just a body model instead. Once you've created your model, you will have to "parent it" to the appropriate armature (aka "skeleton") in order for it to work. If words like "parent" and "armature" in this context don't mean much to you, then you need to do more reading about 3D modeling (again, "Noob to Pro" is a good resource for Blender).

Things like buildings and clutter items are also created with Blender (or 3dsMax), but they don't have armatures. They do have collision though. You'll have to make a collision mesh in Blender when you create your model.

When creating custom meshes for things with different materials, just create individual collision meshes ("bhkcollisionobjects") for each material and let Blender and the NifTools figure it out. When creating something like a log cabin with a stone base, for example, create one collision mesh for the stone base and another collision mesh for the wooden parts. The stone part would have a string property of HAV_MAT_STONE and the wood part would have a collision of HAV_MAT_WOOD under the "hkPackedNitriStripsData".

Primitive collisions (box, sphere, capsule) can be created in NifSkope as well as convex shapes. The nature of your object will sometimes require you to create them in Blender, though.

It is interesting to know that a collider will relate to an object part when it encompasses it, not by the child/parent relation inside a Nif.

  • Getting NIF and DDS textures out of BSAs. (See BSA Extraction Warning above.)
  • Importing, editing and exporting into/from Blender (2.49 and latest)
  • Creating new texture files as DDS in Photoshop.
  • Adjusting new object in NifTools for correct projection.
  • Making various emission colors for signs, like green, red, yellow and non-glowing.
  • Importing new model mesh into GECK for use in game.

 

TIP Biped and Equipped Objects

Thanks to madmongo of the Nexus Fallout "New Vegas GECK and Modders" forum for the basis of the following:

TIP Flickering on added item Radius Setting

Sometimes when adding an item to another (such as a hat on a Mr Gutsy) it seems to flicker out of sight depending on the player's camera angle or distance. This is a classic symptom of a problem with the model's "Radius setting". The following is courtesy of Prensa in a specific reply to a question about this issue with general application.

 

TIP Floating objects

Thanks to Stonedturtle26 and baduk of the Nexus Fallout "New Vegas Mod Talk" forum for the basis of the following:

 

TIP Head Parts Rotated

It's not known why head parts changed between FO3 and FNV, considering that so much else in the game engine is identical, but they did. If you port a head part (hat, glasses, facemask, etc) from FO3 to FNV or from FNV to FO3, or make a new open helmet/hat/head accessory that uses a existing mesh, whether it's a simply a clone or a retexture, it tends to equip sideways (rotated by 90 degrees).

Thanks to madmongo of the Nexus Fallout "New Vegas GECK and Modders" forum for the basis of the following fix using NifSkope:
Thanks to masternetra of the Nexus Fallout "New Vegas GECK and Modders" forum for the basis of the following fix using FNVEdit (xEdit):

 

TIP Item Substitution

Thanks to madmongo and Jokerine of the Nexus Fallout "New Vegas GECK and Modders" forum for the basis of the following:

 

TIP Mashing Meshes

Thanks to madmongo, M48A5, and RoyBatterian of the Nexus Fallout "New Vegas Mod Troubleshooters" forum for the basis of the following:

 

TIP Movable or Static custom objects in cell

Thanks to madmongo, davidlallen, and Tefnacht of the Nexus Fallout "New Vegas Mod Talk" forum for the basis of the following:

TIP Plugins can not override injected records

Thanks to luthienanarion of the Nexus Fallout "New Vegas Mod Talk" forum for the basis of the following:

TIP Repairability

Thanks to slippyguy for his informative description in the mod Alternative Repairing listing a number of potential problems he identified/resolved.

Custom Creatures

Thanks to madmongo of the Nexus Fallout "New Vegas Mod Troubleshooting" forum for the basis of the following.

Let's assume you want to add an "albino radscorpion" to the game.

An "albino" version of the radscorpion would just be a re-texture. What you are going to want to do is export all of the meshes related to the radscorpion (everything in \meshes\creatures\radscorpion) into your own custom directory, and do similar for the textures. Let's assume you are using \meshes\creatures\albinoscorpion (you can of course change the names to match your real directory names). Edit your custom texture using GIMP or Paint.Net or Photoshop or any other texture editor that can handle DDS files and save it with a new name. Then go into NifSkope and edit radscorpion.nif so that it will use your new texture, and save the modified mesh Nif as something unique like albinoscorpion.nif.

Since this is just a re-texture, the easiest thing to do is copy the existing radscorpion creature in the GECK and modify it. So open up one of the radsorpions under the "creatures" section of the GECK like CrRadscorpion2Large and select the "ModelList" tab. Change the skeleton to the skeleton in your new directory. Now your custom Nif should show up along with the standard radscorpion Nifs. Uncheck radscorpion.nif (if it's still checked) and check your new albinoradscorpion.nif, and change the ID for the creature from CrRadscorpion2Large to something like AlbinoRadscorpion or whatever you want to call it, and hit "OK" to save it. You can edit the stats or traits or anything else in there that you like if you want too, of course.

Remember: in the GECK, save early and often.

If you want to make a custom model in Blender that uses the same skeleton as an existing creature, the procedure is basically the same, except that you have to know how to create meshes in Blender and parent them to skeletons. You'll end up with a custom Nif that will already have a custom texture that you applied to it in Blender when you created the model, and the idea is basically the same. Export the meshes and textures of the creature whose skeleton you are using, then edit that creature to use your new Nif (and your Nif will tell it to use the new textures), and save it with a new ID.

To create a completely new creature (one not based upon any existing creature already in the game), you will have to build the mesh and texture files from scratch, and also provide it with animations. If it is based upon an existing skeleton, then you can use that as the "armature". Otherwise you will need to create a specialized one from scratch along with weighting the bones appropriately or by adapting an existing one with a new editor-ID. As you might guess, this is a much more involved process than merely re-texturing an existing creature. Save it for after you have mastered the basics.

Spawning modded items

The following overview is taken from a thread reply in the "Fallout New Vegas" Nexus forum by Hexrowe:

In GECK, there's a category titled Leveled Item (under Items). It contains a whole bunch of lists that tell the game what items should be spawned in randomly filled loot containers, vendor inventories and enemies. These are usually called "leveled lists" because much of their contents are affected by player level (which is why you tend to find more powerful items in better condition the higher your level is). Adding your items to these lists causes them to appear randomly in the game like any other non-unique items, and is what is meant when mod descriptions mention "leveled list integration" or some such.

The sheer number of these lists can look daunting at first, but if you use filters with some fairly obvious keywords and look around a bit you should get the hang of it. Lists starting with "Cond" are used for randomly determining the condition of spawned items, and are usually referenced by other lists; lists starting with "Vendor" are used to randomly fill vendor inventories; lists starting with "Loot" are used to spawn random loot on enemies and in containers; and so on.

In order to add an item to a list, you can double-click on the list to open it in its own window and EITHER go back to the Object Window, find the item you want to add and physically drag-and-drop it into the list, OR right-click on an empty spot on the list (to create a new default list entry) or on an existing entry (to create a copy of that entry) and select "New" from the context menu. Then you have to edit the new entry into what you actually wanted to add. (Drag-and-drop is required for adding items into Form Lists, but Leveled Item Lists can also use the right-click menu. GECK is kind of a mess like that.)

ALTERNATELY, if you want to place an item in a specific location in the game as is often done with unique weapons, creatures, and such, there's a list of world spaces in the Cell View window; find the one you want to place the object in (note that there are several lists; Interiors seems to be displayed by default, but if you want to place the object in an open air location go to WastelandNV instead), double-click it to open it in the Render Window, then find the object in the Object Window and drag-and-drop it into the Render Window. The item will now appear in the list of objects on the right side of the Cell View Window, and double-clicking it there allows you to edit it's exact location and rotation, ownership, whether it can be picked up by wandering AI, and so on. You can also use a "X Marker" and define a radius from the marker at which a script will place an item or creature when certain conditions are met. See Tip: Random NPC Comments for an example of this technique.

Common practice is to put the items in an owner-less container, just to be safe. For this you'll have to create the container in the Object Window (they're found in the Container category, under World Objects) and add it into the world space by drag-and-dropping it into the Render Window just like any other item. The easiest way to create a new container is to double-click on an existing one that uses whichever world model you want (fridge, gun cabinet, briefcase, etc.), change its Editor-ID and name, and click OK; at this point GECK will ask whether you want to create a new form instead of renaming the old, so click "Yes" and you'll have your new container. Now just edit its contents and attributes (remember to remove any owners, unless you specifically want the player to have to steal the goods) and add it to the world space of your liking. Done!

TIP Respawning Plant bug fix

Thanks to masternetra of the Nexus Fallout "New Vegas Mod Talk" forum for the basis of the following:

Worldspaces

If you want to create your own worldspace, then you must be a real glutton for punishment, because this gets you into the buggiest parts of the GECK. For example. you create a worldspace, then go and edit its heightmap, and when you save your heightmap and exit out of it, the GECK will crash. The only way to avoid this is to create your worldspace, save your mod, exit the GECK, reload your mod, and then edit the heightmap. This isn't explained anywhere in the GECK, but if you create a heightmap that is too low, the GECK will crash. One modder used to create heightmaps with a general offset of about 6000, but then found there's another bug that when you do that: trees don't generate LOD properly. So your heightmap really needs to be above something like 20-25,000 or so. If your landscape doesn't have trees (or objects that are defined as having tree LOD in the GECK) then you don't need to worry about it and 6000 offset works fine, BUT: the default LOD water height is 10500.

At some point you will try to navmesh your entire new worldspace. It's a really big worldspace with lots of cells, so it's