Difference between revisions of "Modding Etiquette"

151 bytes added ,  20:55, 7 March 2009
imported>Wrye
imported>Wrye
Line 104: Line 104:
** 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.
** 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.  
** 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 [[Script_Processing#Remote_Ref_Heartbeat|Remote Ref Heartbeat]] -- Do '''not''' set local variables in every frame of persistent ref scripts.


* 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.)
* 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.)
Anonymous user