Login

russian armor

How to make Infantry units auto-seek cover?

25 Jun 2017, 10:18 AM
#1
avatar of Vangruffe

Posts: 139

I had an older mod where the infantry units will auto-search for cover when the player uses Attack-Move. I'm trying to do that now but I.., forgotten how to do it. May you guys please help me?

EDIT: Auto-search cover makes the infantry units automatically take cover at the nearest available cover (world_object, a sandbag, a wall, etc)

EDIT: Also, I lost the files to the older mod, which is why I'm seeking help here.
25 Jun 2017, 21:49 PM
#2
avatar of Angrade (Ægion)
Senior Modmaker Badge

Posts: 766 | Subs: 2

I had an older mod where the infantry units will auto-search for cover when the player uses Attack-Move. I'm trying to do that now but I.., forgotten how to do it. May you guys please help me?

EDIT: Auto-search cover makes the infantry units automatically take cover at the nearest available cover (world_object, a sandbag, a wall, etc)

EDIT: Also, I lost the files to the older mod, which is why I'm seeking help here.


I think the single player units in the soviet campaign did this to a degree. Perhaps you can start looking there? If I remembered correctly shock troops did this in mission one. I took a quick look at the mod files and I think what you are looking for is the sbps unit squad_combat_behaviour_ext. There is one called dive for cover on some units such as m11_shock_troops.
25 Jun 2017, 22:52 PM
#3
avatar of LimaOscarMike

Posts: 440

that how it end up with squad dancing

they will not fire a weapon till they get to cover properly (if there is cover nearby) ,like old captain when RE zook does it job better because there is no squad dancing

but if you can find a way to fix that would be cool because at somepoint squad also dont get to cover position properly either Feelsbadman
30 Jun 2017, 09:48 AM
#4
avatar of Vangruffe

Posts: 139



I think the single player units in the soviet campaign did this to a degree. Perhaps you can start looking there? If I remembered correctly shock troops did this in mission one. I took a quick look at the mod files and I think what you are looking for is the sbps unit squad_combat_behaviour_ext. There is one called dive for cover on some units such as m11_shock_troops.


I'm not sure what I"m doing wrong. I copy/pasted the exact strings into my sbps but the units don't dive for cover when being shot at. Perhaps I'm missing something? Has it worked for you?
30 Jun 2017, 20:13 PM
#5
avatar of ZombiFrancis

Posts: 2742

I think it is hard coded that infantry squad entities don't seek cover based on combat or attack move. I have tried to reintroduce it a number of times over the years and couldn't get it to work. I haven't tried in a while though, maybe not even since brits.

I think it is similar to infantry spacing in cover.
31 Jul 2017, 19:46 PM
#6
avatar of Mr.Smith

Posts: 2636 | Subs: 17

If you manage to find out a solution to this, I would be interested to know. Who knows, maybe if it doesn't interfere with player control too much, we can even add it to the game.

One of the things that made CoH1 look absolutely amazing imo, was infantry squads ducking in and out of craters like wildcats, when under fire. This made combat looks more.. alive. Contrast this with the completely stationary riflemen/volks squads, and you get what I mean.

For the purposes of the live game, it would be cool if infantry models would hop about while out of cover, but they would stand still when hiding behind sandbags (so as not to interefere with player control).

5 Aug 2017, 13:36 PM
#7
avatar of Lugie
Senior Modmaker Badge

Posts: 327

That is all controlled by squad-ai, something they removed from the game during the western front forces. Coh-1 still has it, and while it looks great it was a bit clunky at times.

In Coh-2 squad-ai has actually been improved, with more entries for different encounters. Units are also able to choose what side of the cover is best (if it is flagged as directional cover). Units only seem to dance/glitch during weapon cooldown (it is very rare), but thats more of an animation issue than a squad-ai one. Other bugs include units running out of a trench because there is a cover spot at the other side (trenches have a very wide cover box on both sides, so in some positions it creates cover at both ends), and since it is closer to the enemy, the ai thinks that is a better spot (it isn't). I still think its sad Relic decided to remove it, along with a bunch of other little touches like infantry formations (all infantry now only use the same 4 formations, before/during beta each unit had its own formation). It made battles feel much more alive, with men diving away from explosions, a few men advancing towards the enemy at a time (bounding overwatch)while their comrades give covering fire, etc.

(Shameless self-promotion incoming)
18 Jan 2018, 09:32 AM
#8
avatar of DoggieBalloon

Posts: 64

Sorry, I know this thread is really old but, I really would like help on getting this to work. My mod's playebility depends on it. How did you guys get it to even work?

(Sorry again for reviving an old thread)
19 Jan 2018, 11:40 AM
#9
avatar of Lugie
Senior Modmaker Badge

Posts: 327

Sorry, I know this thread is really old but, I really would like help on getting this to work. My mod's playebility depends on it. How did you guys get it to even work?

(Sorry again for reviving an old thread)


You can check out my tutorial on squad-ai. Look for it in this sub-thread (modding and tools), its buried somewhere around page 3 or 4.

Edit: Its on page 5.
20 Jan 2018, 00:51 AM
#10
avatar of DoggieBalloon

Posts: 64

jump backJump back to quoted post19 Jan 2018, 11:40 AMLugie


You can check out my tutorial on squad-ai. Look for it in this sub-thread (modding and tools), its buried somewhere around page 3 or 4.

Edit: Its on page 5.


Cool, I found it. I'm going to use your example as a playtest. But where do I put the squadai file into (which part in the mod directory and which part in the tools-which I assume is the field called 'squad_ai_file' under 'squad_combat_behaviour_ext'? is it the same for the reaction_file and retaliation_file?)?
20 Jan 2018, 19:23 PM
#11
avatar of Lugie
Senior Modmaker Badge

Posts: 327



Cool, I found it. I'm going to use your example as a playtest. But where do I put the squadai file into (which part in the mod directory and which part in the tools-which I assume is the field called 'squad_ai_file' under 'squad_combat_behaviour_ext'? is it the same for the reaction_file and retaliation_file?)?


Well, dont bother doing that. Squad-ai is currently unmoddable, due to the way its loaded into the game. You can only use whats there.

Each action plays during different conditions, and there are different files for each action. The description when selected in attrib editor will give you info. To find the available squad-ai files, use archive viewer to open up the data archive and search it.
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

695 users are online: 695 guests
0 post in the last 24h
8 posts in the last week
37 posts in the last month
Registered members: 49101
Welcome our newest member, Dorca477
Most online: 2043 users on 29 Oct 2023, 01:04 AM