stars2heaven Posted January 18, 2010 Posted January 18, 2010 A few weeks ago I set off to create and item that produces cheese and shreaks "Cheese for everyone!" whenever you hit someone with it. It happens to be an artifact of Sheogoraths, anyways... I realized after reading about it that the function "PlaceAtMe" would result in save game bloat if used continuously the way I had planned to use it. So I decided not to use that function. But it got me to wondering, does "Player.AddItem" do the same thing? Both functions are creating new items in the world. Well, one is in the inventory first. But you can then place it in the world. Im just wondering. I dont want to be the cause of peoples games becoming obese
zprospero Posted January 19, 2010 Posted January 19, 2010 I'm fairly certain that the AddItem command doesn't cause any bloating. I'm fairly certain that it's because PlaceAtMe places new items IN the world,whereas AddItem places it in a container and doesn't render anything. Someone else may be able to give some specifics, butI'm rather certain that using AddItem is perfectly safe.
alonsomartinez Posted January 20, 2010 Posted January 20, 2010 This is regarding the pan that summons cheese right ? Im pretty sure that yuou can use ref.moveto player instead of placeatme.Theres a whole article on the wiki.
David Brasher Posted January 21, 2010 Posted January 21, 2010 I think the issue is persistent references. You can place all the non-persistent references in the world that you like, but PlaceAtMe adds persistent references. (I do not know why they made it this way.) PlaceAtMe is a much-maligned taboo command that everyone gripes about, but I think there is a double standard. Nobody goes around saying, "Don't use so many traps! Don't write so many scripts that refer to persistent references! Don't have so many NPCs!" I guess it is just that non-bloating workarounds can be used instead of PlaceAtMe, but there is no way out around some of these other game components.
zprospero Posted January 21, 2010 Posted January 21, 2010 Well, I think it's because of the potential for exponential growth with PlaceAtMe. If you use a set number of traps, NPCs, etc that's a static amount that will not increase,but PlaceAtMe has the potential to create several thousand persistent references(especially with the summoning cheese on hit). AddItem is safe as it just adds instancesof that object into a inventory, it doesn't create a reference because it's going intoa container, all it's really doing is incrementing a counter.
Recommended Posts