Jump to content
Sign in to follow this  
spamurai

[Questio] Getting the AI to capture Camps.

Recommended Posts

How much work would it take to modify the AI's Squad script to get the Resistance and AI Squads to look for camps to capture before attempting to capture a Towns Depot?

I'm having a little trouble finding the place where the scripting physically tells the AI leader to go to a Depot and Capture it when it's hostile. I hope it can be modified so the leader looks camps to capture first.

Share this post


Link to post
Share on other sites
How much work would it take to modify the AI's Squad script to get the Resistance and AI Squads to look for camps to capture before attempting to capture a Towns Depot?

I'm having a little trouble finding the place where the scripting physically tells the AI leader to go to a Depot and Capture it when it's hostile. I hope it can be modified so the leader looks camps to capture first.

Hi!

WACO has this AI behavior.

Check (in latest WACO version):

- Server\AI\AI_Resistance.sqs lines 38 to 52

- Server\AI\Advanced\Advanced_UpdateSquad.sqs lines 484 to 490

Basically, resistance AI try to re-capture camps if they are on the

same side of the city, preventing *all* resistance teams converging on

a single camp. They will also re-take depots.

Normal AI teams (i.e., east and west) try to capture camps if they are

close (within 1000m) and hostile. This behavior will change somewhat

in the upcoming WACO v1.1.6. It will then be required to capture a

certain percentage of camps before the town itself can be captured. By

default this percentage is 50%. The AI has also been overhauled to

capture camps of a town more effectively.

Doomguy out

Share this post


Link to post
Share on other sites

Thanks Doomguy. that's awesome.

We're gonna try out WACO Warfare on our server later too. Is it PvP or strictly Co-Op?

Share this post


Link to post
Share on other sites

Hi Spamurai,

Let me know how it works out! WACO is designed for COOP, but PvP will work as well. I'm not sure the balance between OPFOR and BLUFOR is perfect, however. BLUFOR gets the Javelin, for instance, while OPFOR does not. OPFOR doesn't (yet) have a bomber with LGB's.

Doomguy

Share this post


Link to post
Share on other sites

Well, so far things look pretty good. Some good features in it.

Not sure about the Inventory balance between sides though, but that can be fixed. More of a concern is the way respawn and inventory is handled. It appears to make it hard to sustain PvP in towns because the player does not respawn with his last Gear Loadout and the player can't purchase new Gear at a Camp.

The current method does have merit for PvP though, since players are accountable for things they buy and death is not a free meal ticket to get more heavy items like Anti-Tank rockets. Also, lacking the ability to build things at camps is also welcome to some degrees, like the absence of instant walled forts and turrets.

----------------

I was wondering if it would be ok to port WACO features into a map that is of the full Island. If so, we'd need some help in understanding how things are setup so they don't get broken. Certain things would have to be adjusted, like I think we'd remove the RACs Radio towers since it would be more about fighting in PvP, then fighting the AI.

Otherwise, I think you've done good work here Doomguy and I encourage you to keep going with it.

Share this post


Link to post
Share on other sites

Feel free to port it!

The airport will pose an issue because right now the scripts only deal with one airport. It's easier just to copy the radio towers with the towns and keep them in - they have no effect if a player's side holds a town anyway.

Doomguy

Share this post


Link to post
Share on other sites

All done. We ported it and it is running on our server with a few tweaks. The AI have been cranked up to high, the full island is populated and a few setting adjusted.

So far it runs rather well.

Just that one config error that pops up on first loading of the map.

Thanks Again Doomguy.

Share this post


Link to post
Share on other sites

Sounds great! Let me know how it works out - especially with the AI path finding in the north of Sahrani, where there are many mountain ranges. And around Corazol!

Oh yeah, please release it biggrin_o.gif

Doomguy

Share this post


Link to post
Share on other sites

Things are going well. Still need to fiddle with a setting or too, nothing major.

One thing I would like to ask about though is the way Respawning is handled. I noticed that players do not respawn with their selected Gear loadout, but instead respawn with a default loadout. At first I wasn't sure this was a good idea, but I have come to think that it does have some good gameplay merit.

The question is, can it be modified to obey ACE default loadouts instead of the generic default one? Warfare (or maybe WACO) overrides the basic starting slot loadout with a generic one. So... An ACE_US_Army_Sniper is stripped of his M24 on spawning in.

That way, players still have to re-buy customized requipment for themselves on death, but the team can't get stuck without some basic ability. In other words, if worse comes to worse, atleast somebody on the team will spawn with atleast 1 AT rocket instead of everybody being able to respawn with AT Missles.

It emphasizes individual roles in teamwork more.

Share this post


Link to post
Share on other sites

I'm not sure I understand completely. In WACO/Warfare every player is a squad leader. When respawning they get (almost) standard squad leader loadouts. Unless you added playable snipers to the mission, I don't understand what you want.

In any case, you can change the loadouts players get upon respawn in Client\Client_Killed.sqs (lines 91 and 92). That is, respawns at a base or camp, not as a team member. If you respawn as a team member you always get the loadout of that team member. If you want to change even that, look at lines 7 and 8 of Client\Functions\Client_PlayerRespawnAsTeamMembers.sqf.

It is possible to get the loadout of a unit type UNIT from the config files, like so:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_weapons = getArray (configFile >> "CfgVehicles" >> "UNIT" >> "weapons")

_ammo = getArray (configFile >> "CfgVehicles" >> "UNIT" >> "magazines")

Doomguy

Share this post


Link to post
Share on other sites

Right. All the mission's starting slots are set for Squad Leader. However, if I change them to other types of Starting Positions, everyone still spawns with a default loadout of 4 Magazines and 4 Grenades.

They spawn in as the proper model (EI: Armor Crew spawn in looking like Armor Crew). But they are stripped of their weapons and equipment and given 4 magazines and 4 grenades.

In otherwords, not everyone starts as a Squad Leader, some start as a Medic... some as Armor Crew... ect ect. The catch is they can't be stripped of their starting equipment every time they respawn at a base or camp. They should "default" to it.

EDIT: Oh, and if I can pester you just a wee bit more.... which folders were updated in the new Version of WACO so I can port the changes over? smile_o.gif

Once again, thanks for your help with all this. It's nice when ideas can manifest themselves into a playable mission because someone like you is open and willing to help.

Share this post


Link to post
Share on other sites
Quote[/b] ]Right. All the mission's starting slots are set for Squad Leader. However, if I change them to other types of Starting Positions, everyone still spawns with a default loadout of 4 Magazines and 4 Grenades.

They spawn in as the proper model (EI: Armor Crew spawn in looking like Armor Crew). But they are stripped of their weapons and equipment and given 4 magazines and 4 grenades.

In otherwords, not everyone starts as a Squad Leader, some start as a Medic... some as Armor Crew... ect ect. The catch is they can't be stripped of their starting equipment every time they respawn at a base or camp. They should "default" to it.

Ok I see now. You could do the following...

In Client\Client_Killed.sqs change lines 91 and 92 so they look like:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">respawnWeapons = getArray (configFile >> "CfgVehicles" >> TypeOf player >> "weapons");

respawnAmmo = getArray (configFile >> "CfgVehicles" >> TypeOf player >> "magazines");

Also in Client\Init\Init_Client.sqs change lines 188 and 189 exactly the same way.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">EDIT: Oh, and if I can pester you just a wee bit more.... which folders were updated in the new Version of WACO so I can port the changes over? :)

Lots ;-) I use merge tools to find out these things myself. Try WinMerge, which I believe is free-of-charge.

Doomguy out.

Share this post


Link to post
Share on other sites

Presto, just like that, it seems to work. That is awesome, thanks DoomGuy smile_o.gif.

Now, all I have left on my basic wish list is to change the map from 16 to 32 players.

Share this post


Link to post
Share on other sites

That should be extremely easy, just add 16 more playable units to the map? Or am I forgetting something?

EDIT: Well, it is advisable to change the AI team types that the AI commanders will use. They can be changed in Common\Config\Config_AITeams.sqs, lines 358 - 374 for west and lines 704 - 721 for east.

EDIT2: It turns out that you do need to do something more: In InitMission.sqf you need to extend the arrays westTeams, eastTeams, westSlots, and eastSlots. Have a look at lines 160 - 166.

Doomguy

Share this post


Link to post
Share on other sites

Roger. All Done biggrin_o.gif

-=31st Wrecking Crew=- Server is currently running the modified version of the map (if you wanted to see it).

I think we'll spend some time playing it out for a bit before going back and tweaking the dials some more.

Share this post


Link to post
Share on other sites
Roger. All Done biggrin_o.gif

-=31st Wrecking Crew=- Server is currently running the modified version of the map (if you wanted to see it).

I think we'll spend some time playing it out for a bit before going back and tweaking the dials some more.

Meh, I'm at work biggrin_o.gif

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×