Enable to kill people in towns and villages

Users who are viewing this thread

Al_Mansur

Grandmaster Knight
Hi all. Since the first time I played to m&B, I want to be able to kill everybody in the towns and villages, at least only with the bows, javelins, etc. as we can in the castles. But, which folder of the module system have I to change in order to make it possible ?  :neutral:
 
Yes I am  :twisted:  :mrgreen: But, as many m&b players... I am sure that you have already committed massacres in small villages of poor innocent peasants...  :razz:
If we can kill soldiers in castles, so there is a way to enable people killing in villages and towns.
 
WilliamBerne in WWII: China Battlefield has allowed the player to kill NPCs in towns with certain firearms. Perhaps you could contact him?
 
hello, the code you are looking for is located in the module_dialogs.py

and the command to make a regular town/castle scene a battleground is this :

  [(set_party_battle_mode),
    (try_for_agents, ":cur_agent"),
      (agent_get_troop_id, ":cur_agent_troop", ":cur_agent"),
      (eq, ":cur_agent_troop", "trp_castle_guard"),
      (agent_set_team, ":cur_agent", 1),
    (try_end),
 
Search for mission "town_center", it should look like this:

  (
    "town_center",0,0,
    "Default town visit",
    [(0,mtef_scene_source|mtef_team_0,af_override_horse,0,1,pilgrim_disguise),
    (1,mtef_scene_source|mtef_team_0,0,0,1,[]),
    (2,mtef_scene_source|mtef_team_0,af_override_horse,0,1,pilgrim_disguise),
    (3,mtef_scene_source|mtef_team_0,af_override_horse,0,1,pilgrim_disguise),
    (4,mtef_scene_source|mtef_team_0,af_override_horse,0,1,pilgrim_disguise),
    (5,mtef_scene_source|mtef_team_0,af_override_horse,0,1,pilgrim_disguise),
    (6,mtef_scene_source|mtef_team_0,af_override_horse,0,1,pilgrim_disguise),
    (7,mtef_scene_source|mtef_team_0,af_override_horse,0,1,pilgrim_disguise),
   
    (8,mtef_scene_source,af_override_horse,0,1,[]),
    (9,mtef_visitor_source,af_override_horse,0,1,[]),(10,mtef_visitor_source,af_override_horse,0,1,[]),
    ...

Then add team assignment (we will use team 2) to all neutral NPC entries, that is entry 8 - 40 (39 is the last one to change). It should look like this:

  (
    "town_center",0,0,
    "Default town visit",
    [(0,mtef_scene_source|mtef_team_0,af_override_horse,0,1,pilgrim_disguise),
    (1,mtef_scene_source|mtef_team_0,0,0,1,[]),
    (2,mtef_scene_source|mtef_team_0,af_override_horse,0,1,pilgrim_disguise),
    (3,mtef_scene_source|mtef_team_0,af_override_horse,0,1,pilgrim_disguise),
    (4,mtef_scene_source|mtef_team_0,af_override_horse,0,1,pilgrim_disguise),
    (5,mtef_scene_source|mtef_team_0,af_override_horse,0,1,pilgrim_disguise),
    (6,mtef_scene_source|mtef_team_0,af_override_horse,0,1,pilgrim_disguise),
    (7,mtef_scene_source|mtef_team_0,af_override_horse,0,1,pilgrim_disguise),
   
    (8,mtef_scene_source|mtef_team_2,af_override_horse,0,1,[]),
    (9,mtef_visitor_source|mtef_team_2,af_override_horse,0,1,[]),(10,mtef_visitor_source|mtef_team_2,af_override_horse,0,1,[]),
    ...
    (40,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]), ...

Then add new trigger in that mission template:

(ti_before_mission_start, 0, 0, [], [(team_set_relation,0,2,1)),

And it should be fine.
 
If only Chobo the Barbarian would see this thread. He would jump with joy, finally able to kill all the peasants with his axe.
 
what I did for the latest beta of the star wars mod, was to have a mission template trigger that set everybody to be on the players team.  This allows you to attack them with ranged weapons, and I have another trigger that flips each agent to the opposite team so they all fight back.  I also coded a tavern brawl you can start through the dialogs, by then setting each agent to different random team, etc.
 
NaglFaar said:
Did it work?

It did for me but I had to change this -->[(team_set_relation,0,2,1)),  to this -->[(team_set_relation,0,2,1)]),

Other wise i would get a syntax error on the compile. Tested it and it works.
 
NormanKnight said:
It doesn't work for me  :sad:
Please could someone help me. Where have I to add this "[(team_set_relation,0,2,1)])," ?

This is what town_center looks like in my module_mission_templates.py  In red is where I put the trigger your asking about.  And make sure you add mtef_team_2 in lines  8-39 like mine below..

(
    "town_center",0,-1,
    "Default town visit",
    [(0,mtef_scene_source|mtef_team_0,af_override_horse,0,1,pilgrim_disguise),
    (1,mtef_scene_source|mtef_team_0,0,0,1,[]),
    (2,mtef_scene_source|mtef_team_0,af_override_horse,0,1,pilgrim_disguise),
    (3,mtef_scene_source|mtef_team_0,af_override_horse,0,1,pilgrim_disguise),
    (4,mtef_scene_source|mtef_team_0,af_override_horse,0,1,pilgrim_disguise),
    (5,mtef_scene_source|mtef_team_0,af_override_horse,0,1,pilgrim_disguise),
    (6,mtef_scene_source|mtef_team_0,af_override_horse,0,1,pilgrim_disguise),
    (7,mtef_scene_source|mtef_team_0,af_override_horse,0,1,pilgrim_disguise),
   
    (8,mtef_scene_source|mtef_team_2,af_override_horse,0,1,[]),
    (9,mtef_visitor_source|mtef_team_2,af_override_horse,0,1,[]),(10,mtef_visitor_source|mtef_team_2,af_override_horse,0,1,[]),(11,mtef_visitor_source|mtef_team_2,af_override_horse,0,1,[]),(12,mtef_visitor_source|mtef_team_2,af_override_horse,0,1,[]),(13,mtef_scene_source|mtef_team_2,0,0,1,[]),(14,mtef_scene_source|mtef_team_2,0,0,1,[]),(15,mtef_scene_source|mtef_team_2,0,0,1,[]),
    (16,mtef_visitor_source|mtef_team_2,af_override_horse,0,1,[]),(17,mtef_visitor_source|mtef_team_2,af_override_horse,0,1,[]),(18,mtef_visitor_source|mtef_team_2,af_override_horse,0,1,[]),(19,mtef_visitor_source|mtef_team_2,af_override_horse,0,1,[]),(20,mtef_visitor_source|mtef_team_2,af_override_horse,0,1,[]),(21,mtef_visitor_source|mtef_team_2,af_override_horse,0,1,[]),(22,mtef_visitor_source|mtef_team_2,af_override_horse,0,1,[]),(23,mtef_visitor_source|mtef_team_2,af_override_horse,0,1,[]),
    (24,mtef_visitor_source|mtef_team_2,af_override_horse,0,1,[]),(25,mtef_visitor_source|mtef_team_2,af_override_horse,0,1,[]),(26,mtef_visitor_source|mtef_team_2,af_override_horse,0,1,[]),(27,mtef_visitor_source|mtef_team_2,af_override_horse,0,1,[]),(28,mtef_visitor_source|mtef_team_2,af_override_horse,0,1,[]),(29,mtef_visitor_source|mtef_team_2,af_override_horse,0,1,[]),(30,mtef_visitor_source|mtef_team_2,af_override_horse,0,1,[]),(31,mtef_visitor_source|mtef_team_2,af_override_horse,0,1,[]),
    (32,mtef_visitor_source|mtef_team_2,af_override_horse,0,1,[]),(33,mtef_visitor_source|mtef_team_2,af_override_horse,0,1,[]),(34,mtef_visitor_source|mtef_team_2,af_override_horse,0,1,[]),(35,mtef_visitor_source|mtef_team_2,af_override_horse,0,1,[]),(36,mtef_visitor_source|mtef_team_2,af_override_horse,0,1,[]),(37,mtef_visitor_source|mtef_team_2,af_override_horse,0,1,[]),(38,mtef_visitor_source|mtef_team_2,af_override_horse,0,1,[]),(39,mtef_visitor_source|mtef_team_2,af_override_horse,0,1,[]),
    (40,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]),(41,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]),(42,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]),(43,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]),
    (44,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]),(45,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]),(46,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]),(47,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]),
    ],
    [
     
  (ti_on_agent_spawn, 0, 0, [],
      [
        (store_trigger_param_1, ":agent_no"),
        (call_script, "script_init_town_agent", ":agent_no"),
        ]),

   
       
(1, 0, ti_once, [],
        [
          (try_begin),
            (eq, "$g_mt_mode", tcm_default),
            (store_current_scene, ":cur_scene"),
            (scene_set_slot, ":cur_scene", slot_scene_visited, 1),
          (try_end),
          (call_script, "script_init_town_walker_agents"),
          (try_begin),
            (eq, "$sneaked_into_town", 1),
            (call_script, "script_music_set_situation_with_culture", mtf_sit_town_infiltrate),
          (else_try),
            (call_script, "script_music_set_situation_with_culture", mtf_sit_travel),
          (try_end),
          ]),
        (ti_before_mission_start, 0, 0, [],  [(call_script, "script_change_banners_and_chest")]),
        (ti_before_mission_start, 0, 0, [], [(team_set_relation,0,2,1)]),
(ti_inventory_key_pressed, 0, 0,
        [
 
It works for me:
uu-2e3b3e2e39.jpg
Thank you guys  :smile:
 
Back
Top Bottom