ID:272675
 
Is it bad to have a big .dyn file ?

I currently have one at +400 kb's. If it is, how could I decrease it ?

It seems to increase when I create a character. (mainly the part I add the hair and icon) I create /icon's for that.

Is there any viable solution if it's bad ? :/
.dyn stands for, IIRC, the dynamic part of the resource file. That is, resources created during runtime. If you're using functions that create new icon files (such as using rgb, etc), they get added to that file, which is why it gets larger when you create a character.

As for if it's bad, that depends on one thing, in my opinion: If the resources are downloaded when the client connects, or if they're downloaded when they would be drawn on the screen (this used to be the old behavior). I'm not sure which it does anymore.
In response to Devourer Of Souls
And is it a bad thing if it gets too big ?

mob/proc
BuildIcons()
var/icon/main = new('Base.dmi')
if(hairstyle)
var/icon/hair = new('hair.dmi', "[hairstyle]")
hair.SwapColor(rgb(1,1,1),haircolor)
main.Blend(hair, ICON_OVERLAY)
icon = main


It started happening when I added that proc. The original version can be found here</a href>.

I just don't know if it's better to save on savefile size and have a huge .dyn file or the reverse.
In response to Andre-g1
Well, if didn't tamper with preload_rsc, it should download all compiled resources upon connecting, and then all dynamic resources upon viewing them. This could cause a small lag spike here and there in people with slower connections, but it shouldn't be a huge problem. I think I would prefer the larger .dyn file just because a larger savefile probably means you are saving the hair color, then upon loading, wasting processing power on creating a new icon.
In response to Jeff8500
I'm actually creating 2 new icons when they login, the base icon and the hair.

But nonetheless, thanks for your opinion, I guess I'll keep this :)