A lot of FarCry itself is built in Lua, and thus easily modified.
• Open Far Cry/FCData/Scripts.pak with any zip utility. (it's a standard zip file)
• Here you can see and modify all sorts of things. Menu-screens, Hud, player attributes, etc.
Logs
• This file will contain details of various things. Including errors of various types.
• Script errors are typically at the bottom of the file
Logging
• Use the System:LogAlways( "Your message here" ); command to print a message to log.txt and the console
• This should be equivalent to the CryLogAlways( ) command in the C++ SDK
LUA Debugger
• Can be enabled by adding sys_script_debugger = "1" to your system.cfg or systemcfgoverride.cfg file. Enabling it via the console should be possible as well
• Then you need to open the lua script file you want to inspect. You need to create an error so the debugger will open.
• There's various ways, but calling a function that does not exist is one of the simplest ones. Such as: abc( );
• If you have a syntax error in your script, it won't be compiled and the debugger will not open. Check log.txt if the entire script won't run..
Bind script to keypress
Input:BindCommandToKey( "#Game:ChangeFrame( )" , "Right" , 1 );
^^ First argument is the Lua command to run. Some command that will run in Lua. Second argument is the key it will be bound to. Can find out the names of keys in the "Control Options" in the main menu.
^^ This particular example is calling a custom function in C++. Note the # in front of the command exactly as if it were to be run in the console.