Jump to content
Sign in to follow this  
PELHAM

load Mortar Magazine - Change Ammo to WP/Illum

Recommended Posts

I would like to chang the Ammo in the mortar.

I got this far in the init:

this removeMagazine "8Rnd_81mmHE_M252"; {this addmagazine "8Rnd_81mmWP_M252"} forEach [1,2,3,4,5,6];

This removes the HE 8 round magazine and gives you 6 magazines of WP Ammo.

Alternatives are:

"8Rnd_81mmHE_M252"

"8Rnd_81mmWP_M252"

"8Rnd_81mmILLUM_M252" (these don't work, useful for duds?)

Works well but at the start of the mission (or if you spawn a mortar with the new ammo) the mortar is unloaded. It takes 30 - 40 seconds for the magazine to load before it can be fired. The Commands, selectWeapon, reload, addWeapon do not work.

Anyone any ideas on how to get the magazine loaded?

If you add additional HE mags without the removeMagazine command it's ok.

Edited by PELHAM

Share this post


Link to post
Share on other sites

If I'm wrong forgive me as I haven't been mucking about in the editor in ages, but if I remember right it seems that you must add magazines before adding weapons in order for the weapons to start loaded. This applies to the mortar as you essentially "addWeapon" the mortar when you create the unit, but you can't add ammo to it before you create it. It comes with a specific type of ammo already, so it loads that, but if you remove those HE rounds I suspect you have to reload it from the start.

I have a hunch this might be hardcoded. I'm probably wrong, but it feels that way to me.

Share this post


Link to post
Share on other sites

I had similar thoughts eventually - I guess this is it ATM. HE is fine for me so no worries.

It would be nice if BIS got the ILLUM Flares working so you could light up night missions from a fire base spontaneously without scripting and unit / marker positions.

Share this post


Link to post
Share on other sites

I did just the other day, works fine:

this setVehicleAmmo 0.0; this addMagazine "8Rnd_Something_ILLUM";

Share this post


Link to post
Share on other sites

Biki, your best friend:

Q: Why does the MLRS blow up when I try to use it as a player?

A: You need to add an Artillery Module magazine with the rocket artillery for it to work properly. Try doing the following in the init field of your MLRS:

this addMagazine "ARTY_12Rnd_227mmHE_M270";

Feel free to remove the current magazines before doing this.

Oh, and I assume the Arty module must be involved for this. :confused:

Share this post


Link to post
Share on other sites
Biki, your best friend:
Q: Why does the MLRS blow up when I try to use it as a player?
A: You need to add an Artillery Module magazine with the rocket artillery for it to work properly. Try doing the following in the init field of your MLRS:
Code:
this addMagazine "ARTY_12Rnd_227mmHE_M270";

Feel free to remove the current magazines before doing this.

Oh, and I assume the Arty module must be involved for this. :confused:

"ARTY_8Rnd_81mmHE_M252" is the incorrect ammo? - it messes up the Artillery Computer - I have listed the correct ammo above.

Again here:

"8Rnd_81mmHE_M252"

"8Rnd_81mmWP_M252"

"8Rnd_81mmILLUM_M252" (these don't work, useful for duds?)

The Artillery module is not necessary for player or player group members - you just order the Mortar Gunner to Fire at target. The player can select the Artillery computer from the drop down menu.

I have scripted AI to fire the mortar with the Artillery Module and they don't need xtra ammo as the module reloads it automatically.

It's not the loading of ammo I'm having a problem with - it's the weapon being ready to fire. It takes 50 seconds for the magazine to load after the Mortar spawns with:

removeAllWeapons this;
this removeMagazine "8Rnd_81mmHE_M252";
{this addmagazine "8Rnd_81mmWP_M252"} forEach [1,2];
this addWeapon "M252";
this selectWeapon "M252_US_EP1";

When you remove the default HE magazine the weapon spawns with no magazines loaded. It shows the ammo in the top left in red but you can't fire it. After 50 seconds you hear a 'thunk' and the mortar is ready. That is my problem.

The above code in an init field works for the player or an AI but will not have the mortar ready with magazine loaded.

PS - there is something odd about the above code - if you put:

this addWeapon "M252_US_EP1";

It gives an error:

No entry 'bin\config/ CfgWeapons.M252_US_EP1".




---------- Post added at 01:03 ---------- Previous post was at 00:30 ----------

I did just the other day, works fine:

Thank you for the reply but it's the delay in loading the magazine thats the problem - NOT adding the Magazine.

Also - the Illum rounds can be fired but don't produce a flare?

this setVehicleAmmo 0.0; this addMagazine "8Rnd_Something_ILLUM";
Edited by PELHAM

Share this post


Link to post
Share on other sites
Also - the Illum rounds can be fired but don't produce a flare?

They do produce a flare. You can't see it during the day. Well it did for me anyway.

Edited by Muzzleflash

Share this post


Link to post
Share on other sites
They do produce a flare. You can't see it during the day. Well it did for me anyway.

Dis test today in SP editor, fired illum round using arty computer from magazine "ARTY_8Rnd_81mmILLUM_M252" and setPos myself to the target area, no round incoming.

tested with HE and WP versions and impact was there. illum rounds are duds.

Wich sucks.

I had no arty module on map, and also tested with synching both with virtual and with reg arty module.

Share this post


Link to post
Share on other sites
They do produce a flare. You can't see it during the day. Well it did for me anyway.

Any chance you could do a quick fraps video?

I can confirm I put this code in the mortar init and fired it in the dark at minimum distance approx 50-100m - nothing.

this setVehicleAmmo 0.0; this addMagazine "8Rnd_81mmILLUM_M252";

---------- Post added at 11:34 ---------- Previous post was at 11:24 ----------

Is it possible to get into the CfgWeapons file?

I'm sure there is a Muzzle name or something missing that we need.

Anyone know where CfgWeapons is? I tried UnPBo on several items but they must be binarised - it would not unpack them.

Share this post


Link to post
Share on other sites
Any chance you could do a quick fraps video?

I can confirm I put this code in the mortar init and fired it in the dark at minimum distance approx 50-100m - nothing.

Fraps no, sorry, and I have terrible upload.

Just tested it:

Open Utes map in editor

Insert USMC - Static - M252 Mortar with player as gunner. In init i paste:

this setVehicleAmmo 0.0; this addMagazine "8Rnd_81mmILLUM_M252";

Click preview, takes about 3-4s for "ammo to be green". Look straight up and fire. 9 seconds later it lights up.

I didn't even have to insert the artillery module, which is probably due to the comment i explain below.

Maybe the problem you are having is a result of this comment at the very bottom on the BIKI page for the artillery module:

Operation Arrowhead Compatibility

(GeneralCarver, 11/27/10) - As of Operation Arrowhead v1.55, this module is not needed in single player or multiplayer missions to use the new Artillery Computer. Do not load your static arty weapons with the magazines which have the "ARTY" prefix. These are intended for the Artillery Module in ArmA 2 only. Use the same magazine names, but omit the "ARTY_" prefix in the magazine name.

Share this post


Link to post
Share on other sites
Fraps no, sorry, and I have terrible upload.

Just tested it:

Open Utes map in editor

Insert USMC - Static - M252 Mortar with player as gunner. In init i paste:

this setVehicleAmmo 0.0; this addMagazine "8Rnd_81mmILLUM_M252";

Click preview, takes about 3-4s for "ammo to be green". Look straight up and fire. 9 seconds later it lights up.

I didn't even have to insert the artillery module, which is probably due to the comment i explain below.

Maybe the problem you are having is a result of this comment at the very bottom on the BIKI page for the artillery module:

Yep - thats exactly what I am doing - no flare.

Can you manage a screen shot?

Share this post


Link to post
Share on other sites
Yep - thats exactly what I am doing - no flare.

Can you manage a screen shot?

I have better thing to do than intentionally make stuff up on a game forum. Anyway, here it is. I don't know the rules for image posting on this forum so it are links:

http://www.tiikoni.com/tis/view/?id=d43018e

And:

http://www.tiikoni.com/tis/view/?id=4e521d1

You tried adding Arty in front of the magazine classname?

Share this post


Link to post
Share on other sites
I have better thing to do than intentionally make stuff up on a game forum. Anyway, here it is. I don't know the rules for image posting on this forum so it are links:

http://www.tiikoni.com/tis/view/?id=d43018e

And:

http://www.tiikoni.com/tis/view/?id=4e521d1

You tried adding Arty in front of the magazine classname?

I'm using Arma 2 OA 1.57 Arty infront of magazine classname is the incorrect ammo as stated many times above. It will fire Arty ammo but the minrange settings in the Artillery Computer are lost. It will only fire from Medium to Full Range.

---------- Post added at 05:41 PM ---------- Previous post was at 04:33 PM ----------

I have looked in the various config files associated with the M252. It will not produce a flare as there are no effects listed under the ammo config file.

class Sh_82_ILLUM: Sh_82_HE {

cratereffects = "";

explosioneffects = "";

explosive = 0;

It will do so in ACE

class Sh_81_ILLUM: Sh_81_HE {

ace_sys_arty_deploy = "ARTY_Flare_Small";

ace_sys_arty_deployaltitude = 250;

In theory it will do so with Arty ammo BUT myself and others have tested - can't see anything.

class ARTY_Sh_81_ILLUM: ARTY_Sh_81_HE {

arty_deployaltitude = 250;

arty_deployerror = 50;

arty_deployflare = "ARTY_Flare_Small";

New info!

It refers to the mortar has having

Vehicle cfg - Main Turret

As I suspected, the various turret commands may solve the problem.

The Cfg also refers to single and burst firing modes and Mode_SemiAuto - it may be possible to command the AI to fire 1 shot at a time.

modes[] = {"Single1", "Single2", "Single3", "Burst1", "Burst2", "Burst3"};

Also:

CfgVehicles>M252

All subclasses

4: M252_base

M252_US_EP1

Vehicleclass - static

Cfg patches - CAWeapons_M252_81mm_Mortar

Cfg magazines - FakeWeapon

Cfg weapons - FakeWeapon

Cfg vehicles -

Mortar Bags and assembly

class M252_US_Bag_EP1: Weapon_Bag_Base_EP1 {

displayname = "M252 81mm Mortar Bag";

scope = 2;

class assembleInfo: assembleInfo {

assembleto = "M252_US_EP1";

displayname = "M252 81mm Mortar";

};

Magazine Classes note the differences in the magazine Cfg's? Does the "count = 8" have something to do with the problem? HE works ok and starts with 8 rounds loaded at spawn.

class 8Rnd_81mmHE_M252: VehicleMagazine {

ammo = "Sh_81_HE";

count = 8;

displayname = "M821A1 HE";

initspeed = 243;

namesound = "heat";

scope = 2;

class 8Rnd_81mmWP_M252: 8Rnd_81mmHE_M252 {

ammo = "Sh_81_WP";

displayname = "M375A3 WP";

class 8Rnd_81mmILLUM_M252: 8Rnd_81mmHE_M252 {

ammo = "Sh_81_ILLUM";

displayname = "M853 Illum";

Full M252 Cfg:

class M252: CannonCore {

autoreload = 1;

canlock = 0;

cursor = "Missile";

cursoraim = "\ca\Weapons\Data\clear_empty";

cursorsize = 1;

displayname = "M252 81mm Mortar";

magazinereloadtime = 5;

magazines[] = {"8Rnd_81mmHE_M252", "8Rnd_81mmWP_M252", "8Rnd_81mmILLUM_M252", "ARTY_8Rnd_81mmHE_M252", "ARTY_8Rnd_81mmWP_M252", "ARTY_8Rnd_81mmILLUM_M252"};

maxleadspeed = 100;

maxrange = 5675;

maxrangeprobab = 0.1;

midrange = 2500;

midrangeprobab = 0.7;

minrange = 100;

minrangeprobab = 0.7;

modes[] = {"Single1", "Single2", "Single3", "Burst1", "Burst2", "Burst3"};

namesound = "CannonCore";

reloadsound[] = {"\Ca\sounds\Weapons\cannon\mortar_load", 1.12202, 1, 12};

reloadtime = 3;

scope = 1;

sound[] = {"\Ca\sounds\Weapons\cannon\mortar1_fire", 22.3872, 1, 500};

soundservo[] = {"", 0.0001, 1};

class Single1: Mode_SemiAuto {

artillerycharge = 0.27;

artillerydispersion = 0.7;

displayname = "Semi (close)";

maxrange = 0;

midrange = 0;

minrange = 0;

reloadsound[] = {"\Ca\sounds\Weapons\cannon\mortar_load", 1.12202, 1, 12};

reloadtime = 4;

sound[] = {"\Ca\sounds\Weapons\cannon\mortar1_fire", 22.3872, 1, 500};

soundservo[] = {"", 0.0001, 1};

};

class Single2: Single1 {

artillerycharge = 0.6;

displayname = "Semi (medium)";

};

class Single3: Single1 {

artillerycharge = 1;

displayname = "Semi (far)";

};

class Burst1: Mode_Burst {

artillerycharge = 0.27;

artillerydispersion = 0.93;

burst = 4;

displayname = "Burst (close)";

maxrange = 583;

maxrangeprobab = 0.5;

midrange = 257;

midrangeprobab = 0.7;

minrange = 59;

minrangeprobab = 0.5;

reloadsound[] = {"\Ca\sounds\Weapons\cannon\mortar_load", 1.12202, 1, 12};

reloadtime = 3;

showtoplayer = 0;

sound[] = {"\Ca\sounds\Weapons\cannon\mortar1_fire", 22.3872, 1, 500};

soundburst = 0;

soundservo[] = {"", 0.0001, 1};

};

class Burst2: Burst1 {

artillerycharge = 0.6;

displayname = "Burst (medium)";

maxrange = 2882;

maxrangeprobab = 0.4;

midrange = 1272;

midrangeprobab = 0.6;

minrange = 290;

minrangeprobab = 0.4;

showtoplayer = 0;

};

class Burst3: Burst1 {

artillerycharge = 1;

displayname = "Burst (far)";

maxrange = 8005;

maxrangeprobab = 0.3;

midrange = 3532;

midrangeprobab = 0.4;

minrange = 803;

minrangeprobab = 0.3;

showtoplayer = 0;

};

};

class 2B14: CannonCore {

autoreload = 1;

canlock = 0;

cursor = "\ca\UI\data\cursor_w_tank_gs";

cursoraim = "\ca\Weapons\Data\clear_empty";

cursorsize = 1;

displayname = "Podnos 2B14";

magazinereloadtime = 5;

magazines[] = {"8Rnd_82mmHE_2B14", "8Rnd_82mmWP_2B14", "8Rnd_82mmILLUM_2B14", "ARTY_8Rnd_82mmHE_2B14", "ARTY_8Rnd_82mmWP_2B14", "ARTY_8Rnd_82mmILLUM_2B14"};

maxleadspeed = 100;

maxrange = 4000;

maxrangeprobab = 0.1;

midrange = 2000;

midrangeprobab = 0.7;

minrange = 80;

minrangeprobab = 0.7;

modes[] = {"Single1", "Single2", "Single3", "Burst1", "Burst2", "Burst3"};

namesound = "CannonCore";

reloadsound[] = {"\Ca\sounds\Weapons\cannon\mortar_load", 1.12202, 1, 12};

reloadtime = 3;

scope = 1;

sound[] = {"\Ca\sounds\Weapons\cannon\mortar2_fire", 22.3872, 1, 500};

soundservo[] = {"", 0.0001, 1};

class Single1: Mode_SemiAuto {

artillerycharge = 0.35;

artillerydispersion = 0.7;

displayname = "Semi (close)";

maxrange = 0;

midrange = 0;

minrange = 0;

reloadsound[] = {"\Ca\sounds\Weapons\cannon\mortar_load", 1.12202, 1, 12};

reloadtime = 4;

sound[] = {"\Ca\sounds\Weapons\cannon\mortar2_fire", 22.3872, 1, 500};

soundservo[] = {"", 0.0001, 1};

};

class Single2: Single1 {

artillerycharge = 0.7;

displayname = "Semi (medium)";

};

class Single3: Single1 {

artillerycharge = 1;

displayname = "Semi (far)";

};

class Burst1: Mode_Burst {

artillerycharge = 0.35;

artillerydispersion = 0.93;

burst = 4;

displayname = "Burst (close)";

maxrange = 665;

maxrangeprobab = 0.5;

midrange = 290;

midrangeprobab = 0.7;

minrange = 60;

minrangeprobab = 0.5;

reloadsound[] = {"\Ca\sounds\Weapons\cannon\mortar_load", 1.12202, 1, 12};

reloadtime = 3;

showtoplayer = 0;

sound[] = {"\Ca\sounds\Weapons\cannon\mortar2_fire", 22.3872, 1, 500};

soundburst = 0;

soundservo[] = {"", 0.0001, 1};

};

class Burst2: Burst1 {

artillerycharge = 0.7;

displayname = "Burst (medium)";

maxrange = 2660;

maxrangeprobab = 0.4;

midrange = 1175;

midrangeprobab = 0.6;

minrange = 230;

minrangeprobab = 0.4;

showtoplayer = 0;

};

class Burst3: Burst1 {

artillerycharge = 1;

displayname = "Burst (far)";

maxrange = 5500;

maxrangeprobab = 0.3;

midrange = 2355;

midrangeprobab = 0.4;

minrange = 540;

minrangeprobab = 0.3;

showtoplayer = 0;

};

};

Edited by PELHAM

Share this post


Link to post
Share on other sites

Incorrect info.

Edited by PELHAM
Didn't work

Share this post


Link to post
Share on other sites

In my testing it seems it works with ACE and in the editor.

However, on a dedicated with ACE too it does not work.

Share this post


Link to post
Share on other sites

Flare works if:

You set up an AI mortar with the Artillery Module and script using the BIS_ARTY_F functions. It spawns the ammo above the target so you get a flare.

(see the module wiki - the SAM_Support addon from Armaholic has some good examples.)

Flare does not work (No ACE):

If the player wants to fire the mortar - you can only get WP and HE ammo.

The ILLUM ammo will fire but no flare spawns.

My experience anyway.

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  

×