OSP Kit MP Arch3r OS: Invasion mode - New expanded code being developed

Currently viewing this thread:

Arch3r

Count
M&BWBNW
New code is being developed.

Feature list:
  • Wave spawning
  • Random wave generation
  • Siege equipment support by AI (Siege towers, ladders)
  • Advanced AI (shooting positions, defending gaps, less clustering)
  • Boss generation (name, random abilities)
  • Presentations
  • Scenes LOOKING FOR SCENERS
 

Arch3r

Count
M&BWBNW
THIS IS THE OLD ORIGINAL POST/CODE, SAVED AS BACKUP. FIRST POST WILL HAVE ALL THE CODE YOU NEED, ONCE DONE.

Originally made for The Battle for Calradia, I decided to make them open source. These scripts give your mod a new gamemode, called Invasion. In this gamemode the key is to survive as long as possible against hordes of bots.
Thread of the original mod: http://forums.taleworlds.com/index.php/topic,100090.0.html

Altered files:
-----------------------------------------------------------------------
Header_commons

Search for:
Code:
#multiplayer game type indices
Change:
Code:
multiplayer_num_game_types                   = 7
to:
Code:
multiplayer_game_type_invasion               = 7 #tBfC
multiplayer_num_game_types                   = 8 #tBfC
-----------------------------------------------------------------------
Header_troops

Search for:
Code:
str_30           = bignum | 0x0000001e
Add under that line:
Code:
str_90           = bignum | 0x0000005A #tBfC edit
str_200          = bignum | 0x0000008C #tBfC edit
-----------------------------------------------------------------------
Module_constants

Search for:
Code:
slot_player_spawn_count                        = 39
Add under that line:
Code:
##FuIn
slot_FuIn_respawn                 = 50
##tBfC

Than search for:
Code:
#revolts -- notes for self
#type 1 -- minor revolt, aimed at negotiating change without changing the ruler
#type 2 -- alternate ruler revolt (ie, pretender, chinese dynastic revolt -- keep the same polity but switch the ruler)
	#subtype -- pretender (keeps the same dynasty)
	#"mandate of heaven" -- same basic rules, but a different dynasty
	#alternate/religious
	#alternate/political
#type 3 -- separatist revolt
	# reGonalist/dynastic (based around an alternate ruling house
	# regionalist/republican
	# messianic (ie, Canudos)
Add under that line:
Code:
##Invasion FuIn invader slots##
slot_faction_invader_1 = 200
slot_faction_invader_2 = 201
slot_faction_invader_3 = 202
slot_faction_invader_4 = 203
slot_faction_invader_5 = 204
slot_faction_invader_6 = 205
slot_faction_invader_7 = 206
slot_faction_invader_8 = 207
slot_faction_invader_9 = 208
slot_faction_invader_10 = 209
slot_faction_invader_11 = 210
slot_faction_invader_12 = 211
slot_faction_invader_13 = 212

slot_faction_boss_1 = 221
slot_faction_boss_2 = 222
slot_faction_boss_3 = 223
slot_faction_boss_4 = 224
slot_faction_boss_5 = 225
slot_faction_boss_6 = 226
slot_faction_boss_7 = 227
slot_faction_boss_8 = 228
slot_faction_boss_9 = 229
slot_faction_boss_minion_1 = 231
slot_faction_boss_minion_2 = 232
slot_faction_boss_minion_3 = 233
slot_faction_boss_minion_4 = 234
slot_faction_boss_minion_5 = 235
slot_faction_boss_minion_6 = 236
slot_faction_boss_minion_7 = 237
slot_faction_boss_minion_8 = 238
slot_faction_boss_minion_9 = 239

slot_faction_challenge_1 = 241
slot_faction_challenge_2 = 242
slot_faction_challenge_3 = 243
slot_faction_challenge_4 = 244
slot_faction_challenge_5 = 245
slot_faction_challenge_6 = 246
slot_faction_challenge_7 = 247
slot_faction_challenge_8 = 248
slot_faction_challenge_9 = 249

slot_player_profile_gender = 255

slot_invasion_chest_open = 10
##FuIn end
-----------------------------------------------------------------------
Module_factions

Search for:
Code:
  ("kingdom_6",  "Sarranid Sultanate",  0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0xDDDD33),
Add under that line:
Code:
##tBfC##
  ("kingdom_invaders",  "Invaders",  0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x888888),
##tBfC##
-----------------------------------------------------------------------

Module_mission_templates
Search for:
Code:
multiplayer_server_spawn_bots = (
Do the following two times. Search for:
Code:
       (this_or_next|eq, "$g_multiplayer_game_type", multiplayer_game_type_battle),
Add under that:
Code:
   ##tBfC##
       (this_or_next|eq, "$g_multiplayer_game_type", multiplayer_game_type_invasion),
   ##tBfC##
----
Search for:
Code:
       (else_try),
          (this_or_next|eq, "$g_multiplayer_game_type", multiplayer_game_type_battle),
          (eq, "$g_multiplayer_game_type", multiplayer_game_type_destroy),
      
          (try_begin),
            (eq, ":selected_team", 0),
            (assign, reg0, 0),
          (else_try),
            (assign, reg0, 32),
          (try_end),
       (else_try),
          (call_script, "script_multiplayer_find_spawn_point", ":selected_team", 0, ":is_horseman"), 
        (try_end),

And change it to:
Code:
        (else_try),
          (this_or_next|eq, "$g_multiplayer_game_type", multiplayer_game_type_battle),
          (eq, "$g_multiplayer_game_type", multiplayer_game_type_destroy),
      
          (try_begin),
            (eq, ":selected_team", 0),
            (assign, reg0, 0),
          (else_try),
            (assign, reg0, 32),
          (try_end),
    ##tBfC##
        (else_try),
          (eq, "$g_multiplayer_game_type", multiplayer_game_type_invasion),

          (try_begin),
            (eq, ":selected_team", 0),
            (store_random_in_range, reg0, 0, 2),
          (else_try),
            (store_random_in_range, reg0, 32, 40),
          (try_end),
    ##tBfC##
        (else_try),
          (call_script, "script_multiplayer_find_spawn_point", ":selected_team", 0, ":is_horseman"), 
        (try_end),
--------
Search for:
Code:
multiplayer_server_check_end_map = (

Do the following 2 times:
Search for:
Code:
      (this_or_next|eq, "$g_multiplayer_game_type", multiplayer_game_type_battle),
Add under that:
Code:
   ##tBfC##
       (this_or_next|eq, "$g_multiplayer_game_type", multiplayer_game_type_invasion),
   ##tBfC##

------
Add under:
Code:
(neq, "$g_multiplayer_game_type", multiplayer_game_type_battle),
This:
Code:
    ##tBfC##    
      (neq, "$g_multiplayer_game_type", multiplayer_game_type_invasion), #battle mod has different end map condition by time
    ##tBfC##
-------

See the following post for the rest:
Download the following .rar, it contains the maps and a text file. Link: http://www.filefront.com/16353753/invasion.rar
NEW UPDATED CODE, REPLACED THE TXT IN THE RAR: http://www.mediafire.com/?rma6vmrkd2uafeh

The invasion_code.txt file contains the code for the actual gamemode.
Reason for this is that it didn't fit in a post, due to the 40000 character-limit.

Search for:
Code:
  (
	"bandit_lair",mtf_battle_mode,charge,
    "Ambushing a bandit lair",
Add above that the gamemode code in the .txt (warning, huge!):
 

Arch3r

Count
M&BWBNW
--------------------------------------------------------------------
Module_presentations

Do the following 6 times!
Search for:
Code:
        (this_or_next|eq, "$g_multiplayer_game_type", multiplayer_game_type_battle),
Add under that:
Code:
      #tBfC
        (this_or_next|eq, "$g_multiplayer_game_type", multiplayer_game_type_invasion),
      #tBfC
Search for:
Code:
          (neq, "$g_multiplayer_game_type", multiplayer_game_type_battle),
Add under that:
Code:
       #tBfC
          (neq, "$g_multiplayer_game_type", multiplayer_game_type_invasion),
       #tBfC
--------------------------------------------------------------------
Module_scenes

Search for:
Code:
  ("random_multi_steppe_large", sf_generate|sf_randomize|sf_auto_entry_points, "none", "none", (0,0),(100, 100), -0.5, "0x000000012a00d8630009fe7f0004406900002920001e4f81",
    [],[], "outer_terrain_steppe"),
Add under that:
Code:
##tBfC
  ("tbfc_invasion_1",sf_generate,"none", "none", (0,0),(100,100),-100,"0x00000000300005000005ad7400005ab600002ab200004262",
    [],[],"outer_terrain_plain"), 
  ("tbfc_invasion_2",sf_generate,"none", "none", (0,0),(100,100),-100,"0x30054da28004050000005a76800022aa00002e3b",
    [],[],"outer_terrain_plain"), 
  ("tbfc_invasion_3",sf_generate,"none", "none", (0,0),(100,100),-100,"0x00000000300005000005ad7400005ab600002ab200004262 ",
    [],[],"outer_terrain_plain"), 
  ("tbfc_invasion_4",sf_generate,"none", "none", (0,0),(100,100),-100,"0x00000000300005000005ad7400005ab600002ab200004262 ",
    [],[],"outer_terrain_plain"), 
  ("tbfc_invasion_5",sf_generate,"none", "none", (0,0),(100,100),-100,"0x00000000300005000005ad7400005ab600002ab200004262 ",
    [],[],"outer_terrain_plain"), 
  ("tbfc_invasion_6",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000024003d7d20007d1f40000374100001e120000097b ",
    [],[],"outer_terrain_plain"), 
  ("tbfc_invasion_7",sf_generate,"none", "none", (0,0),(100,100),-100,"0x0000000140029bbc0006799b000009cb0000720000006555 ",
    [],[],"outer_terrain_plain"), 
  ("tbfc_invasion_8",sf_generate,"none", "none", (0,0),(100,100),-100,"0xa00363638005c16d00003c82000037e000002303",
    [],[],"outer_terrain_plain"),   
  ("tbfc_invasion_9",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000024003d7d20007d1f40000374100001e120000097b",
    [],[],"outer_terrain_desert"),   
##tBfC
--------------------------------------------------------------------
Module_strings

Search for:
Code:
  ("multi_scene_15", "Random Steppe (Large)"),
Add under that:
Code:
##tBfC The Battle for Calradia##
  ("tbfc_invasion_1", "Pass of Thermopylae"), 
  ("tbfc_invasion_2", "The Countryside"), 
  ("tbfc_invasion_3", "The Hill"), 
  ("tbfc_invasion_4", "Deep Forest"), 
  ("tbfc_invasion_5", "The Castle"), 
  ("tbfc_invasion_6", "Dungeons"), 
  ("tbfc_invasion_7", "The Pit"), 
  ("tbfc_invasion_8", "Helms Deep"), 
  ("tbfc_invasion_9", "The Island"), 

##tBfC The Battle for Calradia##

Search for:
Code:
  ("multi_game_type_7", "Siege"),
Add under that:
Code:
  ("multi_game_type_8", "Invasion"), ##tBfC


--------------------------------------------------------------------
Module_scripts
Do the following 4 times:
Search for:
Code:
           (this_or_next|eq, "$g_multiplayer_game_type", multiplayer_game_type_battle),
Add under that:
Code:
## tBfC ##
           (this_or_next|eq, "$g_multiplayer_game_type", multiplayer_game_type_invasion),
## tBfC ##
----
Do the following 3 times:
Search for:
Code:
       (neq, "$g_multiplayer_game_type", multiplayer_game_type_battle),
Add under that:
Code:
## tBfC ##
       (neq, "$g_multiplayer_game_type", multiplayer_game_type_invasion),
## tBfC ##
----
Do the following 6 times:
Search for:
Code:
         (neq, ":mission_template_id", "mt_multiplayer_bt"),
Add under that:
Code:
##tBfC##
         (neq, ":mission_template_id", "mt_multiplayer_iv"),
##tBfC##
----
Do the following 1 time:
Search for:
Code:
     (else_try),
       (eq, ":game_type", multiplayer_game_type_battle),
       (assign, ":selected_mt", "mt_multiplayer_bt"),
Add under that:
Code:
##tBfC##
     (else_try),
       (eq, ":game_type", multiplayer_game_type_invasion),
       (assign, ":selected_mt", "mt_multiplayer_iv"),
##tBfC##
----

Search for:
Code:
      (this_or_next|eq, "$g_multiplayer_game_type", multiplayer_game_type_battle),
Add under that:
Code:
    ##tBfC ##
       (this_or_next|eq, "$g_multiplayer_game_type", multiplayer_game_type_invasion),
     ##tBfC ##
----

Search for:
Code:
         (neq, "$g_multiplayer_game_type", multiplayer_game_type_battle),
Add under that:
Code:
     ##tBfC ##
         (neq, "$g_multiplayer_game_type", multiplayer_game_type_invasion),
     ##tBfC ##
----
Go to the script:
Code:
multiplayer_fill_map_game_types
Add under:
Code:
      (else_try),
        (eq, ":game_type", multiplayer_game_type_siege),
        (troop_set_slot, "trp_multiplayer_data", multi_data_maps_for_game_type_begin, "scn_multi_scene_3"),
        (troop_set_slot, "trp_multiplayer_data", multi_data_maps_for_game_type_begin + 1, "scn_multi_scene_8"),
        (troop_set_slot, "trp_multiplayer_data", multi_data_maps_for_game_type_begin + 2, "scn_multi_scene_10"),
        (troop_set_slot, "trp_multiplayer_data", multi_data_maps_for_game_type_begin + 3, "scn_multi_scene_13"),
        (assign, ":num_maps", 4),

This:
Code:
##tBfC maps#
      (else_try),
        (eq, ":game_type", multiplayer_game_type_invasion),
        (troop_set_slot, "trp_multiplayer_data", multi_data_maps_for_game_type_begin , "scn_tbfc_invasion_1"),
        (troop_set_slot, "trp_multiplayer_data", multi_data_maps_for_game_type_begin + 1, "scn_tbfc_invasion_2"),
        (troop_set_slot, "trp_multiplayer_data", multi_data_maps_for_game_type_begin + 2, "scn_tbfc_invasion_3"),
        (troop_set_slot, "trp_multiplayer_data", multi_data_maps_for_game_type_begin + 3, "scn_tbfc_invasion_4"),
        (troop_set_slot, "trp_multiplayer_data", multi_data_maps_for_game_type_begin + 4, "scn_tbfc_invasion_5"),
        (troop_set_slot, "trp_multiplayer_data", multi_data_maps_for_game_type_begin + 5, "scn_tbfc_invasion_6"),
        (troop_set_slot, "trp_multiplayer_data", multi_data_maps_for_game_type_begin + 6, "scn_tbfc_invasion_7"),
        (troop_set_slot, "trp_multiplayer_data", multi_data_maps_for_game_type_begin + 7, "scn_tbfc_invasion_8"),
        (troop_set_slot, "trp_multiplayer_data", multi_data_maps_for_game_type_begin + 8, "scn_tbfc_invasion_9"),
        (assign, ":num_maps", 9),
##tBfC maps#
--------------------------------------------------------------------------------
Module_troops

Search for:
Code:
  ["sarranid_horseman_multiplayer_ai","Sarranid Horseman","Sarranid Horsemen",tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet|tf_guarantee_horse|tf_guarantee_shield,0,0,fac_kingdom_6,
   [itm_lance,itm_arabian_sword_b,itm_scimitar_b,itm_mace_4,itm_tab_shield_small_round_b,
    itm_sarranid_mail_shirt,itm_sarranid_boots_b,itm_sarranid_boots_c,itm_sarranid_horseman_helmet,itm_courser,itm_hunter],
   def_attrib_tbfc|level(20),wp_melee(100),knows_common|knows_riding_4|knows_ironflesh_2|knows_shield_2|knows_power_strike_3,swadian_face_young_1, swadian_face_old_2],
Add under that:
Code:
##tBfC
  ["invader_multiplayer_ai","Invader","Invaders",0,0,0,fac_kingdom_invaders,
   [itm_club,itm_rawhide_coat,itm_stones,itm_woolen_cap,itm_woolen_cap,itm_nomad_boots,itm_wrapping_boots],
   def_attrib|level(8),wp(60),knows_common|knows_power_strike_2,bandit_face1, bandit_face2],
  ["invaderb_multiplayer_ai","Invader","Invaders",0,0,0,fac_kingdom_invaders,
   [itm_falchion,itm_pelt_coat,itm_felt_hat,itm_wrapping_boots],
   def_attrib|level(8),wp(60),knows_common|knows_power_strike_2,bandit_face1, bandit_face2],
##tBfC
----

Search for:
Code:
 ["multiplayer_end","{!}multiplayer_end","{!}multiplayer_end", 0, 0, 0, fac_kingdom_5, [], 0, 0, 0, 0, 0],
Add under that:
Code:
##Invasion tBfC##
  ["invader1_multiplayer_ai","Invader","Invaders",0,0,0,fac_kingdom_invaders,
   [itm_club,itm_rawhide_coat,itm_stones,itm_woolen_cap,itm_woolen_cap,itm_nomad_boots,itm_wrapping_boots],
   def_attrib|level(8),wp(60),knows_common|knows_power_strike_2,bandit_face1, bandit_face2],
  ["invader2_multiplayer_ai","Invader","Invaders",0,0,0,fac_kingdom_invaders,
   [itm_falchion,itm_pelt_coat,itm_felt_hat,itm_wrapping_boots],
   def_attrib|level(8),wp(60),knows_common|knows_power_strike_2,bandit_face1, bandit_face2],
  ["invader3_multiplayer_ai","Invader","Invaders",0,0,0,fac_kingdom_invaders,
   [itm_falchion,itm_rawhide_coat,itm_woolen_cap,itm_wrapping_boots],
   def_attrib|level(8),wp(60),knows_common|knows_power_strike_2,bandit_face1, bandit_face2],
##Extra
  ["invader_new_1_multiplayer_ai","Invader","Invaders",0,0,0,fac_kingdom_invaders,
   [itm_scythe,itm_pelt_coat,itm_woolen_cap,itm_stones,itm_nomad_boots],
   def_attrib|level(8),wp(60),knows_common|knows_power_strike_2,bandit_face1, bandit_face2],
  ["invader_new_2_multiplayer_ai","Invader","Invaders",0,0,0,fac_kingdom_invaders,
   [itm_scythe,itm_rawhide_coat,itm_straw_hat,itm_stones,itm_wrapping_boots],
   def_attrib|level(8),wp(60),knows_common|knows_power_strike_2,bandit_face1, bandit_face2],
#  ["invader_new_3_multiplayer_ai","Invader","Invaders",0,0,0,fac_kingdom_invaders,
#   [itm_invader_shovel,itm_pelt_coat,itm_straw_hat,itm_nomad_boots],
#   def_attrib|level(8),wp(60),knows_common|knows_power_strike_2,bandit_face1, bandit_face2],
#  ["invader_new2_4_multiplayer_ai","Invader","Invaders",0,0,0,fac_kingdom_invaders,
#   [itm_invader_shovel,itm_rawhide_coat,itm_woolen_cap,itm_wrapping_boots],
#   def_attrib|level(8),wp(60),knows_common|knows_power_strike_2,bandit_face1, bandit_face2],
#  ["invader_new2_5_multiplayer_ai","Invader","Invaders",0,0,0,fac_kingdom_invaders,
#   [itm_melon,itm_stones,itm_rawhide_coat,itm_woolen_cap,itm_wrapping_boots],
#   def_attrib|level(8),wp(60),knows_common|knows_power_strike_2,bandit_face1, bandit_face2],
#  ["invader_new2_6_multiplayer_ai","Invader","Invaders",0,0,0,fac_kingdom_invaders,
#   [itm_plank_with_nails,itm_rawhide_coat,itm_woolen_cap,itm_wrapping_boots],
#   def_attrib|level(8),wp(60),knows_common|knows_power_strike_2,bandit_face1, bandit_face2],
#  ["invader_new2_7_multiplayer_ai","Invader","Invaders",0,0,0,fac_kingdom_invaders,
#   [itm_plank_with_nails_rusty,itm_pelt_coat,itm_woolen_cap,itm_wrapping_boots],
#   def_attrib|level(8),wp(60),knows_common|knows_power_strike_2,bandit_face1, bandit_face2],
  ["invader_new2_8_multiplayer_ai","Invader","Invaders",0,0,0,fac_kingdom_invaders,
   [itm_spiked_mace,itm_rawhide_coat,itm_woolen_cap,itm_stones,itm_wrapping_boots],
   def_attrib|level(8),wp(60),knows_common|knows_power_strike_2,bandit_face1, bandit_face2],
#  ["invader_new2_9_multiplayer_ai","Invader","Invaders",0,0,0,fac_kingdom_invaders,
#   [itm_pitch_fork_rusty,itm_pelt_coat,itm_straw_hat,itm_nomad_boots],
#   def_attrib|level(8),wp(60),knows_common|knows_power_strike_2,bandit_face1, bandit_face2],
#  ["invader_new3_1_multiplayer_ai","Invader","Invaders",0,0,0,fac_kingdom_invaders,
#   [itm_club_rusty,itm_rawhide_coat,itm_woolen_cap,itm_nomad_boots],
#   def_attrib|level(8),wp(60),knows_common|knows_power_strike_2,bandit_face1, bandit_face2],
##Extra
  ["invader4_multiplayer_ai","Invader","Invaders",0,0,0,fac_kingdom_invaders,
   [itm_pitch_fork,itm_pelt_coat,itm_woolen_cap,itm_stones,itm_nomad_boots],
   def_attrib|level(8),wp(60),knows_common|knows_power_strike_2,bandit_face1, bandit_face2],
  ["invader5_multiplayer_ai","Invader","Invaders",0,0,0,fac_kingdom_invaders,
   [itm_butchering_knife,itm_rawhide_coat,itm_felt_hat,itm_nomad_boots],
   def_attrib|level(8),wp(60),knows_common|knows_power_strike_2,bandit_face1, bandit_face2],

  ["invader6_multiplayer_ai","Tank","Tanks",0,0,0,fac_kingdom_invaders,
   [itm_one_handed_battle_axe_b,itm_tab_shield_round_a,itm_mail_hauberk,itm_mail_boots],
   def_attrib|str_30|level(12),wp(90),knows_common|knows_ironflesh_10|knows_power_strike_2,bandit_face1, bandit_face2],
##Extra
  ["invader_new_3_multiplayer_ai","Tank","Tanks",0,0,0,fac_kingdom_invaders,
   [itm_bastard_sword_b,itm_tab_shield_round_a,itm_mail_hauberk,itm_mail_boots,itm_warhorse],
   def_attrib|str_30|level(12),wp(90),knows_common|knows_ironflesh_5|knows_power_strike_2|knows_riding_4,bandit_face1, bandit_face2],  
  ["invader_new_4_multiplayer_ai","Horde","Hordes",0,0,0,fac_kingdom_invaders,
   [itm_sledgehammer,itm_leather_jerkin,itm_skullcap,itm_mail_boots],
   def_attrib|str_30|level(12),wp(90),knows_common|knows_ironflesh_10|knows_power_strike_4,bandit_face1, bandit_face2],
##Extra
  ["invader7_multiplayer_ai","Tank","Tanks",0,0,0,fac_kingdom_invaders,
   [itm_mace_3,itm_tab_shield_round_a,itm_mail_hauberk,itm_mail_boots,itm_leather_cap],
   def_attrib|str_30|level(12),wp(90),knows_common|knows_ironflesh_10|knows_power_strike_2,bandit_face1, bandit_face2],

  ["invader8_multiplayer_ai","Horde","Hordes",0,0,0,fac_kingdom_invaders,
   [itm_crossbow,itm_bolts,itm_padded_cloth,itm_skullcap,itm_mail_boots],
   def_attrib|level(12),wp(90),knows_common|knows_ironflesh_2|knows_power_strike_4,bandit_face1, bandit_face2],
##Extra  
  ["invader9_new_multiplayer_ai","Horde","Hordes",0,0,0,fac_kingdom_invaders,
   [itm_nomad_bow,itm_arrows,itm_padded_cloth,itm_skullcap,itm_ankle_boots],
   def_attrib|level(12),wp(90)|wp_archery(200),knows_common|knows_ironflesh_2|knows_power_draw_2|knows_horse_archery_2,bandit_face1, bandit_face2],
##Extra
  ["invader9_multiplayer_ai","Horde","Hordes",0,0,0,fac_kingdom_invaders,
   [itm_javelin,itm_ragged_outfit,itm_mail_coif,itm_mail_boots,itm_glaive],
   def_attrib|level(12),wp(90),knows_common|knows_ironflesh_2|knows_power_strike_4,bandit_face1, bandit_face2],

  ["invader10_multiplayer_ai","Tough guy","Tough guy",0,0,0,fac_kingdom_invaders,
   [itm_banded_armor,itm_splinted_leather_greaves,itm_mail_mittens,itm_mail_coif,itm_tab_shield_kite_d, itm_arabian_sword_b],
   def_attrib|str_22|level(16),wp(90),knows_common|knows_ironflesh_6|knows_power_strike_4,bandit_face1, bandit_face2],
  ["invader11_multiplayer_ai","Tough guy","Tough guy",0,0,0,fac_kingdom_invaders,
   [itm_banded_armor,itm_splinted_leather_greaves,itm_mail_mittens,itm_norman_helmet,itm_shortened_voulge],
   def_attrib|str_22|level(16),wp(90),knows_common|knows_ironflesh_6|knows_power_strike_4,bandit_face1, bandit_face2],

  ["invader12_multiplayer_ai","Juggernaut","Juggernauts",0,0,0,fac_kingdom_invaders,
   [itm_cuir_bouilli,itm_gauntlets,itm_full_helm,itm_iron_greaves,itm_military_cleaver_c, itm_tab_shield_pavise_d],
   def_attrib|str_200|level(20),wp(90),knows_common|knows_ironflesh_10|knows_power_strike_10,bandit_face1, bandit_face2],
  ["invader13_multiplayer_ai","Shocker","Shockers",0,0,0,fac_kingdom_invaders,
   [itm_scale_armor,itm_gauntlets, itm_bascinet_3, itm_iron_greaves,itm_voulge],
   def_attrib|str_90|level(20),wp(90),knows_common|knows_athletics_9|knows_ironflesh_4|knows_power_strike_4,bandit_face1, bandit_face2],

  ["invader20_multiplayer_ai","Bonus_Weapon","Bonus_Weapons",0,0,0,fac_kingdom_invaders,
   [itm_military_cleaver_c],
   def_attrib|level(3),wp(10),knows_common|knows_athletics_10,bandit_face1, bandit_face2],

  ["invader_boss1","Achtung, Panzer!","Achtung, Panzer!",0,0,0,fac_kingdom_invaders,
   [itm_heraldic_mail_with_surcoat,   itm_bascinet_3, itm_black_greaves, itm_tab_shield_small_round_c, itm_military_cleaver_c],
   def_attrib|str_200|level(90),wp(100),knows_common|knows_ironflesh_10,bandit_face1, bandit_face2],
  ["invader_boss2","MEEP MEEP","MEEP MEEPs",0,0,0,fac_kingdom_invaders,
   [itm_warhorse, itm_heraldic_mail_with_surcoat,   itm_bascinet_3, itm_black_greaves,  itm_voulge],
   def_attrib|str_20|agi_15|level(90),wp(200),knows_common|knows_ironflesh_10|knows_athletics_10,bandit_face1, bandit_face2],
  ["invader_boss3","Arch3r","Arch3r",0,0,0,fac_kingdom_invaders,
   [itm_heraldic_mail_with_surcoat,   itm_mail_boots,itm_mail_mittens, itm_voulge],
   def_attrib|str_200|agi_30|level(90),wp(200),knows_common|knows_ironflesh_10|knows_power_strike_10|knows_athletics_10,0x0000000d50000510040763e179ff81ff00000000001d70380000000000000000, bandit_face2],

  ["invader_klargus_minion","Swadian Guy-at-arms","Achtung, Panzer!",0,0,0,fac_kingdom_invaders,
   [itm_saddle_horse, itm_heraldic_mail_with_surcoat,   itm_nomad_boots, itm_sword_medieval_c,  itm_scale_gauntlets,    itm_tab_shield_heater_cav_a],
   def_attrib|str_22|level(30),wp(130),knight_skills_3|knows_trainer_1|knows_trainer_3, 0x0000000c3e08601414ab4dc6e39296b200000000001e231b0000000000000000, swadian_face_older_2],
  ["invader_boss1_minion","Hammerzeit","Hammerzeit",0,0,0,fac_kingdom_invaders,
   [itm_heraldic_mail_with_surcoat,   itm_black_greaves, itm_warhammer],
   def_attrib|str_200|level(30),wp(100),knows_common|knows_ironflesh_10,bandit_face1, bandit_face2],
  ["invader_boss2_minion","MEEP MEEP","MEEP MEEPs",0,0,0,fac_kingdom_invaders,
   [itm_heraldic_mail_with_surcoat,   itm_bascinet_3, itm_black_greaves,  itm_morningstar],
   def_attrib|str_20|agi_15|level(30),wp(120),knows_common|knows_ironflesh_6|knows_athletics_10,bandit_face1, bandit_face2],
  ["invader_boss3_minion","Mini Dark version of Arch3r","Mini Dark version of Arch3r",0,0,0,fac_kingdom_invaders,
   [itm_heraldic_mail_with_surcoat,   itm_bascinet_3, itm_black_greaves, itm_voulge],
   def_attrib|str_90|agi_30|level(30),wp(120),knows_common|knows_ironflesh_6|knows_power_strike_5|knows_athletics_10,0x0000000d50000510040763e179ff81ff00000000001d70380000000000000000, bandit_face2],



  ["invader_tercero","Tercero","Tercero",0,0,0,fac_kingdom_invaders, 
   [itm_heraldic_mail_with_tunic, itm_mail_boots, itm_mail_mittens, itm_long_axe_b,itm_heavy_throwing_axes],
   def_attrib|str_200|agi_30|level(90),wp(200),knows_common|knows_power_throw_5|knows_ironflesh_10|knows_power_strike_10|knows_athletics_10,0x000000003600118304dcca568a65e6db00000000001d2aaa0000000000000000],
  ["invader_mahud","Mahud","Mahud",0,0,0,fac_kingdom_invaders, 
   [itm_heraldic_mail_with_tunic, itm_mail_boots, itm_mail_mittens, itm_long_axe_b,itm_heavy_throwing_axes],
   def_attrib|str_200|agi_30|level(90),wp(200),knows_common|knows_power_throw_5|knows_ironflesh_10|knows_power_strike_10|knows_athletics_10,0x0000000fff0000037a1bfc7a3f1fb7ff00000000001f80170000000000000000],
  ["invader_ibbey","Ibanez","Ibbo",0,0,0,fac_kingdom_invaders,
   [itm_heraldic_mail_with_tunic, itm_mail_boots, itm_mail_mittens, itm_long_axe_b,itm_heavy_throwing_axes],
   def_attrib|str_200|agi_30|level(90),wp(200),knows_common|knows_ironflesh_10|knows_power_strike_10|knows_athletics_10,0x000000001908000638dc6ab6c38d345b00000000001e461d0000000000000000],
  ["invader_meph","Mephisto","Meppey",0,0,0,fac_kingdom_invaders,
   [itm_heraldic_mail_with_tunic, itm_mail_boots, itm_mail_mittens, itm_long_axe_b,itm_heavy_throwing_axes],
   def_attrib|str_200|agi_30|level(90),wp(200),knows_common|knows_ironflesh_10|knows_power_strike_10|knows_athletics_10,0x0000000ffe1020077482e87fff1d01ff00000000001c7f400000000000000000],
  ["invader_freddo","Fredelios","Fredelios",0,0,0,fac_kingdom_invaders,
   [itm_heraldic_mail_with_tunic, itm_mail_boots, itm_mail_mittens, itm_long_axe_b,itm_heavy_throwing_axes],
   def_attrib|str_200|agi_30|level(90),wp(200),knows_common|knows_ironflesh_10|knows_power_strike_10|knows_athletics_10,0x0000000e7f003588220787fff09c004700000000001efe380000000000000000],
  ["invader_dimez","Dimez","Dimez",0,0,0,fac_kingdom_invaders,
   [itm_heraldic_mail_with_tunic, itm_mail_boots, itm_mail_mittens, itm_long_axe_b,itm_heavy_throwing_axes],
   def_attrib|str_200|agi_30|level(90),wp(200),knows_common|knows_ironflesh_10|knows_power_strike_10|knows_athletics_10,0x000000047a10300949236dc6e686521d00000000001ea6db0000000000000000],
  ["invader_unox","Unox_Ionizer","InoxIonizer",0,0,0,fac_kingdom_invaders,
   [itm_heraldic_mail_with_tunic, itm_mail_boots, itm_mail_mittens, itm_long_axe_b,itm_heavy_throwing_axes],
   def_attrib|str_200|agi_30|level(90),wp(200),knows_common|knows_ironflesh_10|knows_power_strike_10|knows_athletics_10,0x000000000000210536db6db6db6db6db00000000001db6db0000000000000000],
  ["invader_foamy","Foamy","Foamy",0,0,0,fac_kingdom_invaders,
   [itm_heraldic_mail_with_tunic, itm_mail_boots, itm_mail_mittens, itm_long_axe_b,itm_heavy_throwing_axes],
   def_attrib|str_200|agi_30|level(90),wp(200),knows_common|knows_ironflesh_10|knows_power_strike_10|knows_athletics_10,0x00000006e504218446db6d47136db4db00000000001d3a9b0000000000000000],
  ["invader_coglory","COGlory","COG",0,0,0,fac_kingdom_invaders,
   [itm_heraldic_mail_with_tunic, itm_mail_boots, itm_mail_mittens, itm_long_axe_b,itm_heavy_throwing_axes],
   def_attrib|str_200|agi_30|level(90),wp(200),knows_common|knows_ironflesh_10|knows_power_strike_10|knows_athletics_10,0x000000000000210536db6db6db6db6db00000000001db6db0000000000000000],
#  ["invader_death","The Dark version of Arch3r","The Dark version of Arch3r",0,0,0,fac_kingdom_invaders,
#   [itm_heraldic_mail_with_tunic, itm_mail_boots, itm_mail_mittens, itm_long_axe_b,itm_heavy_throwing_axes],
#   def_attrib|str_200|agi_30|level(90),wp(200),knows_common|knows_ironflesh_10|knows_power_strike_10|knows_athletics_10,0x000000000000210536db6db6db6db6db00000000001db6db0000000000000000],
  ["invader_kazzan","Kazzan","Kazzan",0,0,0,fac_kingdom_invaders,
   [itm_heraldic_mail_with_tunic, itm_mail_boots, itm_mail_mittens, itm_long_axe_b,itm_heavy_throwing_axes],
   def_attrib|str_200|agi_30|level(90),wp(200),knows_common|knows_ironflesh_10|knows_power_strike_10|knows_athletics_10,0x000000003f004009231b6dc6d36db6db00000000001d26e10000000000000000],
  ["invader_freddex","Anton Freddex","Freddex",0,0,0,fac_kingdom_invaders,
   [itm_heraldic_mail_with_tunic, itm_mail_boots, itm_mail_mittens, itm_long_axe_b,itm_heavy_throwing_axes],
   def_attrib|str_200|agi_30|level(90),wp(200),knows_common|knows_ironflesh_10|knows_power_strike_10|knows_athletics_10,0x00000001970051c320000000077f85ff00000000001d04000000000000000000],
  ["invader_melons","Melons","Watermelons",0,0,0,fac_kingdom_invaders,
   [itm_heraldic_mail_with_tunic, itm_mail_boots, itm_mail_mittens, itm_long_axe_b,itm_heavy_throwing_axes],
   def_attrib|str_200|agi_30|level(90),wp(200),knows_common|knows_ironflesh_10|knows_power_throw_10|knows_power_strike_10|knows_athletics_10,0x000000003f08134f35636ca524a9d8dd00000000001d36da0000000000000000],
##Invasion tBfC##
 
Thanks a lot, Arch3r!

Would be a huge help with Khazad-Dum, which would have basically same spawn-bots-repeat game process. It's so much easier to modify what's already working and leaves more time to tinkering with new features :smile:
 

Alec{zacool}

Master Knight
M&BWBWF&S
Where does the gametype invasion code go?

I've searched
Code:
  
(
	"bandit_lair",mtf_battle_mode,charge,
    "Ambushing a bandit lair",

And I don't find anything.
 

Arch3r

Count
M&BWBNW
Under the whole multiplayer_bt (Battle mode) code. find
Code:
"multiplayer_bt"
and scroll down until you find bandit_lair. Than place it above that.
 

Arch3r

Count
M&BWBNW
Acid-NN-9 said:
Acid-NN-9 said:
Please you can give the code (and a little steps) for make health boxes like in you mod?
Please i need it, its very cool  :wink:
Sure, let me make a new thread for that.

done: http://forums.taleworlds.com/index.php/topic,112677.0.html
 

Snutze

Sergeant
Arch3r said:
Acid-NN-9 said:
Acid-NN-9 said:
Please you can give the code (and a little steps) for make health boxes like in you mod?
Please i need it, its very cool  :wink:
Sure, let me make a new thread for that.

done: http://forums.taleworlds.com/index.php/topic,112677.0.html


I have a question for you !! Would these code be editable to make them *standard* what I mean is lets say I add a option to the trainer in the training field  that say Survival then when I click it you pop on the field and basicly its your invasion mod. Would that be possible to make that a feature of the regular game ?
 

Airith

Sergeant at Arms
M&BWBWF&SNW
hey arch3r, i've been looking at your code but i still can't figure out how to get the gun sound to occur. i gave up and used the normal play sound, but of course it only works for the person firing it. i was wondering if you could tell me how?  :wink:

I followed the multiplayer sound container to header_common and the module_scripts files but it does not seem to work for me.
 

Arch3r

Count
M&BWBNW
These are just the gamemode scripts, not for gunsounds. I used Yoshi's tutorial on that: http://forums.taleworlds.com/index.php/topic,94854.0.html
 

The Shadow

Recruit
Arch3r, where did you edit the items that people can select in multi?  (Based on factions.)  I can't seem to find them anywhere. 
 

Arch3r

Count
M&BWBNW
module_scripts. Search for

Code:
 (call_script, "script_multiplayer_set_item_available_for_troop", "itm_bolts", "trp_swadian_crossbowman_multiplayer"),
 

Kazzan

Count
M&BWBNW
Followed the steps, but afterwards i got this error whilst compiling, the error comes a few times:
Traceback (most recent call last):
Code:
 File "process_init.py",line 2,in <module>
  from process_operations import *
 File "C:\Users\Username\desktop\Kazzan Mod\module_troop.py", line 2120
  ["invader_boss2","MEEP MEEP","MEEP MEEP's",0,0,0,fac_kingdom_invaders,
  ^
IndentationError: unexpected indent
traceback <most recent call last>:
 File "process_global_variables.py", line 12, in <module>
  from process_operations import *
 File "C:\Users\Username\desktop\Kazzan Mod\module_troop.py", line 14, in <module>
  from module_troops import *
 File "C:\Users\Username\desktop\Kazzan Mod\module_troop.py", line 2120
  ["invader_boss2","MEEP MEEP","MEEP MEEP's",0,0,0,fac_kingdom_invaders,
  ^
IndentationError: unexpected indent
 
Top Bottom