Jump to content
Sign in to follow this  
KeyCat

Armour Battle Fix MP 1.00 released

Recommended Posts

After some heavy multiplayer testing within our group I'm happy to say that version 1.00 of ABF is done!

Overview.

---------

This script makes surviving in a tank battle against enemy AI possible and you can adjust the level of difficulty from "arcadish style" to very hard by tweaking two values when initalizing the script.

IMHO the problem in original OFP when it comes to tank battles against the AI is that the AI is to good and will easily kill you with their deadly accuracy before you have time to even react to them!

If you jump into a vehicle (tank/APC in this case) it's a matter of seconds before the AI magicly picks you up on their "uber radar" and blow you away if they are in the vincinty. Most of the time they do it with one or two very well aimed sabots that seldom misses and sometimes they also fires when outside your view distance.

Not to mention if there are enemy helicopters or planes in the air! Then you can expect a AG missile inbound the moment you start up your engines and you have very little or no time to even react to the threaths.

Armour Battle Fix MP remedy the above mentioned problems and (IMHO) improves the gameplay in co-op tank missions tenfold! Now we finally have at least a fair chance to react to the threaths and survive in a tank battle against enemy AI!

Features:

- Works (only) in multiplayer!

- Makes co-op's as tank crew against enemy AI armour a bit more fair.

- Enemy AI will fire their main guns frequently but miss you more often, however it is still possible to be hit and killed by them.

- Limits the AI to not fire outside view distance (depends on the values used so it may still happen)

- Automaticly detects side of the tank/APC object (same script for all tanks in OFP).

- Possibility to lay a smoke screen that obscures the AI's sight (optional and based on JAM 2 obscuring smoke grenades).

Requirements.

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

OFP Resistance 1.91+

Invisible Targets 1.30 addon (included in the ZIP-file)

JAM 2 addon (included in BAS Deltaforce pack among others)

Credits

-------

Lester, JAM Team, DKM Team, Amalfi

Version history.

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

1.00 [Released 2004-08-13]

- Initial release.

See readme.txt and example mission for more details.

Armoured Battle Fix MP 1.00

Enjoy!

/Christer (a.k.a KeyCat)

Share this post


Link to post
Share on other sites

Nothing against your mod, but I find the AI reacts in tank battles well. They are meant to be professional crew or AT soldiers, this is what would happen in real life as well. (not that a tank jsut explodes like in OFP all the time)

The main concern I have with AI armor is that it does not engage enemy soldiers agressively enough at times. Especially if you have some soft cover like a car blocking.

Basically, I know that if I were to play against professional human crew or AT soldiers, it would be even harder than against OFP AI. tounge_o.gif

Share this post


Link to post
Share on other sites

Hi bn880,

Quote[/b] ]

Nothing against your mod, but I find the AI reacts in tank battles well.  They are meant to be professional crew or AT soldiers, this is what would happen in real life as well.

That may be true (I've never been in a real tank battle?) but I disagree and even if I strive for realism there is also a thing called gameplay. For me there is no enjoyment at all in being almost instantly killed by a Hind's AG missile that they fired beyond your view distance.

This script at least gives mission makers the option to have it a bit more fair and it is tweakable from very easy to very hard (almost BIS "uber AI" level).

Jump into the M1A1 tank that is behind you (not using the script) in the example and drive ~2 km east and tell me how long you survive and if you had any chance to react to the threaths wink_o.gif

Anyway, thanks for your comment!

/Christer (a.k.a KeyCat)

Share this post


Link to post
Share on other sites

awesome work mate!  biggrin_o.gif

... i am just dreaming of GL2 and ABF could be implemented in such way that mission automatically have the changes without editing  ghostface.gif

Share this post


Link to post
Share on other sites

Just tried the demo mission out. First I hopped into the "scripted" tank (the one w/the smoke), and drove myself to the east. Spotted some enemy armor on the horizon thru my radar, and decided to drive up into the hill where they can't shoot me. Enemy chopper comes flying at me, and I order my AI gunner to start throwing some lead at it. I don't notice it at first, but the hind doesn't throw any missles my way. It just shoots its chain gun, which I can sometimes avoid by driving perpendicular to his direction of fire. I have to take over for the AI gunner who can't seem to lead off, and I shoot the thing down.

Next, I drive up onto the hill, and shoot down at one of the tanks. He shoots back at me, but misses. I drive back behind the crest of the hill where he can't hit me while I reload. Then I drive back to the edge and repeat. Using this method, I destroy one of the T80s, and I'm sure that I could finish off the rest, so I quit.

Next, I try things in the "unscripted" tank. I drive to the same hill as before, and up comes the hind, ready for action. This time, I notice he is shooting his real payload at me--his missles. I take a hit but can still function, and I frantically try to target him so my gunner can start shooting. He shoots another missle my way, but misses as I back down the crest of the hill. I remember how bad my gunner was at shooting down the last guy, so I hop into his seat just as the hind passes over my head, and starts to turn around. I switch over to Sabot, and score a direct aerial hit (is that even possible in RL?). Next I try to use the same strategy on the tanks as I did before, driving behind the crest of the hill to reload, only this time, they are more accurate when I show myself, and I end up getting blown to bits.

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

  So, lets see... what to say. Well, I don't think this script makes things very realistic. I agree with bn880; things are pretty realistic as is, as long as you have an AI as your gunner. An Abrams can be cruising thru the desert at 40mph, in the middle of the night (viewrange = 0), and can directly hit another tank from like 2000 meters or more away. Modern tanks have stabilized turrets, and computer controlled targeting systems which make this possible.

  The AI can do that in OFP. So can you, as long as you are commanding the tank with an AI gunner. I'll agree though, that when the player is the gunner, it is pretty tough and unrealistic, since he has to manually aim every shot.

 But having choppers not fire their missles at you?! As far as realism goes, that is ludicrous. Again, an apache can blast the *$#% out of a tank from thousands of meters away, IRL. It happened in Iraq many times. Best defense? Have some anti-aircraft protecting the tanks (eg, shilka).

 But I do have problems with the AI too. Like bn880 said, the AI doesn't act aggressively/realistically enough. When my tank was in those hills, the other tanks just sat there in the open, instead of trying to surround me. If you are on foot and hide behind a car, the tank just sits there and waits for you to get in sight again. Also, it REALLY pisses me off that the AI can magically tell the difference between an empty vehicle and a crewed one, even when its engine is off.

   Now, gameplay-wise, I'd agree that it is easier this way. It lets you go "rambo style" against other tanks, which is impossible otherwise. Normally there is no way a single tank could take out 2-3 other tanks AND a chopper. So, overall I'd say, that you met your goal, but that personally, realism is more my style.

EDIT

Oh yeah, is there any reason this script can't be SP compatible? Usually it's the other way around...

Share this post


Link to post
Share on other sites

Hi GB,

Thanks for your comments... Just want to clarify some of the things...

Quote[/b] ]

Now, gameplay-wise, I'd agree that it is easier this way. It lets you go "rambo style" against other tanks, which is impossible otherwise. Normally there is no way a single tank could take out 2-3 other tanks AND a chopper. So, overall I'd say, that you met your goal, but that personally, realism is more my style.

1st of all you did not read the README.TXT did you tounge_o.gif

It will work in SP (and the editor) but for this version to work as intended you should play it with full human crew (i.e no AI's), if you study the script you will se why wink_o.gif

2nd, I deliberately made the example very easy for the tank that uses the script, I would say it is almost "arcadish" style. This was done to show the difference between how easy it could be if you want to. If my memory is correct I call the script with the following values in the example.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

[this,0,15,true] exec "abf_main_mp.sqs"

Try a higher value on the second parameter and lower the third and you will see things change. This way the mission designer can decide for himself how easy/hard the mission will be. In our co-ops we use the following (still testing/tweaking).

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

[this,20,5,true] exec "abf_main_mp.sqs"

I say, play around with the values while testing!

Quote[/b] ]

Oh yeah, is there any reason this script can't be SP compatible? Usually it's the other way around...

It's indeed possible to do a SP version that gives the same results as the MP version with a full human tank crew but since I only play MP I didn't bother but will consider it if enough interest.

If someone likes it as it is by default due to realism thats perfectly OK with me and they don't have to bother with adding scripts that takes away some of their performence. But for our co-op group this script made armoured battles against AI fun and this is what OFP is all about for me anyway!

PS: You could think of ABF as "high dispersion ammo" for the AI tanks and we use it just like we use the HD ammo in JAM 2, to enhance our gameplay and have more fun...

/Christer (a.k.a KeyCat)

Share this post


Link to post
Share on other sites
Quote[/b] ]1st of all you did not read the README.TXT did you

Lol... you caught me :P. I read the first couple lines, but it seemed like a duplicate of your first post.

Anyway, now I see that your original intention was for a full-human crew in coop. For that, I think this script would be perfect and required to balance gameplay, since a human crew is at an unrealistic disadvantage (since it doesn't have access to auto-targeting systems of the tank). The way choppers don't use their missles against you I still think is very unrealistic, but I could see how it would be nice for playability in coop missions.

I should also point out to others, that this script would work equally well on any type of vehicle; not just tanks. For example, you could run it on a truck, and make a mission where the player drives thru a valley being shot at by tanks, and actually has a chance to live.

My only question about the script is: how does it affect AT soldiers?

After opening up the script and looking at it, I could see no reason why it wouldn't work in SP, or without a full human crew. Obviously from my little experience, it worked fine in MP with 2 AI crew members. Actually, it could work on a fully-AI crewed tank, if you just replaced this line:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">; Wait until some of the crew gets in the _object

if ((driver _object == player) || (gunner _object == player) || (commander _object == player) || (isNull player)) then {goto "check_side"} else {goto "start"}

With this one:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">; Wait until some of the crew gets in the _object

if ((count crew _object) > 0) then {goto "check_side"} else {goto "start"}

That means the script would start when anybody, AI or not, gets into the vehicle.

I looked thru the script, and found a few problems:

Bug found in this line of the script:

if (side _object == civil) then {goto "civil_side"}

"civil" isn't a 'side', unless the comref is wrong. It needs to be "civilian" (misspelling intended).

Also, this line is kinda weird, as it will tend to place the target within a square area to the NW of the tank:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">; Move invisible target0 to random spot around your tank/APC

_target0 setPos [((getPos _object select 0) + (random _proximity) - (random _proximity)), ((getPos _object select 1) + (random _proximity) - (random _proximity)),(getPos _object select 2) + (random 3)]

Could be replaced with this, to make it fall within a circular area centered directly on the tank:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">; Move invisible target0 to random spot around your tank/APC

_dir = random 360

_dist = random _proximity

_target0 setpos [(getpos _object select 0) + _dist * cos _dir, (getpos _object select 0) + _dist * sin _dir, (getPos _object select 2) + (random 3)]

It also seems like the delay in the main loop could be a little longer, since tanks don't really shoot that fast.

Also, in the smoke launcher script, there are a couple small changes you should make, because I can see some possible problems. First off, this line should be changed:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">; Get players tank

_tank = vehicle player

You should get that information from the _this variable, so you are always sure that _tank is the one that the action was added to:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">; Get players tank

_tank = _this select 0

Along the same lines, you should change this line:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">; Only allow the driver to launch smoke

if ((player == _tank) || (player != driver _tank)) then {exit}

so that it gets its info from who actually used the action:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">; Only allow the crew to launch smoke

if ( NOT((_this select 1) IN crew _tank) ) then {exit}

I changed it so that anybody in the tank can fire the smoke, but if you only want one person to be able to do it, it should be the commander, IMO.

These changes would make the smoke deployable by the AI, when ordered to do so by the player via the radio menu. It also could prevent problems with multiple tanks running the script (I don't know much about MP scripting, so perhaps this wouldn't be a problem).

I can't think of a way to limit the # of smoke screens a tank can shoot ATM, without using global variables. However, you could put in a "recharge time", meaning you make a delay before adding the smokescreen action back to the tank.

To do so, put this line just below the "start" label:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">; remove smokescreen action from tank

(_this select 0) removeaction (_this select 2)

Next, add this line right at the bottom of the script:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">; add smokescreen action back to tank

(_this select 0) addAction ["Launch smoke", "abf_smoke_mp.sqs"]

You could add more delay beyond the 62 seconds already in the script, if you wanted.

Share this post


Link to post
Share on other sites

tounge_o.gif

Quote[/b] ]

The way choppers don't use their missles against you I still think is very unrealistic, but I could see how it would be nice for playability in coop missions.

Again, up the second parameter and the chopper will start to use it's missiles.

Quote[/b] ]

After opening up the script and looking at it, I could see no reason why it wouldn't work in SP, or without a full human crew.

After lots of testing I got the best results by using three "AI decoys" per tank/APC. When playing this MP version each player will generate one "AI decoy" (total 3 for all in crew) and since you are the only player in the tank you will only generate one.

As I previously said, it's fully possible to make a SP version if enough interest exist.

Quote[/b] ]

I looked thru the script, and found a few problems:

Thanks for your suggestions on improvements and possible bugs! I will have to take a closer look at your list tomorrow since I'm currently to intoxicated by some very nice Single Malt biggrin_o.gif

Thanks again and cheers!

/Christer (a.k.a keyCat)

Share this post


Link to post
Share on other sites

Actually, I just thought of a way to limit the number of smokescreens you get.

First off, you would have to create the invisible target at the start of the script, and never delete it until the tank is destroyed.

Next, "addmagazine" some smokeshells or whatever to the invisible target. You would then remove one magazine each time a smokescreen is used. When the target is out of magazines, you can't use the smokescreen anymore.

This all hinges on being able to actually add magazines to the invisible target. I tried adding smokeshells to a tank, but it didn't work. So perhaps you could only add vehicle weapon magazines to the invisible target, if you can't add smokeshells. Or perhaps you can't give it magazines at all, and this won't work sad_o.gif

Share this post


Link to post
Share on other sites

Sorry, missed some of your questions... Should probably put away that bottle but it is so damn tasty smile_o.gif

Quote[/b] ]

I should also point out to others, that this script would work equally well on any type of vehicle; not just tanks. For example, you could run it on a truck, and make a mission where the player drives thru a valley being shot at by tanks, and actually has a chance to live.

Yes! The issue with the AI's "uber radar" affects all vehicles in OFP. As soon you jump into a car/jeep/truck/bike or whatever the AI "magicly" pick you up as soon they have LOS and you are most likely dead meat within seconds (now how's that for realism tounge_o.gifrock.gif)

Thats some critisism I still have with current OFP engine and the main reason to why I wrote the script. Lets at least hope this will be fixed in OFP 2.

Quote[/b] ]

My only question about the script is: how does it affect AT soldiers?

This cheap trick with "AI decoys" will work equally well with AT soldiers.

/Christer (a.k.a KeyCat)

Share this post


Link to post
Share on other sites

Hi again GB,

Quote[/b] ]

Also, this line is kinda weird, as it will tend to place the target within a square area to the NW of the tank:

Hmm, just tested and the "AI decoys" are randomly generated all around the tank with the original code? How did you test it?

Quote[/b] ]

Could be replaced with this, to make it fall within a circular area centered directly on the tank:

Slight typo in your code it should probably be...

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

; Move invisible target0 to random spot around your tank/APC

_dir = random 360

_dist = random _proximity

_target0 setpos [(getpos _object select 0) + _dist * cos _dir, (getpos _object select 1) + _dist * sin _dir, (getPos _object select 2) + (random 3)]

I will test your suggestion and see if it makes any difference but I doubt it...

Quote[/b] ]

It also seems like the delay in the main loop could be a little longer, since tanks don't really shoot that fast.

The delay has nothing to do with AI's shooting frequency! It decides how fast the "AI decoys" will be updated on the clients and choosen values are a balance for not taking to much CPU resources and bandwidth. Making it to slow will make the "AI decoys" trail to far from the tank when you drive.

Quote[/b] ]

I changed it so that anybody in the tank can fire the smoke, but if you only want one person to be able to do it, it should be the commander, IMO.

The reason why only the driver can pop smoke is that the smoke in current version is aligned with the tanks hull, not the turret as it should be. I will eventually fix this in a future version if I can find an easy way to get the direction of the turret/gun.

Regarding limiting the number of smoke screen I'm sure I will come up with something.

Thanks for your comments and suggestion!

/Christer (a.k.a KeyCat)

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  

×