Author Topic: python code: creating characters w/trainer (updated 1/9/06)  (Read 3080 times)

0 Members and 1 Guest are viewing this topic.

Ahadhran

  • Knight
  • *
    • View Profile
python code: creating characters w/trainer (updated 1/9/06)
« on: January 06, 2006, 08:39:16 pm »
Warning below is what we refer to as cheating all those opposed to cheating should quickly close their eyes and hit ctrl-alt-delete....

 Edit:
Ok the following code works all the time and is much streamlined from previous version, I will leave up the old code for a little while as a sort of example of a right and wrong way to do things.

So any way this is code that if entered after the line (in module_dialogs.py):

Quote
[trp_trainer|plyr,"novicemaster_talk", [], "I need to leave now. I'll train another time.", "novicemaster_not_ready",[]],



will make it so you can talk to the trainer and level up, and or boost your abilities, and proficiencies... so here is the code.

THE GOOD CODE (or at least better, if anyone has suggestions let me know

Quote
#crazy haxor code

  [trp_trainer|plyr,"novicemaster_talk", [], "I want to make an uber hacked character.", "novicemaster_hack",[]],
  [trp_trainer|plyr,"novicemaster_are_you_ready", [], "I want to make an uber hacked character.", "novicemaster_hack",[]],
 
  [trp_trainer,"novicemaster_hack",[], "what would you like to increase good sir?","novicemaster_hack2",[]],

  [trp_trainer|plyr,"novicemaster_hack2", [], "I want to get some experience", "novicemaster_xp",[]],
  [trp_trainer|plyr,"novicemaster_hack2", [], "I want to increase my abilities(str,agi,int,cha).", "novicemaster_abi",[]],
  [trp_trainer|plyr,"novicemaster_hack2", [], "I want to increase my weapon proficiencies", "novicemaster_wp",[]],
  [trp_trainer|plyr,"novicemaster_hack2", [], "nevermind.", "close_window",[]],

##xp
 
  [trp_trainer,"novicemaster_xp",[], "How much xp do you want?","novicemaster_xp_amount",[]],
  [trp_trainer|plyr,"novicemaster_xp_amount", [], "give me 500 xp", "novicemaster_are_you_done1",
   [[add_xp_as_reward,500]]],
  [trp_trainer|plyr,"novicemaster_xp_amount", [], "give me 1000 xp.", "novicemaster_are_you_done1",
   [[add_xp_as_reward,1000]]],
  [trp_trainer|plyr,"novicemaster_xp_amount", [], "give me 10000 xp.", "novicemaster_are_you_done1",
   [[add_xp_as_reward,10000]]],
  [trp_trainer|plyr,"novicemaster_xp_amount", [], "give me 100000 xp.", "novicemaster_are_you_done1",
   [[add_xp_as_reward,100000]]],
  [trp_trainer|plyr,"novicemaster_xp_amount", [], "nevermind.", "novicemaster_are_you_done",[]],

  [trp_trainer,"novicemaster_are_you_done1",[], "Are you done with xp?","novicemaster_xp_done",[]],
  [trp_trainer|plyr,"novicemaster_xp_done", [], "never, I'm not nearly uber enough!", "novicemaster_xp",[]],
  [trp_trainer|plyr,"novicemaster_xp_done", [], "yes", "novicemaster_are_you_done",[]],

##abilities choice

  [trp_trainer,"novicemaster_abi",[], "which ability would you like to increase?","novicemaster_abi_choice",[]],
  [trp_trainer|plyr,"novicemaster_abi_choice", [], "strength", "novicemaster_abi_general",
   [[assign,"$attribute_number",0]]],
  [trp_trainer|plyr,"novicemaster_abi_choice", [], "Agility", "novicemaster_abi_general",
   [[assign,"$attribute_number",1]]],
  [trp_trainer|plyr,"novicemaster_abi_choice", [], "Intelligence", "novicemaster_abi_general",
   [[assign,"$attribute_number",2]]],
  [trp_trainer|plyr,"novicemaster_abi_choice", [], "charisma", "novicemaster_abi_general",
   [[assign,"$attribute_number",3]]],
  [trp_trainer|plyr,"novicemaster_abi_choice", [], "nevermind.", "novicemaster_are_you_done",[]],

  ########str,agi,int,cha

  [trp_trainer,"novicemaster_abi_general",[], "How much do you want your ability increased?","novicemaster_abi_amount",[]],
  [trp_trainer|plyr,"novicemaster_abi_amount", [], "by 1", "novicemaster_are_you_done2a",
   [(troop_raise_attribute,"trp_player","$attribute_number",1)]],
  [trp_trainer|plyr,"novicemaster_abi_amount", [], "by 3", "novicemaster_are_you_done2a",
   [(troop_raise_attribute,"trp_player","$attribute_number",3)]],
  [trp_trainer|plyr,"novicemaster_abi_amount", [], "by 9", "novicemaster_are_you_done2a",
   [(troop_raise_attribute,"trp_player","$attribute_number",9)]],
  [trp_trainer|plyr,"novicemaster_abi_amount", [], "by 15", "novicemaster_are_you_done2a",
   [(troop_raise_attribute,"trp_player","$attribute_number",15)]],
  [trp_trainer|plyr,"novicemaster_abi_amount", [], "nevermind.", "novicemaster_are_you_done2",[]],

  [trp_trainer,"novicemaster_are_you_done2a",[], "Do you want to increase that ability more?","novicemaster_current_abi_done",[]],
  [trp_trainer|plyr,"novicemaster_current_abi_done", [], "Yes, I'm not nearly uber enough!", "novicemaster_abi_general",[]],
  [trp_trainer|plyr,"novicemaster_current_abi_done", [], "no", "novicemaster_are_you_done2",[]],

  [trp_trainer,"novicemaster_are_you_done2",[], "Are you done with abilities?","novicemaster_abi_done",[]],
  [trp_trainer|plyr,"novicemaster_abi_done", [], "never, I'm not nearly uber enough!", "novicemaster_abi",[]],
  [trp_trainer|plyr,"novicemaster_abi_done", [], "yes", "novicemaster_are_you_done",[]],
 
##wp_proficiencies

  [trp_trainer,"novicemaster_wp",[], "which weapon proficiency do you want to increase?","novicemaster_wp_choice",[]],
  [trp_trainer|plyr,"novicemaster_wp_choice", [], "One handed, two handed, and polearm proficiencies",
       "novicemaster_wp_choice2",[[assign,"$pr_selection",0]]],
  [trp_trainer|plyr,"novicemaster_wp_choice", [], "archery, throwing, and crossbow proficiencies",
       "novicemaster_wp_choice3",[[assign,"$pr_selection",1]]],
  [trp_trainer|plyr,"novicemaster_wp_choice", [], "nevermind.", "novicemaster_are_you_done",[]],

  [trp_trainer,"novicemaster_wp_choice2",[], "which weapon proficiency do you want to increase?","novicemaster_wp_choice2a",[]],
  [trp_trainer|plyr,"novicemaster_wp_choice2a", [], "One handed", "novicemaster_wp_choice_general",[[assign,"$pr_number",0]]],
  [trp_trainer|plyr,"novicemaster_wp_choice2a", [], "two handed", "novicemaster_wp_choice_general",[[assign,"$pr_number",1]]],
  [trp_trainer|plyr,"novicemaster_wp_choice2a", [], "polearm", "novicemaster_wp_choice_general",[[assign,"$pr_number",2]]],
  [trp_trainer|plyr,"novicemaster_wp_choice2a", [], "nevermind.", "novicemaster_are_you_done3",[]],

  [trp_trainer,"novicemaster_wp_choice3",[], "which weapon proficiency do you want to increase?","novicemaster_wp_choice3a",[]],
  [trp_trainer|plyr,"novicemaster_wp_choice3a", [], "archery", "novicemaster_wp_choice_general",[[assign,"$pr_number",3]]],
  [trp_trainer|plyr,"novicemaster_wp_choice3a", [], "throwing", "novicemaster_wp_choice_general",[[assign,"$pr_number",5]]],
  [trp_trainer|plyr,"novicemaster_wp_choice3a", [], "crossbows", "novicemaster_wp_choice_general",[[assign,"$pr_number",4]]],
  [trp_trainer|plyr,"novicemaster_wp_choice3a", [], "nevermind.", "novicemaster_are_you_done3",[]],

  [trp_trainer,"novicemaster_wp_choice_general",[], "How much do you want to increase your proficiency by?","novicemaster_wp_amount",[]],
  [trp_trainer|plyr,"novicemaster_wp_amount", [], "by 10", "novicemaster_are_you_done3a",
   [(troop_raise_proficiency_linear,"trp_player","$pr_number",10)]],
  [trp_trainer|plyr,"novicemaster_wp_amount", [], "by 50", "novicemaster_are_you_done3a",
   [(troop_raise_proficiency_linear,"trp_player","$pr_number",50)]],
  [trp_trainer|plyr,"novicemaster_wp_amount", [], "by 100", "novicemaster_are_you_done3a",
   [(troop_raise_proficiency_linear,"trp_player","$pr_number",100)]],
  [trp_trainer|plyr,"novicemaster_wp_amount", [], "nevermind.", "novicemaster_are_you_done3a",[]],

  [trp_trainer,"novicemaster_are_you_done3a",[(eq,"$pr_selection",0)], "Are you done with one handed, two handed and polearms?","novicemaster_pr_any_done",[]],
  [trp_trainer,"novicemaster_are_you_done3a",[(eq,"$pr_selection",1)], "Are you done with archery, throwing and crossbows?","novicemaster_pr_any_done",[]],
  [trp_trainer|plyr,"novicemaster_pr_any_done", [(eq,"$pr_selection",0)], "never, I'm not nearly uber enough!", "novicemaster_wp_choice2",[]],
  [trp_trainer|plyr,"novicemaster_pr_any_done", [(eq,"$pr_selection",1)], "never, I'm not nearly uber enough!", "novicemaster_wp_choice3",[]],
  [trp_trainer|plyr,"novicemaster_pr_any_done", [], "yes", "novicemaster_are_you_done3",[]],
  [trp_trainer,"novicemaster_are_you_done3",[], "Are you done with all proficiency editing?","novicemaster_pr_done",[]],
  [trp_trainer|plyr,"novicemaster_pr_done", [], "never, I'm not nearly uber enough!", "novicemaster_wp",[]],
  [trp_trainer|plyr,"novicemaster_pr_done", [], "yes", "novicemaster_are_you_done",[]],

  [trp_trainer,"novicemaster_are_you_done",[], "Are you done with all character editing?","novicemaster_quit_choice",[]],
  [trp_trainer|plyr,"novicemaster_quit_choice", [], "never, I'm not nearly uber enough!", "novicemaster_hack",[]],
  [trp_trainer|plyr,"novicemaster_quit_choice", [], "yes", "close_window",[]],

#end haxorness


Quote



THE BAD CODE DO NOT USE< FOR EDUCATIONAL PUPROSES ONLY

#crazy haxor code
  [trp_trainer|plyr,"novicemaster_talk", [], "I want to make an uber hacked character.", "novicemaster_hack",[]],
  [trp_trainer,"novicemaster_hack",[], "what would you like to increase good sir?","novicemaster_hack2",[]],

  [trp_trainer|plyr,"novicemaster_hack2", [], "I want to get some experience", "novicemaster_xp",[]],
  [trp_trainer|plyr,"novicemaster_hack2", [], "I want to increase my abilities(str,agi,int,cha).", "novicemaster_abi",[]],
  [trp_trainer|plyr,"novicemaster_hack2", [], "I want to increase my weapon proficiencies", "novicemaster_wp",[]],
  [trp_trainer|plyr,"novicemaster_hack2", [], "nevermind.", "close_window",[]],

##xp
 
  [trp_trainer,"novicemaster_xp",[], "How much xp do you want?","novicemaster_xp_amount",[]],
  [trp_trainer|plyr,"novicemaster_xp_amount", [], "give me 500 xp", "novicemaster_are_you_done1",
   [[add_xp_as_reward,500]]],
  [trp_trainer|plyr,"novicemaster_xp_amount", [], "give me 1000 xp.", "novicemaster_are_you_done1",
   [[add_xp_as_reward,1000]]],
  [trp_trainer|plyr,"novicemaster_xp_amount", [], "give me 10000 xp.", "novicemaster_are_you_done1",
   [[add_xp_as_reward,10000]]],
  [trp_trainer|plyr,"novicemaster_xp_amount", [], "give me 100000 xp.", "novicemaster_are_you_done1",
   [[add_xp_as_reward,100000]]],
  [trp_trainer|plyr,"novicemaster_xp_amount", [], "nevermind.", "novicemaster_are_you_done",[]],

  [trp_trainer,"novicemaster_are_you_done1",[], "Are you done with xp?","novicemaster_xp_done",[]],
  [trp_trainer|plyr,"novicemaster_xp_done", [], "never, I'm not nearly uber enough!", "novicemaster_xp",[]],
  [trp_trainer|plyr,"novicemaster_xp_done", [], "yes", "novicemaster_are_you_done",[]],

##abilities

  [trp_trainer,"novicemaster_abi",[], "which ability would you like to increase?","novicemaster_abi_choice",[]],
  [trp_trainer|plyr,"novicemaster_abi_choice", [], "strength", "novicemaster_abi_str",[]],
  [trp_trainer|plyr,"novicemaster_abi_choice", [], "Agility", "novicemaster_abi_agi",[]],
  [trp_trainer|plyr,"novicemaster_abi_choice", [], "Intelligence", "novicemaster_abi_int",[]],
  [trp_trainer|plyr,"novicemaster_abi_choice", [], "charisma", "novicemaster_abi_cha",[]],
  [trp_trainer|plyr,"novicemaster_abi_choice", [], "nevermind.", "novicemaster_are_you_done",[]],

  ########str
  [trp_trainer,"novicemaster_abi_str",[], "How much do you want your strength increased?","novicemaster_str_amount",[]],
  [trp_trainer|plyr,"novicemaster_str_amount", [], "by 1", "novicemaster_are_you_done2a",
   [(troop_raise_attribute,"trp_player",0,1)]],
  [trp_trainer|plyr,"novicemaster_str_amount", [], "by 3", "novicemaster_are_you_done2a",
   [(troop_raise_attribute,"trp_player",0,3)]],
  [trp_trainer|plyr,"novicemaster_str_amount", [], "by 9", "novicemaster_are_you_done2a",
   [(troop_raise_attribute,"trp_player",0,9)]],
  [trp_trainer|plyr,"novicemaster_str_amount", [], "by 15", "novicemaster_are_you_done2a",
   [(troop_raise_attribute,"trp_player",0,15)]],
  [trp_trainer|plyr,"novicemaster_str_amount", [], "nevermind.", "novicemaster_are_you_done2",[]],

  [trp_trainer,"novicemaster_are_you_done2a",[], "Are you done with strength?","novicemaster_str_done",[]],
  [trp_trainer|plyr,"novicemaster_str_done", [], "never, I'm not nearly uber enough!", "novicemaster_abi_str",[]],
  [trp_trainer|plyr,"novicemaster_str_done", [], "yes", "novicemaster_are_you_done2",[]],

  ######agi
 
  [trp_trainer,"novicemaster_abi_agi",[], "How much do you want your agility increased?","novicemaster_agi_amount",[]],
  [trp_trainer|plyr,"novicemaster_agi_amount", [], "by 1", "novicemaster_are_you_done2b",
   [(troop_raise_attribute,"trp_player",1,1)]],
  [trp_trainer|plyr,"novicemaster_agi_amount", [], "by 3", "novicemaster_are_you_done2b",
   [(troop_raise_attribute,"trp_player",1,3)]],
  [trp_trainer|plyr,"novicemaster_agi_amount", [], "by 9", "novicemaster_are_you_done2b",
   [(troop_raise_attribute,"trp_player",1,9)]],
  [trp_trainer|plyr,"novicemaster_agi_amount", [], "by 15", "novicemaster_are_you_done2b",
   [(troop_raise_attribute,"trp_player",1,15)]],
  [trp_trainer|plyr,"novicemaster_agi_amount", [], "nevermind.", "novicemaster_are_you_done2",[]],

  [trp_trainer,"novicemaster_are_you_done2b",[], "Are you done with agility?","novicemaster_agi_done",[]],
  [trp_trainer|plyr,"novicemaster_agi_done", [], "never, I'm not nearly uber enough!", "novicemaster_abi_agi",[]],
  [trp_trainer|plyr,"novicemaster_agi_done", [], "yes", "novicemaster_are_you_done2",[]],

  #######Int

  [trp_trainer,"novicemaster_abi_int",[], "How much do you want your intelligece increased?","novicemaster_int_amount",[]],
  [trp_trainer|plyr,"novicemaster_int_amount", [], "by 1", "novicemaster_are_you_done2c",
   [(troop_raise_attribute,"trp_player",2,1)]],
  [trp_trainer|plyr,"novicemaster_int_amount", [], "by 3", "novicemaster_are_you_done2c",
   [(troop_raise_attribute,"trp_player",2,3)]],
  [trp_trainer|plyr,"novicemaster_int_amount", [], "by 9", "novicemaster_are_you_done2c",
   [(troop_raise_attribute,"trp_player",2,9)]],
  [trp_trainer|plyr,"novicemaster_int_amount", [], "by 15", "novicemaster_are_you_done2c",
   [(troop_raise_attribute,"trp_player",2,15)]],
  [trp_trainer|plyr,"novicemaster_int_amount", [], "nevermind.", "novicemaster_are_you_done2",[]],

  [trp_trainer,"novicemaster_are_you_done2c",[], "Are you done with Intellegence?","novicemaster_int_done",[]],
  [trp_trainer|plyr,"novicemaster_int_done", [], "never, I'm not nearly uber enough!", "novicemaster_abi_int",[]],
  [trp_trainer|plyr,"novicemaster_int_done", [], "yes", "novicemaster_are_you_done2",[]],

  ######cha

  [trp_trainer,"novicemaster_abi_cha",[], "How much do you want your charisma increased?","novicemaster_cha_amount",[]],
  [trp_trainer|plyr,"novicemaster_cha_amount", [], "by 1", "novicemaster_are_you_done2d",
   [(troop_raise_attribute,"trp_player",3,1)]],
  [trp_trainer|plyr,"novicemaster_cha_amount", [], "by 3", "novicemaster_are_you_done2d",
   [(troop_raise_attribute,"trp_player",3,3)]],
  [trp_trainer|plyr,"novicemaster_cha_amount", [], "by 9", "novicemaster_are_you_done2d",
   [(troop_raise_attribute,"trp_player",3,9)]],
  [trp_trainer|plyr,"novicemaster_cha_amount", [], "by 15", "novicemaster_are_you_done2d",
   [(troop_raise_attribute,"trp_player",3,15)]],
  [trp_trainer|plyr,"novicemaster_cha_amount", [], "nevermind.", "novicemaster_are_you_done2",[]],

  [trp_trainer,"novicemaster_are_you_done2d",[], "Are you done with charisma?","novicemaster_cha_done",[]],
  [trp_trainer|plyr,"novicemaster_cha_done", [], "never, I'm not nearly uber enough!", "novicemaster_abi_cha",[]],
  [trp_trainer|plyr,"novicemaster_cha_done", [], "yes", "novicemaster_are_you_done2",[]],

  [trp_trainer,"novicemaster_are_you_done2",[], "Are you done with abilities?","novicemaster_abi_done",[]],
  [trp_trainer|plyr,"novicemaster_abi_done", [], "never, I'm not nearly uber enough!", "novicemaster_abi",[]],
  [trp_trainer|plyr,"novicemaster_abi_done", [], "yes", "novicemaster_are_you_done",[]],
 
##wp_proficiencies
  [trp_trainer,"novicemaster_wp",[], "which weapon proficiency do you want to increase?","novicemaster_wp_choice",[]],
  [trp_trainer|plyr,"novicemaster_wp_choice", [], "One handed, two handed, and polearm proficiencies", "novicemaster_wp_choice2",[]],
  [trp_trainer|plyr,"novicemaster_wp_choice", [], "archery, throwing, and crossbow proficiencies", "novicemaster_wp_choice3",[]],
  [trp_trainer|plyr,"novicemaster_wp_choice", [], "nevermind.", "novicemaster_are_you_done",[]],

  [trp_trainer,"novicemaster_wp_choice2",[], "which weapon proficiency do you want to increase?","novicemaster_wp_choice2a",[]],
  [trp_trainer|plyr,"novicemaster_wp_choice2a", [], "One handed", "novicemaster_wp_choice_oh",[]],
  [trp_trainer|plyr,"novicemaster_wp_choice2a", [], "two handed", "novicemaster_wp_choice_tha",[]],
  [trp_trainer|plyr,"novicemaster_wp_choice2a", [], "polearm", "novicemaster_wp_choice_po",[]],
  [trp_trainer|plyr,"novicemaster_wp_choice2a", [], "nevermind.", "novicemaster_are_you_done3",[]],

  ###one handed
  [trp_trainer,"novicemaster_wp_choice_oh",[], "How much do you want to increase one handed weapons?","novicemaster_wp_amount_oh",[]],
  [trp_trainer|plyr,"novicemaster_wp_amount_oh", [], "by 10", "novicemaster_are_you_done3a",
   [(troop_raise_proficiency,"trp_player",0,10)]],
  [trp_trainer|plyr,"novicemaster_wp_amount_oh", [], "by 50", "novicemaster_are_you_done3a",
   [(troop_raise_proficiency,"trp_player",0,50)]],
  [trp_trainer|plyr,"novicemaster_wp_amount_oh", [], "by 100", "novicemaster_are_you_done3a",
   [(troop_raise_proficiency,"trp_player",0,100)]],
  [trp_trainer|plyr,"novicemaster_wp_amount_oh", [], "nevermind.", "novicemaster_are_you_done3a",[]],

  ###two handed
  [trp_trainer,"novicemaster_wp_choice_tha",[], "How much do you want to increase two handed weapons?","novicemaster_wp_amount_tha",[]],
  [trp_trainer|plyr,"novicemaster_wp_amount_tha", [], "by 10", "novicemaster_are_you_done3a",
   [(troop_raise_proficiency,"trp_player",1,10)]],
  [trp_trainer|plyr,"novicemaster_wp_amount_tha", [], "by 50", "novicemaster_are_you_done3a",
   [(troop_raise_proficiency,"trp_player",1,50)]],
  [trp_trainer|plyr,"novicemaster_wp_amount_tha", [], "by 100", "novicemaster_are_you_done3a",
   [(troop_raise_proficiency,"trp_player",1,100)]],
  [trp_trainer|plyr,"novicemaster_wp_amount_tha", [], "nevermind.", "novicemaster_are_you_done3a",[]],

  ###polearms
  [trp_trainer,"novicemaster_wp_choice_po",[], "How much do you want to increase polearms?","novicemaster_wp_amount_po",[]],
  [trp_trainer|plyr,"novicemaster_wp_amount_po", [], "by 10", "novicemaster_are_you_done3a",
   [(troop_raise_proficiency,"trp_player",2,10)]],
  [trp_trainer|plyr,"novicemaster_wp_amount_po", [], "by 50", "novicemaster_are_you_done3a",
   [(troop_raise_proficiency,"trp_player",2,50)]],
  [trp_trainer|plyr,"novicemaster_wp_amount_po", [], "by 100", "novicemaster_are_you_done3a",
   [(troop_raise_proficiency,"trp_player",2,100)]],
  [trp_trainer|plyr,"novicemaster_wp_amount_po", [], "nevermind.", "novicemaster_are_you_done3a",[]],

  [trp_trainer,"novicemaster_are_you_done3a",[], "Are you done with one handed, two handed and polearms?","novicemaster_pr1_done",[]],
  [trp_trainer|plyr,"novicemaster_pr1_done", [], "never, I'm not nearly uber enough!", "novicemaster_wp_choice2",[]],
  [trp_trainer|plyr,"novicemaster_pr1_done", [], "yes", "novicemaster_are_you_done3",[]],

####second tier
  [trp_trainer,"novicemaster_wp_choice3",[], "which weapon proficiency do you want to increase?","novicemaster_wp_choice3a",[]],
  [trp_trainer|plyr,"novicemaster_wp_choice3a", [], "archery", "novicemaster_wp_choice_ar",[]],
  [trp_trainer|plyr,"novicemaster_wp_choice3a", [], "throwing", "novicemaster_wp_choice_thr",[]],
  [trp_trainer|plyr,"novicemaster_wp_choice3a", [], "crossbows", "novicemaster_wp_choice_cr",[]],
  [trp_trainer|plyr,"novicemaster_wp_choice3a", [], "nevermind.", "novicemaster_are_you_done3",[]],

  ###archery
  [trp_trainer,"novicemaster_wp_choice_ar",[], "How much do you want to increase archery?","novicemaster_wp_amount_ar",[]],
  [trp_trainer|plyr,"novicemaster_wp_amount_ar", [], "by 10", "novicemaster_are_you_done3b",
   [(troop_raise_proficiency,"trp_player",3,10)]],
  [trp_trainer|plyr,"novicemaster_wp_amount_ar", [], "by 50", "novicemaster_are_you_done3b",
   [(troop_raise_proficiency,"trp_player",3,50)]],
  [trp_trainer|plyr,"novicemaster_wp_amount_ar", [], "by 100", "novicemaster_are_you_done3b",
   [(troop_raise_proficiency,"trp_player",3,100)]],
  [trp_trainer|plyr,"novicemaster_wp_amount_ar", [], "nevermind.", "novicemaster_are_you_done3b",[]],

  ###throwing
  [trp_trainer,"novicemaster_wp_choice_thr",[], "How much do you want to increase throwing?","novicemaster_wp_amount_thr",[]],
  [trp_trainer|plyr,"novicemaster_wp_amount_thr", [], "by 10", "novicemaster_are_you_done3b",
   [(troop_raise_proficiency,"trp_player",5,10)]],
  [trp_trainer|plyr,"novicemaster_wp_amount_thr", [], "by 50", "novicemaster_are_you_done3b",
   [(troop_raise_proficiency,"trp_player",5,50)]],
  [trp_trainer|plyr,"novicemaster_wp_amount_thr", [], "by 100", "novicemaster_are_you_done3b",
   [(troop_raise_proficiency,"trp_player",5,100)]],
  [trp_trainer|plyr,"novicemaster_wp_amount_thr", [], "nevermind.", "novicemaster_are_you_done3b",[]],

  ###crossbows
  [trp_trainer,"novicemaster_wp_choice_cr",[], "How much do you want to increase crossbows?","novicemaster_wp_amount_cr",[]],
  [trp_trainer|plyr,"novicemaster_wp_amount_cr", [], "by 10", "novicemaster_are_you_done3b",
   [(troop_raise_proficiency,"trp_player",4,10)]],
  [trp_trainer|plyr,"novicemaster_wp_amount_cr", [], "by 50", "novicemaster_are_you_done3b",
   [(troop_raise_proficiency,"trp_player",4,50)]],
  [trp_trainer|plyr,"novicemaster_wp_amount_cr", [], "by 100", "novicemaster_are_you_done3b",
   [(troop_raise_proficiency,"trp_player",4,100)]],
  [trp_trainer|plyr,"novicemaster_wp_amount_cr", [], "nevermind.", "novicemaster_are_you_done3b",[]],

  [trp_trainer,"novicemaster_are_you_done3b",[], "Are you done with archery, throwing and crossbows?","novicemaster_pr2_done",[]],
  [trp_trainer|plyr,"novicemaster_pr2_done", [], "never, I'm not nearly uber enough!", "novicemaster_wp_choice3",[]],
  [trp_trainer|plyr,"novicemaster_pr2_done", [], "yes", "novicemaster_are_you_done3",[]],

  [trp_trainer,"novicemaster_are_you_done3",[], "Are you done with all proficiency editing?","novicemaster_pr_done",[]],
  [trp_trainer|plyr,"novicemaster_pr_done", [], "never, I'm not nearly uber enough!", "novicemaster_wp",[]],
  [trp_trainer|plyr,"novicemaster_pr_done", [], "yes", "novicemaster_are_you_done",[]],

  [trp_trainer,"novicemaster_are_you_done",[], "Are you done with all character editing?","novicemaster_quit_choice",[]],
  [trp_trainer|plyr,"novicemaster_quit_choice", [], "never, I'm not nearly uber enough!", "novicemaster_hack",[]],
  [trp_trainer|plyr,"novicemaster_quit_choice", [], "yes", "close_window",[]],

#end haxorness



The dialogs should continue on to:

Quote
[trp_trainer,"novicemaster_enter_fight", [[eq,"$training_system_explained"]],
 "The training has four tiers, each tougher than the one before.\
 To finish a tier and advance to the next one, you have to win three fights in a row. Good luck.", "novicemaster_enter_fight",[[assign,"$training_system_explained",1]]],



So to get this working in any mod of M&B
 (unless you heavily changed the trainer, in which case you would know how to adapt it anyway...)
just copy the code as seen and paste to the place mentioned and run build_module.bat and you can now haxor your characters
Note: you do not need to make new charactersthis is savegame compatible

Why did I do this? you might ask.
Well I did this because I seem to recall others requesting something of the sort...
Also it allows me to make characters exactly as I need them for testing in my mod
which my intention is that other modders can use it for the same. :D

If anyone has questions just post and i will reply somewhat swiftly  :)

fesfesfes

  • 3fap
  • Knight at Arms
  • *
  • gief posting skillz
    • View Profile
python code: creating characters w/trainer (updated 1/9/06)
« Reply #1 on: January 06, 2006, 08:43:14 pm »
How do the fighting look like  when you get agility up in around 1000?



edit: thanks for the answer

Ahadhran

  • Knight
  • *
    • View Profile
python code: creating characters w/trainer (updated 1/9/06)
« Reply #2 on: January 06, 2006, 08:46:59 pm »
I've heard its pretty crazy but I haven't actually used my code much for doing anything ridiculous

Lu Bu

  • Veteran
  • *
  • Permanently Banned
  • The legendary God!
    • View Profile
    • Bow before your GOD, worm!
python code: creating characters w/trainer (updated 1/9/06)
« Reply #3 on: January 06, 2006, 08:50:55 pm »
You didnt even fight once with your super char? what a waste... would be interesting of course, but i´m to busy to test it myself right now *sighs*

I am your legendary and almighty GOD!
Better than you since the universe exists! Oh and probably before too!

Ahadhran

  • Knight
  • *
    • View Profile
python code: creating characters w/trainer (updated 1/9/06)
« Reply #4 on: January 06, 2006, 08:54:36 pm »
I pretty much created it only for the purpose of testing my mod and or creating a character I lost from upgrade incompatability...I am actually pretty opposed to cheating as I find that it ruins the game for me however I realize that is not so for others. :)

edit:
OMG only one post away from fifty!

Lu Bu

  • Veteran
  • *
  • Permanently Banned
  • The legendary God!
    • View Profile
    • Bow before your GOD, worm!
python code: creating characters w/trainer (updated 1/9/06)
« Reply #5 on: January 06, 2006, 09:07:44 pm »
When i cheat i would only do so for recreating my old char or to test mods. All other arts of cheating are wicked!  :wink:

Also pre gratz Adadhran! ;)

I am your legendary and almighty GOD!
Better than you since the universe exists! Oh and probably before too!

Deus Ex

  • Elder Statesman
  • Administrator
  • *
  • Poor Impulse Control
    • View Profile
python code: creating characters w/trainer (updated 1/9/06)
« Reply #6 on: January 06, 2006, 09:49:32 pm »
here is another option...

I added the following code to the module_game_menus.py file.  (In the start new character section, right at the beginning)...

I use this in my module development for testing new stuff...

Beta Tester character code
==================
      ("start_tester",[],"Beta Tester",
       [
           (troop_set_type,0,1),
           (assign,"$character_gender",1),
           (troop_raise_attribute, "trp_player",ca_intelligence,9),
           (troop_raise_attribute, "trp_player",ca_strength,9),
           (troop_raise_attribute, "trp_player",ca_charisma,9),
           (troop_raise_attribute, "trp_player",ca_agility,9),
           (troop_raise_skill, "trp_player",skl_athletics,3),
           (troop_raise_skill, "trp_player",skl_power_draw,3),
           (troop_raise_skill, "trp_player",skl_pathfinding,3),
           (troop_raise_skill, "trp_player",skl_tracking,3),
           (troop_raise_skill, "trp_player",skl_spotting,3),
           (troop_raise_skill, "trp_player",skl_ironflesh,3),
           (troop_raise_skill, "trp_player",skl_weapon_master,3),
           (troop_raise_skill, "trp_player",skl_power_strike,3),
           (troop_raise_skill, "trp_player",skl_riding,3),
           (troop_raise_skill, "trp_player",skl_tactics,3),
           (troop_raise_skill, "trp_player",skl_shield,3),
           (troop_raise_skill, "trp_player",skl_leadership,3),
           (troop_raise_skill, "trp_player",skl_prisoner_management,3),
           (troop_raise_proficiency, "trp_player",3,30),
           (troop_add_item, "trp_player","itm_leather_jerkin",imod_ragged),
           (troop_add_item, "trp_player","itm_arming_sword",imod_rusty),
           (troop_add_item, "trp_player","itm_hunting_crossbow",0),
           (troop_add_item, "trp_player","itm_leather_boots",0),
           (troop_add_item, "trp_player","itm_leather_gloves",imod_tattered),
           (troop_add_item, "trp_player","itm_bolts",0),
           (troop_add_item, "trp_player","itm_smoked_fish",0),
           (troop_add_item, "trp_player","itm_saddle_horse",imod_swaybacked),
           (troop_add_item, "trp_player","itm_furs",0),
           [troop_add_gold, "trp_player", 5035],
           (change_screen_return,0),
        ]
       ),
==================

You can edit it as desired - it changes the stats and equip of your starting character - sorry but there is no way to set the character level higher (that I could find).

If you want to do this, take the code above and paste it into the games_menu.py file in the following location:


module_game_menus.py
=======================
  (
    "start_game_1",0,
    "Welcome, adventurer, to Mount&Blade. Before you start the game, you must create a character. To begin, select your character's gender.",
    "none",
    [],
    [
--->>> right here - insert code from above
       ("start_male",[],"Male",
       [
           (troop_set_type,0,0),
           (assign,"$character_gender",0),
           (troop_raise_attribute, "trp_player",ca_strength,1),
           (troop_raise_attribute, "trp_player",ca_charisma,1),
           (jump_to_menu,"mnu_start_game_2")
        ]
       ),
--->>> OR right here - insert code from above
      ("start_female",[],"Female",
       [
           (troop_set_type,0,1),
           (assign,"$character_gender",1),
           (troop_raise_attribute, "trp_player",ca_agility,1),
           (troop_raise_attribute, "trp_player",ca_intelligence,1),
           (jump_to_menu,"mnu_start_game_2")
        ]
       ),
--->>> OR right here - insert code from above
    ]
  ),

=======================
After you do that, save the file, and compile with the python bat file.

Now when you need to test something - you can start with a bit better character (still level one though).

Oh, and I could not find a way to skip the NEW CHARACTER points allocation screen - so you still get some skill, stat, and weapon points to allocate.  

Hope this is of interest...

DE

(yeah, I do nearly all my modding in the python files so far...)
What are you looking here for??  What are you looking for here??

Ahadhran

  • Knight
  • *
    • View Profile
python code: creating characters w/trainer (updated 1/9/06)
« Reply #7 on: January 07, 2006, 07:24:07 pm »
hmm yes that would be another way of doing it...

I was wondering if there shouldn't be a thread devoted to coding from python that can be used by modders like the above. Some of it could be used as is while others would have to be personalized....This would make mod development a lot faster if a lot of copying and pasting could go on.

The thread would have to be limited to just the code so it didn't get cluttered with comments. You could I guess have a second thread devoted to comments but I don't know that could be clumsy...Anyway just thought I'd put the idea out there

jellywerker

  • Recruit
  • *
    • View Profile
python code: creating characters w/trainer (updated 1/9/06)
« Reply #8 on: January 07, 2006, 08:30:42 pm »
This is a cool way to integrate cheating into the game, I like it :D Although not for all players, many will get a lot of fun out of this (including me).

svaucher

  • Veteran
  • *
    • View Profile
    • http://www-etud.iro.umontreal.ca/~vauchers
Re: coding for creating uber characters w/trainer
« Reply #9 on: January 07, 2006, 09:21:19 pm »
Code contains a lot of copy-pasted lines (a no-no of programming). By using one variable, you could reduce the code by two-thirds.

Basically, in a first dialog, you ask for the ability to increase, then store the ability in your var. In a second dialog, you can then ask for the points and increase the ability stored in your var. You can then reuse the whole second dialog without copy-pasting it for str, int, char, agil.

sv

Ahadhran

  • Knight
  • *
    • View Profile
python code: creating characters w/trainer (updated 1/9/06)
« Reply #10 on: January 08, 2006, 07:50:45 pm »
That is all very true, however this is not code I will keep in any kind of permanency in any of my mods and will not even use much my self. I made it brain numbingly redundant more for the purpose of noobs seeing what is going on...Maybe I am mistaken in this but I can't say i have a lot of self interest since I'm pretty uber in game all on my own :twisted:. Maybe if there is enough interest in the code I will clean it up(I only spent an hour writing it)....but I'm guessing that the audience for this is pretty small

Note: I'm very new to programing, I started knowing absolutely nothing about the Python files and built all my knowledge on staring at the files until I understood them (my only background was a single Visual basic class at a community college).

Note #2: This code only works if you haven't started training with the trainer, after that it isn't an option anymore...may change this later but I don't know since if you're making a hacked character do you really need to do the training fights? :roll:

Azael

  • Recruit
  • *
    • View Profile
python code: creating characters w/trainer (updated 1/9/06)
« Reply #11 on: January 17, 2006, 03:52:32 pm »
Out of curiousity, how exactly would you go about to use this script for the trainer in the Last Days mod?

The Master

  • Veteran
  • *
  • Your Master has arrived...
    • View Profile
  • Faction: Nord
Re: python code: creating characters w/trainer (updated 1/9/06)
« Reply #12 on: April 08, 2009, 12:01:02 am »
How do the fighting look like  when you get agility up in around 1000?



edit: thanks for the answer

That's an easy one... while in-game press "C" then go to "statistics" and "export character" then save if you want (cause you have to quit the game) go to "C:...mount&blade (where your mount and blade is installed) and enter a briefcase called "CharExport", open the .txt file in there and edit it. After editing enter the game load your profile the press "C" again and select "import character" and that's done (DOESN'T WORK ON VISTA. WHY?? Don't know the .txt doesn't shows up


I know this is off topic but was just to awser him sorry  :roll:


jinnwarior

  • Recruit
  • *
    • View Profile
  • Faction: Bandit
Re: python code: creating characters w/trainer (updated 1/9/06)
« Reply #13 on: April 08, 2009, 12:12:02 am »
nah man the txt doesnt show up on vista IF you dont change this option. go into tools, folder options and click show file extensions

The Master

  • Veteran
  • *
  • Your Master has arrived...
    • View Profile
  • Faction: Nord
Re: python code: creating characters w/trainer (updated 1/9/06)
« Reply #14 on: April 08, 2009, 01:19:14 am »
nah man the txt doesnt show up on vista IF you dont change this option. go into tools, folder options and click show file extensions

 :DTHANKS!!! DIDN'T KNEW THAT (not joking  :lol:)