MSFD Uses of the CharGenState variable - Disabling saving and menus
The availability of the save option in the main menu (and the Quicksave key) depends on the value of the CharGenState global. Set it to something other than -1 (to 99, for example), and the player is no longer allowed to save the game. Setting CharGenState back to -1 again turns everything back to normal.
This has several side effects. First, you won't be able to access the menu screen. This can be fixed by EnableStatsMenu - it reenables ALL the menus, not only the stats window. However, the journal, the Quick Keys and the QuickKey menu (F1) are disabled as well, and you can't loot corpses. I haven't found a way around these limitations.
There is some conflict potential in this, so it would be good to take some precautions that the player is not currently inside the character generation sequence, and that the value is set back to its original value after use.
(Forum info / Erstam)
Note:
If you use a command like EnableStatsMenu or EnableInventoryMenu while CharGenState is other than -1, you will never be able to turn off the menus again with CharGenState. The EnableInventoryMenu command only seems to have this effect in the CharGen process, while EnableStatsMenu has this effect all the time. If the menus were supposed to be turned off in a mod, it won't work. You still can't save or use quick keys. But what really is annoying about this is that this applies for the whole game session! You actually need to exit the game and restart it, so you can never rely on that menus will be turned off.