Day of Defeat Plugins Community
This site is an archive — everything is readable and downloadable, nothing can be posted. Admin
Archive › Old Forum Threads › General › Requests for DoD Plugins › Precache Plugin Manger
19 posts, 7 people · 9,656 views Thread Rating: ★★★★★
closedPrecache Plugin Manger
Started by WARDOG on 05-08-2007, 04:03 PM
WARDOG
started this thread
Posts: 141
Threads: 14
Joined: Jan 2006
05-08-2007, 04:03 PM #1

Requesting a plugin, that manages all your plugins, that precache sounds, models, sprites,etc.rnrnIs it possible to make this so it will catch all the precache from the other plugins that load up, that have "copies of the same sounds, sprites, models", and precache them "once" for that "copied sound, sprites, model", for all these running plugins? Maybe use an .ini plugin listing that it checks before the precache action? rnrnSo it can help prevent the " failed to precache because the item count is over the 512 limit" map crash error.rnrnI'm totaly bummed out about this.

diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
05-08-2007, 09:17 PM #2

having 2 or more plugins precache/use the same things should not precache them twice as two different things.. it should see that its already precached and skip it.. or at the very least overwrite the precache data of the previous one

WARDOG
started this thread
Posts: 141
Threads: 14
Joined: Jan 2006
05-09-2007, 12:52 AM #3
having 2 or more plugins precache/use the same things should not precache them twice as two different things.. it should see that its already precached and skip it.. or at the very least overwrite the precache data of the previous one
rnrnIt's not though, I confirmed this by taking all the copy caching plugins, and making one plugin out of them, thus aleiviating the precache copies, say boom.mdl in one, and a boom.mdl in the other. This stopped the crash error, but it's a huge pain in the arse. Thus needing some code in plugins to check others for copies before precaching, or some way to stop this.rnrn I only run about 5 or 6 plugins that have similar cache .mdls and sprites. Two have 5 or 6 similar, and the rest, 1 or 2, on top of a few that have dissimilar cache properties. rnrnAMXX Version 1.76drnMetamod-P 1.19p31

=|[76AD]|= TatsuSaisei
posted here
Posts: 794
Threads: 54
Joined: May 2005
05-09-2007, 05:01 AM #4
It's not though, I confirmed this by taking all the copy caching plugins, and making one plugin out of them, thus aleiviating the precache copies, say boom.mdl in one, and a boom.mdl in the other. This stopped the crash error, but it's a huge pain in the arse. Thus needing some code in plugins to check others for copies before precaching, or some way to stop this.n nI only run about 5 or 6 plugins that have similar cache .mdls and sprites. Two have 5 or 6 similar, and the rest, 1 or 2, on top of a few that have dissimilar cache properties. n nAMXX Version 1.76dnMetamod-P 1.19p31
n nThis is very interesting... I have actually wondered about this. I can say I never tried completely what you did to test your theory, but am glad someone di and posted thier results... I will have to spend some time looking through all of my plugins to make sure nothing is doubled up...n nand I agree, if this is the normal behavior, where it will precache things needlessly, then a plugin or method to prevent it would be golden...n nRest assured this idea will not die....

WARDOG
started this thread
Posts: 141
Threads: 14
Joined: Jan 2006
05-09-2007, 02:36 PM #5

The doubles don't seem to matter if you have to many plugins, although I do not, if you get past that % of cache, and change your map to a large map like wolfie, snowcity, = map server crash. :/

diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
05-09-2007, 08:49 PM #6

after discussing this a bit in #amxmodx on irc.. no one seemed to really be all that sure if it will actually take up two precache 'slots'nnnso teame06 gave me a for loop to try, so i popped it in a plugin and filled in the needed areas and got this:n

public plugin_precache()n{n    n         for(new i; i < 513; i++)n        {n        server_print("Precache # [%d]", i)n        precache_model("models/mapmodels/smoke_grenade.mdl")n        }n        n}
nwhich will precache the smoke_grenade model 512 times (which including everything else already precached should def hit the limit)nnbut in the console it def shows it running thru the loop 512 times.. yet the map worked without a problem..nnnow that only checks precaching the same file over and over within the same plugin.. now im gonna give a try to checking out multiple plugins myself :D

diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
05-09-2007, 09:07 PM #7

ok sorry for doubting you or whatever lol.. i think your totally right now :Pnnnjust put my local server over the limit.. pulled it back just slightly below the limit.. and threw in a plugin that precaches a model that is already precached in another plugin.. and that threw it over the limit.. removing the extra plugin.. was back to working fine..nnthats quite odd..nni dont really see how any plugin would be able to 'go thru' other plugins or anything and combine precaches or anything.. nntho i might take a look at the precache forward.. see what can be done with that..nn*edit* nnok im a dumbass.. i forgot the precache forwards are client precache and not server precaching

WARDOG
started this thread
Posts: 141
Threads: 14
Joined: Jan 2006
05-10-2007, 12:25 AM #8

It was actually a clan mate that put the plugin all in one together, but my assumption that this is what it was doing, with the precache after viewing all the .smas, so we put our heads together and came up with this conclusion.rnrnHope you guys can figure some thing out.

WARDOG
started this thread
Posts: 141
Threads: 14
Joined: Jan 2006
05-10-2007, 01:13 PM #9

On a side note, does anyone know exactly what amount is being precached for the game. Why such a huge amount?rnrnSay dod_wolfie loads up, give it 100 precache items, rnrn3rd party plugins, give it a high number like 50,rnrnHow much does amxx precache?rnrnDoes the game itself precache other things at that moment, besides the map and plugins uselessly?rnrnWhere did the 360 precaches go?rnrnIt just seems weird, like some thing else is going on, maybe a bug, I don't know. :/

=|[76AD]|= TatsuSaisei
posted here
Posts: 794
Threads: 54
Joined: May 2005
05-10-2007, 02:44 PM #10
On a side note, does anyone know exactly what amount is being precached for the game. Why such a huge amount?n nSay dod_wolfie loads up, give it 100 precache items, n n3rd party plugins, give it a high number like 50,n nHow much does amxx precache?n nDoes the game itself precache other things at that moment, besides the map and plugins uselessly?n nWhere did the 360 precaches go?n nIt just seems weird, like some thing else is going on, maybe a bug, I don't know. :/
n nThe game itself precaches many hundreds of files itself regardless of maps and plugins... the player models, ALL the weapon models, weapon sprites, the sounds people make running, jumping, shooting, etc... think about it, everything you see and hear has to be precached first.. and then you add maps and the stuff IT uses...

diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
05-11-2007, 08:13 PM #11

now knowing that valve added a command line argument to increase max entities.. it would be nice if someone or 10000 people would ask them to add one to increase the precache limit

Wilson [29th ID]
posted here
Posts: 623
Threads: 57
Joined: Oct 2005
05-11-2007, 09:04 PM #12

You should post this on amxmodx.org's forums too.rnrnYou can hook FM_PrecacheModel and FM_PrecacheSound, etc. and make sure it hsan't already been precached.rnrnBut the problem is, that won't catch anything that is precached by plugins, as metamod cannot hook itself.

diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
05-12-2007, 12:00 AM #13

thats what i tried wilson.. nnit catches when each client precaches the stuff.. so that wont help.. as the server would crash before anyone could get on it anyway

K KidTwisted
posted here
Posts: 23
Threads: 3
Joined: Apr 2006
05-15-2007, 03:32 PM #14

Wow, It's good to see this topic come alive again.rnrnhttps://www.dodplugins.net/forums/showthread.php?t=524rnrnSuch an important issue for all server admins/owners.rnrnThanks Wardog, this new info is another small step toward finding the possible fix for this problem.rnrnSo to sum up what we have learned:rnrnIf we take all the precache requests from all the plugins ran, and combine them all into one plugin that just precaches stuff, (ie. no more doubles) this will reduce our precahe count? Hmmmm.rnrnIt sounds like the HL1 engine sort of sets aside precache slots and allows for some sort of multiples which makes me ask - why? sounds buggy.rnyou know Valve could care less :(

xxavalanchexx
posted here
Posts: 13
Threads: 2
Joined: Oct 2006
05-16-2007, 06:02 PM #15

I've verified that two plugins precaching the same file return the same precache index, though it doesn't necessarily mean that they don't take up two precache slots anyway. I've also hooked FM_PrecacheModel and had it scan everything precached by the server dll, and there are no cases where the same resource returns multiple precache indexes.rnrnI'm not ready to give up on this entirely, though. Could anyone recommend some plugins that have a high amount of resources to stress out the limit?rnrnThanks.

diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
05-16-2007, 10:55 PM #16

im gonna try and do a couple more tests if i get a chance tomorrow..nnbut heres 3 plugins of mine that have larger #'s of files being precachednnDoD Explosives Beta (12 files)nDoD Smoke Grenades 2 (17 files)nDoD Throw Rocks (17 files)nnnheh and welcome to the forums mr 1 post hehe :P

WARDOG
started this thread
Posts: 141
Threads: 14
Joined: Jan 2006
05-17-2007, 12:18 AM #17

Try dod gore, Roll the Dice, and Evil Admin. They all have similar cache.rnrnAlso admin ESP, and Out of Bounds Protector, share one or two.

{SR} *Raggy*
posted here
Posts: 370
Threads: 27
Joined: Apr 2006
05-17-2007, 01:18 PM #18

Where's the Roll The Dice for AmxX that works with DoD?

K KidTwisted
posted here
Posts: 23
Threads: 3
Joined: Apr 2006
05-17-2007, 01:24 PM #19
I've verified that two plugins precaching the same file return the same precache index, though it doesn't necessarily mean that they don't take up two precache slots anyway. I've also hooked FM_PrecacheModel and had it scan everything precached by the server dll, and there are no cases where the same resource returns multiple precache indexes.nnI'm not ready to give up on this entirely, though. Could anyone recommend some plugins that have a high amount of resources to stress out the limit?nnThanks.
nnAlso run with maps that use a lot of resources, these two come to mind from past over the 512 limit crashes:nndod_charliendod_vicenzannoh ya and the whole monster spawner project will for sure hit 512

Archive › Old Forum Threads › General › Requests for DoD Plugins › Precache Plugin Manger
DoD Plugins Archive · Repository · Old Forum Threads · Maps · Admin · built 14 Sep 2026 00:34 UTC