Login

russian armor

How to: Infantry Only Mode in a Custom Map

4 Sep 2014, 19:40 PM
#22
avatar of Janne252
Admin Black Badge
Patrion 15

Posts: 3421 | Subs: 11

The code is not updated for Western Front armies (yet).
6 Sep 2014, 04:23 AM
#23
avatar of Projekt

Posts: 1

When will it be updated?
8 Sep 2014, 11:47 AM
#24
avatar of optical21

Posts: 95

Ah ok, thanks for reply, and yeah, i hope it will be updated some day! Would love to try it out!
14 Sep 2014, 14:30 PM
#25
avatar of Blutsuechtiger

Posts: 2

Here is the code (including popCap as well):

Code
function OnInitID()
--Population cap override value
g_popCapOverRide =300

for i = 1, World_GetPlayerCount() do
local player = World_GetPlayerAt(i)
Player_SetPopCapOverride(player, g_popCapOverRide)
Modify_PlayerResourceRate(player, RT_Fuel, 1.5, MUT_Multiplication)
Modify_PlayerResourceRate(player, RT_Munition, 2, MUT_Multiplication)
Modify_PlayerResourceRate(player, RT_Manpower, 1.5, MUT_Multiplication)
Modify_PlayerSightRadius( player, 1.5 )


Player_SetSquadProductionAvailability (player, SBP.AEF.M8A1_HMC_SQUAD_MP, ITEM_REMOVED)
Player_SetSquadProductionAvailability (player, SBP.AEF.M1_75MM_PACK_HOWITZER_SQUAD_MP, ITEM_REMOVED)
Player_SetSquadProductionAvailability (player, SBP.AEF.PM_M3_HALFTRACK_SQUAD_OMCG, ITEM_REMOVED)
Player_SetSquadProductionAvailability (player, SBP.AEF.JACKSON_SQUAD, ITEM_REMOVED)
Player_SetSquadProductionAvailability (player, SBP.AEF.M20_ASSAULT_ENGY_ANTITANK_SQUAD_MP, ITEM_REMOVED)
Player_SetSquadProductionAvailability (player, SBP.AEF.M1_57MM_AT_GUN_SQUAD_MP, ITEM_REMOVED)
Player_SetSquadProductionAvailability (player, SBP.AEF.M1_81MM_MORTAR_SQUAD_MP, ITEM_REMOVED)
Player_SetSquadProductionAvailability (player, SBP.AEF.M2_60MM_MORTAR_SQUAD_MP, ITEM_REMOVED)
Player_SetSquadProductionAvailability (player, SBP.AEF.DODGE_WC51_50CAL_SQUAD_MP, ITEM_REMOVED)
Player_SetSquadProductionAvailability (player, SBP.AEF.DODGE_WC51_PATHFINDER_SQUAD_MP, ITEM_REMOVED)
Player_SetSquadProductionAvailability (player, SBP.AEF.DODGE_WC51_SQUAD_MP, ITEM_REMOVED)
Player_SetSquadProductionAvailability (player, SBP.AEF.M10_TANK_DESTROYER_SQUAD_MP, ITEM_REMOVED)
Player_SetSquadProductionAvailability (player, SBP.AEF.M20_UTILITY_CAR_SQUAD_MP, ITEM_REMOVED)
Player_SetSquadProductionAvailability (player, SBP.AEF.M36_TANK_DESTROYER_SQUAD_MP, ITEM_REMOVED)
Player_SetSquadProductionAvailability (player, SBP.AEF.M15A1_AA_HALFTRACK_SQUAD_MP, ITEM_REMOVED)
Player_SetSquadProductionAvailability (player, SBP.AEF.M21_MORTAR_HALFTRACK_SQUAD_MP, ITEM_REMOVED)
Player_SetSquadProductionAvailability (player, SBP.AEF.M3_HALFTRACK_SQUAD_ASSAULT_MP, ITEM_REMOVED)
Player_SetSquadProductionAvailability (player, SBP.AEF.M3_HALFTRACK_SQUAD_MP, ITEM_REMOVED)
Player_SetSquadProductionAvailability (player, SBP.AEF.M4A3_76MM_SHERMAN_SQUAD_MP, ITEM_REMOVED)
Player_SetSquadProductionAvailability (player, SBP.AEF.M4A3_SHERMAN_SQUAD_MP, ITEM_REMOVED)
Player_SetSquadProductionAvailability (player, SBP.AEF.M5A1_STUART_SQUAD_MP, ITEM_REMOVED)
Player_SetSquadProductionAvailability (player, SBP.AEF.M8_GREYHOUND_SQUAD_MP, ITEM_REMOVED)

Player_SetAbilityAvailability (player, ABILITY.AEF.PRIEST_DISPATCH, ITEM_LOCKED)
Player_SetAbilityAvailability (player, ABILITY.AEF.MAJOR_ARTILLERY, ITEM_LOCKED)
Player_SetAbilityAvailability (player, ABILITY.AEF.MAJOR_ARTILLERY_FAKE, ITEM_LOCKED)
Player_SetAbilityAvailability (player, ABILITY.AEF.ARTILLERY_155MM, ITEM_LOCKED)
Player_SetAbilityAvailability (player, ABILITY.AEF.SIEGE_240MM_BARRAGE, ITEM_LOCKED)
Player_SetAbilityAvailability (player, ABILITY.AEF.SUPPORT_ARTILLERY, ITEM_LOCKED)
Player_SetAbilityAvailability (player, ABILITY.AEF.DODGE_WC51_DISPATCH, ITEM_LOCKED)
Player_SetAbilityAvailability (player, ABILITY.AEF.GREYHOUND_RECON_DISPATCH, ITEM_LOCKED)
Player_SetAbilityAvailability (player, ABILITY.AEF.M10_DEPLOY, ITEM_LOCKED)
Player_SetAbilityAvailability (player, ABILITY.AEF.M21_MORTAR_HALFTRACK_DISPATCH, ITEM_LOCKED)
Player_SetAbilityAvailability (player, ABILITY.AEF.M3_HALFTRACK_GROUP, ITEM_LOCKED)
Player_SetAbilityAvailability (player, ABILITY.AEF.SHERMAN_BULLDOZER_DISPATCH, ITEM_LOCKED)
Player_SetAbilityAvailability (player, ABILITY.AEF.SHERMAN_EASY8_DISPATCH, ITEM_LOCKED)
Player_SetAbilityAvailability (player, ABILITY.AEF.SP_240MM_OFF_MAP_BARRAGE, ITEM_LOCKED)

Player_SetSquadProductionAvailability (player, SBP.SOVIET.KATYUSHA_BM_13N_SQUAD_MP, ITEM_REMOVED)
Player_SetSquadProductionAvailability (player, SBP.SOVIET.PM_82_41_MORTAR_SQUAD_MP, ITEM_REMOVED)
Player_SetSquadProductionAvailability (player, SBP.SOVIET.KV_1_MP, ITEM_REMOVED)
Player_SetSquadProductionAvailability (player, SBP.SOVIET.M3A1_SCOUT_CAR_SQUAD_MP, ITEM_REMOVED)
Player_SetSquadProductionAvailability (player, SBP.SOVIET.M5_HALFTRACK_SQUAD_MP, ITEM_REMOVED)
Player_SetSquadProductionAvailability (player, SBP.SOVIET.M1937_53_K_45MM_AT_GUN_SQUAD_MP, ITEM_REMOVED)
Player_SetSquadProductionAvailability (player, SBP.SOVIET.M1942_ZIS_3_76MM_AT_GUN_SQUAD_MP, ITEM_REMOVED)
Player_SetSquadProductionAvailability (player, SBP.SOVIET.SU_76M_MP, ITEM_REMOVED)
Player_SetSquadProductionAvailability (player, SBP.SOVIET.SU_85_MP, ITEM_REMOVED)
Player_SetSquadProductionAvailability (player, SBP.SOVIET.T_70M_MP, ITEM_REMOVED)
Player_SetSquadProductionAvailability (player, SBP.SOVIET.T_34_76_SQUAD_MP, ITEM_REMOVED)
Player_SetAbilityAvailability (player, ABILITY.SOVIET.B4_203MM_HOWITZER, ITEM_LOCKED)
Player_SetAbilityAvailability (player, ABILITY.SOVIET.IS2_DISPATCH_SP, ITEM_LOCKED)
Player_SetAbilityAvailability (player, ABILITY.SOVIET.ISU_152_DISPATCH_SP, ITEM_LOCKED)
Player_SetAbilityAvailability (player, ABILITY.SOVIET.KV_2, ITEM_LOCKED)
Player_SetAbilityAvailability (player, ABILITY.SOVIET.M_42_AT_GUN, ITEM_LOCKED)
Player_SetAbilityAvailability (player, ABILITY.SOVIET.M5_HALFTRACK_ASSAULT, ITEM_LOCKED)
Player_SetAbilityAvailability (player, ABILITY.SOVIET.SHERMAN_SOVIET_DISPATCH, ITEM_LOCKED)
Player_SetAbilityAvailability (player, ABILITY.SOVIET.KV_8_FLAME_45MM_TOGGLE_MP, ITEM_LOCKED)
Player_SetAbilityAvailability (player, ABILITY.SOVIET.CMD_120MM_MORTAR_CREW, ITEM_LOCKED)
Player_SetAbilityAvailability (player, ABILITY.SOVIET.CMD_ADVANCED_T34_85_MEDIUM_TANK, ITEM_LOCKED)
Player_SetAbilityAvailability (player, ABILITY.SOVIET.CMD_IS2_HEAVY_TANK, ITEM_LOCKED)
Player_SetAbilityAvailability (player, ABILITY.SOVIET.CMD_ISU_152, ITEM_LOCKED)
Player_SetAbilityAvailability (player, ABILITY.SOVIET.CMD_KV_1_UNLOCK, ITEM_LOCKED)
Player_SetAbilityAvailability (player, ABILITY.SOVIET.CMD_KV_8_UNLOCK_MP, ITEM_LOCKED)
Player_SetAbilityAvailability (player, ABILITY.SOVIET.CMD_ML_20, ITEM_LOCKED)
Player_SetAbilityAvailability (player, ABILITY.SOVIET.CMD_T34_85_MEDIUM_TANK, ITEM_LOCKED)
Player_SetAbilityAvailability (player, ABILITY.SOVIET.KV_8_FLAME_45MM_TOGGLE_MP, ITEM_LOCKED)
Player_SetAbilityAvailability (player, ABILITY.SOVIET.B4_203MM_HOWITZER, ITEM_LOCKED)
Player_SetAbilityAvailability (player, ABILITY.SOVIET.B4_203MM_HOWITZER, ITEM_LOCKED)
Player_SetAbilityAvailability (player, ABILITY.SOVIET.B4_203MM_HOWITZER, ITEM_LOCKED)

Player_SetSquadProductionAvailability (player, SBP.GERMAN.PANZERWERFER_SQUAD_MP, ITEM_REMOVED)
Player_SetSquadProductionAvailability (player, SBP.GERMAN.MORTAR_TEAM_81MM_MP, ITEM_REMOVED)
Player_SetSquadProductionAvailability (player, SBP.GERMAN.PAK40_75MM_AT_GUN_SQUAD_MP, ITEM_REMOVED)
Player_SetSquadProductionAvailability (player, SBP.GERMAN.BRUMMBAR_SQUAD_MP, ITEM_REMOVED)
Player_SetSquadProductionAvailability (player, SBP.GERMAN.SDKFZ_221_LIGHT_AT_HALFTRACK, ITEM_REMOVED)
Player_SetSquadProductionAvailability (player, SBP.GERMAN.SDKFZ_251_HALFTRACK_SQUAD_MP, ITEM_REMOVED)
Player_SetSquadProductionAvailability (player, SBP.GERMAN.OSTWIND_SQUAD_MP, ITEM_REMOVED)
Player_SetSquadProductionAvailability (player, SBP.GERMAN.PANTHER_SQUAD_MP, ITEM_REMOVED)
Player_SetSquadProductionAvailability (player, SBP.GERMAN.PANZER_IV_SQUAD_MP, ITEM_REMOVED)
Player_SetSquadProductionAvailability (player, SBP.GERMAN.PUMA_EAST_GERMAN_MP, ITEM_REMOVED)
Player_SetSquadProductionAvailability (player, SBP.GERMAN.SCOUTCAR_SDKFZ222_MP, ITEM_REMOVED)
Player_SetSquadProductionAvailability (player, SBP.GERMAN.STUG_III_SQUAD_MP, ITEM_REMOVED)

Player_SetAbilityAvailability (player, ABILITY.GERMAN.ELEFANT_UNLOCK, ITEM_LOCKED)
Player_SetAbilityAvailability (player, ABILITY.GERMAN.HOWITZER_105MM_EMPLACEMENT_UNLOCK, ITEM_LOCKED)
Player_SetAbilityAvailability (player, ABILITY.GERMAN.MORTAR_HALFTRACK, ITEM_LOCKED)
Player_SetAbilityAvailability (player, ABILITY.GERMAN.PAK_43_EMPLACEMENT_UNLOCK, ITEM_LOCKED)
Player_SetAbilityAvailability (player, ABILITY.GERMAN.TIGER_TANK, ITEM_LOCKED)
Player_SetAbilityAvailability (player, ABILITY.GERMAN.MECHANIZED_ASSAULT_GROUP, ITEM_LOCKED)
Player_SetAbilityAvailability (player, ABILITY.GERMAN.MECHANIZED_GRENADIER_GROUP, ITEM_LOCKED)
Player_SetAbilityAvailability (player, ABILITY.GERMAN.PUMA_DISPATCH, ITEM_LOCKED)
Player_SetAbilityAvailability (player, ABILITY.GERMAN.SDKFZ_221_LIGHT_AT_HALFTRACK, ITEM_LOCKED)
Player_SetAbilityAvailability (player, ABILITY.GERMAN.STUG_III_E, ITEM_LOCKED)
Player_SetAbilityAvailability (player, ABILITY.GERMAN.TIGER_TANK_ACE, ITEM_LOCKED)
Player_SetAbilityAvailability (player, ABILITY.GERMAN.ARMOR_COMMANDER, ITEM_LOCKED)

Player_SetSquadProductionAvailability (player, SBP.WEST_GERMAN.SDKFZ_251_WURFRAHMEN_40_HALFTRACK_SQUAD_MP, ITEM_REMOVED)
Player_SetSquadProductionAvailability (player, SBP.WEST_GERMAN.SCOUTCAR_223_SQUAD, ITEM_REMOVED)
Player_SetSquadProductionAvailability (player, SBP.WEST_GERMAN.PAK40_75MM_AT_GUN_SQUAD_WG_MP, ITEM_REMOVED)
Player_SetSquadProductionAvailability (player, SBP.WEST_GERMAN.RAKETENWERFER43_88MM_PUPPCHEN_ANTITANK_GUN_SQUAD_MP, ITEM_REMOVED)
Player_SetSquadProductionAvailability (player, SBP.WEST_GERMAN.GRW34_81MM_MORTAR_SQUAD_MP, ITEM_REMOVED)
Player_SetSquadProductionAvailability (player, SBP.WEST_GERMAN.LE_IG_18_INF_SUPPORT_GUN_SQUAD_MP, ITEM_REMOVED)
Player_SetSquadProductionAvailability (player, SBP.WEST_GERMAN.PAK43_88MM_AT_GUN_SQUAD_WESTGERMAN_MP, ITEM_REMOVED)
Player_SetSquadProductionAvailability (player, SBP.WEST_GERMAN.SDKFZ_251_17_FLAK_HALFTRACK_SQUAD_MP, ITEM_REMOVED)
Player_SetSquadProductionAvailability (player, SBP.WEST_GERMAN.SDKFZ_251_HALFTRACK_SQUAD_MP_2, ITEM_REMOVED)
Player_SetSquadProductionAvailability (player, SBP.WEST_GERMAN.JAGDPANZER_TANK_DESTROYER_SQUAD_MP, ITEM_REMOVED)
Player_SetSquadProductionAvailability (player, SBP.WEST_GERMAN.KUBELWAGEN_SQUAD_MP, ITEM_REMOVED)
Player_SetSquadProductionAvailability (player, SBP.WEST_GERMAN.KING_TIGER_SQUAD_MP, ITEM_REMOVED)
Player_SetSquadProductionAvailability (player, SBP.WEST_GERMAN.PANTHER_AUSF_G_SQUAD_MP, ITEM_REMOVED)
Player_SetSquadProductionAvailability (player, SBP.WEST_GERMAN.PANZER_II_LUCHS_SQUAD_MP, ITEM_REMOVED)
Player_SetSquadProductionAvailability (player, SBP.WEST_GERMAN.ARMORED_CAR_SDKFZ_234_SQUAD_MP, ITEM_REMOVED)
Player_SetSquadProductionAvailability (player, SBP.WEST_GERMAN.STURMTIGER_SQUAD_MP, ITEM_REMOVED)

Player_SetAbilityAvailability (player, ABILITY.WEST_GERMAN.TANK_COMMANDER_UNLOCK, ITEM_LOCKED)
Player_SetAbilityAvailability (player, ABILITY.WEST_GERMAN.FLAME_HALTRACK_DISPATCH, ITEM_LOCKED)
Player_SetAbilityAvailability (player, ABILITY.WEST_GERMAN.COMMAND_PANTHER, ITEM_LOCKED)
Player_SetAbilityAvailability (player, ABILITY.WEST_GERMAN.JAGDTIGER, ITEM_LOCKED)
Player_SetAbilityAvailability (player, ABILITY.WEST_GERMAN.MORTAR_HALFTRACK_WEST_GERMAN, ITEM_LOCKED)
Player_SetAbilityAvailability (player, ABILITY.WEST_GERMAN.OSTWIND_DISPATCH, ITEM_LOCKED)
Player_SetAbilityAvailability (player, ABILITY.WEST_GERMAN.PANZER_IV_GROUP_DISPATCH, ITEM_LOCKED)

Player_SetAbilityAvailability (player, ABILITY.GERMAN.FORWARD_REPAIR_STATION, ITEM_UNLOCKED)
Player_AddAbility(player, BP_GetAbilityBlueprint("forward_repair_station_tow"))
Player_AddAbility(player, BP_GetAbilityBlueprint("troop_training_tow"))


end
-- [[ Markers ]]

-- [[ Squad Groups ]]

-- [[ Entity Groups ]]

end
27 Sep 2014, 20:13 PM
#26
avatar of DracusNarcrym

Posts: 4

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
Code
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
10 Oct 2014, 19:18 PM
#27
avatar of optical21

Posts: 95

Hi, that does not work, i tried it
13 Oct 2014, 12:12 PM
#28
avatar of Blutsuechtiger

Posts: 2

Which one ... ?
13 Oct 2014, 13:45 PM
#29
avatar of DracusNarcrym

Posts: 4

Updated the code in my previous post. It should work now. ~Leonidas
8 Jan 2015, 12:27 PM
#30
avatar of Flying Dutchy

Posts: 43

Greetings folks,

Can any of you intelligent code-boys tell me what I need to add to my SCAR file if I want to only disable russian mortar teams and nothing else?

Cheers
1 user is browsing this thread: 1 guest