I made a very simple non-generic script (i.e. blocks only the squads specified in the tables) that is to be put in a
.scar file to work in custom maps. Does not block call-in vehicles (vehicles called into the battlefield via commander abilites). I hope it helps.
~Leonidas
import("ScarUtil.scar")
function OnGameSetup()
Rule_AddOneShot(excludeVehicle, 0)
end
function excludeVehicle()
--[[Made by General Dracus (a.k.a. Dracus Narcrym). A very simple non-generic script (i.e. only works for present blueprint tables) that blocks all vehicles off of the map in which
this script is packed, except infantry halftracks. Upon the addition of new units, their blueprints must be
added to the corresponding faction's blueprint table. If the blueprint is not defined in the format SBP.RACENAME.SQUAD then it must be defined using the
BP_GetSquadBlueprint("squadname") function where squadname = the squad name as seen in the World Builder "sbps" rollout menu.]]--
for i = 1 , World_GetPlayerCount() do
local sovietVehicles = {
SBP.SOVIET.IS_2,
SBP.SOVIET.ISU_152,
SBP.SOVIET.KV_1,
SBP.SOVIET.KV_8,
SBP.SOVIET.SU_76M,
SBP.SOVIET.SU_85,
SBP.SOVIET.T_34_76_SQUAD,
SBP.SOVIET.T_34_85_SQUAD,
SBP.SOVIET.T_70M,
SBP.SOVIET.M3A1_SCOUT_CAR_SQUAD,
SBP.SOVIET.KATYUSHA_BM_13N_SQUAD
}
local germanVehicles = {
SBP.GERMAN.BRUMMBAR_SQUAD,
SBP.GERMAN.ELEFANT_TANK_DESTROYER_SQUAD,
SBP.GERMAN.OSTWIND_SQUAD,
SBP.GERMAN.PANTHER_SQUAD,
SBP.GERMAN.PANZER_IV_COMMAND_SQUAD,
SBP.GERMAN.PANZER_IV_SQUAD,
SBP.GERMAN.STUG_III_E_SQUAD,
SBP.GERMAN.STUG_III_SQUAD,
SBP.GERMAN.TIGER_SQUAD,
SBP.GERMAN.SCOUTCAR_SDKFZ222,
SBP.GERMAN.PANZERWERFER_SQUAD,
SBP.GERMAN.MORTAR_250_HALFTRACK_SQUAD
}
local aefVehicles = {
BP_GetSquadBlueprint("dodge_wc51_50cal_squad_mp"),
BP_GetSquadBlueprint("dodge_wc51_ambulance_squad_mp"),
BP_GetSquadBlueprint("dodge_wc51_pathfinder_squad_mp"),
BP_GetSquadBlueprint("dodge_wc51_squad_mp"),
BP_GetSquadBlueprint("m10_tank_destroyer_squad_mp"),
BP_GetSquadBlueprint("m20_utility_car_squad_mp"),
BP_GetSquadBlueprint("m4a3_76mm_sherman_bulldozer_squad_mp"),
BP_GetSquadBlueprint("m4a3_76mm_sherman_squad_mp"),
BP_GetSquadBlueprint("m4a3_sherman_squad_mp"),
BP_GetSquadBlueprint("m4a3e8_sherman_easy_8_squad_mp"),
BP_GetSquadBlueprint("m5a1_stuart_squad_mp"),
BP_GetSquadBlueprint("m7b1_priest_squad_mp"),
BP_GetSquadBlueprint("m8_greyhound_squad_mp"),
BP_GetSquadBlueprint("m8a1_hmc_squad_mp")
}
local westgermanVehicles = {
BP_GetSquadBlueprint("mortar_250_halftrack_squad_westgerman_mp"),
BP_GetSquadBlueprint("sdkfz_251_17_flak_halftrack_squad_mp"),
BP_GetSquadBlueprint("sdkfz_251_20_ir_searchlight_halftrack_squad_mp"),
BP_GetSquadBlueprint("sdkfz_251_wurfrahmen_40_halftrack_squad_mp"),
BP_GetSquadBlueprint("jagdpanzer_tank_destroyer_squad_mp"),
BP_GetSquadBlueprint("jagdtiger_td_squad_mp"),
BP_GetSquadBlueprint("command_king_tiger_squad_mp"),
BP_GetSquadBlueprint("king_tiger_squad_mp"),
BP_GetSquadBlueprint("kubelwagen_squad_mp"),
BP_GetSquadBlueprint("ostwind_squad_westgerman_mp"),
BP_GetSquadBlueprint("panther_ausf_g_squad_mp"),
BP_GetSquadBlueprint("panther_commander_squad_mp"),
BP_GetSquadBlueprint("panzer_ii_luchs_squad_mp"),
BP_GetSquadBlueprint("panzer_iv_ausf_j_battle_group_mp"),
BP_GetSquadBlueprint("armored_car_sdkfz_234_squad_mp"),
BP_GetSquadBlueprint("sturmtiger_squad_mp")
}
local player = World_GetPlayerAt(i)
local playerrace = Player_GetRaceName(player)
function vehicleExclusion(player, playerrace, sovietVehicles, germanVehicles, aefVehicles, westgermanVehicles)
if playerrace == "soviet" then
Player_SetSquadProductionAvailability(player, sovietVehicles, ITEM_REMOVED)
elseif playerrace == "german" then
Player_SetSquadProductionAvailability(player, germanVehicles, ITEM_REMOVED)
elseif playerrace == "aef" then
Player_SetSquadProductionAvailability(player, aefVehicles, ITEM_REMOVED)
elseif playerrace == "west_german" then
Player_SetSquadProductionAvailability(player, westgermanVehicles, ITEM_REMOVED)
end
end
end
end