Skipping character creation for mod testing

Users who are viewing this thread

uly

Sergeant at Arms
This is a problem that's been plaguing me since the early days of M&B:

When modding M&B, I've often had to start new games for testing. Every time I start a new game, I'm forced to suffer through the character creation sequence. I've been able to make shortcuts that skip most of the steps, but haven't found a way to skip the basic character creation screens (name+stats screen and face editing screen).

Can anyone tell me how to start a game without going through these 2 steps manually?
 
I've accidentally skipped over it, basically you redirect the game menus to skip over start_phase_2. It will activate the next time you enter the character screen, however.
 
Somebody said:
next time you enter the character screen, however.

well  you can always disable that screen hehe

use script "game_character_screen_requested". VC, as a example, uses that to direct you a presentation (custom). Works for the shorcut ("C") and the UI button (worldmap).


but if OP only wants to skip for testing a quick AutoHotKey macro will do it.



I was doing some testing today on my mod and I remembered this thread, so a quick update in case OP/someone needs this in the future

1) First menu (0 on ID_menus.py) directs to "mnu_start_game_0" as I wanted to have the option of cheating/skip OR use the normal path.
--> you could simple use a (change_screen_map, 0) here if you don't want the question/second step
2) "mnu_start_game_0" gives option to go back, normal creation or SKIP

Code:
game_menus = [
  
  (
    "skip_character_creation",0,
    "{!}This menu allows game to skip character creation at a new campaign.",
    "none",
    [(jump_to_menu, "mnu_start_game_0")], []),  
 
  # Note: The first Menu is the initial character creation menu.
  # This is a stub (required by the engine)
  # Rewrite this later
  ("start_game_0",menu_text_color(0xFF000000)|mnf_disable_all_keys,
    "TBD: starting a new game",
    "none",
    [],
    [
      ("continue",[],"Continue...",
        [
          (troop_set_type, "trp_player", 0),
          (assign, "$character_gender", tf_male),
          (jump_to_menu, "mnu_auto_return"),
        ]
      ),
      ("go_back", [], "Go back",
        [
          (change_screen_quit),
      ]),
      
      ("tutorial_cheat",[],"{!}CHEAT AND SKIP CHAR CREATION!",
        [
          (assign, "$cheat_mode", 1),
          (troop_set_type, "trp_player", 0),
          (assign, "$character_gender", tf_male),
          # put your quick creation code here, like extra XP, gold, troops, skills, etc
          (change_screen_map, 0),
        ]
      ),
    ]
  ),
  
  (
    "no_menu_1",0,
    "{!}This menu automatically returns to caller.",
    "none",
    [(change_screen_return, 0)], [] ),
  
  (
    "no_menu_2",0,
    "{!}This menu automatically returns to caller..",
    "none",
    [(change_screen_return, 0)], [] ),

  # QUARTERS BUTTON. HARDCODED (not from a script).
  # Don't change order of this
  (
    "troop_camp",0,
    "{!}This menu automatically loads the implemented version.",
    "none",
    [
      (jump_to_menu, "mnu_troop_camp_implemented"),
    ],
    []
  ),
  
  # CAMP BUTTON. Fires from script_game_event_encounter
  # Don't change order of this
  (
    "camp",0,
    "{!}This menu automatically loads the implemented version.",
    "none",
    [
      (jump_to_menu, "mnu_camp_implemented"),
    ],
    []
  ),
  
  (
    "debug_alert_from_s65",0,
    "DEBUG ALERT: {s65}",
    "none",
    [
    ],
    [
      ("continue",[],"Continue...",
        [
          (assign, "$debug_message_in_queue", 0),
          (change_screen_return),
      ]),
    ]
  ),
  
  (
    "auto_return",0,
    "{!}This menu automatically returns to caller.",
    "none",
    [
      (change_screen_return, 0)
    ],
    []
  ),

note: remember that you can even remove the character creation screen with script "game_character_screen_requested"

Edit: update to include code
 
Back
Top Bottom