Editing Portal:Scripting

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

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

Latest revision Your text
Line 1: Line 1:
==Overview==
__NOTOC__
'''Scripts''' are used by modders to control the game in fairly direct ways and achieve effects that are far outside the normal scope of the game. If you're new to scripting, you should start at the top of the page, especially with the tutorials. If you're an experienced scripter, then the later parts of the page should be most useful.


==Basic Tutorials==
<div id="esstyle">
 
<h2 class="header">Welcome to the Scripting Portal</h2>
<div id="esstyle" style="float: right; width: 40%;">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec tincidunt tempus neque. Morbi condimentum fermentum quam. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Etiam quis ipsum ac ante varius condimentum. Cras diam ipsum, cursus ut, molestie vitae, ullamcorper ut, nisl. Phasellus dignissim sem sed enim. In dolor ipsum, aliquam quis, fringilla at, pharetra eget, nisi. Vivamus tristique, arcu vel bibendum viverra, turpis massa gravida enim, vel viverra augue nulla ut nisl. Cras a turpis vitae ipsum aliquet mollis. Proin semper. Etiam vulputate, ante eget interdum ullamcorper, mi nulla porttitor felis, quis volutpat mi enim tincidunt nulla. Curabitur augue risus, volutpat at, rhoncus in, hendrerit quis, ante. Nullam ornare. Nullam eu sapien nec turpis ullamcorper commodo. Ut commodo diam nec pede. Praesent eget justo eget odio placerat auctor. Integer sit amet enim at erat luctus egestas.
</div >


<div id="esstyle" style="width:333px;float:left;">
<h2 class="header">Featured</h2>
<h2 class="header">Featured</h2>
[[Image:Scripttut2_testing2.JPG|thumb|right|The message box we wrote]]
{{Portal:Scripting/Featured}}
==== My Second Script ====
</div>
While the '''My First Script''' tutorial is a good first taste of scripting for Oblivion, it does not appreciably demonstrate what the scripting language in Oblivion can do. It is a wonderful introduction for those who have never seen a programming or scripting language before, but a more in-depth tutorial would be helpful to further introduce modders to this amazing resource.


This tutorial has been largely adapted from GhanBuriGhan's excellent Morrowind Scripting for Dummies; all credit goes to GhanBuriGhan for his fantastic work on the original.
<div id="esstyle" style="width:333px;float:right;">
<h2 class="header">Things you can do</h2>
*Replace the [[:Category:Functions (CS 1.0)]] with <nowiki>[[Category:Functions CS]]</nowiki> on ~400 functions.
*Discuss the future of the Wiki [http://www.bethsoft.com/bgsforums/index.php?showtopic=795927 right here]
</div>


This tutorial is meant to be a more complete introduction to scripting for Oblivion than the My First Script tutorial, and assumes that the reader is already familiar with My First Script. If you do not understand the main points of that tutorial, you may find yourself in over your head here. If you're comfortable with My First Script, though, let's begin scripting!
<div id="esstyle" style="width:333px;float:right;">
{{break}}
<h2 class="header">Getting Started</h2>
<div style="text-align:right; padding: 2px;">[[Scripting Tutorial: My Second Script|Read more...]]</div>
*[[List of Functions]]
*[[Scripting Tutorial: My First Script|My First Script]]
*[[Scripting Tutorial: My First Spell|My First Spell]]
*[[Scripting Tutorial: Basic Scripting Knowledge|Basic Scripting Knowledge]]
</div>
</div>


*[[Scripting Tutorial: My First Spell|My First Spell]] - With script effects.
<div id="esstyle" style="width:333px;float:right;">
*[[Scripting Tutorial: My Second Script|My Second Script]]
<h2 class="header">Categories</h2>
*[[Start Your Mod]]
*[[:Category:Scripting|Scripting]]
*[[Scripting_Tutorial:_Creating_a_Simple_Timer|Creating a Simple Timer]]
*[[:Category:Useful Code|Useful Code]]
*[[Scripting_Tutorial:_Modify_Weapon_On_Equip|Modify Weapon On Equip]]
*[[:Category:Code Optimization|Code Optimization]]
*[[:Category:Oblivion Script Extender|Oblivion Script Extender]]
</div>


==Functions==
<div id="esstyle" style="width:333px;float:right;">
* [[List of Functions|All Functions]]
<h2 class="header">Tutorials</h2>
** [[CS Functions]]
*[[Bound Arrows Tutorial]]
** [[OBSE Functions]]
*[[Casting Spells From An Activator]]
** [[Pluggy Functions]]
*[[Combine your SI and non-SI mods into one (OBSE, Patch v1.1, Other mods too)]]
** [[TSFC Functions]]
*[[Getting started with TSFC]]
*[[:Category: Functions|Function Categories]]
*[[Health Regeneration over Time]]
*[[MessageBox Tutorial]]
</div>


==General Knowledge==
<div id="esstyle" style="width:333px;float:left;">
*[[TES Files]] - Basic info about esp and esm files.
<h2 class="header">Tools</h2>
**[[Esp vs. Esm]] - Differences between esp and esm files.
*[[Oblivion Script Extender]]
* [[Modding Terminology]] - Advanced discussion of modding terms.
*[[DX2VK]]
*[[:Category:Console Functions|Console Functions]] - Useful for playtesting.
*[[Notepad++ Script Definitions]]
*[[Oblivion Script Dumper]]
</div>


==Scripting Basics==
<div id="esstyle" style="width:333px;float:right;">
*[[Scripting Tutorial: Basic Scripting Knowledge|Basic Scripting Knowledge]]
 
*[[:Category:Commands|Commands]]
<h2 class="header">Related Portals</h2>
*[[:Category:Variables|Variables]]
*Portal:AI
*[[If|Using "If" Conditions]]
*Portal:Quests
* '''Types of Scripts'''
</div>
**[[Object scripts]]
**[[Quest scripts]]
**[[Global Scripts]]
**[[Magic effect scripts]]
*[[Script Processing]]
*[[Cross Script Variables]]


==Troubleshooting==
<div id="esstyle" style="width:333px;float:left;">
*[[Common Bugs]]
<h2 class="header">Troubleshooting</h2>
*[[Common Mistakes]]
*[[Common Mistakes]]
*[[Crashes]]
*[[Crashes]]
Line 58: Line 65:
*[[Performance Problems]]
*[[Performance Problems]]
*[[Debug Scripts]]
*[[Debug Scripts]]
</div>


==Code Optimization==
* [[CPU-usage of Functions]] - Lists of functions and their effects on performance; notes on which drop FPS the most, etc.
* [[Minimizing your Script]] - Tips to keep the number of functions used down, how often sections of your script run, and more.
* [[Script Comparison Tests]] - Comparisons of script snippets and/or functions.
==Extensions and Libraries==
*[[Oblivion Script Extender]] - Oblivion scripting language extension.
*[[ESM Math Library]] - Math functions as stage function library.
*[http://www.uesp.net/wiki/Tes4Mod:Cobl/Modding Cobl] - Common Oblivion.
==Standard Solutions==
The following are standard solutions for solving various types of problems.
*[[Activation Functions]] - Simulating a function by means of a activate call.
*[[Combine your SI and non-SI mods into one (OBSE, Patch v1.1, Other mods too)|Adaptive Mods]] - Adjust a mod for presence or absence of SI, OBSE, Patch v1.1, etc.
*[[Dynamically Adding Spells to Merchants]]
*[[Casting Spells From An Activator]]
*[[Scripting Tutorial: Custom Bound Items|Custom Bound Items]]
*[[Distinguishing Between Physical and Magickal Hits]]
*[[GetActorType]] - Encode actor type (npc, creature, ghost, etc.) as a single number.
*[[Teleport Recall#Marker Rats|Marker Rats]] - Using hidden actors as stable marker points.
*'''Inventory'''
**[[DropAllItems|Drop All Items]]
**[[Generic Unequip]] - Remove an object from inventory without specifying its object id.
**[[Unplayable Items]] - Various uses of unplayable items.
** [[Walking Through Inventory Items]]
*'''Math Functions'''
**[[:Category:Extra Math Functions|Extra Math Functions]]
**[[:Category:Math Functions (OBSE)|OBSE Math Functions]]
*'''Messagebox Menus'''
**[[MessageBox Tutorial]] - Complicted messagebox and menu structures.
** [[Standard Menu UI]] - Menu triggers, options menus, hierarchical menus, number configuration, etc.
*[[Programmable Spell Effects]] - Beyond scripted spell effects.
*[[Reference Variables for Nearby Actors]]
*[[Remote Activators]] - Uses of activating remote objects.
*[[Rotating an object around another object with a script]]
*[[Running Scripts On Arrows]]
*[[:Category:Stage Functions]] - Simulating a function by means of a setStage call.
** [[Simulating new functions|Stages Functions]] - (Needs to be merged with base article.)
*[[Summon Object]] - Summon (move) an existing object to position in front of player.
*[[Teleport Recall]] - Establishing a teleport recall point.
* '''Text Input'''
** [[Text Input With OBSE]] - Simulating a text input box (OBSE).
** [[Text Input With Pluggy]] - [[:Category:Pluggy|Pluggy]] based text input.
** [[Text Input With TSFC]] - [[:Category:TSFC|TSFC]] based text input.


==Deprecated Articles==
<!-- to make sure the buttons don't do floating through the article -->
*[[Dynamic Storage]] - General survey of arrays, linked lists, etc. in pre-pluggy world.
<div style="clear:both"></div>
**[[Linked List Tutorial]] - Pre-pluggy approach to linked lists.

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

Cancel Editing help (opens in new window)

Template used on this page: