COH2 Modding: Getting started with the official tools
![avatar of Janne252](/images/avatars/april14_07.png?updated=1398148404)
![Admin Black Badge](/images/badges/badge_ADMIN.png)
![Patrion 1](/images/badges/crowdfunding/patron_1.png)
Posts: 3421 | Subs: 11
You will find apply_modifiers_action under actions. This should give you a basic idea of how to apply modifiers to squads. The modifier you are looking for is modifiers\received_accuracy_modifier.
![avatar of PotisMan](/images/no_av.png)
Posts: 6
I just realised that none off my squads are called squads like yours. But why?
http://gyazo.com/fdccf69e60e947f06fa85efe536f4bcf
I figured it out, i were still in ebps
![:) :)](/images/Smileys/smile.gif)
![avatar of gary.giles71](/uploads/avatar/9396.jpg?updated=1413570577)
Posts: 165
![avatar of nigo](/images/avatars/MAJ_Pope.png?updated=1428069544)
![Senior Editor Badge](/images/badges/badge_SENIOR_EDITOR.png)
Posts: 2238 | Subs: 15
![Relic](/images/icons/r-hover.png)
![avatar of qduffy](/images/no_av.png)
![Developer Relic Badge](/images/badges/badge_DEVELOPER_relic.png)
Posts: 75 | Subs: 11
![avatar of Lokust22](/images/avatars/t_34_76.png?updated=1395609007)
Posts: 79
Thanks a lot for the guide. You made it look simple enough that I thought I would try my hand at it.
Does anyone know how to add a unit to a building? I have figured out how to make a building required in order to make a unit, but I don't think this is the same thing.
Thanks
![avatar of Janne252](/images/avatars/april14_07.png?updated=1398148404)
![Admin Black Badge](/images/badges/badge_ADMIN.png)
![Patrion 1](/images/badges/crowdfunding/patron_1.png)
Posts: 3421 | Subs: 11
EBPs\races\soviet\buildings\base_building\barracks_mp
![avatar of Lokust22](/images/avatars/t_34_76.png?updated=1395609007)
Posts: 79
Buildings will have spawner_ext if they can spawn units. Take a look at (for example) soviet base buildings.
EBPs\races\soviet\buildings\base_building\barracks_mp
Ah, Fantastic.
I browsed right past that variable.
Thanks for the help!
![avatar of Volsky](/uploads/avatar/5898.jpg?updated=1373841607)
Posts: 344
![avatar of Janne252](/images/avatars/april14_07.png?updated=1398148404)
![Admin Black Badge](/images/badges/badge_ADMIN.png)
![Patrion 1](/images/badges/crowdfunding/patron_1.png)
Posts: 3421 | Subs: 11
![avatar of .Trooper..](/images/avatars/osttruppen.png?updated=1394378846)
Posts: 10
![:( :(](/images/Smileys/sad.gif)
I cant press on "Build Mod"
![avatar of steel](/uploads/avatar/10558.jpg?updated=1460210635)
Posts: 1963 | Subs: 1
I cant seem to actually build the modYou've got to save the mod in the Mod Builder (not the Attribute Editor).
I cant press on "Build Mod"
Anyway, Master Janne, do you know how to adjust the entity's behaviour? Here's what I did:
Made conscripts 8 men
-7 men default mosin nagant rifles
-1 man custom entity PPSh 41 SMG.
Now the entity with the PPSh always walks far away from the pack as in like this.
![:snfAmi: :snfAmi:](/images/Smileys/snfami.png)
![:snfPeter: :snfPeter:](/images/Smileys/snfpq.png)
![:snfAmi: :snfAmi:](/images/Smileys/snfami.png)
![:snfMarcus: :snfMarcus:](/images/Smileys/snfmarcus.png)
![:snfQuinn: :snfQuinn:](/images/Smileys/snfquinn.png)
![:snfCHVGame: :snfCHVGame:](/images/Smileys/computerheatvgame.png)
![:snfPeter: :snfPeter:](/images/Smileys/snfpq.png)
![:snfBarton: :snfBarton:](/images/Smileys/snfbarton.png)
You can see that BartonPL is lagging behind Ami and friends. Anyway that's how my custom squad always walks.
Thanks for your help on previous questions of mine.
![:) :)](/images/Smileys/smile.gif)
![avatar of .Trooper..](/images/avatars/osttruppen.png?updated=1394378846)
Posts: 10
![avatar of .Trooper..](/images/avatars/osttruppen.png?updated=1394378846)
Posts: 10
![avatar of Janne252](/images/avatars/april14_07.png?updated=1398148404)
![Admin Black Badge](/images/badges/badge_ADMIN.png)
![Patrion 1](/images/badges/crowdfunding/patron_1.png)
Posts: 3421 | Subs: 11
You've got to save the mod in the Mod Builder (not the Attribute Editor).
Anyway, Master Janne, do you know how to adjust the entity's behaviour? Here's what I did:
Made conscripts 8 men
-7 men default mosin nagant rifles
-1 man custom entity PPSh 41 SMG.
Now the entity with the PPSh always walks far away from the pack as in like this.
You can see that BartonPL is lagging behind Ami and friends. Anyway that's how my custom squad always walks.
Thanks for your help on previous questions of mine.
Well that's weird. Have you tried if "Barton" lags behind with a smaller squad?
Oh plus i cant find it ingame maybe the reason is the code above ? ^^
Those error codes are really hard to debug, I would recommend carefully doing everything again by the tutorial.
![avatar of .Trooper..](/images/avatars/osttruppen.png?updated=1394378846)
Posts: 10
modbuilder.exe Information: 0 : Built FirstMod.mod.
modbuilder.exe Information: 0 : Building FirstMod.mod...
modbuilder.exe Information: 0 : F:\SteamLibrary\steamapps\common\Company of Heroes 2 Tools\AttributeEditorXML.exe --operation ModBinaryBurn --root "F:\SteamLibrary\steamapps\common\Company of Heroes 2 Tools\assets\data\attributes\attributes.xml" --mod "C:\Users\Sam\Documents\my games\company of heroes 2\Mod Projects\My First Mod\attrib.xml" --burn_path "C:\Users\Sam\Documents\my games\company of heroes 2\Mod Projects\My First Mod\instances\FirstMod Intermediate Cache\Intermediate Files\attrib\attrib"
modbuilder.exe Information: 0 : Copying C:\Users\Sam\Documents\my games\company of heroes 2\Mod Projects\My First Mod\locale\english\english.ucs...
modbuilder.exe Information: 0 : Writing C:\Users\Sam\Documents\my games\company of heroes 2\Mod Projects\My First Mod\instances\FirstMod Intermediate Cache\Intermediate Files\info\01f8a729a3f448338a1aa0252dada9a5.info...
modbuilder.exe Information: 0 : F:\SteamLibrary\SteamApps\common\Company of Heroes 2\Archive.exe -c "C:\Users\Sam\Documents\my games\company of heroes 2\Mod Projects\My First Mod\instances\FirstMod Intermediate Cache\ArchiveDefinition.txt" -a "C:\Users\Sam\Documents\my games\company of heroes 2\Mod Projects\My First Mod\instances\FirstMod.sga" -r "C:\Users\Sam\Documents\my games\company of heroes 2\Mod Projects\My First Mod\instances\FirstMod Intermediate Cache\Intermediate Files"
modbuilder.exe Error: 0 : F:\SteamLibrary\SteamApps\common\Company of Heroes 2\Archive.exe failed with exit code -1073741819.
modbuilder.exe Warning: 0 : Error copying C:\Users\Sam\Documents\my games\company of heroes 2\Mod Projects\My First Mod\instances\FirstMod.sga: Could not find file 'C:\Users\Sam\Documents\my games\company of heroes 2\Mod Projects\My First Mod\instances\FirstMod.sga'.
modbuilder.exe Information: 0 : Built FirstMod.mod.
![avatar of shpongle](/images/no_av.png)
Posts: 41 | Subs: 1
Also, like others noted. The attribute list is different from what we have. It seems we are missing anything related to squads. We can set attributes for single soldiers but not for squads.
![](http://oi59.tinypic.com/anmnwp.jpg)
![avatar of steel](/uploads/avatar/10558.jpg?updated=1460210635)
Posts: 1963 | Subs: 1
I did the same thing with the grenadiere this time with an MP40 and
Well that's weird. Have you tried if "Barton" lags behind with a smaller squad?
![:snfBarton: :snfBarton:](/images/Smileys/snfbarton.png)
![avatar of shpongle](/images/no_av.png)
Posts: 41 | Subs: 1
I did the same thing with the grenadiere this time with an MP40 anddon't lag behind. Only conscripts
Maybe it depends on the individual speed of the unit?
![avatar of Sarantini](/uploads/avatar/6366.jpg?updated=1428004593)
![Honorary Member Badge](/images/badges/badge_HONORARY.png)
![Donator 2](/images/badges/crowdfunding/donator_2.png)
Posts: 2181
I did the same thing with the grenadiere this time with an MP40 anddon't lag behind. Only conscripts
If I remember correctly browsing the stats there are squad formation plans for each squad. And for conscripts it was 2 right 2 left and 2 middle
Maybe 8 men screws too much with this ?