Consistency Checking and Modding

Soul_RiderSoul_Rider Mod Bean Join Date: 2004-06-19 Member: 29388Members, Constellation, Squad Five Blue
edited January 2014 in Modding
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:
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

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

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

  • SamusDroidSamusDroid Colorado Join Date: 2013-05-13 Member: 185219Members, Forum Moderators, NS2 Developer, NS2 Playtester, Squad Five Gold, Subnautica Playtester, NS2 Community Developer, Pistachionauts
    edited January 2014
    No. It's done in the engine
  • GhoulofGSG9GhoulofGSG9 Join Date: 2013-03-31 Member: 184566Members, Super Administrators, Forum Admins, Forum Moderators, NS2 Developer, NS2 Playtester, Squad Five Blue, Squad Five Silver, Reinforced - Supporter, WC 2013 - Supporter, Pistachionauts
    edited January 2014
    I would just create a special ConsistenConfig.json for your mod.

    Warning: Will need some work if you don't store most of your modfiles in special folders beside the vanilla folder structure!
  • Soul_RiderSoul_Rider Mod Bean Join Date: 2004-06-19 Member: 29388Members, Constellation, Squad Five Blue
    @GhoulofGSG9, Already tried that, didn't go to well :P
  • GhoulofGSG9GhoulofGSG9 Join Date: 2013-03-31 Member: 184566Members, Super Administrators, Forum Admins, Forum Moderators, NS2 Developer, NS2 Playtester, Squad Five Blue, Squad Five Silver, Reinforced - Supporter, WC 2013 - Supporter, Pistachionauts
    Yeah you will end up listing all files exactly in the check table :))
  • Soul_RiderSoul_Rider Mod Bean Join Date: 2004-06-19 Member: 29388Members, Constellation, Squad Five Blue
    Yes, paths and everything, what a nightmare, hence why I finished my main post with....
    Soul_Rider wrote:
    Can this be done easily?

    :D
  • GhoulofGSG9GhoulofGSG9 Join Date: 2013-03-31 Member: 184566Members, Super Administrators, Forum Admins, Forum Moderators, NS2 Developer, NS2 Playtester, Squad Five Blue, Squad Five Silver, Reinforced - Supporter, WC 2013 - Supporter, Pistachionauts
    edited January 2014
    Soul_Rider wrote: »
    Yes, paths and everything, what a nightmare, hence why I finished my main post with....
    Soul_Rider wrote:
    Can this be done easily?

    :D

    You could print out the file index of your output folder and convert it to a json table ;)

    Hint for windows:
    Open cmd:
    cd <outputpath>
    dir /s /b /o:gn
    
Sign In or Register to comment.