Home   Help Search Login Register  

Author Topic: Mando Missile ArmA (ACCEPTED)  (Read 133227 times)

0 Members and 1 Guest are viewing this topic.

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Mando Missile ArmA (ACCEPTED)
« on: 25 Mar 2007, 22:55:01 »


- Simulate most existing missile/torpedo in real-life using any object class present in ArmA able to move.
- Full MP support.
- Add chaff or flares missile defense systems to any AI unit, AI units defending with chaff or flares automatically.
- Add a player controlled Missile Control Center to any playable vehicle.
- Add automatic missile systems to any AI vehicle, AI units enganging with their missiles by their own.
- Add chaff or flares to player vehicles.
- Ammo trucks able to reload missiles and flares/chaff.
- Missiles intercepting missiles.
- Missiles hitting targets now reward with score to the players in the crew of firing units.
- ArmA missile replacement. Now you may replace easily any missile fired in ArmA by a MMA one.
- Remote targeting added. Players or AI may attack targets locked by other units (for example, using laser designators).
- Customizable MCC colours.
- Up to 8 different missile systems per vehicle (what about modeling a big battleship?).
- Visual and MCC (dialog based) locking, tracking and firing systems for players.
- AI units now are able to reload missiles by their own if close enough to an ammo truck.
- Missile systems may be added to units by type or by name. You may add missile systems to every units of the indicated class with a single script executed in your init.sqs or init.sqf.
- Keys and key descriptions used to drop flares/chaff, lock on targets and fire missiles cuztomizables from mandomissile_init.sqf.
- Fully customizable warheads, smoke trails and launch FX scripts.
- More than 30 configurable parameters for missiles (seeker range, endurange, agility, seeker scan arcs, flight profile, etc).
- You may now configure missile reload times after firing for MCCs.
- Anti-radar systems.

Mando Missile ArmA v2.3 (please, do not mirror this resource yet)

Mando Missile online help

Mando Missile demostration videos


Attached below there are two extra basic usage examples:
- basic_missile.Sara: Basic example with two targets (a near chopper and a far away tank) and two radio triggers. The basic firing script is basic_missile.sqs, inside you will find all the firing parameters so you may play with them at will. This example uses the addon, so you dont need to modify or create any description.ext file.

- mando_laserbomb.Sara: A Su34 will support you with laser guided bombs. Call of support using the radio, use the laser designator to paint targets and validate them while the Su34 aproaches the area. This example uses the addon too, so you dont need to modify or create any description.ext file.

Attached below you will find mma_air_combat.Sara.zip. While it is a fully playable mission SP or MP, it is inteded as an example of Mando Missile integration with addons. Inside you will find mma_bis_su34_init.sqf, mma_bis_su34b_init.sqf and mma_bis_av8b2_init.sqf. Three example scripts which are executed from the init field of the planes in the mission, but these script might also be executed from the "Init" EH (or Extended EH) of an addon derived from Su34, Su34B or AV8B2. If Mando Missile is not present in the mission, the planes will behave like normal ones, but if MMA 2.3 or above is present, the planes will reconfigure themselves to use MMA systems. The script activates/deactivates AI/human systems depending on who is into each position of a plane, human or AI.

In the example mission you may fly as OPFOR, BLUFOR or keep grounded as civilian observer.


Update Jan 6 2009
NEW MMA 2.35B teaser
Attached below you will find MMA235_teaser.Intro.zip, which is a teaser of MMA 2.35B new HUD system. Do not mirror, do not include it into any addon and use it only for testing purposes as MMA 2.35 is already quite close to be public.

All mando missile functionalities not used in the teaser demo have been removed to save space.
The new mando_missilevehicle3.sqf HUD handler present in the demo will be heavily modified before 2.35 final verions to allow the customization of several hardcoded parameters in a similar way as current 2.35 TV systems.

MMA 2.35 teaser video, Falcon 4 style

Example video of MMA 2.35B
« Last Edit: 06 Jan 2009, 22:15:14 by Mandoble »

Offline DeanosBeano

  • Addons Depot Staff
  • *****
  • SirDeanosbeano bstowed on me by sui ;)
    • Fraghaus
Re: Mando Missile ArmA
« Reply #1 on: 26 Mar 2007, 00:04:47 »
 no need to thank me m8, i had a fantastic time messing with it.

 you must sleep eat and pee math , your a genius
 
 hope you get the credit for eveyrthing that will spawn from these scripts.

 fanatastic stuff well done there mando

I love ofp

Offline ViperMaul

  • Members
  • *
    • Theatre Of War (Team PvP Campaign)
Re: Mando Missile ArmA
« Reply #2 on: 02 Apr 2007, 22:38:21 »
Mandoble,

I took all day Friday and reviewed your scripts and WOW. Excellent work!!
My job is to use the your automatic Missile Defense System as well as the Manual key press to trigger Chaffs or Flares.
I've got them deploying but I have not been unable to prove that they actually work with STOCK stinger and strella missiles that come with the game.

The tournament I am working with wants to hold off in using the mando missiles until they pass it through the balance team.
This week I am slammed with RL work and was hoping you can tell me what I need to do to confirm that your scripts supports (especially the flares) attracting the standard hand-held stingers and the handheld strellas as these are what I prefer to call them NON-mando missiles.

My thought was to pass on the launcher, the missile type, and target to the mando_missile.sqf script with blank characteristics and hope that would be enough. But I noticed the mando_missile.sqf seems to also uses the createvehicle command in which leads me to believe the script creates the missile as well.

My goal is to adapt your flare script to potientially fool & redirect stock missiles in the game: the stinger and the strella missile.
Would you be so kind as to give me direction in my goal?

ViperMaul
ViperMaul
Theatre of War (Co-Lead Dev)
ACE (Jr Project Manager)

Offline ViperMaul

  • Members
  • *
    • Theatre Of War (Team PvP Campaign)
Re: Mando Missile ArmA
« Reply #3 on: 02 Apr 2007, 22:47:19 »
Also another question about the mando_missileecm.sqf script.

I am very new to scripting but I am learning fast.
My tournament is very concerned with server stress imposed by scripts. Also though they are not scripters themselves yet.
My question is this two-fold. I see in this .sqf script that there is a while do loop.

1) In General, in looking at any script from the community how can I tell if a script is being run on the server only or on the client's machine only?  I assume this is one key factor in causing stress to a server, right?

2) Does the mando-missileecm.sqf script run only on the client's machine? So if I have 5 Ka50 attack helos flown by 5 different human players does this while do loop run on the 5 separate client machines and NOT on the server-side? If not how can this be modified to work while running only on the client-side?

Thanks for your help.
ViperMaul
Theatre of War (Co-Lead Dev)
ACE (Jr Project Manager)

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Mando Missile ArmA
« Reply #4 on: 02 Apr 2007, 23:03:00 »
Certainly mando_missile.sqf creates and controls the missile, so you may use a Stinger or a Strella as models, but they would be mando missiles, not ArmA ones. Chaff and flares are known by mando missiles, but not by ArmA ones so you need to make some changes there.

mando_chaffflares.sqs generates the chaff or flares effect, but also creates a gamelogic at drop position, this gamelogic is stored into "mando_missilechaff" variable of the launcher vehicle. Then you may create an event handler "incomming missile" type attached to the units you want to have chaff/flares. If the event is triggered and "mando_missilechaff" plane/chopper variable is not null nor nil, then you may interfere with the missile, check that and apply the interferences just from the incomming missile eventhandler script. Now, you only need to affect continuously the vectorDir, vectorUp and velocity vector of the ArmA missile so it moves out of target adcquisition range. You may apply the same principle to a plane simulating real active ECM, if ECM is ON, any missile incomming to friendly units may be affected. Hope this is so far clear enough.

Now about MP, Mando missile scripts have not been designed/tested for MP, so I dont really know how compatible they would be. I suspect that current scripts are way complex to MP, so probably much simplifier ones would be needed.

Offline ViperMaul

  • Members
  • *
    • Theatre Of War (Team PvP Campaign)
Re: Mando Missile ArmA
« Reply #5 on: 03 Apr 2007, 00:51:08 »
Thank you greatly for the quick reply!!
I've taken a minute to understand your reply. And I feel good I have done most everything you've mentioned up to the part about applying the interference.

Now I am trying to find within your scripts the code where you actually apply that interference. If you can direct me that would be great. But you have already given me the clue with the "mando_missilechaff" variable with the launcher.

Thank You!
ViperMaul
Theatre of War (Co-Lead Dev)
ACE (Jr Project Manager)

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Mando Missile ArmA
« Reply #6 on: 03 Apr 2007, 01:01:16 »
Remember that my interference is for mando missiles, not for arma missiles. mando_missile.sqf checks continuously for the existance of chaff dropped by missile's target. If present and the missile is flying in active mode, the new target for the missile is the logic attached to the chaff / flares (this is what you may call interference). Chaff routine deletes the chaff cloud after few seconds, and then the missile will try to track its original target again if it is still inside missile's vertical and horizontal scan arcs.

But for ArmA missiles you will not be able to change their targets, you need to affect their velocity vector, vectorUP and vectorDir to "simulate" a deviation, at least a slight one so it cannot track its real target anymore.

To start with, you may try to detect the presence of chaff when missile is incomming, if the missile is closer to the chaff than to the target, delete missile's object. If everthing goes well, in next try instead of deleting it, pick up its current velocity vector and apply it in a continuous loop for 2 seconds (the missile will fly straight without turning). That may be enough for your case.

Offline ViperMaul

  • Members
  • *
    • Theatre Of War (Team PvP Campaign)
Re: Mando Missile ArmA
« Reply #7 on: 03 Apr 2007, 02:13:57 »

First a comment on Chaff / Flares. The SA7 and the Strella, the best google has supplied me is these are IR heat seeking missiles. So I am focusing on Flares. Right?


If I have correct information this code from the mando_missile.sqf is the code that changes the direction IR missiles affected by flares right? if not perhaps you can point me to the example of your code that interferes with the heat-seeking type of missile?


Code: [Select]
while {!_finish} do
{
   if (_mode == 2) then {_target = _rtarget;};

   _chaff = _rtarget getVariable "mando_missilechaff";
   if (isNil ("_chaff")) then{_chaff = objNull;};

   if ((!isNull _chaff)&&(_mode == 2)&&((_mis distance _chaff) < _radarrgn)) then {_target = _chaff;};

   _follow = true;
   _dir = getDir _mis;
   if ((_speed +_accelfact) < _speedmax) then {_speed = _speed + _accelfact;};


   if ((getPos _mis select 0)>1) then
   {
      _posm = getPos _mis;
   };


   if (!isNull _target) then
   {
      _velt = velocity _target;
      _spdt = speed _target;
      _intercepttime = _spdt * 0.5/300;
      _post = [(getPos _target select 0)+(_velt select 0)*_intercepttime,(getPos _target select 1)+(_velt select 1)*_intercepttime, (getPos _target select 2)+(_velt select 2)*_intercepttime + _sealeveloffset];

....


Another question.
So which Mode (0. 1. or 2) == heat seeking mando_missile here in your code?
ViperMaul
Theatre of War (Co-Lead Dev)
ACE (Jr Project Manager)

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Mando Missile ArmA
« Reply #8 on: 03 Apr 2007, 13:18:46 »
If you plan to use mando missiles instead of ArmA ones, then just use initial mode = 2 (missile's seeker active at launch time) for your IR ones. In this case, you dont need any extra code to make these missiles to follow flares dropped from their targets, as it is already implemented.

Now, about the code you post there, note that the only change for the missile script with the presence of flares (or chaff, it is the same with different visual effects) is the current missile target.

Code: [Select]
if ((!isNull _chaff)&&(_mode == 2)&&((_mis distance _chaff) < _radarrgn)) then {_target = _chaff;};

mando missiles in mode 2 will simply track and follow the object stored in _target variable. So, nothing else but changing it, is needed to make the missile to follow the chaff cloud instead of the real target.


But, as said, if you use ArmA missiles you will not be able to change their tartets once they are fired. What you need to do is to mess up with their trajectory, deviating them, or making them to fly straight, so they will not follow (while they will try) the real target for 2 or 3 seconds.

To do that, as said before, you need to modify in a countinuous loop ArmA missile's speed vector, vectorUp and vectorDir, for example, keeping the values present at the moment when the chaff or flares were dropped. This way the missile will fly straight without even turning to catch the target.

None of that is needed if you use mando missiles, as they react when mando chaff/flares are present, so they will really fly towards the chaff or flares cloud, when the chaff or flares dissipate, the missile may be able to track the real target again, if the target is still in the sight of the mando missile.

Offline Nemesis6

  • Members
  • *
Re: Mando Missile ArmA
« Reply #9 on: 03 Apr 2007, 17:42:43 »
Mandoble, I have to say - I found the effects you used just as interesting as the example missions. To tell you the truth, I'm pretty interested in incorporating the explosion effects of the missiles onto units. I knew how to do this in regular OFP, but I'm at somewhat of a loss with SQF files. Could you possibly provide some examples of the explosion effects used elsewhere? I would really appreciate it.
I am actually flying into a star... this is incredible!

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Mando Missile ArmA
« Reply #10 on: 03 Apr 2007, 18:12:34 »
ViperMaul, may be this (attached mission example) is what you are looking for. I just incorporated an small example of what is comming in next Mando Missile ArmA release. The Camel and the chopper have flares, two flare packets each, so they'll be able to avoid two missiles, and I mean ArmA missiles, not only mando missiles  :cool2:

Nemesis, check mando_missiles\warheads\mando_missilehead1a.sqf script, it gets two arguments, the position and the target, forget the target as it is meaningful only for the mando missiles, the rest is code for the effects and the explosion (the example you were looking for).

Offline ViperMaul

  • Members
  • *
    • Theatre Of War (Team PvP Campaign)
Re: Mando Missile ArmA
« Reply #11 on: 04 Apr 2007, 00:19:07 »
Cool is right. I've looked at it and this will save me some time.
The other cool thing is I was close. All I needed was the tight loop to force the ArmA missile to fly straight. And of course you added some other things I would have discovered I needed as well.  And the Sleep (0.005);  I would not have known to place that there at all I'm sure.

Question the _timeini variable doesn't seem to be used unless I'm temporarily blind. What was your intent there?

This is great! Thanks for your help.
ViperMaul
Theatre of War (Co-Lead Dev)
ACE (Jr Project Manager)

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Mando Missile ArmA
« Reply #12 on: 04 Apr 2007, 00:31:04 »
   _timeini = dayTime * 3600;
is there because, as I indicated, mando_incomming.sqf is still unfinished (till next mando missile ArmA release). Currently, the missile will be free of interference as soon as flares disapears (while {!isNull (_target getVariable "mando_missilechaff")}). Flares live for 5 seconds, but I may decide to stop flares "disturbance" effect  before flares are gone, that is, after 2 or 3 secs instead of 5. In this case the condition would change to while {dayTime*3600 < (_timeini +3)} do ...

Current mando_missileecm.sqf (as present in the small demo) is effective for both, mando missiles and ArmA stock missiles. But mando_missileecm.sqf is to be used by AI units, you only need to do what it does but when player's hit a key, just like in mando_camel demo mission.

Offline ViperMaul

  • Members
  • *
    • Theatre Of War (Team PvP Campaign)
Re: Mando Missile ArmA
« Reply #13 on: 05 Apr 2007, 08:14:45 »
Sorry, I had drama hit today in our tournament plus I had an awards ceremony I had to participate in.
Hey your script works well enough with the Arma Missles!! Excellent! For the first time I got a missile evaded message.  :clap:
I cannot wait for the new improved one.

Thanks again! Now I need to submit it to more human pilot and human AA shooters to put it through its paces. Along with a small multiplayer test. Also we have decided not to use the keypress. We need the automatic deployment for the Helos because the ArmA stingers and Strelas are way to fast to react in time.


For the next version, do you think its possible to send one set of flare position coordinates and use that to constantly change the VectorDir and VectorUP so that flare continously nudges its way toward the flares position for 3 - 5 seconds?
ViperMaul
Theatre of War (Co-Lead Dev)
ACE (Jr Project Manager)

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Mando Missile ArmA
« Reply #14 on: 05 Apr 2007, 09:21:21 »
so that flare continously nudges its way toward the flares position for 3 - 5 seconds?

Well it was already done in first beta version of Mando Missile (and it is still present in OFP version), but there was a single flare in the air each time, not many (different planes choppers may drop flares are same time, etc, etc). The "named" flare was setposed every fraction of second in the current position of one of the flying particles, so the logic acting as flare was in fact moving with the flare particles. This feature was removed in favour to have many  flares in the air at the same time. You may still move the flare (the logic) changing mando_chaffflares.sqs but you will have no real idea where the flares visual particles are.

Probably you'll find some adaptions are (would be) necesary for MP. I had intentions to test all that in MP and, eventually, to create a separate set of scripts just for MP, but sadly I have no way to test/do this so you better have some MP expert at hand.