Consistency Checking and Modding
Soul_Rider
Mod Bean Join Date: 2004-06-19 Member: 29388Members, Constellation, Squad Five Blue
Consistency Checking is the main way that NS2 prevents files being hacked. This system generally works well, apart from the slowdowns caused when checking all the files.
With PG, I don't use a lot of NS2 base code, but consistency checking still hashes every piece of NS2 code, Every NS2 Model and every NS2 material, regardless of whether I am using it or not. Just showing the files that are changed in number, on start-up where NS2 consistency hashes these files:
PG consistency is hashing these files:
Now, I have 2 maps in my PG file, but still 12 original NS2 level files are getting hashed, and yet, if you tried to use a NS2 map with the mod, it would crash.
The only maps in the folder are currently 2 different versions of the same map, and the map, apart from RR, is 100% custom texture, with grey dev in RR. There are no NS2 models used in map or game apart from the Marine and 5 Marine weapons, and associated bits, so overall i have a tiny fraction of the game used, but consistency is still wasting it's time with all the other NS2 stuff.
Essentially, I should be hashing about 150-200 dds files, 50-75 Material files, 20 model files etc, and probably only a couple of hundred Lua files.
I am aware, because it is not loading these files, the consistency check is not being performed on these files, but I want a way to be able to get my mod's consistency check to only hash and store the files that the mod loads, nothing else. Can this be done easily?
With PG, I don't use a lot of NS2 base code, but consistency checking still hashes every piece of NS2 code, Every NS2 Model and every NS2 material, regardless of whether I am using it or not. Just showing the files that are changed in number, on start-up where NS2 consistency hashes these files:
Hashed 783 *.lua files for consistency
Hashed 135 *.surface_shader files for consistency
Hashed 12 *.level files for consistency
Hashed 5772 *.dds files for consistency
Hashed 897 *.cinematic files for consistency
Hashed 2174 *.material files for consistency
Hashed 3857 *.model files for consistency
Hashed 135 *.surface_shader files for consistency
Hashed 12 *.level files for consistency
Hashed 5772 *.dds files for consistency
Hashed 897 *.cinematic files for consistency
Hashed 2174 *.material files for consistency
Hashed 3857 *.model files for consistency
PG consistency is hashing these files:
Hashed 813 *.lua files for consistency
Hashed 140 *.surface_shader files for consistency
Hashed 14 *.level files for consistency
Hashed 5879 *.dds files for consistency
Hashed 898 *.cinematic files for consistency
Hashed 2211 *.material files for consistency
Hashed 3863 *.model files for consistency
Hashed 140 *.surface_shader files for consistency
Hashed 14 *.level files for consistency
Hashed 5879 *.dds files for consistency
Hashed 898 *.cinematic files for consistency
Hashed 2211 *.material files for consistency
Hashed 3863 *.model files for consistency
Now, I have 2 maps in my PG file, but still 12 original NS2 level files are getting hashed, and yet, if you tried to use a NS2 map with the mod, it would crash.
The only maps in the folder are currently 2 different versions of the same map, and the map, apart from RR, is 100% custom texture, with grey dev in RR. There are no NS2 models used in map or game apart from the Marine and 5 Marine weapons, and associated bits, so overall i have a tiny fraction of the game used, but consistency is still wasting it's time with all the other NS2 stuff.
Essentially, I should be hashing about 150-200 dds files, 50-75 Material files, 20 model files etc, and probably only a couple of hundred Lua files.
I am aware, because it is not loading these files, the consistency check is not being performed on these files, but I want a way to be able to get my mod's consistency check to only hash and store the files that the mod loads, nothing else. Can this be done easily?
Comments
Warning: Will need some work if you don't store most of your modfiles in special folders beside the vanilla folder structure!
You could print out the file index of your output folder and convert it to a json table
Hint for windows:
Open cmd: