ID:140432
 
Code:
client/preload_rsc= 1


Problem description:

For some reason, the game is making players download 30+ MB of resources (in the options box after the game is open but before they get to the title screen) every single time they open the game up..

If you cancel the download it continues fine like it didn't even need the download. The resources file is only about 3MB, though the .dyn.rsc file is around the same size as the 30MB download. I tried setting preload_rsc to 0 but that didn't help either. Any suggestions?
30MB means you need to fix your game
In response to Ripiz
Yeah thanks that helped me so much.
Sprin wrote:
Code:
> client/preload_rsc= 1
>

Problem description:

For some reason, the game is making players download 30+ MB of resources (in the options box after the game is open but before they get to the title screen) every single time they open the game up..

If you cancel the download it continues fine like it didn't even need the download. The resources file is only about 3MB, though the .dyn.rsc file is around the same size as the 30MB download. I tried setting preload_rsc to 0 but that didn't help either. Any suggestions?

Try compiling with the clean resources option. If that doesn't help delete the dyn.rsc file and recompile and run again.

If that doesn't work then may I ask what are you doing in your code at startup?

*warning: I'm no expert at this so I would strongly suggest making a back up of dyn.rsc before deleting it.*
In response to Sprin
You're welcome :)

Disable custom icons
Disable custom hair/eye/clothes coloring
If you use turn() or any other similar function, make sure you delete object after you don't need it
Don't save icons/overlays/underlays into savefile, they go resources when loaded, as it creates new icon when loading them
If you have names on map for players or etc, make sure you delete those, when player logs out

That's only few things which can be done.
'Clean Compile' Would be the Answer but are you aware that

1 YB = 1024 B
1 ZB = 1021 B
1 EB = 1018 B
1 PB = 1015 B
1 TB = 1012 B
1 GB = 109 B
1 MB = 106 B
1 KB = 103 B
In response to Getenks
You are mistaken. A kilobyte is 1024 bytes, a megabyte is 1024 kilobytes, a gigabyte is 1024 megabytes and so on.
In response to Getenks
EB/ZB/YB? Also, why are the numbers smaller font and slightly higher?
In response to Moonlight Memento
Exabyte, Zettabyte, and Yottabyte. The small numbers are exponents, where XY means X multiplied by X, Y times. Or, in the case of 10Y, it means 1 followed by Y zeroes. So, 106 is 1000000, or one million.
In response to Garthor
Thanks and yeah I know most of them but what did it have to do with my problem?

Also, clean compile didn't work.. I'm trying deleting the .dyn.rsc now. It's strange because this hasn't happened before and the .dyn.rsc has been this big before.
In response to Sprin
The dyn.rsc file is any resource that is created at runtime. This means any time you use an icon proc you add to this file, any time someone uploads any type of file you add to this file, any time you do anything to alter any part of the game's resources at runtime.


Fun fact: Today Mobius Evalon wasn't able to upload files to his directory on the Tibbius server, Icon Ultima's dyn.rsc file had reached 1.5GB and caused his user-level quota (which I put in place for this reason exactly) to trigger.
In response to Nadrew
I deleted the .dyn.rsc and that fixed this whole problem, I don't get it..

What's the point of keeping around files that never get used anymore? And I get the feeling it just keeps adding to it even if it's the same dynamic icons.. Can't it just delete the old ones or something?
In response to Sprin
http://www.byond.com/ members/?command=reference&path=world%2Fvar%2Fcache_lifespan

Most likely, however, the issue is that you are creating far too many icons.
In response to Sprin
Sprin wrote:
I deleted the .dyn.rsc and that fixed this whole problem, I don't get it..

What's the point of keeping around files that never get used anymore? And I get the feeling it just keeps adding to it even if it's the same dynamic icons.. Can't it just delete the old ones or something?

That file should be deleted when you reboot the game. Is that not happening?
In response to Garthor
Thanks, I'm gonna try setting it to 7 days. The game uses a LOT of dynamic icons, every single player character in the world has a dynamic icon that updates itself every now and then. (And there's 30-90 players a day)
And I use a lot of coloured dynamic icons, etc.

While I'm here, is there a way to set the log to output the cause of a daemon crash? I can never figure out what's crashing my game because there's never any log output for crashes, it either just freezes, or dies. Which makes it really really hard to debug what's going on, especially when I'm not even around most of the time when it happens.
In response to Tom
Yeah that definitely doesn't happen.. would cache_lifespan have anything to do with that?
In response to Sprin
Likely. Set it to 0 so the resources are only saved for that hosted session.