Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
How can I make it so when a siege happens your troops are fighting inside the town not at the walls.

EX: after you beat them off the walls it says " you must defeat them in the town" then you have a battle in the town.
 
I want to make the town guard that was is the gate to notice us when we near, when we near them, automatically they will say, "Morning/Afternoon/Night, My lord"  :wink:
So I try to take the belligerent drunk code in Mission Template, then i got confuse, where is the code?
    (try_begin),
      (eq, "$g_start_belligerent_drunk_fight", 0),
      (assign, "$g_start_belligerent_drunk_fight", 1),
     
      (try_for_agents, ":cur_agent"),
        (agent_get_troop_id, ":cur_agent_troop", ":cur_agent"),
        (eq, ":cur_agent_troop", "trp_belligerent_drunk"),
        (assign, "$g_belligerent_drunk", ":cur_agent"),
      (try_end),
    (else_try),
      (eq, "$g_start_belligerent_drunk_fight", 1),
         
      (agent_is_active, "$g_belligerent_drunk"),
      (agent_is_alive, "$g_belligerent_drunk"),
      (get_player_agent_no, ":player_agent"),
      (agent_get_position, pos0, ":player_agent"),
      (agent_get_position, pos1, "$g_belligerent_drunk"),
      (get_distance_between_positions, ":dist", pos0, pos1),
      (position_get_z, ":pos0_z", pos0),
      (position_get_z, ":pos1_z", pos1),
      (store_sub, ":z_difference", ":pos1_z", ":pos0_z"),
      (try_begin),
        (le, ":z_difference", 0),
        (val_mul, ":z_difference", -1),
      (try_end),
      (store_mul, ":z_difference_mul_3", ":z_difference", 3),
      (val_add, ":dist", ":z_difference_mul_3"),
      (store_random_in_range, ":random_value", 0, 200),
      (store_add, ":400_plus_random_200", 400, ":random_value"),
      (le, ":dist", ":400_plus_random_200"),
     
  (call_script, "script_activate_tavern_attackers"),
    (start_mission_conversation, "trp_belligerent_drunk"),
    (assign, "$g_start_belligerent_drunk_fight", 2),
    (try_end), 
Or may be the code is on module_dialogue.py?
 
gaham1 said:
How can I make it so when a siege happens your troops are fighting inside the town not at the walls.

EX: after you beat them off the walls it says " you must defeat them in the town" then you have a battle in the town.
Look at the code for the second stage in a town siege attack. It happens in a normal town centre scene and not a siege scene (I bet you ask this because you don't want to do separate siege scenes.)
You basically need to add entry points used in a wall siege battle to the town scene and use that town scene instead of a regular siege scene.

13exa said:
I want to make the town guard that was is the gate to notice us when we near, when we near them, automatically they will say, "Morning/Afternoon/Night, My lord"  :wink:
So I try to take the belligerent drunk code in Mission Template, then i got confuse, where is the code?

Or may be the code is on module_dialogue.py?
Not an answer, but don't do it. The players won't like it and would avoid the guards like a plague. Always let the player decide what he wants to do. Best put it in normal, player-initiated guard dialogs.
 
2 Q's plz...

1: what software makes u read DDS files?

2: how to change the main page back ground (  the one that theres restore game multiplayer exit to windows ) and the pause background (Note : i am using WFAS)
 
MadVader said:
13exa said:
I want to make the town guard that was is the gate to notice us when we near, when we near them, automatically they will say, "Morning/Afternoon/Night, My lord"  :wink:
So I try to take the belligerent drunk code in Mission Template, then i got confuse, where is the code?

Or may be the code is on module_dialogue.py?
Not an answer, but don't do it. The players won't like it and would avoid the guards like a plague. Always let the player decide what he wants to do. Best put it in normal, player-initiated guard dialogs.
What If I do it to make an assassin mod that it was a "must" for player to avoid those guards?  :neutral:

Gambino said:
2 Q's plz...

1: what software makes u read DDS files?

2: how to change the main page back ground (  the one that theres restore game multiplayer exit to windows ) and the pause background (Note : i am using WFAS)
1: You can do it with Paint.NET
But I think GIMP has more option, so I convert the DDS use DDS Converter 2.1 to PNG/BMP, and then edit them use GIMP
2: Not sure If WFaS is same with Warband, I think the main menu texture is main_menu_nord.dds is folder Texture, I'm not sure about this
 
13exa said:
MadVader said:
13exa said:
I want to make the town guard that was is the gate to notice us when we near, when we near them, automatically they will say, "Morning/Afternoon/Night, My lord"  :wink:
So I try to take the belligerent drunk code in Mission Template, then i got confuse, where is the code?

Or may be the code is on module_dialogue.py?
Not an answer, but don't do it. The players won't like it and would avoid the guards like a plague. Always let the player decide what he wants to do. Best put it in normal, player-initiated guard dialogs.
What If I do it to make an assassin mod that it was a "must" for player to avoid those guards?  :neutral:
Then do it only in stealth missions.
The needed code is all there, what you included in the last post.

To make it clear what you need to do in pseudo code:
Write a trigger for your stealth mission
try_for_agents
  #check if it's a guard
  #check if distance to player is less than X
  start_mission_conversation

Add a new guard dialog that will activate only when this happens (see the drunk dialogs for code example), and start a fight there.
 
MadVader said:
13exa said:
MadVader said:
13exa said:
I want to make the town guard that was is the gate to notice us when we near, when we near them, automatically they will say, "Morning/Afternoon/Night, My lord"  :wink:
So I try to take the belligerent drunk code in Mission Template, then i got confuse, where is the code?

Or may be the code is on module_dialogue.py?
Not an answer, but don't do it. The players won't like it and would avoid the guards like a plague. Always let the player decide what he wants to do. Best put it in normal, player-initiated guard dialogs.
What If I do it to make an assassin mod that it was a "must" for player to avoid those guards?  :neutral:
Then do it only in stealth missions.
The needed code is all there, what you included in the last post.

To make it clear what you need to do in pseudo code:
Write a trigger for your stealth mission
try_for_agents
  #check if it's a guard
  #check if distance to player is less than X
  start_mission_conversation

Add a new guard dialog that will activate only when this happens (see the drunk dialogs for code example), and start a fight there.
Thank you, now I little understand, what do I need is what I bold below wasn't it?
(try_begin),
        (eq, "$g_start_belligerent_drunk_fight", 0),
        (assign, "$g_start_belligerent_drunk_fight", 1),
       
        (try_for_agents, ":cur_agent"),
          (agent_get_troop_id, ":cur_agent_troop", ":cur_agent"),
          (eq, ":cur_agent_troop", "trp_belligerent_drunk"),
          (assign, "$g_belligerent_drunk", ":cur_agent"),
        (try_end),
      (else_try),
        (eq, "$g_start_belligerent_drunk_fight", 1),   
             
        (agent_is_active, "$g_belligerent_drunk"),
        (agent_is_alive, "$g_belligerent_drunk"),
        (get_player_agent_no, ":player_agent"),
        (agent_get_position, pos0, ":player_agent"),
        (agent_get_position, pos1, "$g_belligerent_drunk"),
        (get_distance_between_positions, ":dist", pos0, pos1),
        (position_get_z, ":pos0_z", pos0),
        (position_get_z, ":pos1_z", pos1),
        (store_sub, ":z_difference", ":pos1_z", ":pos0_z"),
        (try_begin),
          (le, ":z_difference", 0),
          (val_mul, ":z_difference", -1),
        (try_end),
        (store_mul, ":z_difference_mul_3", ":z_difference", 3),
        (val_add, ":dist", ":z_difference_mul_3"),
        (store_random_in_range, ":random_value", 0, 200),
        (store_add, ":400_plus_random_200", 400, ":random_value"),
        (le, ":dist", ":400_plus_random_200"),

       
        (call_script, "script_activate_tavern_attackers"),
          (start_mission_conversation, "trp_belligerent_drunk"),
          (assign, "$g_start_belligerent_drunk_fight", 2),
      (try_end),
Just need some modifications?  :wink:
 
bisthebis25 said:
What's difference between party and party_templates ? parties are single and parties templates are generals ?
From my syntax thread:
Caba`drin said:
Terminology - Parties and Party Templates
A "party" is any entity on the world map, be that the player's party, bandits and their lairs, NPC lords, or a town/castle/village. The different types of parties are separated into categories in the first party slot "slot_party_type" (or party slot 0--see the discussion of slots below), which contains an integer associated with a certain type. These types are defined in module_constants and begin with the heading spt_* (for slot_party_type). Some examples of spt_* values are spt_kingdom_hero_party (for NPC lords) and spt_castle (...for castles).

Each party has an ID number that it is referenced by in the code. For instance, the player's party is "p_main_party" which has an index value or Party ID of 0. Certain parties have constant or static ID numbers, such as the player's party and all towns, castles and villages. Those parties with static IDs are defined in module_parties. You can see their ID number in the file ID_parties.py after you compile your module.

For all parties NOT defined in module_parties, these are created, dynamically, by the game based on a party_template, in a manner somewhat parallel to the agent/troop division above. These party templates are defined in module_party_templates and have names that are referenced with the prefix "pt_*". The template contains, primarily, a list of troops that are contained in that template and a numeric range that is used to determine how many of each troop type will be given to that template in game (the engine randomly picks a number within that range). A party template can be used to create a new party with the command <spawn_party>. This new party is assigned an ID number and then can be classified with a slot_party_type value, etc. Party templates can also be used with already existing parties...one can add a template (the troops defined in that template) to another party to "reinforce" an existing party in this way.

13exa said:
Gambino said:
2 Q's plz...

1: what software makes u read DDS files?

2: how to change the main page back ground (  the one that theres restore game multiplayer exit to windows ) and the pause background (Note : i am using WFAS)
1: You can do it with Paint.NET
But I think GIMP has more option, so I convert the DDS use DDS Converter 2.1 to PNG/BMP, and then edit them use GIMP
2: Not sure If WFaS is same with Warband, I think the main menu texture is main_menu_nord.dds is folder Texture, I'm not sure about this
You can download a .DDS plugin for the GIMP...no need for a separate converter.

And it is still main_menu_nord.dds for WFaS, and the exit menu is still escape_menu.dds both in the WFaS\Textures\ folder....but you should copy them and put them in your WFaS\Modules\<Mod Name>\Textures\ folder so you don't break the Native textures.

 
I still get no luck  :cry: I modified the mission. but what I did only makes it worse I think

Code:
(
    "village_center",0,-1,
    "village center",
    [(0,mtef_scene_source|mtef_team_0,0,0,1,[]),
     (1,mtef_scene_source|mtef_team_0,0,0,1,[]),
     (2,mtef_scene_source|mtef_team_0,0,0,1,[]),
     (3,mtef_scene_source|mtef_team_0,0,0,1,[]),
     (4,mtef_scene_source|mtef_team_0,0,0,1,[]),
     (5,mtef_scene_source|mtef_team_0,0,0,1,[]),
     (6,mtef_scene_source|mtef_team_0,0,0,1,[]),
     (7,mtef_scene_source|mtef_team_0,0,0,1,[]),
     
     (44,mtef_visitor_source,0,0,1,[]),
     (8,mtef_visitor_source,af_override_horse,0,1,[]),
     (9,mtef_visitor_source,0,0,1,[]),(10,mtef_visitor_source,0,0,1,[]),(11,mtef_visitor_source,0,0,1,[]),(12,mtef_visitor_source,0,0,1,[]),(13,mtef_visitor_source,0,0,1,[]),(14,mtef_visitor_source,0,0,1,[]),(15,mtef_visitor_source,0,0,1,[]),
     (16,mtef_visitor_source,0,0,1,[]),(17,mtef_visitor_source,0,0,1,[]),(18,mtef_visitor_source,0,0,1,[]),(19,mtef_visitor_source,0,0,1,[]),(20,mtef_visitor_source,0,0,1,[]),(21,mtef_visitor_source,0,0,1,[]),(22,mtef_visitor_source,0,0,1,[]),(23,mtef_visitor_source,0,0,1,[]),
     (24,mtef_visitor_source,0,0,1,[]),(25,mtef_visitor_source,0,0,1,[]),(26,mtef_visitor_source,0,0,1,[]),(27,mtef_visitor_source,0,0,1,[]),(28,mtef_visitor_source,0,0,1,[]),(29,mtef_visitor_source,0,0,1,[]),(30,mtef_visitor_source,0,0,1,[]),(31,mtef_visitor_source,0,0,1,[]),
     (32,mtef_visitor_source,0,0,1,[]),(33,mtef_visitor_source,0,0,1,[]),(34,mtef_visitor_source,0,0,1,[]),(35,mtef_visitor_source,0,0,1,[]),(36,mtef_visitor_source,0,0,1,[]),(37,mtef_visitor_source,0,0,1,[]),(38,mtef_visitor_source,0,0,1,[]),(39,mtef_visitor_source,0,0,1,[]),
     (40,mtef_visitor_source,0,0,1,[]),(41,mtef_visitor_source,0,0,1,[]),(42,mtef_visitor_source,0,0,1,[]),(43,mtef_visitor_source,0,0,1,[]),(44,mtef_visitor_source,0,0,1,[]),(45,mtef_visitor_source,0,0,1,[]),(46,mtef_visitor_source,0,0,1,[]),(47,mtef_visitor_source,0,0,1,[]),
     ],
    [
      (1, 0, ti_once, [], [
          (store_current_scene, ":cur_scene"),
          (scene_set_slot, ":cur_scene", slot_scene_visited, 1),
          (entry_point_get_position, pos1, 44),
                     (set_spawn_position, pos1),
                     (spawn_horse, "itm_hunter", 0),                    
	      (call_script, "script_music_set_situation_with_culture", mtf_sit_travel),
        ]),
	  (ti_before_mission_start, 0, 0, [], [(call_script, "script_change_banners_and_chest")]),
      (ti_inventory_key_pressed, 0, 0, [(set_trigger_result,1)], []),
      (ti_tab_pressed, 0, 0, [(try_begin),
                                (check_quest_active, "qst_hunt_down_fugitive"),
                                (neg|check_quest_succeeded, "qst_hunt_down_fugitive"),
                                (neg|check_quest_failed, "qst_hunt_down_fugitive"),
                                (quest_slot_eq, "qst_hunt_down_fugitive", slot_quest_current_state, 1),
                                (try_begin),
                                  (call_script, "script_cf_troop_agent_is_alive", "trp_fugitive"),
                                  (call_script, "script_fail_quest", "qst_hunt_down_fugitive"),
                                (else_try),
                                  (call_script, "script_succeed_quest", "qst_hunt_down_fugitive"),
                                (try_end),
                              (try_end),
                              (set_trigger_result,1)], []),
      (ti_on_leave_area, 0, 0, [
          (try_begin),
            (assign,"$g_leave_town",1),
          (try_end),
          ], []),
      (3, 0, 0, [(call_script, "script_tick_town_walkers")], []),
      (2, 0, 0, [(call_script, "script_center_ambiance_sounds")], []),

      (1, 0, ti_once, [(check_quest_active, "qst_hunt_down_fugitive"),
                       (neg|check_quest_succeeded, "qst_hunt_down_fugitive"),
                       (neg|check_quest_failed, "qst_hunt_down_fugitive"),
                       (quest_slot_eq, "qst_hunt_down_fugitive", slot_quest_current_state, 1),
                       (assign, ":not_alive", 0),
                       (try_begin),
                         (call_script, "script_cf_troop_agent_is_alive", "trp_fugitive"),
                       (else_try),
                         (assign, ":not_alive", 1),
                       (try_end),
                       (this_or_next|main_hero_fallen),
                       (eq, ":not_alive", 1),
                       ],
       [(try_begin),
          (main_hero_fallen),
          (jump_to_menu, "mnu_village_hunt_down_fugitive_defeated"),
          (call_script, "script_fail_quest", "qst_hunt_down_fugitive"),
          (finish_mission, 4),
        (else_try),
          (call_script, "script_change_player_relation_with_center", "$current_town", -2),
          (call_script, "script_succeed_quest", "qst_hunt_down_fugitive"),
        (try_end),
        ]),
    ],
  ),
 
I try to test my "avoiding" guard trigger, but It didn't go well  :???:
(try_for_agents, ":cur_agent"),
(try_for_range, ":town_guard", regular_troops_begin, regular_troops_end),  
  (agent_get_troop_id, ":cur_agent_troop", ":cur_agent"),
        (eq, ":cur_agent_troop", ":town_guard"),
        (assign, "$g_town_guard", ":cur_agent"),
      (try_end),

        (agent_is_active, "$g_town_guard"),
      (agent_is_alive, "$g_town_guard"),
      (get_player_agent_no, ":player_agent"),
      (agent_get_position, pos0, ":player_agent"),
      (agent_get_position, pos1, "$g_town_guard"),
      (get_distance_between_positions, ":dist", pos0, pos1),
      (position_get_z, ":pos0_z", pos0),
      (position_get_z, ":pos1_z", pos1),
      (store_sub, ":z_difference", ":pos1_z", ":pos0_z"),
      (try_begin),
        (le, ":z_difference", 0),
        (val_mul, ":z_difference", -1),
      (try_end),
      (store_mul, ":z_difference_mul_3", ":z_difference", 3),
      (val_add, ":dist", ":z_difference_mul_3"),
      (store_random_in_range, ":random_value", 0, 200),
      (store_add, ":400_plus_random_200", 400, ":random_value"),
      (le, ":dist", ":400_plus_random_200"),
  (jump_to_menu,"mnu_town"),
I test them, so If the trigger is working, I will throwed automatically when I approach the guard to mnu_town, but when I test, I doesn't throwed up, What is wrong?  :???:
 
I continue modifying my copy of salt mine. New mission template works fine. I added town walkers, a guard and a new merchant. However merchant sells nothing. How can I define the goods?
 
Used the search function but couldn't see any applicable results, so apologies if this has already been answered somewhere.

*Humbly asks*

Where in the module system are item modifiers and their changes to the items stored? Or is this hardcoded and thus uneditable?

Thanks.
 
KeithGB said:
Used the search function but couldn't see any applicable results, so apologies if this has already been answered somewhere.

*Humbly asks*

Where in the module system are item modifiers and their changes to the items stored? Or is this hardcoded and thus uneditable?

Thanks.
Yes, they are hardcoded and uneditable.
You can find a list in header_item_modifiers.py; see also header_items.py

As for their effects, they aren't listed anywhere in the module system. See the M&B Wikia.

(Merged to the Q&A thread)

Gergin Adam said:
I continue modifying my copy of salt mine. New mission template works fine. I added town walkers, a guard and a new merchant. However merchant sells nothing. How can I define the goods?
Search module_scripts for the various refresh_X scripts that fill merchant inventories. For best results, add your merchant in the range of the other merchants so it is automatically included in the loop.

13exa said:
I try to test my "avoiding" guard trigger, but It didn't go well  :???:

I test them, so If the trigger is working, I will throwed automatically when I approach the guard to mnu_town, but when I test, I doesn't throwed up, What is wrong?  :???:
Let's step through what you've got here:

Code:
(try_for_agents, ":cur_agent"),
    (try_for_range, ":town_guard", regular_troops_begin, regular_troops_end), ##this loops through all troops and then checks  if the agent is of that troop template
        (agent_get_troop_id, ":cur_agent_troop", ":cur_agent"), ##...but there's no need to loop at all...just test with (is_between)
        (eq, ":cur_agent_troop", ":town_guard"),
        (assign, "$g_town_guard", ":cur_agent"), ##since you don't initialize $g_town_guard, unless you do out of the loop, this could hold an erroneous value
    (try_end),

    (agent_is_active, "$g_town_guard"),
    (agent_is_alive, "$g_town_guard"),
    (get_player_agent_no, ":player_agent"), ##no need to do this every time--move out of the loop
    (agent_get_position, pos0, ":player_agent"), ##ditto
    (agent_get_position, pos1, "$g_town_guard"),
    (get_distance_between_positions, ":dist", pos0, pos1),
    (position_get_z, ":pos0_z", pos0),
    (position_get_z, ":pos1_z", pos1),
    (store_sub, ":z_difference", ":pos1_z", ":pos0_z"),
    (try_begin),
        (le, ":z_difference", 0),
        (val_mul, ":z_difference", -1),
    (try_end),
    (store_mul, ":z_difference_mul_3", ":z_difference", 3),
    (val_add, ":dist", ":z_difference_mul_3"),
    (store_random_in_range, ":random_value", 0, 200),
    (store_add, ":400_plus_random_200", 400, ":random_value"),
    (le, ":dist", ":400_plus_random_200"),
    (jump_to_menu,"mnu_town"), ##i don't think jump_to_menu will work correctly in a mission without you using change_screen or otherwise ending the mission
##unless you just didn't include it, you're missing the (try_end) that makes this actually loop through multiple agents.

I think you want something like:
Code:
(get_player_agent_no, ":player_agent"),
(agent_get_position, pos0, ":player_agent"),
(assign, "$g_town_guard", -1),
(try_for_agents, ":cur_agent"),
    (neq, "$g_town_guard", -1), ##if that variable is needed and you just want to track the first applicable troop found--loop break
    (agent_get_troop_id, ":cur_agent_troop", ":cur_agent"),
    (is_between, ":cur_agent_troop", regular_troops_begin, regular_troops_end),

    (agent_get_position, pos1, ":cur_agent"),
    (get_distance_between_positions, ":dist", pos0, pos1),
    (position_get_z, ":pos0_z", pos0),
    (position_get_z, ":pos1_z", pos1),
    (store_sub, ":z_difference", ":pos1_z", ":pos0_z"),
    (try_begin),
        (le, ":z_difference", 0),
        (val_mul, ":z_difference", -1),
    (try_end),
    (store_mul, ":z_difference_mul_3", ":z_difference", 3),
    (val_add, ":dist", ":z_difference_mul_3"),
    (store_random_in_range, ":random_value", 0, 200),
    (store_add, ":400_plus_random_200", 400, ":random_value"),
    (le, ":dist", ":400_plus_random_200"),
    (display_message, "@Pass"),
    (assign, "$g_town_guard", ":cur_agent"), #if you need "$g_town_guard"
(try_end),
 
I'm stumped on this error right now.

Code:
order_volley_triggers = [
    (ti_before_mission_start,0,0,[],[(assign, "$volley", 0)]),

    (ti_on_agent_spawn,0,0,[
	   (store_trigger_param_1, ":cur_agent"),
	   (agent_get_class, ":cur_class", ":cur_agent"),
	   (agent_set_slot, ":cur_agent", slot_agent_volley_group, -1),
	   (eq, ":cur_class", grc_archers),
	   
       (get_player_agent_no, ":player_agent"),
	   (agent_get_team, ":player_team", ":player_agent"),
	   (agent_get_team, ":cur_team", ":cur_agent"),
	   (eq, ":cur_team", ":player_team"),
	],[
	   (store_trigger_param_1, ":cur_agent"),
	   
	   (assign, ":count", 0),
	   (try_for_agents, ":agent"),
	      (agent_is_alive, ":agent"),
	      (agent_get_class, ":cur_class", ":agent"),
		  (eq, ":cur_class", grc_archers),
		  
          (get_player_agent_no, ":player_agent"),
	      (agent_get_team, ":player_team", ":player_agent"),
	      (agent_get_team, ":cur_team", ":cur_agent"),
	      (eq, ":cur_team", ":player_team"),
		  
		  (val_add, ":count", 1),
       (try_end),
	   
	   (val_mod, ":count", 3),
	   
	   (try_begin),
	      (eq, ":count", 0),
          (agent_set_slot, ":cur_agent", slot_agent_volley_group, 0),
	   (else_try),
	      (eq, ":count", 1),
	      (agent_set_slot, ":cur_agent", slot_agent_volley_group, 1),
	   (else_try),
	      (agent_set_slot, ":cur_agent", slot_agent_volley_group, 2),
       (try_end),
	]),
	
    (0, 0, 1, [(key_clicked, key_for_volley)],[
       (get_player_agent_no, ":player_agent"),
	   (agent_get_team, ":player_team", ":player_agent"),
		   
	   (try_begin),
          (eq, "$volley", 0),
	      (assign, "$volley", 1),
		  
          (reset_mission_timer_a),
          (reset_mission_timer_b),
          (reset_mission_timer_c),
	   (else_try),
          (eq, "$volley", 1),
	 	  (assign, "$volley", 0),
       (try_end),
	]),
	
    (0, 0, 0, [(eq, "$volley", 1)],[
       (get_player_agent_no, ":player_agent"),
       (agent_get_team, ":player_team", ":player_agent"),
	   
       (store_mission_timer_a, ":volley_time_group_0"),
       (store_mission_timer_b, ":volley_time_group_1"),
       (store_mission_timer_c, ":volley_time_group_2"),
	   
	   (try_for_agents, ":agent"),
	      (agent_is_alive, ":agent"),
	      (agent_get_slot, ":volley_group", ":agent", slot_agent_volley_group),
		  
          (try_begin),
		     (is_between, ":volley_time_group_0", 2, 10),
             (eq, ":volley_group", 0),
             (agent_set_animation, ":agent", "anim_stand_crossbow"),
          (else_try),
		     (is_between, ":volley_time_group_1", 2, 10),
             (eq, ":volley_group", 1),
             (agent_set_animation, ":agent", "anim_stand_crossbow"),
          (else_try),
		     (is_between, ":volley_time_group_2", 2, 10),
             (eq, ":volley_group", 2),
             (agent_set_animation, ":agent", "anim_stand_crossbow"),
          (end_try),
       (try_end),
	   
	   (store_add, ":offset1", ":volley_time_group_0", ":volley_time_group_1"),
	   (val_abs, ":offset1"),
	   (store_sub, ":offset2", ":volley_time_group_1", ":volley_time_group_2"),
	   (val_abs, ":offset2"),
	   
       (try_begin),
          (eq, ":volley_time_group_0", 10),
          (reset_mission_timer_a),
       (else_try),
	      (eq, ":offset1", 5),
          (eq, ":volley_time_group_1", 10),
          (reset_mission_timer_b),
       (else_try),
	      (eq, ":offset2", 5),
          (eq, ":volley_time_group_2", 10),
          (reset_mission_timer_c),
       (end_try),
    ]),
  ]

Code:
Initializing...
Compiling all global variables...
Error in mission template:
('lead_charge', 2, 8, 'You lead your men to battle.', [(1, 4160, 0, 16, 12, []),
 (0, 4160, 0, 16, 0, []), (4, 8320, 0, 16, 12, []), (4, 8320, 0, 16, 0, [])], [(
-25.0, 0, 0, [], [(2071, ':agent_no'), (1, 'script_agent_reassign_team', ':agent
_no')]), [(-19.0, 0, 0, [], [(2133, '$volley', 0)]), (-25.0, 0, 0, [(2071, ':cur
_agent'), (1772, ':cur_class', ':cur_agent'), (505, ':cur_agent', 33, -1), (31,
':cur_class', 1), (1700, ':player_agent'), (1770, ':player_team', ':player_agent
'), (1770, ':cur_team', ':cur_agent'), (31, ':cur_team', ':player_team')], [(207
1, ':cur_agent'), (2133, ':count', 0), (12, ':agent'), (1702, ':agent'), (1772,
':cur_class', ':agent'), (31, ':cur_class', 1), (1700, ':player_agent'), (1770,
':player_team', ':player_agent'), (1770, ':cur_team', ':cur_agent'), (31, ':cur_
team', ':player_team'), (2105, ':count', 1), 3, (2109, ':count', 3), 4, (31, ':c
ount', 0), (505, ':cur_agent', 33, 0), 5, (31, ':count', 1), (505, ':cur_agent',
 33, 1), 5, (505, ':cur_agent', 33, 2), 3]), (0, 0, 1, [(71, 66)], [(1700, ':pla
yer_agent'), (1770, ':player_team', ':player_agent'), 4, (31, '$volley', 0), (21
33, '$volley', 1), 2375, 2376, 2377, 5, (31, '$volley', 1), (2133, '$volley', 0)
, 3]), (0, 0, 0, [(31, '$volley', 1)], [(1700, ':player_agent'), (1770, ':player
_team', ':player_agent'), (2370, ':volley_time_group_0'), (2371, ':volley_time_g
roup_1'), (2372, ':volley_time_group_2'), (12, ':agent'), (1702, ':agent'), (525
, ':volley_group', ':agent', 33), 4, (33, ':volley_time_group_0', 2, 10), (31, '
:volley_group', 0), (1740, ':agent', 'anim_stand_crossbow'), 5, (33, ':volley_ti
me_group_1', 2, 10), (31, ':volley_group', 1), (1740, ':agent', 'anim_stand_cros
sbow'), 5, (33, ':volley_time_group_2', 2, 10), (31, ':volley_group', 2), (1740,
 ':agent', 'anim_stand_crossbow'), 3, 3, (2120, ':offset1', ':volley_time_group_
0', ':volley_time_group_1'), (2113, ':offset1'), (2121, ':offset2', ':volley_tim
e_group_1', ':volley_time_group_2'), (2113, ':offset2'), 4, (31, ':volley_time_g
roup_0', 10), 2375, 5, (31, ':offset1', 5), (31, ':volley_time_group_1', 10), 23
76, 5, (31, ':offset2', 5), (31, ':volley_time_group_2', 10), 2377, 3])], (-21.0
, 0, 0, [], [4, (31, '$battle_won', 1), (1, 'script_count_mission_casualties_fro
m_agents'), (1907, 0), 5, (1, 'script_cf_check_enemies_nearby'), (1121, 'str_do_
you_want_to_retreat'), 5, (1106, 'str_can_not_retreat'), 3]), (-8, 0, 0, [], [(2
071, ':answer'), (31, ':answer', 0), (2133, '$pin_player_fallen', 0), 4, (2370,
':elapsed_time'), (32, ':elapsed_time', 20), (2320, 5, 'str_retreat'), (1, 'scri
pt_simulate_retreat', 10, 20), 3, (1, 'script_count_mission_casualties_from_agen
ts'), (1907, 0)]), (-19.0, 0, 0, [], [(1796, 0, 2, 1), (1796, 1, 3, 1), (1, 'scr
ipt_place_player_banner_near_inventory_bms')]), (0, 0, 100000000.0, [], [(2133,
'$battle_won', 0), (2133, '$defender_reinforcement_stage', 0), (2133, '$attacker
_reinforcement_stage', 0), (2133, '$g_presentation_battle_active', 0), (1, 'scri
pt_place_player_banner_near_inventory'), (1, 'script_combat_music_set_situation_
with_culture')]), (30, 0, 0, [], [(1, 'script_combat_music_set_situation_with_cu
lture')]), (2, 0, 0, [], [(1, 'script_check_friendly_kills')]), (1, 0, 5, [(2147
483678L, '$defender_reinforcement_stage', 2), (2370, ':mission_time'), (30, ':mi
ssion_time', 10), (2385, ':num_defenders', 0), (2147483678L, ':num_defenders', 6
)], [(1930, 0, 7), (2105, '$defender_reinforcement_stage', 1)]), (1, 0, 5, [(214
7483678L, '$attacker_reinforcement_stage', 2), (2370, ':mission_time'), (30, ':m
ission_time', 10), (2385, ':num_attackers', 1), (2147483678L, ':num_attackers',
6)], [(1930, 3, 7), (2105, '$attacker_reinforcement_stage', 1)]), (1, 60, 100000
000.0, [(2370, 72057594037927937L), (30, 72057594037927937L, 10), (1003, 5), (21
47484654L, 0), (1906, 1), (1106, 'str_msg_battle_won'), (2133, '$battle_won', 1)
, (2133, '$g_battle_result', 1), (1, 'script_play_victorious_sound')], [(1, 'scr
ipt_count_mission_casualties_from_agents'), (1907, 1)]), (10, 0, 0, [], [(31, '$
battle_won', 1), (1106, 'str_msg_battle_won')]), (1, 4, 100000000.0, [1006], [(2
133, '$pin_player_fallen', 1), (2320, 5, 'str_retreat'), (1, 'script_simulate_re
treat', 10, 20), (2133, '$g_battle_result', -1), (1906, -1), (1, 'script_count_m
ission_casualties_from_agents'), (1907, 0)]), (-22.0, 0, 0, [], [(1106, 'str_use
_baggage_for_inventory')]), (0, 0, 100000000.0, [(2370, ':mission_time'), (30, '
:mission_time', 2)], [(1, 'script_select_battle_tactic'), (1, 'script_battle_tac
tic_init')]), (5, 0, 0, [(2370, ':mission_time'), (30, ':mission_time', 3), (1,
'script_battle_tactic_apply')], []), (0, 0, 0, [], [(73, 20), (900, 'prsnt_battl
e')]), (0.10000000000000001, 0, 0, [], [(31, '$g_presentation_battle_active', 1)
, (1, 'script_update_order_panel_statistics_and_map')])])
Exporting strings...
Exporting skills...
Exporting tracks...
Exporting animations...
Exporting meshes...
Exporting sounds...
Exporting skins...
Exporting map icons...
Creating new tag_uses.txt file...
Creating new quick_strings.txt file...
Exporting faction data...
Exporting item data...
Exporting scene data...
Exporting troops data
Exporting particle data...
Exporting scene props...
Exporting tableau materials data...
Exporting presentations...
Exporting party_template data...
Exporting parties
Exporting quest data...
Exporting scripts...
Exporting mission_template data...
Traceback (most recent call last):
  File "process_mission_tmps.py", line 64, in <module>
    save_mission_templates(variables,variable_uses,tag_uses,quick_strings)
  File "process_mission_tmps.py", line 48, in save_mission_templates
    save_triggers(file,convert_to_identifier(mission_template[mission_template_n
ame_pos]), mission_template[mission_template_triggers_pos],variables,variable_us
es,tag_uses,quick_strings)
  File "process_mission_tmps.py", line 21, in save_triggers
    file.write("%f %f %f "%(trigger[trigger_check_pos],trigger[trigger_delay_pos
],trigger[trigger_rearm_pos]))
TypeError: float argument required, not tuple
Exporting game menus data...
exporting simple triggers...
exporting triggers...
exporting dialogs...
Checking global variable usages...
WARNING: Global variable never used: training_fight_won
WARNING: Global variable never used: g_village_raid_evil
WARNING: Global variable never used: g_siege_sallied_out_once
WARNING: Global variable never used: g_arena_training_max_opponents
WARNING: Global variable never used: tutorial_1_finished
WARNING: Global variable never used: tutorial_2_finished
WARNING: Global variable never used: tutorial_3_finished
WARNING: Global variable never used: tutorial_4_finished
WARNING: Global variable never used: tutorial_5_finished
WARNING: Global variable never used: g_training_ground_training_num_gourds_to_de
stroy
WARNING: Global variable never used: g_training_ground_ranged_distance

______________________________

Script processing has ended.
Press any key to exit. . .
 
Your error is in "lead_charge", as the error report says, but you pasted some code from some triggers here.
Check your "lead_charge". I'm guessing you want to do this, but messed the syntax:
Code:
  (
    "lead_charge",mtf_battle_mode|mtf_synch_inventory,charge,
    "You lead your men to battle.",
    [
     (1,mtef_defenders|mtef_team_0,0,aif_start_alarmed,12,[]),
     (0,mtef_defenders|mtef_team_0,0,aif_start_alarmed,0,[]),
     (4,mtef_attackers|mtef_team_1,0,aif_start_alarmed,12,[]),
     (4,mtef_attackers|mtef_team_1,0,aif_start_alarmed,0,[]),
     ],
    order_volley_triggers + [
      (ti_on_agent_spawn, 0, 0, [],
...
 
I just put order_volley_triggers, in the trigger section of the mission_template, but you are saying that I need to append my triggers onto the trigger section?
 
ithilienranger said:
I just put order_volley_triggers, in the trigger section of the mission_template, but you are saying that I need to append my triggers onto the trigger section?
Correct. You cannot put a list within the trigger list in the module system. You need to append it to the general trigger list with + . Either at the beginning, or the end.
 
See if you don't have abundance in your weapons does that mean it doesn't appear in the shops. I know merchandise makes it appear in the shops but if you don't add abundance does that mean there is no chance of it appear so it will never be there.
 
Status
Not open for further replies.
Back
Top Bottom