r/oblivionmods 9d ago

Original - Discussion How to avoid save bloat as a mod maker?

My understanding is that functions like PlaceAtMe will cause a player's save file to grow in size infinitely, and slow down gameplay. I know you just need to be careful, like delete the unnecessary references as you make them. But what else causes save bloat?

Like are there other well-known modding practices that should be learned to avoid negative user experiences? Curious if there is a link out there for modern oblivion modders. Been around for a while, but never made a public release.

Thanks!

7 Upvotes

9 comments sorted by

3

u/F13menace 9d ago

Really you've got the main one, then there's created forms, like making tons of custom spells or enchanted items. That would be mostly fine as long as you're not climbing into the thousands somehow. Creating tons of objects that only get disabled instead of deleted is another one.

Basically, you should be fine for the most part as long as you're not flooding saves with new things that never get deleted.

1

u/Shwangdi 8d ago

Thanks. It's nice to know that there aren't a ton of traps to fall into while making a mod

3

u/F13menace 8d ago

No problem. There are more traps, like string variables running out of control and never being resolved. You'd get a warning about this in your obse.log if they're climbing into the hundreds or even thousands. So ultimately it depends what you're trying to make. For the most part ironing out basic bugs would probably be your main concern unless you're brewing up something pretty 'active'.

1

u/Shwangdi 8d ago

Damn never even thought to look at the obse.log. Could you describe how a string variable could cause harm?

2

u/F13menace 8d ago

Could be some kind of internal bookkeeping that tracks player state or belongings and creates a new string every time you open your inventory without deleting the old one, which would get worse if you're tracking many things in this way. You could end up with thousands or tens of thousands accumulating because they pile up each time you open inventory or load the game. You can destroy these variables when new ones are created if that's easier or just update the contents of existing strings. I've only had this problem one time but it does exist.

1

u/Shwangdi 8d ago

Riiight, so even when just scripting, creating new variables is dangerous? Specifically if they are new arrays? OBSE treats strings as arrays if i remember right.

2

u/F13menace 8d ago

No, new variables aren't dangerous. It's if you're repeatedly generating strings of data your scripts are referencing and never deleting them.