Difference between revisions of "Modding Etiquette"

2,919 bytes added ,  21:14, 24 February 2009
Moving stuff from About Modding Etiquette to here.
imported>Wrye
imported>Wrye
(Moving stuff from About Modding Etiquette to here.)
Line 87: Line 87:
Note: Cobl provides a number of resources (e.g. hair and eyes) that other mods can take advantage of.
Note: Cobl provides a number of resources (e.g. hair and eyes) that other mods can take advantage of.


== Bug Avoidance ==
* Don't alter anything in cell (3,3) in any existing worldspace. Due to an engine bug, when the player has a mod with edits to this cell active and the cell is loaded, all markers including the player's marker on the local map will disappear. Removing any edits to (3,3) from your mod will fix the problem. This bug does appear by itself even with no mods active, but (3,3) edits will make it worse.
* If your mod adds a bow weapon, or edits any existing bow, be sure to change the Reach value to something other than zero. The suggested value is one. Otherwise, you will trigger a very nasty bug for a small percentage of users where equipping the bow doesn't just crash Oblivion, but can result in a Blue Screen Of Death or a reboot of the PC, depending on their system settings.
* See [[:Category:Troubleshooting|Troubleshooting]] for more bugs and other tips.
== Efficiency ==
* Don't unnecessarily make references persist. Persistent objects are always loaded in memory.
* Check "No Low Level Processing" for actors (creatures or NPCs, even dead/disabled ones) that are never intended to leave a given cell. Low level processing causes their scripts and AI to run once every 5 (?) seconds or so, even if PC is not near.
* Do NOT check '''Quest Item''' unless necessary. Scripts for Quest Item objects run every frame of the game even if PC is nowhere near. If quest item status is necessary, then it's best to turn it on and off using scripts as required.
* Keep your scripting as efficient as possible. Scripts can very rapidly add up and kill performance if too many are running at once - ensure that your scripts are '''only''' running when they need to be. Avoid [[Global Scripts]] as much as possible.
** Avoid using '''GameMode''' blocks if possible. (E.g., if you can use an '''OnLoad''' block instead, do so.)
** If all the script does is enable/disable, consider enabling/disabling from an external script, or if there is a group of related references, assign them all to a single parent reference and enable/disable the parent reference through a script.
** Use quick exits from '''GameMode''' block scripts when possible. I.e., rather than letting the script fall through several lengthy '''If''' statements, instead do a single test at the top to see if rest of script should be skipped, and if so, return.
** When initializing the state of multiple objects (e.g., setting three actor references to attack player under a certain condition), use a single script on one object which sets all, rather than scripting each of them separately.
* Avoid using [[PlaceAtMe]] to create new copies of an object when you could simply use [[MoveTo]] on an existing object. Apparently, placed items are never deleted from the world and if used enough can cause savegame size to expand significantly. (E.g., earlier versions of Harvest Flora had this problem.)
[[Category:Getting Started]]
[[Category:About Modding Etiquette]]
[[Category:About Modding Etiquette]]
Anonymous user