Author Topic: cheat for more soldiers?  (Read 661 times)

0 Members and 1 Guest are viewing this topic.

iLag

  • Sergeant
  • *
    • View Profile
  • Faction: Neutral
Re: cheat for more soldiers?
« Reply #15 on: July 15, 2012, 09:16:02 PM »
Here's the .txt file for 1.143.  You should be able to drop the file into Modules/Native and everything will work:
http://www.gamefront.com/files/21990487/menus.txt

And here's the Module System source code, released as an OSP:
Code: [Select]
You'll need to make these changes in module_game_menus.py in the module system source.

1) Copy and paste this somewhere under ("camp_cheat",0,
      ("camp_cheat_hire_troop",[], "Hire a troop...",
       [
         (assign,reg6,25),
         (jump_to_menu, "mnu_cheat_hire_troop"),
   ]
       ),

2) Copy and paste this to the end of the file, but before the final ]
("cheat_hire_troop",0,
   "{!}Current troop: {s1}^Amount in party: {reg7}^Party Size: {reg8}/{reg10}",
   "none",
   [
     (str_store_troop_name,s1,reg6),
     (str_store_troop_name_plural,s2,reg6),
     (party_count_companions_of_type,reg7,"p_main_party",reg6),
     (party_get_num_companions,reg8,"p_main_party"),
     (party_get_free_companions_capacity,reg9,"p_main_party"),
     (store_add,reg10,reg8,reg9),
   ],
   [
      ("cheat_increase_troop_id",[], "{!}Increase troop id.",
       [
         (val_add,reg6,1),
         (try_begin),
           (gt,reg6,"trp_caravan_master"),
           (assign,reg6,"trp_farmer"),
         (else_try),
           (this_or_next|eq,reg6,"trp_townsman"),
           (this_or_next|eq,reg6,"trp_mercenaries_end"),
           (eq,reg6,"trp_black_khergit_horseman"),
           (val_add,reg6,1),
         (else_try),
           (this_or_next|eq,reg6,"trp_swadian_messenger"),
           (this_or_next|eq,reg6,"trp_vaegir_messenger"),
           (this_or_next|eq,reg6,"trp_khergit_messenger"),
           (this_or_next|eq,reg6,"trp_nord_messenger"),
           (this_or_next|eq,reg6,"trp_rhodok_messenger"),
           (eq,reg6,"trp_sarranid_messenger"),
           (val_add,reg6,4),
         (try_end),
       ]
      ),
      ("cheat_decrease_troop_id",[], "{!}Decrease troop id.",
       [
         (val_sub,reg6,1),
         (try_begin),
           (le,reg6,"trp_cattle"),
           (assign,reg6,"trp_kidnapped_girl"),
           (val_sub,reg6,1),
         (else_try),
           (this_or_next|eq,reg6,"trp_townsman"),
           (this_or_next|eq,reg6,"trp_mercenaries_end"),
           (eq,reg6,"trp_black_khergit_horseman"),
           (val_sub,reg6,1),
         (else_try),
           (this_or_next|eq,reg6,"trp_swadian_castle_guard"),
           (this_or_next|eq,reg6,"trp_vaegir_castle_guard"),
           (this_or_next|eq,reg6,"trp_khergit_castle_guard"),
           (this_or_next|eq,reg6,"trp_nord_castle_guard"),
           (this_or_next|eq,reg6,"trp_rhodok_castle_guard"),
           (eq,reg6,"trp_sarranid_castle_guard"),
           (val_sub,reg6,4),
         (try_end),
       ]
      ),
      ("cheat_hire_1",[], "{!}Hire 1 {s1}.",
       [
         (try_begin),
           (ge,reg9,1),
           (party_add_members,"p_main_party",reg6,1),
         (else_try),
           (display_message,"@Party full!"),
         (try_end),
       ]
      ),
      ("cheat_hire_5",[], "{!}Hire 5 {s2}.",
       [
         (try_begin),
           (ge,reg9,5),
           (party_add_members,"p_main_party",reg6,5),
         (else_try),
           (ge,reg9,1),
           (party_add_members,"p_main_party",reg6,reg9),
           (str_store_troop_name_by_count,s3,reg6,reg0),
           (display_message,"@Not enough room! Only hired {reg0} {s3}."),
         (else_try),
           (display_message,"@Party full!"),
         (try_end),
       ]
      ),
      ("cheat_hire_10",[], "{!}Hire 10 {s2}.",
       [
         (try_begin),
           (ge,reg9,10),
           (party_add_members,"p_main_party",reg6,10),
         (else_try),
           (ge,reg9,1),
           (party_add_members,"p_main_party",reg6,reg9),
           (str_store_troop_name_by_count,s3,reg6,reg0),
           (display_message,"@Not enough room! Only hired {reg0} {s3}."),
         (else_try),
           (display_message,"@Party full!"),
         (try_end),
       ]
      ),
      ("cheat_hire_max",[], "{!}Hire as many {s2} as possible.",
       [
         (try_begin),
           (ge,reg9,1),
           (party_add_members,"p_main_party",reg6,reg9),
         (else_try),
           (display_message,"@Party full!"),
         (try_end),
       ]
      ),

      ("cheat_fire_1",[], "{!}Fire 1 {s1}.",
       [
         (try_begin),
           (ge,reg7,1),
           (party_remove_members_wounded_first,"p_main_party",reg6,1),
         (else_try),
           (display_message,"@No {s2} in party!"),
         (try_end),
       ]
      ),
      ("cheat_fire_5",[], "{!}Fire 5 {s2}.",
       [
         (try_begin),
           (ge,reg7,5),
           (party_remove_members_wounded_first,"p_main_party",reg6,5),
         (else_try),
           (ge,reg7,1),
           (party_remove_members_wounded_first,"p_main_party",reg6,reg7),
           (str_store_troop_name_by_count,s3,reg6,reg0),
           (display_message,"@Less than 5 {s2} in party! Only fired {reg0} {s3}."),
         (else_try),
           (display_message,"@No {s2} in party!"),
         (try_end),
       ]
      ),
      ("cheat_fire_10",[], "{!}Fire 10 {s2}.",
       [
         (try_begin),
           (ge,reg7,10),
           (party_remove_members_wounded_first,"p_main_party",reg6,10),
         (else_try),
           (ge,reg7,1),
           (party_remove_members_wounded_first,"p_main_party",reg6,reg7),
           (str_store_troop_name_by_count,s3,reg6,reg0),
           (display_message,"@Less than 10 {s2} in party! Only fired {reg0} {s3}."),
         (else_try),
           (display_message,"@No {s2} in party!"),
         (try_end),
       ]
      ),

      ("cheat_fire_max",[], "{!}Fire all {s2}.",
       [
         (try_begin),
           (ge,reg7,1),
           (party_remove_members_wounded_first,"p_main_party",reg6,reg7),
         (else_try),
           (display_message,"@No {s2} in party!"),
         (try_end),
       ]
      ),

      ("camp_action_4",[],"{!}Back to camp menu.",
       [(jump_to_menu, "mnu_camp"),
        ]
       ),
   ],
   ),
Secret Doors be warned!  I am a DoorMarshal!  I will find you, and I will break you!  You hear me?!  I will break you!

DogSoldieR

  • Sergeant
  • *
    • View Profile
  • Faction: Neutral
  • WB
Re: cheat for more soldiers?
« Reply #16 on: July 16, 2012, 05:03:12 PM »
Ah good ol' trusty iLag, I missed you and your supply of codes.

I'll store that away for future use :)

iLag

  • Sergeant
  • *
    • View Profile
  • Faction: Neutral
Re: cheat for more soldiers?
« Reply #17 on: July 17, 2012, 04:12:09 AM »
Ah good ol' trusty iLag, I missed you and your supply of codes.

I'll store that away for future use :)
Oh, are you still doing that project?  Well I have a bunch of little scripts like this stored away, and if there's any little things you need, just ask and I'll get to it sometime soon.  Still, don't ask me to do anything major; I'm nowhere near as awesome as the real-deal modders.
Secret Doors be warned!  I am a DoorMarshal!  I will find you, and I will break you!  You hear me?!  I will break you!