User talk:QQuix/On Dynamic Items and Savegame Bloating

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search

Nice[edit source]

This is awesome stuff, great to have this around. When you finish, definitely need to get it moved into the (Main) namespace! (well, assuming you don't mind the byline rule)
Dragoon Wraith TALK 21:32, 1 September 2008 (EDT)

The byline rule is exactly the problem ... but in a different sense: I just can’t write that way. I get all sorts of a mental blocks (lack of talent and confidence, I suppose). I’ve been trying to write this as an article for months. Always procrastinating. As soon as I decided to write it as a personal page, everything flowed in a couple of days. Maybe, someday, some kind soul will rewrite/rephrase it into an article. QQuix 17:47, 2 September 2008 (EDT)
Meant to ask this earlier - would you mind if we post comments directly on the page? I had several, but they were on random bits.
--Haama 19:13, 6 September 2008 (EDT)
No problem. Go ahead. I wont have any mass update anymore.QQuix 19:59, 6 September 2008 (EDT)
That is not a problem at all - we can help with that.
Dragoon Wraith TALK 20:39, 6 September 2008 (EDT)
Thanks, but I am OK. I mentioned mass update because I have a ‘master’ text that I edit during the tests and the initial idea was to replace the whole ‘article’ at once. From now on it will be easy to update by blocks. And comments on the page will be most appropriate. QQuix 21:50, 6 September 2008 (EDT)

This stuff is amazing. I'd love to see a video of the ruby cascade; that sounds awesome. This is easily among the best testing Oblivion has ever seen, you realize?
Dragoon Wraith TALK 00:16, 15 September 2008 (EDT)

I've just downloaded and installed FRAPS. I will try to make a video, just for fun.
The tests may be good, but I am only testing Misc Items. I know that Haama alone has done a lot of serious, varied tests. Anyway, thanks. It is nice to hear that. QQuix 01:24, 15 September 2008 (EDT)
OK. The video with several cascades is here (YouTube).
For each item, the first drop is one-per-frame (organized, takes time). The second, drops all in the first frame and let the engine handle it (chaotic, faster). The third, drops all and spread them in the air in the first frame (fastest). Finally, just move all up and let them fall.
Disclaimers: The video I uploaded was much better quality, but it seems YouTube ‘processes’ it and reduces the quality. Fraps allows only 30 secs of recording, so I had to do a lot of cut&paste (without much practice). And forgive the naked lady. RemoveAllItems did it, not me.
And we all must applaud the physics engine. You really can see it at work here. It looks most realistic and natural.
Have fun. QQuix 22:19, 15 September 2008 (EDT)
That's amazing! Yes, I agree, Havok has out-done itself here. Very, very nice work.
Dragoon Wraith TALK 10:06, 16 September 2008 (EDT)

General test comments[edit source]

Hey QQuix, some quick, general test comments:

  1. Remote cell vs. Loaded cell
    • I suspect that the PlaceAtMe/Activate trick does prevent bloat, but only if the item is in a remote cell. I used this trick extensively to prevent the item's script from running so maybe it has other effects. The trick has been tested (and of course those threads have long been dead/destroyed) so either the tests were wrong or there's another variable we're missing.
  2. No ref vars
    • You can get around 1000s of ref vars by using OBSE's GetFirstRef
  3. Save text file
    • You can make a save text file with con_Save SaveFileName 1. It doesn't have all of the information (i.e., script variables), but I think it has what you're looking for.
  4. Public testing
    • I haven't gotten this much off the ground myself, but please post your test mods so other's can take a look. It doesn't need to be fancy - a link back to this page and comments if necessary.

Very cool and glad this is getting the testing it deserves.
--Haama 11:30, 17 September 2008 (EDT)

Wow, Haama, your comments suggest a lot of new tests.. Anyway, answering the above:
  • 1. I did a quick test, but the results were not much different: I moved each item to a hidden room before activating them. But that was on a single frame. Lots of room to elaborate this test, but would take time (either learn and use Pluggy or create a linked list to hold the refs over several frames)
  • 2. Not sure what you mean. I am using GetFirst/NextRef.
  • 3. I am using con_Save but didn’t know about the “1”. I loved it. It is not documented in the con_Save page. I will write an external program to compare saves. Or would something like that exist already?
  • 4. Will do. But right now it is a mess. I will clean the mess a bit and upload it somewhere.
QQuix 18:25, 17 September 2008 (EDT)
I uploaded the test mod to TES Nexus here QQuix 10:33, 25 September 2008 (EDT)
I uploaded a new version to TES Nexus (same link). QQuix 19:20, 30 September 2008 (EDT)

Not as bad as it seemed[edit source]

It seems that “xItem.Activate xSelf” is the cause of the bloating. While preparing for testing scripted objects I started using “xItem.Activate xSelf 1” and the bloating did not occur, as it correctly removed whatever data was created when the item was placed in the world. I rewrote the conclusions and will add some test data soon.

That's great to hear!
Dragoon Wraith TALK 14:05, 21 September 2008 (EDT)
Thanks for testing that QQuix. That's a bit of a shame, though - I was using Activate without the runScript flag (to get around another problem) in an older mod. I thought people were crazy when they told me removing the mod destroyed their game... it might be worth bringing this up on the Bash thread and asking Ranglor or someone to find a way to get rid of these references permanently. Maybe their "HasBeenPickedUp" flag is set so they're easy to find?
--Haama 18:33, 21 September 2008 (EDT)
Did a quick test: Bloated the savegame by 300K and deactivated the mod. Reloaded the bloated save and saved again. Savegame returned to original size. Bloat gone. No apparent problems. True, all items were on a single cell which was deactivated with the mod. May be different when the bloating items are activated all over the map.
Scruggs said that a DestroyRef function will be added to OBSE.
I am not familiar with WryeBash, but it would be nice to have a tool to clean up the existing saves.
QQuix 01:46, 22 September 2008 (EDT)

CloneForms[edit source]

This clears up all the savegame bloat for dynamic items, does anyone know what happens with CloneForm? It would be really nice if CloneForms had some sort of reference-counting garbage collection so they get removed if nothing uses them, but somehow I doubt that and suspect that each CloneForm bloats savegames permanently. --ABO 17:53, 10 March 2009 (EDT)

CloneForm, DuplicateAllItems and CreateFullActorCopy have twice the usual bloating potential as all three (any other?) create new Base Object records which, along with their Reference records, will remain in the game forever (unless, of course, the modder takes some additional steps - as the ones mentioned below).
Base Records of actors created with CreateFullActorCopy can be completely removed with DeleteFullActorCopy, but CreateFullActorCopy also duplicates whatever items the original actor had in its inventory, and, AFAIK, these duplicated items are not removed by DeleteFullActorCopy.
Besides the additional Base Records, any reference based on these Base Records (reference created either by PlaceAtMe or by dropping an item from an inventory) has the same bloating potential as references based on vanilla Base Records.
I recently installed RefStuff and was very pleased to verify that it's DestroyClonedForm function does remove those Base Records. As it's DestroyRef does remove references created with PlaceAtMe/Drop. Any modder willing to use OBSE+RefStuff will have a lot of flexibility in safely creating and destroying stuff. Even more by using arrays to keep track of the FormIDs-to-be-destroyed.
QQuix 01:07, 11 March 2009 (EDT)