"Your game files do not match" when changing LUA files

LosButchLosButch Join Date: 2007-12-27 Member: 63268Members
Hello fellow modders!

I just started messing around with the LUA code, following the getting started guides (thanks for those BTW)
But every time I save a LUA file (in my mod dir), the game return to the menu with the message "Your game files do not match..."
I am probably missing something really obvious but can't figure out what it is.

Details:
I am editing the file Player.lua, that I copied into my mod (its the only file)
Changing Player.kGravity = -21.5 to Player.kGravity = -2.5 just to have a simple test.
Starting the game with options "-game NewMod -hotload" and running "map ns2_tram"
It loads find, the gravity, is low, everything is fine. Until I change the file, I get the error described above.

Comments

  • 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
    Don't use hotload ....
  • LosButchLosButch Join Date: 2007-12-27 Member: 63268Members
    That is all you can tell me? All tutorials mention it and I really want to use it.
  • 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 September 2013
    Instead of posting a long answer i ask you to read this little thread: http://forums.unknownworlds.com/discussion/132439/how-do-you-develop-a-mod-best-practice. There are different reasons why you should avoid hotload.
    Sewlek wrote: »
    i suggest making a tiny test map. something like a simply ready room (you dont need team portals even, and two tech points, res nodes, with as little textures as possible. hotloading lua doesnt work really, so dont rely on that. i simply did "bind F5 map <testmapname>" as alternative, with a fast to load test map
  • LosButchLosButch Join Date: 2007-12-27 Member: 63268Members
    Oh, I actually wanted to mess around with the hotload part. I will just program other stuff then. Thanks for the reply though :-)
  • Ghosthree3Ghosthree3 Join Date: 2010-02-13 Member: 70557Members, Reinforced - Supporter
    edited September 2013
    OR just change your "%appdata%/natural selection 2/consistentconfig.json" file to:
    {
      "ignore": [  ],
      "check": [  ]
    }
    

    So it won't kick you since you have nothing to fail.

    Also hotloading does work for lua (or did) I've done it.

    EDIT: I just checked, and hotloading lua doesn't work as well for me now as it did a few months back... as soon as I changed the file I got spammed with errors lol.
    That said, it DID effect the game on the fly (looking at log print outs for sv_help I can see that the command names changed like I changed them in the file), so if you could just avoid the errors some how...
Sign In or Register to comment.