Difference between revisions of "Common Bugs"

4,246 bytes added ,  15:19, 21 December 2023
no edit summary
imported>Kivan
(Added a detail)
Tag: Manual revert
 
(12 intermediate revisions by 4 users not shown)
Line 51: Line 51:
One of these cells is listed separately under [[Crashes#Edits_to_Tamriel_cell_.28-47.2C-7.29|Crashes: Edits to Tamriel cell (-47,-7)]]. Others are listed below:
One of these cells is listed separately under [[Crashes#Edits_to_Tamriel_cell_.28-47.2C-7.29|Crashes: Edits to Tamriel cell (-47,-7)]]. Others are listed below:


===Random Vanishing Landscape in Tamriel===  
==Random Vanishing Landscape in Tamriel==


The cells 20,-17 and 20,-18 (along the road between Bravil and Leyawiin, between the small bridge and Fort Nomore). Even small changes to these cells may cause the landscape to randomly vanish. If you quit the game, restart, reload and return to the same spot the problem usually goes away, but it may randomly return on future visits to the spot. Entering these cells slowly may reduce your chances of encountering the bug.
The cells 20,-17 and 20,-18 (along the road between Bravil and Leyawiin, between the small bridge and Fort Nomore). Even small changes to these cells may cause the landscape to randomly vanish. If you quit the game, restart, reload and return to the same spot the problem usually goes away, but it may randomly return on future visits to the spot. Entering these cells slowly may reduce your chances of encountering the bug.
Line 57: Line 57:
One of the causes of this bug has been identified as Havok-enabled object refs. placed in a cell rolling into an adjacent unloaded cell. Because of this, if you are placing Havoked items (items that the player can move with the Z-key; this includes weapons and armor) into the world, ensure that they are not near cell boundaries if they roll easily.
One of the causes of this bug has been identified as Havok-enabled object refs. placed in a cell rolling into an adjacent unloaded cell. Because of this, if you are placing Havoked items (items that the player can move with the Z-key; this includes weapons and armor) into the world, ensure that they are not near cell boundaries if they roll easily.


===Markers Missing from Local Map===  
==Markers Missing from Local Map==  


The cell 3,3. If a mod alters ANYTHING at all in the cell 3,3 in any worldspace, the player's local map will stop showing the player marker and other markers on the local map. However, this local map error can also happen randomly when going through certain cells without any mods at all, but in this case it's only temporary. No fix is known for the latter bug.
The cell 3,3. If a mod alters ANYTHING at all in the cell 3,3 in any worldspace, the player's local map will stop showing the player marker and other markers on the local map. However, this local map error can also happen randomly when going through certain cells without any mods at all, but in this case it's only temporary. No fix is known for the latter bug.
Line 77: Line 77:
== Oblivion Realm Resets ==
== Oblivion Realm Resets ==


Whenever the player closes an Oblivion gate, the entire Oblivion cell and everything inside of it is reset. This includes inventories of containers and NPCs, and for NPCs their spell list and location. Variables on world objects may be reset as well (NPCs seem to be reset, but not activators).
Whenever the player closes an Oblivion gate, the entire Oblivion worldspace and everything inside of it is reset. This includes inventories of containers and NPCs, and for NPCs their spell list and location. Variables on world objects may be reset as well (NPCs seem to be reset, but not activators).
 
One side effect of this is that is it inadvisable to move the player into an Oblivion worldspace with MoveTo rather than using a proper gate door. The worldspace may not reset properly, so the next time the player visits it, the Sigil Stone may be missing or other problems may occur.


== Adding Multiple Items with the Same Script ==
== Adding Multiple Items with the Same Script ==
Line 109: Line 111:
== Weight Updates ==
== Weight Updates ==
The encumbrance of the player won't be updated if you change the weight of an object (SetQuestObject, SetWeight, etc.). You can add/remove an item to force an update.
The encumbrance of the player won't be updated if you change the weight of an object (SetQuestObject, SetWeight, etc.). You can add/remove an item to force an update.
== Adding Same Leveled and Non-Leveled Item to Containers ==
If a container contains instances of a leveled item, and also instances of the same item without being in a leveled list, only the leveled list amount will be present.
Two examples of this effect in unmodified Oblivion are the boss-level chest in Lost Black Rock Chasm, and the "savings" chest in Aelwin Merowald's house. They contain 1,766 and 500 Gold001 respectively, plus a levelled list gold item that also contains Gold001. However, the fixed gold amounts never appear, only the much smaller amount provided by the list. (This has been confirmed to also affect other items too.)
To avoid this, simply either edit the leveled list to add in the fixed amount, or create a new leveled list providing it, and add that to the container along with the variable leveled list, instead of adding the item directly. The amounts will properly be added by the engine.
== AI Packages that Cross Midnight/Go Until the Next Day ==
If a package is supposed to occur on given day(s) of the week or month (not every day) but the duration spans past midnight, then due to an engine bug, the following will occur:
1) The after-midnight component will occur a day before it's supposed to, 2) The package will occur normally, 3) The before-midnight component will occur a day after it's supposed to.
(This is as if the package was repeating and being truncated at the midnights.) This will will lead to strange and unplanned NPC behavior.
For example, a package that is to run on a specific day from 18:00 to 02:00 the next day will actually run from 00:00 to 02:00 on the start day, then 18:00-02:00 as intended, and then again at 18:00-00:00 on the end day. This effect can be seen in unmodified Oblivion on many NPCs who visit another town, for a duration of a day or more, on specific days of the month.
Simply split these packages so that they don't cross midnight to avoid this effect. In the example above, you would create an 18:00-24:00/00:00 package for the start day, and then an 00:00-02:00 package for the end day.


== MoveTo Oddities ==
== MoveTo Oddities ==
When using MoveTo, you should be careful to avoid several problematic situations, described below.
When using MoveTo, you should be careful to avoid several problematic situations, described below.
===MoveTo prevents other scripts to run===
MoveTo seems to crash the script engine until next frame, as no other script runs after you use it.
Not very clear whether the above statement is really true in absolutely all scenarios, but it can be repeatedly proven with the following setup:
#Create a scripted container (ObjA) that uses MoveTo, say, every other frame.
#Create a scripted container  (ObjB) that prints its own FormID to the console every frame.
#Place one ObjA in an exterior cell
#Place one ObjB in the cell to the West of ObjA and one ObjB in the cell to the East
Since the engine runs reference scripts on cells from West to East and from South to North, on frames where ObjA uses MoveTo, the ObjB placed to the East will not run its script.


=== MoveTo Crash on Loading Destination Cell ===
=== MoveTo Crash on Loading Destination Cell ===
Line 118: Line 148:
=== MoveTo in Dialogue Result Script ===
=== MoveTo in Dialogue Result Script ===
Using MoveTo on the player in a dialogue result script triggers in a hidden bug that silently causes the player's viewing axis to be inverted. The player speaks to the NPC and the screen does a violent spinning motion on the viewport as they're zoomed in for dialogue. This is the only way you'll know that the bug has struck. If the player does not speak to another NPC before saving, then reloading that save will cause the game's viewport to be inverted. The ground will be on top, the sky on the bottom. Moving about becomes difficult or impossible. The affected savegame will probably not be salvageable. Do not use MoveTo in a dialogue result script. Instead, set variables in an NPC or quest script and use those variables to determine where your script should move the player.
Using MoveTo on the player in a dialogue result script triggers in a hidden bug that silently causes the player's viewing axis to be inverted. The player speaks to the NPC and the screen does a violent spinning motion on the viewport as they're zoomed in for dialogue. This is the only way you'll know that the bug has struck. If the player does not speak to another NPC before saving, then reloading that save will cause the game's viewport to be inverted. The ground will be on top, the sky on the bottom. Moving about becomes difficult or impossible. The affected savegame will probably not be salvageable. Do not use MoveTo in a dialogue result script. Instead, set variables in an NPC or quest script and use those variables to determine where your script should move the player.
(Though in some cases, this bug can easily be undone by switching between the first- and third person view or enter any coversation)


=== MoveTo on Containers ===
=== MoveTo on Containers ===
Line 125: Line 156:
Another workaround (works also on other 'unmovable' objects), when you get the object at the destination, is to [[Disable]] the object in one frame, [[Reset3DState]] in the next frame and [[Enable]] it in the third frame. The object will flicker, though.
Another workaround (works also on other 'unmovable' objects), when you get the object at the destination, is to [[Disable]] the object in one frame, [[Reset3DState]] in the next frame and [[Enable]] it in the third frame. The object will flicker, though.


=== MoveTo for Actors may require pathrid ===
=== MoveTo for Actors may require pathgrid ===


In some situations, using MoveTo on an Actor may ''appear'' to not work right unless the destination has a valid pathgrid to guide them. The symptom of this problem is that the MoveTo appears to work normally, but the Actor remains at the target only for a few seconds, then is moved to a nearby pathgrid in the same cell. The solution is to make sure the target area for a MoveTo on an Actor has a valid pathgrid, using World...Edit Cell Grid Path in the Construction Set. This isn't really a problem with MoveTo, but it can seem to be such until you realize the underlying cause.
In some situations, using MoveTo on an Actor may ''appear'' to not work right unless the destination has a valid pathgrid to guide them. The symptom of this problem is that the MoveTo appears to work normally, but the Actor remains at the target only for a few seconds, then is moved to a nearby pathgrid in the same cell. The solution is to make sure the target area for a MoveTo on an Actor has a valid pathgrid, using World...Edit Cell Grid Path in the Construction Set. This isn't really a problem with MoveTo, but it can seem to be such until you realize the underlying cause.
Another workaround, in cases where you don’t want/can’t place a pathgrid node at the destination spot, is to use SetPos to (re)position the actor just after the MoveTo, as SetPos does not snap actors to pathgrid nodes as MoveTo does.
==Deleted references in the Construction Set==
If you delete a reference or object in the CS, the reference is marked as deleted but will remain in the CS until you save and reload your mod (reference, in this context, means anything that has a FormID and can be loaded in a ref variable: References in the world, Base Objects, AI Packages, etc)
If you compile a script that refers to that reference, the compiler will not notice that the reference has been deleted and will not give any error. But, in game, this script will not run at all, not even once, no matter what.
After reloading the esp in the CS, the compiler will notice that the reference does not exist and will throw an error (because, now, the reference is gone for good).


[[Category:Troubleshooting]]
[[Category:Troubleshooting]]
Anonymous user