Difference between revisions of "User:DavidJCobb/Miscellany"
pruning, removing gamesas, etc
imported>DavidJCobb (→Unsorted edge-cases: Fun with null cells: Cell variables can break during load screens.) |
imported>DavidJCobb (pruning, removing gamesas, etc) |
||
Line 1: | Line 1: | ||
miscellanous information; outdated | |||
__FORCETOC__ | |||
== Scripting == | == Scripting == | ||
=== Changing a player's Speed Multiplier (SpeedMult) === | === Changing a player's Speed Multiplier (SpeedMult) === | ||
Changes to the player's Speed Multiplier [[Actor Value|actor value]] don't take effect unless you prompt the game engine to take notice. This issue applies to both scripted changes and changes triggered by a "Value Modifier" [[Magic Effect|magic effect]]. There are two ways to force the game to actually use a changed SpeedMult: | Changes to the player's Speed Multiplier [[Actor Value|actor value]] don't take effect unless you prompt the game engine to take notice. This issue applies to both scripted changes and changes triggered by a "Value Modifier" [[Magic Effect|magic effect]]. There are two ways to force the game to actually use a changed SpeedMult: | ||
* Modify the player's inventory. Silently [[AddItem - ObjectReference|adding]] and then [[RemoveItem - ObjectReference|removing]] an item should do the trick. | * Modify the player's inventory. Silently [[AddItem - ObjectReference|adding]] and then [[RemoveItem - ObjectReference|removing]] an item should do the trick. | ||
* Modify the player's carry weight actor value. Adding and then removing 0.1 works. | * Modify the player's carry weight actor value. Adding and then removing 0.1 works. | ||
=== Issues with optional function arguments === | === Issues with optional function arguments === | ||
When you compile a function with optional script arguments, the argument data is updated for the containing script only. If other scripts make cross-script calls to your function, those functions must be recompiled in order for their calls to work properly. Otherwise... | When you compile a function with optional script arguments, the argument data is updated for the containing script only. If other scripts make cross-script calls to your function, those functions must be recompiled in order for their calls to work properly. Otherwise... | ||
Line 57: | Line 32: | ||
Occurs when old script data (baked into a savegame) has malfunctioned badly enough for the game engine to just throw it out. | Occurs when old script data (baked into a savegame) has malfunctioned badly enough for the game engine to just throw it out. | ||
=== Variable loaded from save could not be found on the actual object === | === Variable loaded from save could not be found on the actual object === | ||
Line 69: | Line 38: | ||
[11/17/2013 - 02:59:23AM] warning: Variable ::WVAAliasStorage_var on script DLC1_QF_DLC1EclipseAttack2_01017648 loaded from save not found within the actual object. This variable will be skipped. | [11/17/2013 - 02:59:23AM] warning: Variable ::WVAAliasStorage_var on script DLC1_QF_DLC1EclipseAttack2_01017648 loaded from save not found within the actual object. This variable will be skipped. | ||
== Unsorted facts == | == Unsorted facts == | ||
* If you wish to borrow critter behaviors for a script, be careful. I've been reading through USKP discussions and apparently, Bethesda's critter scripts were | * If you wish to borrow critter behaviors for a script, be careful. I've been reading through USKP discussions and apparently, Bethesda's critter scripts were very buggy. Seems like the USKP rebuilds most critter behaviors almost from scratch. | ||
* [http://afkmods.iguanadons.net/index.php?/topic/3781-the-critter-thread/page-3#entry149560 "Translate routines will operate properly in unloaded areas."] This, in regards to animating and moving critters like moths. | * [http://afkmods.iguanadons.net/index.php?/topic/3781-the-critter-thread/page-3#entry149560 "Translate routines will operate properly in unloaded areas."] This, in regards to animating and moving critters like moths. | ||
** Even though translations work in unloaded cells without 3D loaded, [http://afkmods.iguanadons.net/index.php?/topic/3781-the-critter-thread/page-4#entry149598 "<code>StopTranslation()</code> requires the cell attached and loaded 3D. There's no reason for it, but it throws an error without it!"] | ** Even though translations work in unloaded cells without 3D loaded, [http://afkmods.iguanadons.net/index.php?/topic/3781-the-critter-thread/page-4#entry149598 "<code>StopTranslation()</code> requires the cell attached and loaded 3D. There's no reason for it, but it throws an error without it!"] | ||
Line 119: | Line 47: | ||
** [http://afkmods.iguanadons.net/index.php?/topic/3781-the-critter-thread/page-4#entry149599 There is reason to doubt that translate routines actually do operate properly in unloaded areas.] It's possible that they don't properly unlock the translated object (allowing for deletion) unless the cell is attached. | ** [http://afkmods.iguanadons.net/index.php?/topic/3781-the-critter-thread/page-4#entry149599 There is reason to doubt that translate routines actually do operate properly in unloaded areas.] It's possible that they don't properly unlock the translated object (allowing for deletion) unless the cell is attached. | ||
* [http://afkmods.iguanadons.net/index.php?/topic/3781-the-critter-thread/page-2#entry149454 When an ingredient is sold or consumed, "it will have the deleted flag set already, and won't have a parent cell or 3D."] | * [http://afkmods.iguanadons.net/index.php?/topic/3781-the-critter-thread/page-2#entry149454 When an ingredient is sold or consumed, "it will have the deleted flag set already, and won't have a parent cell or 3D."] | ||
*[http://afkmods.iguanadons.net/index.php?/topic/3781-the-critter-thread/page-6#entry149699 Critter animations]: butterflies and moths use <code>fTakeOff</code>, while dragonflies and fireflies can use <code>fTakeOff</code> or <code>TakeOff</code> | * [http://afkmods.iguanadons.net/index.php?/topic/3781-the-critter-thread/page-6#entry149699 Critter animations]: butterflies and moths use <code>fTakeOff</code>, while dragonflies and fireflies can use <code>fTakeOff</code> or <code>TakeOff</code>. | ||
* [http://afkmods.iguanadons.net/index.php?/topic/3676-skyrim-information-baked-into-saves/page-3#entry147426 "Scripts that are fragments for packages never go away, and seem to begin executing on a None package with no conditions."] | * [http://afkmods.iguanadons.net/index.php?/topic/3676-skyrim-information-baked-into-saves/page-3#entry147426 "Scripts that are fragments for packages never go away, and seem to begin executing on a None package with no conditions."] | ||
* [http://afkmods.iguanadons.net/index.php?/topic/3694-disabling-persistent-references-a-remarkable-solution/ Apparently, one can disable a persistent reference using a method discussed here.] | * [http://afkmods.iguanadons.net/index.php?/topic/3694-disabling-persistent-references-a-remarkable-solution/ Apparently, one can disable a persistent reference using a method discussed here.] | ||
=== Unsorted edge-cases === | === Unsorted edge-cases === | ||
* Be careful about handling things OnCellAttach and OnCellDetach in Riften. [http://afkmods.iguanadons.net/index.php?/topic/3781-the-critter-thread/page-8#entry150257 The city's walkways have you cross back and forth across a cell boundary.] | * Be careful about handling things OnCellAttach and OnCellDetach in Riften. [http://afkmods.iguanadons.net/index.php?/topic/3781-the-critter-thread/page-8#entry150257 The city's walkways have you cross back and forth across a cell boundary.] | ||
** ''The use case dealt with here involves deleting critters when you leave their containing cells. The scripter's attempted solution was to add a timed delay (using OnUpdateGameTime) to the deletion. Return to the cell before the timer has elapsed, and the critter is reused -- the deletion is canceled.'' | ** ''The use case dealt with here involves deleting critters when you leave their containing cells. The scripter's attempted solution was to add a timed delay (using OnUpdateGameTime) to the deletion. Return to the cell before the timer has elapsed, and the critter is reused -- the deletion is canceled.'' | ||
* You may run into a peculiar problem when passing through a load door: [http://forums.bethsoft.com/topic/1514401-detection-of-null-cells-when-going-through-load-doors-how/#entry23901128 cells that are unloaded by the game can still exist as "valid" Papyrus Cell objects.] They'll be recognized as Cells rather than as Nones, but attempts to call ''most'' native methods on them will fail. Effectively, it's the bizarre difference between something that's ''null'' and something that's ''None''. | * You may run into a peculiar problem when passing through a load door: [http://forums.bethsoft.com/topic/1514401-detection-of-null-cells-when-going-through-load-doors-how/#entry23901128 cells that are unloaded by the game can still exist as "valid" Papyrus Cell objects.] They'll be recognized as Cells rather than as Nones, but attempts to call ''most'' native methods on them will fail. Effectively, it's the bizarre difference between something that's ''null'' and something that's ''None''. | ||
** Surprisingly, <code>kMyBrokenCell.GetFormID()</code> will still return a null cell's proper ID, even though the cell object is broken. | ** Surprisingly, <code>kMyBrokenCell.GetFormID()</code> will still return a null cell's proper ID, even though the cell object is broken. | ||
Line 149: | Line 62: | ||
* [http://afkmods.iguanadons.net/index.php?/topic/3997-merchant-gold-reset-bug/#entry151915 Reloading a savegame won't reset a merchant's gold.] | * [http://afkmods.iguanadons.net/index.php?/topic/3997-merchant-gold-reset-bug/#entry151915 Reloading a savegame won't reset a merchant's gold.] | ||
* [http://forums.nexusmods.com/index.php?/topic/781746-problems-with-light-sources-flickeringturning-on-and-off/#entry6272032 If too many light sources are around in a single area, then surfaces and objects will flicker between lit and unlit as the camera moves. This is due to an engine limitation.] | * [http://forums.nexusmods.com/index.php?/topic/781746-problems-with-light-sources-flickeringturning-on-and-off/#entry6272032 If too many light sources are around in a single area, then surfaces and objects will flicker between lit and unlit as the camera moves. This is due to an engine limitation.] | ||
=== Unsorted best practices === | === Unsorted best practices === | ||
Line 157: | Line 69: | ||
=== Unsorted lessons === | === Unsorted lessons === | ||
* [http://afkmods.iguanadons.net/index.php?/topic/3863-mgritual04questscript-unendingcontinuous-papyrus-log-errors/ A 10MB Papyrus log.] This | * [http://afkmods.iguanadons.net/index.php?/topic/3863-mgritual04questscript-unendingcontinuous-papyrus-log-errors/ A 10MB Papyrus log.] This is why you should be careful with update events. | ||