Login

russian armor

Question about a win condition pack

23 Aug 2018, 18:08 PM
#1
avatar of SpiderMike

Posts: 7

Hi,
I saw this code in a win condition .scar file :



if (not Player_IsHuman(player)) then
Player_SetSquadProductionAvailability(player, SBP.SOVIET.KATYUSHA_BM_13N_SQUAD_MP, ITEM_REMOVED)
Player_SetSquadProductionAvailability(player, SBP.GERMAN.PANZERWERFER_SQUAD_MP, ITEM_REMOVED)
Player_SetSquadProductionAvailability(player, SBP.WEST_GERMAN.SDKFZ_251_WURFRAHMEN_40_HALFTRACK_SQUAD_MP, ITEM_REMOVED)
Player_SetSquadProductionAvailability(player, SBP.AEF.M7B1_PRIEST_SQUAD_MP, ITEM_REMOVED)
Player_SetSquadProductionAvailability(player, SBP.AEF.T34_CALLIOPE_SQUAD_MP, ITEM_REMOVED)
Player_SetSquadProductionAvailability(player, SBP.BRITISH.SEXTON_SPG_SQUAD_MP, ITEM_REMOVED)
Player_SetSquadProductionAvailability(player, SBP.BRITISH.BRIT_LAND_MATTRESS_LAUNCHER_SQUAD_MP, ITEM_REMOVED)
end



And i want to know if it's possible do do the same thing with commanders abilities ? I want to removes some commander abilities with a win condition pack and not a tuning mod.

Thank you for your help !
24 Aug 2018, 02:34 AM
#2
avatar of eliw00d
Honorary Member Badge

Posts: 756 | Subs: 8

Yes, it is possible.

http://www.fortresseuropemod.com/scardoc/index.html#Player_SetAbilityAvailability

If there is a SCAR function for it, almost anything is possible.
24 Aug 2018, 05:39 AM
#3
avatar of SpiderMike

Posts: 7

Thank you for the link but i'm a big noob in modding i just begin since sunday. Can you just tell me if the code for removing a commander ability begin with :
Player_SetSquadProductionAvailability or it's an other ?
Thank you
24 Aug 2018, 07:49 AM
#4
avatar of SpiderMike

Posts: 7

I would have thought it was Player_SetCommanderAbility but it's not present in the links that you gave me. I also hesitate with Player_SetUpgradeAvailability
24 Aug 2018, 08:23 AM
#5
avatar of Planet Smasher
Senior Modmaker Badge

Posts: 632 | Subs: 1

As you can see in the link, the function you should use is Player_SetAbilityAvailability.

However, some commander abilities, mostly those that are passive, actually don't do anything and their effects come from somewhere else, i.e. squad weapon upgrades or units that become available in tier buildings. If you want to disable them, you will probably have to do it another way.
24 Aug 2018, 08:35 AM
#6
avatar of SpiderMike

Posts: 7

ok thank you !

So if i want to remove fear propaganda is this code the right one ?

Player_SetAbilityAvailability(player, FEAR_PROPAGANDA_ARTILLERY, ITEM_REMOVED)


I'm not interested in removing the passive actions I just want to remove :
- All IL2 abilities
- Fear propaganda ability
- Fire artillery ability

Thank you for your help
24 Aug 2018, 10:03 AM
#7
avatar of Planet Smasher
Senior Modmaker Badge

Posts: 632 | Subs: 1

Since I've never used the function, I'm not entirely sure about the ability name, to be honest. It might be "ABILITY.SOVIET.FEAR_PROPAGANDA_ARTILLERY" or something similar - just try it out and see what works.
24 Aug 2018, 10:14 AM
#8
avatar of SpiderMike

Posts: 7

Ok i'll try when i go home.
Thank you very much !
24 Aug 2018, 10:27 AM
#9
avatar of Planet Smasher
Senior Modmaker Badge

Posts: 632 | Subs: 1

No problem! Let us know if you need any more help.
24 Aug 2018, 13:41 PM
#10
avatar of eliw00d
Honorary Member Badge

Posts: 756 | Subs: 8

Relic has a lot of constants that point to certain blueprints for you, but it's also as easy as:


BP_GetAbilityBlueprint(abilityBlueprint)


Where abilityBlueprint is a string of just the file name of the ability.
24 Aug 2018, 14:07 PM
#11
avatar of SpiderMike

Posts: 7

It works with this code :

Player_SetAbilityAvailability(player, ABILITY.SOVIET.FEAR_PROPAGANDA_ARTILLERY, ITEM_REMOVED)

Thank you very much guys !!!! I learned more with you in a morning than in 5 days. I am extremely grateful for your help !!!

25 Aug 2018, 05:56 AM
#12
avatar of SpiderMike

Posts: 7

For those interested by the mod : https://steamcommunity.com/sharedfiles/filedetails/?id=1491358259

And for those who would like to remove IL-2 commanders abilities don't whrite IL-2 but IL_2

Example : Player_SetAbilityAvailability(player, ABILITY.SOVIET.IL_2_ANTI_TANK_BOMB_STRIKE, ITEM_REMOVED)
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

443 users are online: 1 member and 442 guests
Crecer13
15 posts in the last 24h
41 posts in the last week
95 posts in the last month
Registered members: 44643
Welcome our newest member, Leiliqu96
Most online: 2043 users on 29 Oct 2023, 01:04 AM