Login

russian armor

Switching Commander Abilities

8 Nov 2015, 21:27 PM
#1
avatar of Drabpanzer

Posts: 3

I've been wanting to experiment with editing commanders and their abilities for some time. I decided to start out small by just seeing if I can swap commander abilities of one faction with another. Ex. Giving an OKW commander the Soviet Partisan ability Underground Network and maybe giving commanders more than 5 abilities. But even just that is confusing for a noob like me :S. My mod is step up as a tuning pack but I think it might work as a win condition, idk. Any help on this topic is appreciated.:D
9 Nov 2015, 01:38 AM
#2
avatar of eliw00d
Honorary Member Badge

Posts: 756 | Subs: 8

Just change the requirements of the ability.
21 Nov 2015, 19:19 PM
#3
avatar of Planet Smasher
Senior Modmaker Badge

Posts: 632 | Subs: 1

I'm having some trouble with this. For example, I tried to replace the MG34 call-in on the OKW Luftwaffe commander with a recon plane. So I first cloned the MG34 dispatch ability:

abilities\west_german\modal_ability\dispatch_ability\mg34_dispatch

To make it disappear in-game, I changed the ui_position to -1; that worked. I then made a copy of the Ostheer recon plane:

abilities\german\modal_ability\commander_ability\stuka_air_recon

With the name changed to:

abilities\west_german\modal_ability\commander_ability\luftwaffe_stuka_air_recon

In the requirements, I changed the required_player_upgrade from:

upgrade\german\commander\ability\recon_plane

To:

upgrade\west_german\commander\ability\mg34_dispatch

Since that unlocks at 1CP and both the upgrade and the ability for the recon plane normally unlock at 4CP, I figured that I wouldn't need to change anything else. The other requirements are basically just '4CP' and 'no blizzard' and I obviously kept those.
But it doesn't appear in-game, so I must be doing something wrong. Does the ui_position have any significance apart from the fact that it shouldn't be set to -1? Do I maybe need to clone the MG34 dispatch ability, keep the name and change it to send a recon plane?

Any help is appreciated!
21 Nov 2015, 20:24 PM
#4
avatar of eliw00d
Honorary Member Badge

Posts: 756 | Subs: 8

You have to modify the existing ability, as you pointed out in your question.
21 Nov 2015, 20:41 PM
#5
avatar of eliw00d
Honorary Member Badge

Posts: 756 | Subs: 8

The reason why is that you cannot change which abilities belong to a commander, you can only override the existing ones with clones.
23 Nov 2015, 12:43 PM
#6
avatar of Planet Smasher
Senior Modmaker Badge

Posts: 632 | Subs: 1

First off, thanks for your help, as always. I tried again. First I cloned:

abilities\west_german\modal_ability\dispatch_ability\mg34_dispatch

Then I copied the ability_bag from:

abilities\german\modal_ability\commander_ability\stuka_air_recon

And pasted into the former. As before, I then changed the required_player_upgrade from recon_plane to mg34_dispatch. In-game, the MG34 ability was gone, but the recon plane was still not visible.

I then opened the XML in Notepad++ and changed the pgbid (which was copied from stuka_air_recon as well, for some reason) back to the one from mg34_dispatch. This did not help either.

Next, I changed the ui_position from 40 to 101, as another ability in OKW Luftwaffe doctrine has it set to 40 already. I also removed the required_player_upgrade entirely. It's still not showing up in-game, though.

Any ideas? Are there any other IDs still pointing to some Ostheer commanders? Do I need to create the new ability completely 'by hand', even if I actually want a straight copy?
23 Nov 2015, 13:47 PM
#7
avatar of eliw00d
Honorary Member Badge

Posts: 756 | Subs: 8

Did you clone to the same name AND location as the original? If so, the pbgid should already match.
23 Nov 2015, 14:08 PM
#8
avatar of Planet Smasher
Senior Modmaker Badge

Posts: 632 | Subs: 1

I did, and the pbgid did stay the same then. But if I paste in the ability_bag from the recon plane, the output shows this:

UniqueID contains an ID which is already used pbgid, c:\coh2stuff\instances\abilities\west_german\modal_ability\dispatch_ability\mg34_dispatch.xml, old 14326 new 1073741832.

Then it changes the pbgid from 14326 (MG34) to 1073741832. Recon normally has 80. And that's even though I copy-pasted only the ability_bag, not the pbgid as well.
23 Nov 2015, 14:22 PM
#9
avatar of eliw00d
Honorary Member Badge

Posts: 756 | Subs: 8

Don't paste the ability bag, then.
1 Dec 2015, 22:08 PM
#10
avatar of Dreadbot
Donator 11

Posts: 94

eliw00d, do you have any idea what actually controls which commander abilities show up when, aside from the contents of their requirements section?

I ask because I've also been having trouble with abilities seemingly randomly not showing up after cloning them and changing the required_player_upgrade. Seems like there's something going on behind the scenes.
1 Dec 2015, 22:18 PM
#11
avatar of eliw00d
Honorary Member Badge

Posts: 756 | Subs: 8

Commanders have Commander Abilities.

Commander Abilities reference Abilities.

You cannot create or even edit Commanders OR Commander Abilities.

You CAN create and edit Abilities.

Therefore, you can edit the Abilities that are referenced by Commander Abilities, to the point where they are essentially like new Abilities.

So, make sure you are right clicking on the Ability in a Commander Ability and selecting "Go to reference". That way, you are editing the right ability. Other than that, it is up to actions and requirements. If any actions are invalid (like referencing null for something), the ability will not show up.
1 Dec 2015, 22:27 PM
#12
avatar of Dreadbot
Donator 11

Posts: 94

Well until the British Forces release the Commander Abilities referenced an upgrade instead of referencing the actual ability directly (i.e. the upgrade field is used instead of the ability field). Then the ability used that upgrade in its requirements section. But an ability with one of those upgrades does not always show up, and I'm wondering why.

Edit: Okay, so one of the ones I had a problem with is recoup_losses, which is referenced directly because it's a newer one. I thought it might not be b/c for some reason it still uses an upgrade.

So what I'm wondering specifically then is, what makes already existing abilities which are NOT referenced directly show up, and new abilities (created by a modder) not show up?
1 Dec 2015, 23:16 PM
#13
avatar of eliw00d
Honorary Member Badge

Posts: 756 | Subs: 8

I am not sure I understand the question. All Commander Abilities reference Abilities. It has been that way since the army_bag was added to the Attribute Editor (before that, the racebps had a list of player abilities that were unlockable by upgrade).

Keep in mind that, in order for your ability to be considered an "edit" (meaning it replaces the existing one), it must have the same name, path, AND pbgid.

Edit: Actually, I guess they do not all reference Abilities. Interesting. Well, there is a list of abilities in the army_bag, so check there. Those are ones that are unlockable with upgrades given by the Commander Ability.
1 Dec 2015, 23:42 PM
#14
avatar of Dreadbot
Donator 11

Posts: 94

Holy smokes! That is exactly the answer I was looking for! The weird thing is I've made AI-related changes under army_bag, but totally did not notice the glaring "abilities" at the top. Thank you for bringing my attention to it :)

With this I have enough to work with to make pretty much any commander ability alteration I can think of (the only problem before was that I wanted to have more total abilities than there currently is).
2 Dec 2015, 21:08 PM
#15
avatar of Planet Smasher
Senior Modmaker Badge

Posts: 632 | Subs: 1

I managed to get it to work now as well. Thanks for the info!
18 Jan 2016, 19:00 PM
#16
avatar of Drabpanzer

Posts: 3



Yeah, I think I've got it.

Sorry for taking soooo... long to respond, I had only just checked this tread less than a month ago and was surprised (and delighted) to see all the responses. I think I understand how the system works and have made many more changes other than this one. Glad to have this help more than just me.:D

P.S. Is it possible to give commanders 6 or more abilities since they originally only have 5?
18 Jan 2016, 19:09 PM
#17
avatar of Dreadbot
Donator 11

Posts: 94

It certainly is. I believe it's only limited by the amount of space in the UI (which, obviously, is not a lot).
18 Jan 2016, 19:10 PM
#18
avatar of Planet Smasher
Senior Modmaker Badge

Posts: 632 | Subs: 1

Sure, why not? Just put them all in army_bag/abilities and give them appropriate requirements. I use required_all_in_list containing several required_player_upgrade that only one commander has in that combination.

You can even put abilities in there that don't have anything to do with commanders at all.

Edit: Too late :D
18 Jan 2016, 19:29 PM
#19
avatar of Drabpanzer

Posts: 3

It certainly is. I believe it's only limited by the amount of space in the UI (which, obviously, is not a lot).
I was pretty sure that was the case. I've seen a community map that featured the troops training ability available to all players on the map, but that was made possible by scar coding unique to that map. And the way how the king tiger was switched to a dispatch ability that was added to what would be the 6th ability position, I presume.


Sure, why not? Just put them all in army_bag/abilities and give them appropriate requirements. I use required_all_in_list containing several required_player_upgrade that only one commander has in that combination.
So I'd clone a 6th ability and in the requirements add the upgrade requirements of all the other abilities of that specific commander. Also, the 6th ability should be one that has the highest command point requirement, since it would require the activation of all previous abilities, yes?
18 Jan 2016, 22:23 PM
#20
avatar of Planet Smasher
Senior Modmaker Badge

Posts: 632 | Subs: 1

So I'd clone a 6th ability and in the requirements add the upgrade requirements of all the other abilities of that specific commander.

Yes, that works. But you don't really have to use all of them as long as you have an upgrade or a combination of upgrades that only your desired commander has.

Also, the 6th ability should be one that has the highest command point requirement, since it would require the activation of all previous abilities, yes?

CP requirements are stored in two places: The ability's own requirements as well as the required commander upgrade's requirements. So one of the two should actually be redundant.

Let's say you want to add an ability to OKW Luftwaffe at 1CP, doesn't matter what exactly it is. Our requirements will be:

required_resource (1CP)
required_player_upgrade (attributes\upgrade\west_german\commander\ability\fallschrimjager_dispatch)

That's already enough, because no other commander has Fallschirmjäger. But the upgrade for Fallschirmjäger has a required_resource at 3CP. So you would also need to clone that upgrade, keep the name and remove the required_resource. But that's alright, because the Fallschirmjäger ability also has the CP requirement, so it should still work fine.
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

585 users are online: 1 member and 584 guests
capiqua
1 post in the last 24h
7 posts in the last week
39 posts in the last month
Registered members: 49061
Welcome our newest member, Rihedcfrd
Most online: 2043 users on 29 Oct 2023, 01:04 AM