Jump to content
Sign in to follow this  
Inkompetent

Real M136 v1.0

Recommended Posts

Got a weird problem. I keep getting this weird error....

Real_M136_Error.jpg

Any suggestions? smile_o.gif

I followed the ReadMe, so the folder and everything is okay, same as you named it, etc.

Share this post


Link to post
Share on other sites

For me exactly that error was fixed with the latest version of this mod.

Are you sure, that you are using the latest release? huh.gif

Share this post


Link to post
Share on other sites

Gonna retry downloading it just to be extra extra extra sure. Let ya know how it turns out. *crosses fingers and eyes* tounge2.gif

Share this post


Link to post
Share on other sites

You must be using the broken version because the path to the script is wrong. It says "Real_M136" in your picture, but the new path is "inko_real_m136x".

Remove the mod completely and make a check that the .pbo is named "inko_real_m136x.pbo". If so you have the newest version.

Share this post


Link to post
Share on other sites

Yep, that was certainly the reason. Oy, I feel so we-todd-did now. confused_o.gif

Share this post


Link to post
Share on other sites

Does this need to be loaded in a specific order, IE after XEH or something? I've downloaded the file from the first page of this thread, extracted the file, added the mod to my =mod command line, but when I get in-game, the AT-4 is not modified at all.

Share this post


Link to post
Share on other sites

it's -mod=yourmod;anothermod

not

=mod

Then check: Do you have an addon folder in the modfolder where this addon is?

Share this post


Link to post
Share on other sites
it's -mod=yourmod;anothermod

not

=mod

Then check: Do you have an addon folder in the modfolder where this addon is?

Yes, =mod was a typo, I know it's -mod=mod1;mod2;etc

Yes there is an addon folder, I extracted it with directories, and checked it.

I've tried loading the mod alone, with other mods, with XEH before and after it in the -mod command line... Nothing.

It just will not seem to work.

Share this post


Link to post
Share on other sites

it works definitely, I tried it myself alone and with other mods.

Check again files, folder and syntax of the modfolder sequence. Maybe you forgot a ; somewhere

Share this post


Link to post
Share on other sites

to: Inkompetent (or all other which have tested that).

1) My english is not good (czech slovak no problem), so be patient with me.

2) When i take your M136 (not used) where is loaded rocket ? a) is the rocket inside TUBE so there is no more "external" rocket needed in the gear ? (saving space) or option b) is there need to have one rocket in gear as was that beffore ? I think option a) would be perfect like in real life ...

3) Is there option to have two (not used) M136 launchers ? One on back as "second weapon" and other one (second M136 launcher) packed into gear (taking some space maybe 6-8boxes in gear). Or are you planing to make that to the addon too ?

4) When you fire M136 out:

a) is the empty M136 tube throwed out inmediatly or wait to the change weapon from player ?

b) afther throwing empty M136 tube is player withouth weapon in hands or is changed automaticaly to the primary weapon ?

c) Is speeded throwing there or that take normal time like in original game ?

Thank you for respond, i like real games/mods/addons and maybe i wish to implement your addon to our gameserver (www.arma.extel.sk).

Share this post


Link to post
Share on other sites

I have had an idea! I remember you saying something that you couldnt make it so that there was no inventory item required to fire the weapon, which makes the point of having this mod a little bit redundant in some areas (i still use it tho :P )

How about, that instead of making it so that a rocket is needed, why not have a pistol mag or something, cos that doesnt really make a difference in inventory space

Share this post


Link to post
Share on other sites

@Winters1807

I suppose you know how to define what type and how many slots it will take?

type = 16; = pistolmag slot

type = 256; = ammo slot

type = 2*256; = 2 ammo slots

So if you want a rocket to only take 1 slot instead of 2 you define it as type = 256;

WGL used 3*16 to limit it to max one rocket (OFP have only 4 slots for pistolmags). But as arma have more pistolmagslots its not a good idea to use up those slots..

Have you tried "type = 0;" ? If I remember correctly that made the ammo "invisible" as it wont use up any slots.

Type=0 worked very well with one big exception. At briefing time if one tries to put a launcher in his inventory his game will CTD. Same for Type=16 (pistol ammo slot). The compromise was to have it take just one regular inventory slot instead of 2 (type=256).

edit: Maybe you could have 2 types of rockets defined? Vanilla and one type = 0? So in inventory vanilla-rockets are used and then ingame a script switches that rocket to a type = 0.

I suppose the only change necessary is to define a new rocket that uses type = 0 and change the scripts to add that?

Share this post


Link to post
Share on other sites

Firstly thank you for the modification.

Now, Having had several sessions with this thing, i was hoping you could edit it slightly so that the launcher is droped several seconds after you fire, rather than immedieatly. The reason for this is that currently when i fire over a ridge, my avatar decides to keep crouched and take his rifle out before he gets down. If there was a few seconds delay, i could fire and immediatly get down, and then the launcher would be droped, and hence preventing my head from dissapearing by return fire.

Share this post


Link to post
Share on other sites

I could make it possible to carry several M136s by using some placeholder item (would probably make it take as much place in the inventory as a rocket).

What I cannot do however is to build the rocket into the weapon.

All ammunition in ArmA requires a weapon to be fired. That even includes hand grenades which use the built in weapon "Throw" that all humans in ArmA have.

It works halfway to do so with the M136 (making it a built in weapon and making the ammo use the launcher slot). I can make the soldier carry it on his back and so on, but when shouldering the weapon it is invisible since I can't have both a weapon and a rocket model on the same item.

I think I could make it spawn the missile when fired (so that you do not need to carry the ammo), but that would however not make any kills register for the player with that weapon.

But yes, I could make a placeholder launcher with an action "Deploy Launcher" that would turn it into a normal M136. That way you could carry two launchers by using up the launcher slot and 6 normal ammo slots. (2x2 for missiles and 2 for launcher), which would still make you able to carry a couple of hand grenades and six rifle mags.

This way people with machineguns could carry M136s too, although they wouldn't be able to use them while still holding the MG.

@andersson

It will be the same problem with that as with the automatic deletion of rockets, if it can be done at all. Once rockets are type 0 there is no direct way to put them back into an ammo crate or drop it on the ground to share with others.

@Ryankaplan

I could either do that, or not make it drop at all so that you'd manually have to throw it away.

What are people's view on the above? Should the used tube be discarded automatically and in that case how fast, or should it be up to the player when to dump it?

Share this post


Link to post
Share on other sites

I think the tube should be discarded automatically. No need to have ~5kg (11pounds) empty and useless weapon on your back during combat.

It's a bit unreal to have fully equipped machinegun units carry AT/AA weapons too - kind of pistols.gif "heroes".

Share this post


Link to post
Share on other sites

Unreal to carry an extra tube?

At least in the Swedish army it isn't uncommon that the AT gunner carries 2x PSkott 86 AT-4 (same as the M136), and when needed the automatic riflemen carry them as well.

Our ranger troops often carry up to an AT-4 per person on more loaded missions, including the automatic riflemen, just to have enough AT firepower on longer missions, and to not have to carry something as huge and heavy as as Carl Gustav.

Personally I'd say it is more real that the troopers in ArmA lacking backpacks carry a SAW, 3x ammo boxes, 2x hand grenades and an AT-4 than it is that they'd carry SAW, 5x ammo boxes and 2x hand grenades wink_o.gif

Share this post


Link to post
Share on other sites

Considering the weight of those I can agree on that. But rest assured. I still can't override the built in function of blocking use of a launcher if you carry a machinegun. At the moment they would have to dump the MG to be able to equip the launcher, or simply toss it to someone that only has a rifle/smg and can use it freely.

Unfortunately I can't at the moment get it to work properly with carrying an extra launcher either.

I'm trying to make the default M136 a dummy weapon (so that people won't have to specifically add the Inko_M136 to their missions) and make it possible to "Equip" that placeholder and turn it into the Inko_M136 that is the useable weapon.

Unfortunately making the default M136 a "type = 2 * 256" makes it invisible in the inventory, and thus not tradeable. It works well to equip it though, so that's less of a problem.

I'll see if I can find a solution to the above (going to check that script that let you carry two main weapons at once).

Share this post


Link to post
Share on other sites

Unreal hmmmm... Sahrani, SLA, etc... Those are pretty real, eh? wink_o.gif

I'm only messing around. Getting back to my point. I may be totally confused about this conversation, so I'll apologize in advance if I sound like a fool here.

Isn't there a weapons addon/Mod that doesn't block the use of a launcher when carry a MG? I'll have to check it out again when I get back from work; but I swear I've been able to do it and thought to myself WTF?

I'll make a bit of time to check when I get home tonight. And try to remember to give an update.

Share this post


Link to post
Share on other sites

Yes, there are modifications for it. I will look into them, but my main concern at the moment is getting my placeholder item to work as intended.

After that it is to get the action menu to work well.

Then I'll look into how to get that to work. Doesn't sound too hard to fix though.

Oh, btw. Do you other coders recommend the waitUntil command, or should I use a looping .sqs script with between a 0.1 and 0.5 second sleep time to update the action menu (if the player carries a placeholder or not)?

Share this post


Link to post
Share on other sites

Sad to say I'm at a standstill at the moment, when I finally started getting things to work as they should.

I get the very interesting No entry 'bin\config.bin/CfgWeapons.Inko_M136'. error, even though I removed the changes I had done to the file before the error.

Can anyone possibly see a problem with my:

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

class Inko_Real_M136 {

units[] = {};

weapons[] = {};

requiredVersion = 0.108000;

requiredAddons[] = {"CACharacters","CAWeapons","Extended_EventHandlers"};

};

};

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

class LauncherCore;

class Launcher;

class cfgWeapons {

class M136 : Launcher {

displayName = "M136 AT-4 (Reserve)";

type = 2 * 256;

useAction = true;

};

class Inko_M136 : M136 {

displayName = "M136 AT-4";

type = 4;

useAction = false;

};

class Inko_M136_Used : Inko_M136 {

displayName = "M136 AT-4 (Used)";

magazines[] = {"FakeMagazine"};

};

};

All the class calls before cfgWeapons is a vain attempt at getting the stuff to work, but no...

And the .RPT hasn't been of any real use either as it all boils down to the above error.

Share this post


Link to post
Share on other sites

Making some real progress again.

The placeholder works and is at the moment a 4-slot item in the inventory.

By an action in the action menu you can (assuming you don't carry any other launcher (only accounts for the launchers in my mod and stock launchers. I can't find a way to check if there is something in the launcher slot, so I have to go by item name)) equip the launcher which puts a launcher in the launcher slot and a rocket in the inventory.

Yep, you got it right. You do not need to carry any extra rockets at all.

So if you want to carry two launchers all you need is six free inventory slots. That's the sum for one M136 AT-4 in the launcher slot, one rocket to use with it, and a 4-slot placeholder that can be quipped and when that happens spawns its own ammo.

At the moment I'm struggling with getting a .sqf script for the action menu to loop properly without locking the computer with memory/CPU overflow, and after that I'll have to make a prettier placeholder.

Share this post


Link to post
Share on other sites

Nearing beta release of v2 now.

All I'm missing at the moment is the machine gun/M136 compatibility and multiplayer testing.

AI uses it perfectly and I've tweaked usability.

For convenience there is no automatic dumping of the spent tube, but I have added an action "Dump empty tube" that ditches the old one and if you have any extra tube it goes onto your back so it is ready to use.

I also think I'll make it possible to carry an RPG-7 and a machine gun to balance it out, although Javelins, Stingers and Strelas will still be blocked from that kind of use.

Share this post


Link to post
Share on other sites

Okay, done the multiplayer testing at it all got messed up badly and doesn't nearly work properly for the clients (servers works perfectly).

I'm quite sure it has to do about locality and that the init eventhandler can't run stuff on clients.

I will be trying to get some workaround in place to get this to work, but if that fails I will have to turn this into a script that will have to be added to each manually.

Possibly I can have it as an addon, but with a call command in the init.sqf file of each mission (in which case having it as a script only seems more convenient since it only is 5kB at the moment anyway).

Share this post


Link to post
Share on other sites

Just a small update. I've uploaded the INKO.bikey to OFPEC.

As for the progress with the addon it's quite much stuck. Made a little progress thanks to the guys at OFPEC but not much. If I get the teensy weensy little workaround to run the scripts properly you'll very soon see a beta release of v2.0 though.

I'll try to work out some inventory issues for the full release and add some nice cosmetics.

Oh, and on top of that it seems like it was really easy to get the machineguns + launcher weapons done though so if someone for some reason want to run around with a M240 and two AT-4 launchers it'll be possible (although you'll get very little MGun ammo, but hey! That's up to you).

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  

×