Jump to content
alarm9k

Smarter tanks script

Recommended Posts

New mod v1.4 available at withSIX. Download now by clicking:

@smarter_tanks.png

@ alarm9k;

Soon you will be able to manage the promo pages of your content on our web platform and publish new content yourself.

To do so, please hit 'this is me' button on the page while logged in and you will get connected to your work.

For now you can send new content or releases our way through withsix.wetransfer.com or add your notification at getsatisfaction.withsix.com.

Share this post


Link to post
Share on other sites

It should be Server-Side only if you spawn your AI with MCC. If you want to spawn units with Zeus you have to run this stuff on your client, too.

I like the Addon version, too! We play as a tank group and you make it feel a little better.

The Major problem we ever encountered is that enemy MBTs and IFVs always trying to approuch the enemy ( you ) instead of using high or covered terrain/places to engage on greater distance or tries to move laterally.

It would be the best to use the ASR AI "Radionet" feature to align to cannon before the tank itself have Line-of-Sight ( with a little tolerance ) and then driving really slowly to a nearby ( better ) place to open fire after LoS is established and do firing till he got counter fire and back off. Searching new position ( avoiding already used positions/cover ) and do the same stuff again.

But wait ... for starters please try to make the tanks don´t trying to approach us. Its too easy :-/

Thanks you very much for this stuff!

Share this post


Link to post
Share on other sites

Thanks for your feedback, guys.

Do you think this mod could run server-side only?

It currently runs on the server only, not on clients.

please try to make the tanks don´t trying to approach us

This is covered by default "ATTACK" (Engage) behaviour, which I haven't yet found a way to override. Someday I will probably write a separate Engage algorithm, like Rydygier suggested. I hope it can be done at all and it can be done without too much performance loss.

do firing till he got counter fire and back off

ARMA API does not provide a command to move the tanks backwards. It can only be done by issuing a sendSimpleCommand "BACK" while player (you, human) being inside the tank (not to mention that backward movement pathfinding is buggy). I have experimented with some dirty things like setting position every 0.01 sec to emulate reverse movement, but they looked too ugly and unacceptable. So unless BIS adds a separate "move back" command, I'm afraid I won't be able to implement a realistic tank behaviour like firing and reversing back to cover. Of course it's possible to make it retreat, but it will look silly -- turning its weakest spot (rear) towards the enemy and then retreating.

Edited by alarm9k

Share this post


Link to post
Share on other sites

Nice, gonna give this a try! The tank behavior is not "the smartest" by default :)

Share this post


Link to post
Share on other sites

Version 1.5 available:

-Tanks will use different round types agains different targets.

Read the updated info on the first page.

Share this post


Link to post
Share on other sites
Guest

New version frontpaged on the Armaholic homepage.

================================================

We have also "connected" these pages to your account on Armaholic.

This means in the future you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have.

When you have any questions already feel free to PM or email me!

Share this post


Link to post
Share on other sites

RPT spamming

The following error is spamming the RPT:

Bad conversion: array
Error in expression <armor == 0) then {
_men = (_x select 4) nearEntities ["Man", 15];
if (count _men>
 Error position: <nearEntities ["Man", 15];
if (count _men>
 Error 0 elements provided, 3 expected
Bad conversion: array
Error in expression <armor == 0) then {
_men = (_x select 4) nearEntities ["Man", 15];
if (count _men>
 Error position: <nearEntities ["Man", 15];
if (count _men>
 Error 0 elements provided, 3 expected
File alarm\setup.sqf, line 264

It is really really really bad. I counted ~20K lines of that error in the RPT. Have to disable the mod because it hurts performance.

What was going on was that, there were some heavy armoured fighting going on between AI controlled HC tank units about 500m-1000m away. They were spawned in by the AI and given commands by the AI. I had nothing to do with them at all. I was driving around in my own tank, but was not part of that fight. It was just an ambient battle.

Edited by stlassen

Share this post


Link to post
Share on other sites
The following error is spamming the RPT:

Hmmm... I'll look into this.

What is your version of ARMA? Are you using stable (1.26) or dev branch?

Edited by alarm9k

Share this post


Link to post
Share on other sites
Hmmm... I'll look into this.

What is your version of ARMA? Are you using stable (1.26) or dev branch?

I'm using the stable.

I was playing the mission WLA (Whole Lotta Altis).

Large scale battle, most under some AI commander on both sides. These tanks were all under the control of the AI commander, so no AI tank units in a player controlled group.

I, as the player, was driving around in a tank, but I was not in that fight.

Share this post


Link to post
Share on other sites

@stlassen: I didn't have time to play 'Whole lotta Altis' and I couldn't reproduce the error you've been getting, during my usual testing scenarios. I have made some adjustments to the code though, that may or may not resolve the problem :) If you could test it and give feedback, it would be great. Version 1.5.1 is here.

Otherwise I'll do more extensive testing in the weekend.

Share this post


Link to post
Share on other sites
@stlassen: I didn't have time to play 'Whole lotta Altis' and I couldn't reproduce the error you've been getting, during my usual testing scenarios. I have made some adjustments to the code though, that may or may not resolve the problem :) If you could test it and give feedback, it would be great. Version 1.5.1 is here.

Otherwise I'll do more extensive testing in the weekend.

I will do what I can. At work right now and may not have all that much time until thursday, but I will take a look at it. :)

Share this post


Link to post
Share on other sites

So far so good. It seems the spamming has gone.

More tests will be done, though. :)

Share this post


Link to post
Share on other sites

Good. But still not sure whether I guessed right or it was some rare condition in your case, that caused an error. :confused:

Share this post


Link to post
Share on other sites

Good questions. Anything I can do to help find out, other than keep on playing in WLA?

What was the guess you made as to what was wrong?

Share this post


Link to post
Share on other sites

No, there is nothing you can do, unless you want to dive into the code :) Testing and reporting errors is already a lot.

Regarding the guess, I changed this:

_men = (_x select 4) nearEntities ["Man", 15];

to this:

_men = (_x select 4) nearEntities ["CAManBase", 15];

in setup.sqf line 262. The first one returned some strange objects along with actual soldiers. This is the part of script where it identifies groups of soldiers.

Share this post


Link to post
Share on other sites

Gentlemen, those of you who are good in ARMA scripting and are interested in this mod, would you please look at this question. I need an advice from someone, more proficient than me. Sorry for a shameless offtopic.

Share this post


Link to post
Share on other sites

Version 1.6 released:

-Fixed multiplayer bugs (locality shifts). Now works properly in multiplayer and on dedicated server.

-Small bugfixes

Share this post


Link to post
Share on other sites
Guest

New version frontpaged on the Armaholic homepage.

================================================

We have also "connected" these pages to your account on Armaholic.

This means in the future you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have.

When you have any questions already feel free to PM or email me!

Share this post


Link to post
Share on other sites
I need to Have empty vehicles, and move crew into them

No. The vehicle must have a crew. How the crew gets in the vehicle is not important. It can be initially created with the crew inside, or it can be created empty and manned later etc. If there is no crew, the script just sleeps and doesn't perform anything useful, as there is nobody inside to drive and shoot :)

Edited by alarm9k

Share this post


Link to post
Share on other sites
tanks spawned by alive and or mcc

It should work too because the script checks all the vehicles in the game every 30 seconds and runs itself for the new ones too if there are any. So it doesn't matter how they have been added.

Also, updated the 'move the crew into the vehicle' description on the first page to be more clear.

Edited by alarm9k

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

×