Login

russian armor

Shock Troop Producrion in HQ

3 Jun 2019, 05:09 AM
#1
avatar of jcbarth

Posts: 24

Hi,

I am trying to add shock troop production from the HQ building. Here's the function:



function Mission_SetupRestrictions()

-------------------------
-- // Player 1 //
-------------------------

--Player_SetMaxPopulation(player1, CT_Personnel, 30)

-- // Abilities //


Player_SetSquadProductionAvailability(player1, SBP.SOVIET.SHOCK_TROOPS, ITEM_DEFAULT)
Player_SetSquadProductionAvailability(player1, SBP.SOVIET.PENAL_BATTALION, ITEM_UNLOCKED)

Player_SetAbilityAvailability(player1, ABILITY.SOVIET.BASE_CONSCRIPT_DISPATCH, ITEM_UNLOCKED)
Player_AddAbility(player1, ABILITY.SOVIET.BASE_CONSCRIPT_DISPATCH)
--Player_AddAbility(player1, BP_GetAbilityBlueprint("frontoviki_conscript_dispatch"))
Player_SetEntityProductionAvailability(player1, EBP.SOVIET.TANK_DEPOT, ITEM_REMOVED)
Player_SetEntityProductionAvailability(player1, EBP.SOVIET.MOTORPOOL, ITEM_REMOVED)
Player_SetEntityProductionAvailability(player1, EBP.SOVIET.WEAPON_SUPPORT_CENTER, ITEM_REMOVED)
Player_SetEntityProductionAvailability(player1, EBP.SOVIET.BARRACKS, ITEM_REMOVED)


Modify_AbilityRechargeTime(player1, ABILITY.SOVIET.BASE_CONSCRIPT_DISPATCH, 0.7)

-- // Units //
--Cmd_Upgrade(player3, BP_GetUpgradeBlueprint("mission01_upgrade"), 1, true)
--Player_CompleteUpgrade(player1, UPG.SOVIET.SHOCK_TROOPS)

-- // Resources //
-- Starting
Player_SetResource(player1, RT_Manpower, 1000)
Player_SetResource(player1, RT_Munition, 1000)
Player_SetResource(player1, RT_Fuel, 1000)
--Player_SetResource(player1, RT_Command, 100)

-- Rates
Modify_PlayerResourceRate(player1, RT_Munition, 1.5, MUT_Multiplication)
Modify_PlayerResourceRate(player1, RT_Fuel, 1.5, MUT_Multiplication)
-- Caps
Modify_PlayerResourceCap(player1, RT_Manpower, 1501, MUT_Addition)
Modify_PlayerResourceCap(player1, RT_Munition, 501, MUT_Addition)
Modify_PlayerResourceCap(player1, RT_Fuel, 201, MUT_Addition)

end


I've been able to remove individual troops from base buildings as well as removed the ability to build the buildings, but haven't been able allow Shock Troops be produced like they are in the campaign.

Any help is appreciated!
3 Jun 2019, 21:35 PM
#2
avatar of eliw00d
Honorary Member Badge

Posts: 756 | Subs: 8

Keep in mind that there are separate single-player and multi-player entities and squads. So, I would guess that those SP squads are not in the MP entity's spawnable squads.
4 Jun 2019, 08:40 AM
#3
avatar of jcbarth

Posts: 24

Yeah, I made sure to not use the mp version that was showing in the Attribute Editor, but they still won't appear in the HQ. I was able to get shock troop dispatch to show with the following:

Player_SetAbilityAvailability(player1, ABILITY.SOVIET.SHOCK_TROOP_DISPATCH_SP, ITEM_UNLOCKED)

Player_AddAbility(player1, ABILITY.SOVIET.SHOCK_TROOP_DISPATCH_SP)


But unfortunately it won't actually spawn the troops when I press the dispatch button for some reason.
1 user is browsing this thread: 1 guest

Ladders Top 10

  • #
    Steam Alias
    W
    L
    %
    Streak
Data provided by Relic Relic Entertainment

Replay highlight

VS
  • U.S. Forces flag cblanco ★
  • The British Forces flag 보드카 중대
  • Oberkommando West flag VonManteuffel
  • Ostheer flag Heartless Jäger
uploaded by XXxxHeartlessxxXX

Board Info

328 users are online: 328 guests
1 post in the last 24h
17 posts in the last week
134 posts in the last month
Registered members: 45019
Welcome our newest member, dsers
Most online: 2043 users on 29 Oct 2023, 01:04 AM