Difference between revisions of "PlaceAtMe"
Jump to navigation
Jump to search
→Warning: Repeated Use Causes Save-Game Bloat: Clarified
imported>DragoonWraith (→Console Use: removing section - true of every function, does not belong here) |
imported>Haama (→Warning: Repeated Use Causes Save-Game Bloat: Clarified) |
||
Line 18: | Line 18: | ||
==Warning: Repeated Use Causes Save-Game Bloat== | ==Warning: Repeated Use Causes Save-Game Bloat== | ||
Objects created with '''PlaceAtMe''' become part of the savegame file and slightly increase its size. However, those slight increases add up and can become huge when '''PlaceAtMe''' is continuously used. Once the savegame file is around 10 megs problems start to creep up, including extended load times, increased game instability and CTDs, and at extreme levels, considerable performance loss and an inability to load the game. | |||
As a rule of thumb, it's OK to use '''PlaceAtMe''' a finite number of times (i.e., a quest script that runs once and creates 20 '''PlaceAtMe''' objects). It's not OK if your script can potentially use '''PlaceAtMe''' an infinite number of times (i.e., a Summon spell that creates a new creature with '''PlaceAtMe''', an activator/button that creates a new sword). | |||
With some careful planning, you can use different functions and avoid these problems. For instance, for summonings you can create a persistent creature, place it in a remote cell in the CS, and when the spell is cast use '''''CreatureRef.[[MoveTo]] player''''' (note that there's more to summoning, but that avoids the '''PlaceAtMe''' problems). If you need an object to appear, create and place it in the CS, make sure it's "Persistent" and "Initially Disabled", and use '''''ObjectRef.[[Enable]]'''''. | |||
If you really ''need'' to use PlaceAtMe in your mod, it would be fair to indicate that fact in your mod's Readme file. | |||
==Getting the Created Object's Reference== | ==Getting the Created Object's Reference== |