cheat mode strings

Users who are viewing this thread

Malnedra

Recruit
I'm working on some scripts that have cheat mode strings to display:

(try_begin),
(eq, "$cheat_mode", 1),
(display_message, "str_troops_available"),
(try_end),

Im in cheat mode  but I never see these messages.  What am I doing wrong?
 
There's nothing wrong with that bit of code, it must be elsewhere.

By "in cheat mode" you mean that you've enabled the cheatmenu in-game, not just checked the button on the config screen before the game, right? (Just double checking)
 
It adds a cheat menu to your camp menu and enables a number of cheat options in reports, when you talk to NPCs, etc.
It also enables the debug messages and enabling the cheatmenu is what sets $cheat_mode to 1.

Two ways to implement it:
1) pull up a console box by pressing (it varies it seems) CTRL ~  or SHIFT ~ or CTRL ` or SHIFT `
Then type 'cheatmenu' and it will be enabled.
Use 'nocheatmenu' to disable it

2) Add a code similar to the following to your camp menu so you can enable it there:
Caba`drin said:
1. Open module_game_menus.py
2. Find menu camp action, begins with: ("camp_action",0,
3. Add these two menu options between the other options that begin with "action_*" such as "action_rename_kingdom" or "action_modify_banner":
Code:
	  ("action_disable_cheat_mode",[(eq, "$cheat_mode", 1)],"Disable cheat mode.",
       [
           (assign, "$cheat_mode", 0),
           (jump_to_menu, "mnu_camp_action"),
        ]),
      ("action_enable_cheat_mode",[(eq, "$cheat_mode", 0)],"Enable cheat mode.",
       [
           (assign, "$cheat_mode", 1),
           (jump_to_menu, "mnu_camp_action"),
        ]),
 
I found it in some of the module system code for warband....  It's commented out so it's not doing anything but I just wondered if it had a use.
 
Back
Top Bottom