Home   Help Search Login Register  

Author Topic: Artillery Module - Help  (Read 7902 times)

0 Members and 1 Guest are viewing this topic.

Offline trooper543

  • Members
  • *
Artillery Module - Help
« on: 31 May 2009, 00:14:28 »
Hi there all, i was wondering if you someone could explain to me on how to set up the artillery module in arma 2 . i have followed all the instructions (http://community.bistudio.com/wiki/Artillery_Module on how to place the battery etc but the part where i loose the plot is how to use or define the different fire missions. I have the german version of the game (couldnt resist the tempation)

Any help would be appreciated

Many thanks in advance



Offline hoz

  • OFPEC Site
  • Administrator
  • *****
Re: Artillery Module - Help
« Reply #1 on: 31 May 2009, 03:59:08 »
At the moment we all have the German edition :)

Xbox Rocks

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: Artillery Module - Help
« Reply #2 on: 31 May 2009, 05:04:53 »
I think the instructions are very detailed, so I'm not sure where you are falling down. Are you trying to script a single fire mission or are you trying to add the mission to socom or are you wanting to get really advanced and define an entirely new type of fire mission?

e.g.
Code: [Select]
// mortarBattery is name of the the artillery gamelogic you synced with your mortar unit.
// _enemy is a unit you want to shoot at, though you could define the target position from a marker or a player mouse-click.
// Will fire 15 HE rounds (allowing for ammo, of course!) with every mortar firing at once (0 delay) rather
// than in a rolling fire (one gun firing after the other, to get continuous barrage).
[mortarBattery, getPos _enemy, ["IMMEDIATE", "HE", 0, 15]] call BIS_ARTY_F_ExecuteTemplateMission;

Don't worry about spawned and non-spawned. Spawned is a lot better and is the default anyway.

Give plenty of time for the gunners to have their sandwiches though. They will sit there for a minute or two before they decide they like the idea of firing ;)
« Last Edit: 31 May 2009, 16:28:17 by Spooner »
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Artillery Module - Help
« Reply #3 on: 31 May 2009, 08:46:26 »
Quote
They will sit there for a minute or two before they decide they like the idea of firing
At least with the basic artillery it takes about 15 seconds for them to start firing, not minutes.  ;)

Whether they want to fire depends on the distance to the target though (I'm talking about non-spawned here), don't even try to have the MLRS engage anything if the target is not far away..
« Last Edit: 31 May 2009, 09:45:31 by h- »
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline trooper543

  • Members
  • *
Re: Artillery Module - Help
« Reply #4 on: 31 May 2009, 09:26:07 »
Gentlemen (@Spooner & Hoz)

Again Many thanks for the response I will try this out as per your instructions there and reply with my finidings

Again many thanks

Offline Headspace

  • Members
  • *
Re: Artillery Module - Help
« Reply #5 on: 31 May 2009, 15:35:22 »
I'm glad someone figured out how to use it. I was starting to think my instructions weren't detailed enough.
Quote
Don't worry about spawned and non-spawned. Spawned is a lot better and is the default anyway.
Non-Spawned is the default. Spawned only turns on if you set it to, or if you use the Secop Manager without a battery (as per the documentation).

« Last Edit: 31 May 2009, 15:37:39 by Headspace »

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: Artillery Module - Help
« Reply #6 on: 31 May 2009, 16:07:52 »
There does seem to be an issue about the artillery type though. I've only managed to get mortars to work...
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline Headspace

  • Members
  • *
Re: Artillery Module - Help
« Reply #7 on: 31 May 2009, 16:15:47 »
With AI or with the player?

While using it as a player, have you loaded magazines appropriate for the Artillery Module as detailed in the documentation?


No need to quote the previous post folks...
« Last Edit: 31 May 2009, 16:58:04 by bedges »

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: Artillery Module - Help
« Reply #8 on: 31 May 2009, 16:29:33 »
Yeah, with player they all seem fine (Really like the GUI!). I am talking about using the direct call (not socom) to initiate AI fire. Sorry for being unclear.
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline schaefsky

  • Members
  • *
Re: Artillery Module - Help
« Reply #9 on: 02 Jun 2009, 14:41:08 »
I am not able to get AI arty to work, too.
SOM version works fine, but that is not what I want.
If I read the biki entry right, I think AI also needs ARTY mags to work. Did not get virtual arty to work neither, though.
Anybody knows out of the head how to let AI controlled arty pieces have only ARTY-mags and none of the standard ones?

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: Artillery Module - Help
« Reply #10 on: 02 Jun 2009, 15:01:46 »
Yeah, you need correct ammo, but there is also a bug you need to workaround. Here is a simple init which is probably only appropriate for testing, but you get the idea:
Code: [Select]
#define NUM_MAGS 10

#define M119_AMMO ["ARTY_30Rnd_105mmHE_M119", "ARTY_30Rnd_105mmWP_M119", "ARTY_30Rnd_105mmSADARM_M119", "ARTY_30Rnd_105mmLASER_M119", "ARTY_30Rnd_105mmSMOKE_M119", "ARTY_30Rnd_105mmILLUM_M119"];

#define M252_AMMO ["ARTY_8Rnd_81mmHE_M252", "ARTY_8Rnd_81mmWP_M252", "ARTY_8Rnd_81mmILLUM_M252"];

#define MLRS_AMMO ["ARTY_12Rnd_227mmHE_M270"]

{
_vehicle = _x;

if (_vehicle isKindOf "m119") then
{
_vehicle setVehicleAmmo 0;

{
for "_i" from 0 to NUM_MAGS do
{
_vehicle addMagazine _x;
};

} forEach M119_AMMO;
}
else{if (_vehicle isKindOf "M252") then
{
_vehicle setVehicleAmmo 0;

{
for "_i" from 0 to NUM_MAGS do
{
_vehicle addMagazine _x;
};
} forEach M252_AMMO;
}
else{if (_vehicle isKindOf "MLRS") then
{
_vehicle setVehicleAmmo 0;
{
for "_i" from 0 to NUM_MAGS do
{
_vehicle addMagazine _x;
};
} forEach MLRS_AMMO;
}; }; };
} forEach vehicles;

_target = getPosASL enemy;

// THIS IS A TEMPORARY WORKAROUND FOR A BUG IN THE MODULE SCRIPTS!
// You MUST set the variable _missionTemplate before you run the template function;
// you cannot just put the template array directly in the function call.
// I've been assured this will be fixed in the next version, but this workaround
// will continue to work when the issue is fixed, so I'd just use this exact syntax for now:
_missionTemplate = ["IMMEDIATE", "HE", 0, 15];
[mortars, _target, _missionTemplate] call BIS_ARTY_F_ExecuteTemplateMission;
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline Headspace

  • Members
  • *
Re: Artillery Module - Help
« Reply #11 on: 02 Jun 2009, 17:47:37 »
Spooner:

Forgive me for saying so, but you are jumping the gun here.

A few things to keep in mind:

First, the module is going to load its own ammo if it's told to fire under a certain mission profile. Manually loading it is absolutely unnecessary. If you tell it to fire a WP mission, it will load WP on its own, provided that ordnance type is defined in the module for that gun. The only time you'll ever need to load your own magazines is if you're firing it manually as a player.

Second, the bug you speak of WILL NOT prevent BIS_ARTY_F_ExecuteTemplateMission from being used with any template variable you want to specify. It only affects a subsystem of the Artillery Module for which documentation has not yet been released, and only when you have more than three parameters in your fire mission template.

Third, I'm not sure who assured you that feature would be fixed "in the next release," but if I gave you that impression, it was not my intent. Please do not assume anything unless it's an official announcement from BIS.

Carry on.  :)
« Last Edit: 02 Jun 2009, 17:50:26 by Headspace »

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: Artillery Module - Help
« Reply #12 on: 02 Jun 2009, 18:58:03 »
Ah yes, this was also a demo mission I was using for testing the full range of ammo types under player control. So, ok, I didn't need to mess with the ammo to use SOM/template missions. Actually, I'd prefer it if it did use its own ammo, since otherwise you could ask SOM to fire it continually through the mission. I expect that limiting available strikes is configurable, but undocumented, so I won't worry about it for now.

Ah, sorry, but I wasn't using any undocumented features at all! That mission template is copied directly from the BIKI documentation. If you just use:
Code: [Select]
[mortars, _target, ["IMMEDIATE", "HE", 0, 15]] call BIS_ARTY_F_ExecuteTemplateMission;
it won't work.

Yeah, very sorry that I made a big assumption about this being fixed in "the next version", I think because I'd given you the fix for it (literally renaming one variable in one function). However, I am fully aware from experience that even the most trivial of fixes need significant documentation, testing and review before they get into a full release. Thus, I should have known better than to make such a naive assumption!

EDIT: Sorry, yes, you are quite right Headspace, regarding BIS_ARTY_F_ExecuteTemplateMission. My test mission was faulty, thus I made bad deductions, I think.
« Last Edit: 02 Jun 2009, 19:30:21 by Spooner »
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline schaefsky

  • Members
  • *
Re: Artillery Module - Help
« Reply #13 on: 02 Jun 2009, 23:03:33 »
Edit again:
Don't know what I did different, but I finally got it working the way it is supposed to be with the logic as battery variable. Disregard the original post, it was bollocks.

Edit... well again:
Working example at first post second page

« Last Edit: 06 Jun 2009, 22:02:44 by schaefsky »

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: Artillery Module - Help
« Reply #14 on: 04 Jun 2009, 17:04:40 »
I put in the name of the arty logic synced with the group. If you give the name of the battery leader, then if the leader is destroyed, then the function call wouldn't work any more, even if there were more guns in the battery.
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)