Page 1 of 2

_precache.scr

Posted: Mon Jul 10, 2006 3:09 am
by mcunha98
In many compiled maps i see a file how this prefix and it have many lines of objects/models.

What this function of this file, and how i make it (how i discover all name/path of objects into my map) ? :oops:

Posted: Mon Jul 10, 2006 3:30 am
by Ophisâ„¢
Im not sure i understand what you just said, i'm sorry.

Posted: Mon Jul 10, 2006 4:27 am
by lizardkid
the precache prepares all the sounds models and effects taht are to be used in a map, test_ caches all of them. i've never used one and i dont see any loading or speed difference with or without one.

it's also quite annoying figuring out what all sounds / effects / models your map will use.

Posted: Mon Jul 10, 2006 8:08 am
by Rookie One.pl
I do feel the difference in loading times, esp. when the map is loaded for the nth time. ;)

Come to think of it, how about a program that creates a precache script automatically for you? I'll make one in a couple of minutes. :)

Posted: Mon Jul 10, 2006 9:09 am
by lizardkid
ya it wouldt be hard, just scan the .map file for all the models and add them. sounds would be a different matter but late precaches arent a problem are they?

Posted: Mon Jul 10, 2006 10:53 am
by mcunha98
Based on HartNugen, see this sample file...

exec global/DMprecache.scr
cache models/fx/bh_paper_lite.tik
cache models/fx/bh_paper_hard.tik
cache models/fx/bh_wood_lite.tik
cache models/fx/bh_wood_hard.tik
cache models/fx/bh_metal_lite.tik
cache models/fx/bh_metal_hard.tik
cache models/fx/bh_stone_lite.tik
cache models/fx/bh_stone_hard.tik
cache models/fx/bh_dirt_lite.tik
cache models/fx/bh_dirt_hard.tik
cache models/fx/bh_grass_lite.tik
cache models/fx/bh_grass_hard.tik
cache models/fx/bh_mud_lite.tik
cache models/fx/bh_mud_hard.tik
cache models/fx/bh_water_lite.tik
cache models/fx/bh_water_hard.tik
cache models/fx/bh_glass_lite.tik
cache models/fx/bh_glass_hard.tik
cache models/fx/bh_sand_lite.tik
cache models/fx/bh_sand_hard.tik
cache models/fx/bh_foliage_lite.tik
cache models/fx/bh_foliage_hard.tik
cache models/fx/bh_snow_lite.tik
cache models/fx/bh_snow_hard.tik
cache models/fx/bh_carpet_lite.tik
cache models/fx/bh_carpet_hard.tik
cache models/fx/bh_foliage.tik
cache models/fx/bh_snow.tik
cache models/fx/bh_carpet.tik
cache models/fx/water_ripple_still.tik
cache models/fx/water_ripple_moving.tik
cache models/fx/barrel_oil_leak_big.tik
cache models/fx/barrel_oil_leak_medium.tik
cache models/fx/barrel_oil_leak_small.tik
cache models/fx/barrel_oil_leak_splat.tik
cache models/fx/barrel_water_leak_big.tik
cache models/fx/barrel_water_leak_medium.tik
cache models/fx/barrel_water_leak_small.tik
cache models/fx/barrel_water_leak_splat.tik
cache models/fx/fs_light_dust.tik
cache models/fx/fs_heavy_dust.tik
cache models/fx/fs_dirt.tik
cache models/fx/fs_grass.tik
cache models/fx/fs_mud.tik
cache models/fx/fs_puddle.tik
cache models/fx/fs_sand.tik
cache models/fx/fs_snow.tik
cache models/fx/bh_human_uniform_lite.tik
cache models/fx/bh_human_uniform_hard.tik
cache models/fx/water_trail_bubble.tik
cache models/fx/grenexp_base.tik
cache models/fx/bazookaexp_base.tik
cache models/fx/grenexp_paper.tik
cache models/fx/grenexp_wood.tik
cache models/fx/grenexp_metal.tik
cache models/fx/grenexp_stone.tik
cache models/fx/grenexp_dirt.tik
cache models/fx/grenexp_grass.tik
cache models/fx/grenexp_mud.tik
cache models/fx/grenexp_water.tik
cache models/fx/grenexp_gravel.tik
cache models/fx/grenexp_sand.tik
cache models/fx/grenexp_snow.tik
cache models/fx/grenexp_foliage.tik
cache models/fx/grenexp_carpet.tik
cache models/items/explosive.tik
cache models/emitters/explosion_mine.tik

Posted: Mon Jul 10, 2006 11:02 am
by Rookie One.pl
Precache files do not cache sounds, Lizard. And my proggy scans BSP files and map scripts. :) I'm currently doing a bit of testing, if it works right I'll post it in a while. ;)

Posted: Mon Jul 10, 2006 2:15 pm
by jv_map
The primary function of the precache file is to prevent a sudden stutter during the game.. for example when you fire a weapon for the first time. :)

Posted: Mon Jul 10, 2006 3:17 pm
by Rookie One.pl
I would've already posted my program already but I'm having some memory allocation-related problem I've been trying to solve for a couple of hours. :?
There also seems to be a problem with loading BSP files, it just won't parse beyond the first lump. :? Weird.

Posted: Mon Jul 10, 2006 3:57 pm
by jv_map
Rookie One.pl wrote:memory allocation-related problem
java ftw!! :D

Posted: Mon Jul 10, 2006 4:01 pm
by mcunha98
Ok, the function of file i understand.
But how i create this file ?
Exists a development tool to create this file (or plugin for Radiant) ???

Posted: Mon Jul 10, 2006 5:49 pm
by jv_map
I believe Rookie's making one :wink: . 2015 were lazy and just notepadded em :)

Posted: Mon Jul 10, 2006 6:03 pm
by mcunha98
jv_map wrote:I believe Rookie's making one
So Rookie ???
Is true ? :D

Posted: Mon Jul 10, 2006 6:37 pm
by Rookie One.pl
Yeah. :) I'm currently resolving some random pointer crashes, but I think I've narrowed the problem area to one (quite long and complex :?) function.

Expect a release soon. :)

And Jv - C++ > Java > Delphi > C# IMHO. :P

Posted: Mon Jul 10, 2006 8:41 pm
by mcunha98
Rookie One.pl wrote:Yeah. :) I'm currently resolving some random pointer crashes, but I think I've narrowed the problem area to one (quite long and complex :?) function.

Expect a release soon. :)

And Jv - C++ > Java > Delphi > C# IMHO. :P
Well, if you need help with programming count with me (Delphi, VB and VB.NET, PHP, C#).

Recently i found the source code of plugins for radiant, i search in my CD's the MSVC++ install. When i found, i will install the MSVC and try make a plugin to identifie entitys of map...