搜索结果: *

  1. Phosphoer

    Adding a 'duel' option to NPC conversation menu

    Really awesome! I love what you've done with it ^^.

    I noticed that it seems cheat mode is on, was that on purpose? It's on set in my config >.>
  2. Phosphoer

    Adding a 'duel' option to NPC conversation menu

    Feel free to use my code ^^, if you get something working with it then I'd appreciate it if you posted it here for me to see :p

    This is how it is now:
    Everything should work with the lord, the other two still crash on the second duel.

    @Jinnai: Thanks, being really new to the module system, I don't really have any idea how to do that ><
    How exactly would I use the victory condition thingy?


    Dialogues: This goes right above Generic Member Chat
    插入代码块:
    ################################################
      # Duel Mod
      ################################################
      [anyone|plyr,"member_question_2", [], "Care to duel?", "lord_challenge_duel",[]],
      [anyone|plyr,"regular_member_talk", [], "Let's have a practice duel.", "lord_challenge_duel",[]],
      [anyone|plyr,"lord_talk_ask_something_2", [], "I say, I've got a rather smashing idea!", "lord_talk_idea",[]],
      [anyone,"lord_talk_idea", [], "What ho! Do tell old chap!", "lord_talk_ideas",[]],
      [anyone|plyr,"lord_talk_ideas", [], "What say we have a duel?", "lord_challenge_duel",[]],
      [anyone|plyr,"lord_talk_ideas", [], "I know, let's go peasant hunting!", "lord_peasant_hunt",[]],
    	
       [anyone,"lord_challenge_duel", [], "Hah! Have at ye!", "close_window",
       [(call_script, "script_change_player_relation_with_troop", "$g_talk_troop", 	0),
        (assign, "$g_leave_encounter", 1),
        (try_begin),
          (is_between, "$g_encountered_party", towns_begin, towns_end),
          (party_get_slot, ":arena_scene", "$g_encountered_party", slot_town_arena),
        (else_try),
          (assign, ":closest_dist", 100000),
          (assign, ":closest_town", -1),
          (try_for_range, ":cur_town", towns_begin, towns_end),
            (store_distance_to_party_from_party, ":dist", ":cur_town", "p_main_party"),
            (lt, ":dist", ":closest_dist"),
            (assign, ":closest_dist", ":dist"),
            (assign, ":closest_town", ":cur_town"),
          (try_end),
          (party_get_slot, ":arena_scene", ":closest_town", slot_town_arena),
        (try_end),
        (modify_visitors_at_site, ":arena_scene"),
        (reset_visitors),
        (set_visitor, 0, "trp_player"),
        (set_visitor, 1, "$g_talk_troop"),
        (set_jump_mission, "mt_arena_duel_thing"),
        (jump_to_scene, ":arena_scene"),
        (try_begin),
          (neq, "$talk_context", tc_court_talk),
          (jump_to_menu, "mnu_arena_duel_fight"),
        (try_end),
        ]],
    	
       [anyone,"lord_peasant_hunt", [], "Ah yes, good show!", "close_window",
       [(call_script, "script_change_player_relation_with_troop", "$g_talk_troop", 	5),
        (assign, "$g_leave_encounter", 1),
        (try_begin),
          (is_between, "$g_encountered_party", towns_begin, towns_end),
          (party_get_slot, ":arena_scene", "$g_encountered_party", slot_town_arena),
        (else_try),
          (assign, ":closest_dist", 100000),
          (assign, ":closest_town", -1),
          (try_for_range, ":cur_town", towns_begin, towns_end),
            (store_distance_to_party_from_party, ":dist", ":cur_town", "p_main_party"),
            (lt, ":dist", ":closest_dist"),
            (assign, ":closest_dist", ":dist"),
            (assign, ":closest_town", ":cur_town"),
          (try_end),
          (party_get_slot, ":arena_scene", ":closest_town", slot_town_arena),
        (try_end),
        (modify_visitors_at_site, ":arena_scene"),
        (reset_visitors),
        (set_visitor, 0, "trp_player"),
        #(set_visitor, 1, "$g_talk_troop"),
        (set_jump_mission, "mt_peasant_hunt"),
        (jump_to_scene, ":arena_scene"),
        (try_begin),
          (neq, "$talk_context", tc_court_talk),
          (jump_to_menu, "mnu_peasants_begin"),
        (try_end),
        ]],
    	
      ################################################
      # End of Duel Mod
      ################################################

    Mission Templates: Right after the arena_challenge_fight mission
    插入代码块:
      #############################
      # Duel Mod
      #############################
       (
        "arena_duel_thing",mtf_arena_fight,-1,
        "The duel begins!",
        [
          (56, mtef_visitor_source|mtef_team_0, 0, aif_start_alarmed, 1, []),
          (58, mtef_visitor_source|mtef_team_2, 0, aif_start_alarmed, 1, []),
        ],
        [
          common_inventory_not_available,
          (ti_tab_pressed, 0, 0, [(display_message, "@Cannot leave now.")], []),
          #(ti_before_mission_start, 0, 0, [], [(call_script, "script_change_banners_and_chest")]),
    
          (0, 0, ti_once, [],
           [
             (call_script, "script_music_set_situation_with_culture", mtf_sit_arena),
           ]),
    
          (1, 4, ti_once, [(this_or_next|main_hero_fallen),(num_active_teams_le,1)],
           [
               (finish_mission),
           ]),
        ],
      ),
      
      # Peasant hunt
      (
        "peasant_hunt",mtf_arena_fight|mtf_commit_casualties,-1,
        "Let the hunt begin!",
        [
          (56, mtef_visitor_source|mtef_team_0, 0, aif_start_alarmed, 1, []),
          (58, mtef_visitor_source|mtef_team_2, 0, aif_start_alarmed, 1, []),
        ],
        [
          common_inventory_not_available,
          (ti_tab_pressed, 0, 0, [(display_message, "@Cannot leave now.")], []),
          #(ti_before_mission_start, 0, 0, [], [(call_script, "script_change_banners_and_chest")]),
    
          (0, 0, ti_once, [],
           [
             (call_script, "script_music_set_situation_with_culture", mtf_sit_arena),
           ]),
    	   
    	   (0, 0, ti_once,[(call_script, "script_spawn_villagers")],[]),
    
          (1, 4, ti_once, [(this_or_next|main_hero_fallen),(num_active_teams_le,1)],
           [
               (finish_mission),
           ]),
        ],
      ),
      
      #############################
      # End of Duel Mod
      #############################

    Game Menus: Right before simple_encounter
    插入代码块:
      ##############################
      # Duel Mod
      ##############################
      
      ("duel_begin",0,
       "You prepare to duel.",
       "none",
       [],
       [
         ("continue",[],"Continue...",
          [
    	  (jump_to_menu, "mnu_simple_encounter"),
    	  (change_screen_mission),
          ]),
          ]
      ),
      
       ("peasants_begin",0,
       "You prepare slaughter peasants..",
       "none",
       [],
       [
         ("continue",[],"Continue...",
          [
    	  (change_screen_mission),
          ]),
          ]
      ),
     
       ("duel_over",0,
       "The duel is over",
       "none",
       [],
       [
         ("continue",[],"Continue...",
          [
    	  (jump_to_menu, "mnu_reports"),
          ]),
    
          ]
      ),
      ##############################
      # End of Duel Mod
      ##############################
  3. Phosphoer

    Adding a 'duel' option to NPC conversation menu

    Aye I was messing about with sending the player to different menus to see if that fixed the bug. Needless to say it didn't, but the bug still occurs even if both of those lines are the same.


    Thanks for trying :smile:
  4. Phosphoer

    Adding a 'duel' option to NPC conversation menu

    Alright, I've got the thing mostly done, but there is a bug :sad:

    At the moment you can request a duel with any lord who isn't out for your blood, and you can fight him with no relationship loss in a nice friendly duel. You also don't come out of the battle all beaten up the way you do in a quest duel.

    You can also duel party members, both heroes and troops, but that is where the bug shows up. The first duel with a party member works fine, but after the second duel, you can't get back to the main map ><  I have a screen that says the duel is over when it is so, but after the second duel, the continue button just doesn't work, even though it works the first time! Any ideas?

    Dialogue code:

    插入代码块:
      ################################################
      # Duel Mod
      ################################################
      [anyone|plyr,"member_question_2", [], "Care to duel?", "hero_challenge_duel",[]],
      [anyone|plyr,"regular_member_talk", [], "Let's have a practice duel.", "troop_challenge_duel",[]],
      [anyone|plyr,"lord_talk_ask_something_2", [], "Care to duel?", "lord_challenge_duel",[]],
      
       [anyone,"hero_challenge_duel", [], "Ah yes, good show!", "close_window",
       [(call_script, "script_change_player_relation_with_troop", "$g_talk_troop", 	0),
        (assign, "$g_leave_encounter", 1),
        (try_begin),
          (is_between, "$g_encountered_party", towns_begin, towns_end),
          (party_get_slot, ":arena_scene", "$g_encountered_party", slot_town_arena),
        (else_try),
          (assign, ":closest_dist", 100000),
          (assign, ":closest_town", -1),
          (try_for_range, ":cur_town", towns_begin, towns_end),
            (store_distance_to_party_from_party, ":dist", ":cur_town", "p_main_party"),
            (lt, ":dist", ":closest_dist"),
            (assign, ":closest_dist", ":dist"),
            (assign, ":closest_town", ":cur_town"),
          (try_end),
          (party_get_slot, ":arena_scene", ":closest_town", slot_town_arena),
        (try_end),
        (modify_visitors_at_site, ":arena_scene"),
        (reset_visitors),
        (set_visitor, 0, "trp_player"),
        (set_visitor, 1, "$g_talk_troop"),
        (set_jump_mission, "mt_arena_duel_thing"),
        (jump_to_scene, ":arena_scene"),
        (try_begin),
         (neq, "$talk_context", tc_court_talk),
         (jump_to_menu, "mnu_duel_begin"),
        (try_end),
        ]],
    	
       [anyone,"lord_challenge_duel", [], "Ah yes, good show!", "close_window",
       [(call_script, "script_change_player_relation_with_troop", "$g_talk_troop", 	0),
        (assign, "$g_leave_encounter", 1),
        (try_begin),
          (is_between, "$g_encountered_party", towns_begin, towns_end),
          (party_get_slot, ":arena_scene", "$g_encountered_party", slot_town_arena),
        (else_try),
          (assign, ":closest_dist", 100000),
          (assign, ":closest_town", -1),
          (try_for_range, ":cur_town", towns_begin, towns_end),
            (store_distance_to_party_from_party, ":dist", ":cur_town", "p_main_party"),
            (lt, ":dist", ":closest_dist"),
            (assign, ":closest_dist", ":dist"),
            (assign, ":closest_town", ":cur_town"),
          (try_end),
          (party_get_slot, ":arena_scene", ":closest_town", slot_town_arena),
        (try_end),
        (modify_visitors_at_site, ":arena_scene"),
        (reset_visitors),
        (set_visitor, 0, "trp_player"),
        (set_visitor, 1, "$g_talk_troop"),
        (set_jump_mission, "mt_arena_duel_thing"),
        (jump_to_scene, ":arena_scene"),
        (try_begin),
          (neq, "$talk_context", tc_court_talk),
          (jump_to_menu, "mnu_arena_duel_fight"),
        (try_end),
        ]],
    	
       [anyone,"troop_challenge_duel", [], "Ah yes, good show!", "close_window",
       [(call_script, "script_change_player_relation_with_troop", "$g_talk_troop", 	0),
        (assign, "$g_leave_encounter", 1),
        (try_begin),
          (is_between, "$g_encountered_party", towns_begin, towns_end),
          (party_get_slot, ":arena_scene", "$g_encountered_party", slot_town_arena),
        (else_try),
          (assign, ":closest_dist", 100000),
          (assign, ":closest_town", -1),
          (try_for_range, ":cur_town", towns_begin, towns_end),
            (store_distance_to_party_from_party, ":dist", ":cur_town", "p_main_party"),
            (lt, ":dist", ":closest_dist"),
            (assign, ":closest_dist", ":dist"),
            (assign, ":closest_town", ":cur_town"),
          (try_end),
          (party_get_slot, ":arena_scene", ":closest_town", slot_town_arena),
        (try_end),
        (modify_visitors_at_site, ":arena_scene"),
        (reset_visitors),
        (set_visitor, 0, "trp_player"),
        (set_visitor, 1, "$g_talk_troop"),
        (set_jump_mission, "mt_arena_duel_thing"),
        (jump_to_scene, ":arena_scene"),
        (try_begin),
          (neq, "$talk_context", tc_court_talk),
          (jump_to_menu, "mnu_arena_duel_fight"),
        (try_end),
        ]],
    	
      ################################################
      # End of Duel Mod
      ################################################

    Mission Templates Code:

    插入代码块:
       (
        "arena_duel_thing",mtf_arena_fight,-1,
        "The duel begins!",
        [
          (56, mtef_visitor_source|mtef_team_0, 0, aif_start_alarmed, 1, []),
          (58, mtef_visitor_source|mtef_team_2, 0, aif_start_alarmed, 1, []),
        ],
        [
          common_inventory_not_available,
          (ti_tab_pressed, 0, 0, [(display_message, "@Cannot leave now.")], []),
          #(ti_before_mission_start, 0, 0, [], [(call_script, "script_change_banners_and_chest")]),
    
          (0, 0, ti_once, [],
           [
             (call_script, "script_music_set_situation_with_culture", mtf_sit_arena),
           ]),
    
          (1, 4, ti_once, [(this_or_next|main_hero_fallen),(num_active_teams_le,1)],
           [
               (finish_mission),
    		   (jump_to_menu, "mnu_duel_over"),
           ]),
        ],
      ),

    Game Menu's Code:

    插入代码块:
      ("duel_begin",0,
       "You prepare to duel.",
       "none",
       [],
       [
         ("continue",[],"Continue...",
          [
    	  (change_screen_mission),
          ]),
          ]
      ),
     
       ("duel_over",0,
       "The duel is over",
       "none",
       [],
       [
         ("continue",[],"Continue...",
          [
    	  (jump_to_menu, "mnu_reports"),
          ]),
    
          ]
      ),


  5. Phosphoer

    Compilation of 82 little tweaks to the text files to change your gameplay(links)

    Alright, I've got a duel option and dueling added, but there is a bug ><

    It works fine if I duel a lord, but I also added an option to duel a hero or a troop in your party. It works fine the first duel but after that it freezes. :sad:

    This is my code:
    插入代码块:
      [anyone|plyr,"member_question_2", [], "Care to duel?", "hero_challenge_duel",[]],
      [anyone|plyr,"regular_member_talk", [], "Let's have a practice duel.", "troop_challenge_duel",[]],
      [anyone|plyr,"lord_talk_ask_something_2", [], "Care to duel?", "lord_challenge_duel",[]],
      
       [anyone,"hero_challenge_duel", [], "Ah yes, good show!", "close_window",
       [(call_script, "script_change_player_relation_with_troop", "$g_talk_troop", 	0),
        (assign, "$g_leave_encounter", 1),
        (try_begin),
          (is_between, "$g_encountered_party", towns_begin, towns_end),
          (party_get_slot, ":arena_scene", "$g_encountered_party", slot_town_arena),
        (else_try),
          (assign, ":closest_dist", 100000),
          (assign, ":closest_town", -1),
          (try_for_range, ":cur_town", towns_begin, towns_end),
            (store_distance_to_party_from_party, ":dist", ":cur_town", "p_main_party"),
            (lt, ":dist", ":closest_dist"),
            (assign, ":closest_dist", ":dist"),
            (assign, ":closest_town", ":cur_town"),
          (try_end),
          (party_get_slot, ":arena_scene", ":closest_town", slot_town_arena),
        (try_end),
        (modify_visitors_at_site, ":arena_scene"),
        (reset_visitors),
        (set_visitor, 0, "trp_player"),
        (set_visitor, 1, "$g_talk_troop"),
        (set_jump_mission, "mt_arena_duel_thing"),
        (jump_to_scene, ":arena_scene"),
        (try_begin),
          #(neq, "$talk_context", tc_court_talk),
         #(jump_to_menu, "mnu_arena_duel_fight"),
    	 (change_screen_mission),
        (try_end),
        ]],
    	
       [anyone,"lord_challenge_duel", [], "Ah yes, good show!", "close_window",
       [(call_script, "script_change_player_relation_with_troop", "$g_talk_troop", 	0),
        (assign, "$g_leave_encounter", 1),
        (try_begin),
          (is_between, "$g_encountered_party", towns_begin, towns_end),
          (party_get_slot, ":arena_scene", "$g_encountered_party", slot_town_arena),
        (else_try),
          (assign, ":closest_dist", 100000),
          (assign, ":closest_town", -1),
          (try_for_range, ":cur_town", towns_begin, towns_end),
            (store_distance_to_party_from_party, ":dist", ":cur_town", "p_main_party"),
            (lt, ":dist", ":closest_dist"),
            (assign, ":closest_dist", ":dist"),
            (assign, ":closest_town", ":cur_town"),
          (try_end),
          (party_get_slot, ":arena_scene", ":closest_town", slot_town_arena),
        (try_end),
        (modify_visitors_at_site, ":arena_scene"),
        (reset_visitors),
        (set_visitor, 0, "trp_player"),
        (set_visitor, 1, "$g_talk_troop"),
        (set_jump_mission, "mt_arena_duel_thing"),
        (jump_to_scene, ":arena_scene"),
        (try_begin),
          (neq, "$talk_context", tc_court_talk),
          (jump_to_menu, "mnu_arena_duel_fight"),
        (try_end),
        ]],
    	
       [anyone,"troop_challenge_duel", [], "Ah yes, good show!", "close_window",
       [(call_script, "script_change_player_relation_with_troop", "$g_talk_troop", 	0),
        (assign, "$g_leave_encounter", 1),
        (try_begin),
          (is_between, "$g_encountered_party", towns_begin, towns_end),
          (party_get_slot, ":arena_scene", "$g_encountered_party", slot_town_arena),
        (else_try),
          (assign, ":closest_dist", 100000),
          (assign, ":closest_town", -1),
          (try_for_range, ":cur_town", towns_begin, towns_end),
            (store_distance_to_party_from_party, ":dist", ":cur_town", "p_main_party"),
            (lt, ":dist", ":closest_dist"),
            (assign, ":closest_dist", ":dist"),
            (assign, ":closest_town", ":cur_town"),
          (try_end),
          (party_get_slot, ":arena_scene", ":closest_town", slot_town_arena),
        (try_end),
        (modify_visitors_at_site, ":arena_scene"),
        (reset_visitors),
        (set_visitor, 0, "trp_player"),
        (set_visitor, 1, "$g_talk_troop"),
        (set_jump_mission, "mt_arena_duel_thing"),
        (jump_to_scene, ":arena_scene"),
        (try_begin),
          (neq, "$talk_context", tc_court_talk),
          (jump_to_menu, "mnu_arena_duel_fight"),
        (try_end),
        ]],

    And this is my code in Mission Templates:
    插入代码块:
       (
        "arena_duel_thing",mtf_arena_fight,-1,
        "You prepare to duel.",
        [
          (56, mtef_visitor_source|mtef_team_0, 0, aif_start_alarmed, 1, []),
          (58, mtef_visitor_source|mtef_team_2, 0, aif_start_alarmed, 1, []),
        ],
        [
          common_inventory_not_available,
          (ti_tab_pressed, 0, 0, [(display_message, "@Cannot leave now.")], []),
          ##(ti_before_mission_start, 0, 0, [], [(call_script, "script_change_banners_and_chest")]),
    
          (0, 0, ti_once, [],
           [
             (call_script, "script_music_set_situation_with_culture", mtf_sit_arena),
             ]),
    
          (1, 4, ti_once, [(this_or_next|main_hero_fallen),(num_active_teams_le,1)],
           [
               (finish_mission),
               ]),
        ],
      ),


  6. Phosphoer

    Compilation of 82 little tweaks to the text files to change your gameplay(links)

    Hiya, could someone explain how to re-create the option to duel a lord any time you want, but using the python module system instead of editing the text files?

    That'd help me out a lot :smile:
  7. Phosphoer

    Editing walk speed / Base Health

    Really it's hardcoded? That's surprising to me, crappy ><

    Thanks for the help, maybe a combination of increasing the damage everything does and getting rid of iron flesh will do the trick ^^.
  8. Phosphoer

    Editing walk speed / Base Health

    Hiya, I've been trying to figure out how to edit the base walking speed and health, and haven't been able to find anything in the module system that seem like likely culprits. I searched the forum and the Q&A thread but couldn't find anything. I'd like to make it so that all troops, including...
  9. Phosphoer

    Adding a 'duel' option to NPC conversation menu

    Good point, I'll check that out :smile:

    Thanks!
  10. Phosphoer

    Adding a 'duel' option to NPC conversation menu

    Hi, I was thinking how it would be cool to duel any of the heroes in your party, and started looking into ways to accomplish this. I'm still really new to the module system and such, so I was wondering if I could get some tips and advice on the subject? So far I've added a new bit of code in...
  11. Phosphoer

    Different way to edit Overland Map?

    Hey guys, I'm new to Mount and Blade and the modding community, but am very interested in learning :) Thorgrim's Map Editor doesn't work on my computer, I have a really abstract ATI card ( on an intel iMac ) that only seems to have one set of drivers available for it, and those driver's don't...
后退
顶部 底部