Village Training

Users who are viewing this thread

I have encoded the "trainers" conversation into the village elder's conversation, as what I am trying to do is make it that you get trained in villages. But I have encountered a problem, as my end result is to be like undertaking the mission "help the peasents learn to defend themselves" only you are learning to fight. If that makes sence.
ANYWAYS, when I then implament this code a few things will happen.

1), should I leave the code like it is it will take me to the boarder of a random map, where I then have to battle the dude, upon winning it will take me to the same map and after half an hour of searching, the only other thing there will be a merchant.

2) If i change the code so that it goes to the "$current_town", it will then send me to a tavern to fight the dude before leaving me in the tavern with no-one else.

Does anybody know how to fix this or if someone has done something similar? It would be a great help...
 
At first, you should show me your script that you modified. Unless you do so, Nobody can help you...
 
Ok then, please note that this is the coding that makes me go to a tavern, but here it is...
The script I'm trying to use is:

Dialog
[anyone,"novicemaster_ready_to_fight", [], "Here you go then. Good luck.", "close_window",
  [
    (assign, "$training_fight_won", 0),
    (assign, "$waiting_for_training_fight_result", 1),
    (modify_visitors_at_site, "$current_town"),
    (reset_visitors),
    (assign, reg0, 0),
    (assign, reg1, 1),
    (assign, reg2, 2),
    (assign, reg3, 3),
    (shuffle_range, 0, 4),
    (set_visitor, reg0, "trp_player"),
    (set_visitor, reg1, "$novicemaster_opponent_troop"),
    (set_visitor, 4, "$g_talk_troop"),
    (set_jump_mission, "mt_training_ground_trainer_training"),
    (jump_to_scene, "$current_town"),
    ]],

Mission Template
  (
    "training_ground_trainer_training",mtf_arena_fight,-1,
    "You will fight a match in the arena.",
    [
      (16, mtef_visitor_source|mtef_team_0,af_override_everything,aif_start_alarmed,1,[itm_practice_shield,itm_practice_sword,itm_practice_boots]),
      (17, mtef_visitor_source|mtef_team_1,af_override_everything,aif_start_alarmed,1,[itm_practice_staff,itm_practice_boots]),
      (18, mtef_visitor_source|mtef_team_2,af_override_everything,aif_start_alarmed,1,[itm_practice_staff,itm_practice_boots]),
      (19, mtef_visitor_source|mtef_team_3,af_override_everything,aif_start_alarmed,1,[itm_heavy_practice_sword,itm_practice_boots]),
      (20, mtef_visitor_source,0,0,1,[]),
    ],
    [
      (ti_before_mission_start, 0, 0, [], [(call_script, "script_change_banners_and_chest")]),
     
      common_arena_fight_tab_press,

      (ti_question_answered, 0, 0, [],
      [
        (store_trigger_param_1, ":answer"),
        (eq, ":answer", 0),
        (set_jump_mission, "mt_training_ground_trainer_talk"),
        (modify_visitors_at_site, "$current_town"),
        (reset_visitors),
        (set_jump_entry, 5),
        (jump_to_scene, "$current_town"),
        ]),
      (1, 3, ti_once, [(main_hero_fallen,0)],
      [
        (set_jump_mission, "mt_training_ground_trainer_talk"),
        (modify_visitors_at_site, "$current_town"),
        (reset_visitors),
        (set_jump_entry, 5),
        (jump_to_scene, "$current_town"),
        ]),
      (1, 3, ti_once,
      [
        (store_mission_timer_a, reg1),
        (ge, reg1, 1),
        (num_active_teams_le, 1),
        (neg|main_hero_fallen),
        (assign, "$training_fight_won", 1),
        ],
      [
        (set_jump_mission, "mt_training_ground_trainer_talk"),
        (modify_visitors_at_site, "$current_town"),
        (reset_visitors),
        (set_jump_entry, 5),
        (jump_to_scene, "$current_town"),
        ]),
      (ti_inventory_key_pressed, 0, 0, [(display_message,"str_cant_use_inventory_arena")], []),
    ],
  ),

The changed variable is "$current_town" which has been changed from:"$g_training_ground_melee_training_scene"
 
1, You want to train villagers, Don't you?
(set_visitor, reg1, "trp_trainee_peasant"),

2, Get the scene ID.
(party_get_slot, ":village_scene", "$current_town", slot_castle_exterior),
(jump_to_scene, ":village_scene"),
 
I think he doesnt want to train villagers. He just wants to give option to make village elders act like training ground trainers. Scene used is village scene, but mission template used is melee training ground.
 
YEA!!! Thanks dunde, I'm not the best at SHORT explinations. Basically I want to get rid of training grounds by making you train in villages.
ANYWAYS...
I tried your code rucchi and It works, YAYS!!!
Only problem is that it spawns me off the map.
stuffed.bmp
And when I then move (or in this case my opponent) it spawns us just away from the corner
stuffed2.bmp
 
I could not understand your explanation, But I understand it by your pictures.
Code:
[anyone,"novicemaster_ready_to_fight", [], "Here you go then. Good luck.", "close_window",
   [
     (assign, "$training_fight_won", 0),
     (assign, "$waiting_for_training_fight_result", 1),
     (modify_visitors_at_site, "$current_town"),
     (reset_visitors),
     (set_visitor, 0, "trp_player"),
     (set_visitor, 1, "$novicemaster_opponent_troop"),
     (set_visitor, 11, "$g_talk_troop"),
     (set_jump_entry, 11),
     (set_jump_mission, "mt_training_ground_trainer_training"),
     (party_get_slot, ":village_scene", "$current_town", slot_castle_exterior),
     (jump_to_scene, ":village_scene"),
     ]],
 
HOORAH FOR THE PICTURES!!!
But alas, nah. But I tried to incorperate your code into the origional semi-working and came out with this, I am gonna test it now but tell me if ayone see's any major flaws.
Code:
  [anyone|plyr,"novicemaster_are_you_ready", [], "Yes I am.", "novicemaster_ready_to_fight",[]],
  [anyone,"novicemaster_ready_to_fight", [], "Here you go then. Good luck.", "close_window",
   [
     (party_get_slot, ":village_scene", "$current_town", slot_castle_exterior),
     (assign, "$training_fight_won", 0),
     (assign, "$waiting_for_training_fight_result", 1),
     (modify_visitors_at_site, ":village_scene"),
     (reset_visitors),
     (shuffle_range, 0, 4),
     (set_visitor, 0, "trp_player"),
     (set_visitor, 1, "$novicemaster_opponent_troop"),
     (set_visitor, 4, "$g_talk_troop"),
     (set_jump_mission, "mt_training_ground_trainer_training"),
     (set_jump_entry, 11),
     (jump_to_scene, ":village_scene"),
     ]],
 
I tried my new code, and a few other versions. I also set the "set_jump_entry" to a few different numbers and none of them work. They all still do what is happening in the pictures below.
I was wondering if the problem could be in he mission template?
  (
    "training_ground_trainer_training",mtf_arena_fight,-1,
    "You will fight a match in the arena.",
    [
      (16, mtef_visitor_source|mtef_team_0,af_override_everything,aif_start_alarmed,1,[itm_practice_shield,itm_practice_sword,itm_practice_boots]),
      (17, mtef_visitor_source|mtef_team_1,af_override_everything,aif_start_alarmed,1,[itm_practice_staff,itm_practice_boots]),
      (18, mtef_visitor_source|mtef_team_2,af_override_everything,aif_start_alarmed,1,[itm_practice_staff,itm_practice_boots]),
      (19, mtef_visitor_source|mtef_team_3,af_override_everything,aif_start_alarmed,1,[itm_heavy_practice_sword,itm_practice_boots]),
      (20, mtef_visitor_source,0,0,1,[]),
    ],
    [
      (ti_before_mission_start, 0, 0, [], [(call_script, "script_change_banners_and_chest")]),
     
      common_arena_fight_tab_press,
      (ti_question_answered, 0, 0, [],
      [
        (party_get_slot, ":village_scene", "$current_town", slot_castle_exterior),
        (store_trigger_param_1, ":answer"),
        (eq, ":answer", 0),
        (set_jump_mission, "mt_village_center"),
        (modify_visitors_at_site, ":village_scene"),
        (reset_visitors),
        (set_jump_entry, 1),
        (jump_to_scene, ":village_scene"),
        ]),
      (1, 3, ti_once, [(main_hero_fallen,0)],
      [
        (try_begin),
          (call_script, "script_cf_enter_center_location_bandit_check"),
        (else_try),
          (party_get_slot, ":village_scene", "$current_town", slot_castle_exterior),
          (modify_visitors_at_site,":village_scene"),
          (reset_visitors),
          (party_get_slot, ":village_elder_troop", "$current_town",slot_town_elder),
          (set_visitor, 11, ":village_elder_troop"),

          (call_script, "script_init_town_walkers"),

          (try_begin),
            (check_quest_active, "qst_hunt_down_fugitive"),
            (neg|is_currently_night),
            (quest_slot_eq, "qst_hunt_down_fugitive", slot_quest_target_center, "$current_town"),
            (neg|check_quest_succeeded, "qst_hunt_down_fugitive"),
            (neg|check_quest_failed, "qst_hunt_down_fugitive"),
            (set_visitor, 45, "trp_fugitive"),
          (try_end),

          (set_jump_mission,"mt_village_center"),
          (jump_to_scene,":village_scene"),
          (change_screen_mission),
        (try_end),
        ]),
      (1, 3, ti_once,
      [
        (store_mission_timer_a, reg1),
        (ge, reg1, 1),
        (num_active_teams_le, 1),
        (neg|main_hero_fallen),
        (assign, "$training_fight_won", 1),
        ],
      [
        (try_begin),
          (call_script, "script_cf_enter_center_location_bandit_check"),
        (else_try),
          (party_get_slot, ":village_scene", "$current_town", slot_castle_exterior),
          (modify_visitors_at_site,":village_scene"),
          (reset_visitors),
          (party_get_slot, ":village_elder_troop", "$current_town",slot_town_elder),
          (set_visitor, 11, ":village_elder_troop"),

          (call_script, "script_init_town_walkers"),

          (try_begin),
            (check_quest_active, "qst_hunt_down_fugitive"),
            (neg|is_currently_night),
            (quest_slot_eq, "qst_hunt_down_fugitive", slot_quest_target_center, "$current_town"),
            (neg|check_quest_succeeded, "qst_hunt_down_fugitive"),
            (neg|check_quest_failed, "qst_hunt_down_fugitive"),
            (set_visitor, 45, "trp_fugitive"),
          (try_end),

          (set_jump_mission,"mt_village_center"),
          (jump_to_scene,":village_scene"),
          (change_screen_mission),
        (try_end),
        ]),
      (ti_inventory_key_pressed, 0, 0, [(display_message,"str_cant_use_inventory_arena")], []),
    ],
  ),
 
IT WORKS!!!
WOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
OOOOOOOOOOOOHOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOOOOOOOOOO!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
(And for those of you wondering I am extremly happy at the moment)

Ok, I don't know what exactally what it is that I changed but I changed the red bits:
(
    "training_ground_trainer_training",mtf_arena_fight,-1,
    "You will fight a match in the arena.",
    [
      (1, mtef_visitor_source|mtef_team_0,af_override_everything,aif_start_alarmed,1,[itm_practice_shield,itm_practice_sword,itm_practice_boots]),
      (2, mtef_visitor_source|mtef_team_1,af_override_everything,aif_start_alarmed,1,[itm_practice_staff,itm_practice_boots]),
      (3, mtef_visitor_source|mtef_team_2,af_override_everything,aif_start_alarmed,1,[itm_practice_staff,itm_practice_boots]),
      (4, mtef_visitor_source|mtef_team_3,af_override_everything,aif_start_alarmed,1,[itm_heavy_practice_sword,itm_practice_boots]),
      (5, mtef_visitor_source,0,0,1,[]),
    ],
    [
      (ti_before_mission_start, 0, 0, [], [(call_script, "script_change_banners_and_chest")]),
     
      common_arena_fight_tab_press,
      (ti_question_answered, 0, 0, [],
      [
        (party_get_slot, ":village_scene", "$current_town", slot_castle_exterior),
        (store_trigger_param_1, ":answer"),
        (eq, ":answer", 0),
        (set_jump_mission, "mt_village_center"),
        (modify_visitors_at_site, ":village_scene"),
        (reset_visitors),
        (set_jump_entry, 1),
        (jump_to_scene, ":village_scene"),
        ]),
      (1, 3, ti_once, [(main_hero_fallen,0)],
      [
        (try_begin),
          (call_script, "script_cf_enter_center_location_bandit_check"),
        (else_try),
          (party_get_slot, ":village_scene", "$current_town", slot_castle_exterior),
          (modify_visitors_at_site,":village_scene"),
          (reset_visitors),
          (party_get_slot, ":village_elder_troop", "$current_town",slot_town_elder),
          (set_visitor, 11, ":village_elder_troop"),

          (call_script, "script_init_town_walkers"),

          (try_begin),
            (check_quest_active, "qst_hunt_down_fugitive"),
            (neg|is_currently_night),
            (quest_slot_eq, "qst_hunt_down_fugitive", slot_quest_target_center, "$current_town"),
            (neg|check_quest_succeeded, "qst_hunt_down_fugitive"),
            (neg|check_quest_failed, "qst_hunt_down_fugitive"),
            (set_visitor, 45, "trp_fugitive"),
          (try_end),

          (set_jump_mission,"mt_village_center"),
          (jump_to_scene,":village_scene"),
          (change_screen_mission),
        (try_end),
        ]),
      (1, 3, ti_once,
      [
        (store_mission_timer_a, reg1),
        (ge, reg1, 1),
        (num_active_teams_le, 1),
        (neg|main_hero_fallen),
        (assign, "$training_fight_won", 1),
        ],
      [
        (try_begin),
          (call_script, "script_cf_enter_center_location_bandit_check"),
        (else_try),
          (party_get_slot, ":village_scene", "$current_town", slot_castle_exterior),
          (modify_visitors_at_site,":village_scene"),
          (reset_visitors),
          (party_get_slot, ":village_elder_troop", "$current_town",slot_town_elder),
          (set_visitor, 11, ":village_elder_troop"),

          (call_script, "script_init_town_walkers"),

          (try_begin),
            (check_quest_active, "qst_hunt_down_fugitive"),
            (neg|is_currently_night),
            (quest_slot_eq, "qst_hunt_down_fugitive", slot_quest_target_center, "$current_town"),
            (neg|check_quest_succeeded, "qst_hunt_down_fugitive"),
            (neg|check_quest_failed, "qst_hunt_down_fugitive"),
            (set_visitor, 45, "trp_fugitive"),
          (try_end),

          (set_jump_mission,"mt_village_center"),
          (jump_to_scene,":village_scene"),
          (change_screen_mission),
        (try_end),
        ]),
      (ti_inventory_key_pressed, 0, 0, [(display_message,"str_cant_use_inventory_arena")], []),
    ],
  ),
 
Back
Top Bottom