Jump to content

djdeluxe76

Member
  • Content Count

    15
  • Joined

  • Last visited

  • Medals

Posts posted by djdeluxe76


  1. You should use playSound "classname" instead of playSound "name"

    Yeah the strange thing is I tried putting the classname in there instead of the name and it still wouldn't work. Only when I put name to the same string as the classname it started to work. I know this makes no sense but it could also be because you really have to exit out of the Editor completely to get the changes to .ext to show up. Just saving/reloading doesn't seem to cut it for me.

    Anyway, thanks to your help I got it working now. Do you know what the numbers after the sound file path mean in BI's own CfgSounds section?

    e.g. as in

           sound[] = {
               "sound\radio_18s.ogg", 
               0.632456,
               1,
               30,
               1,
               4,
               8,
               15
           };
    

    The Biki only seems to document 2 numbers out of those...


  2. To me it appears playSound is broken with .ogg files.

    I extracted an .ogg file from BI's own PBOs and even those come up with "... not found" errors.

    The sounds work from the Effects > Trigger drop down in a trigger though that is problematic since the player will only hear them if he is near the center of the trigger.

    FWIW here's my description.ext

    class CfgSounds {
       class dj76_radio_walkie
       {
           sounds[] = {"dj76_radio_walkie"};
           name = "Radio Walkie S";
           dj76_radio_walkie[] = {"radio_18s.ogg", 0.316228, 1};
           titles[] = {};
       };
    };
    
    class CfgEnvSounds {
       class dj76_radio_walkie_env
       {
           name = "Radio Walkie ENV";
           sound[] = {"radio_18s.ogg", 0.316228, 1};
           soundNight[] = {"radio_18s.ogg", 0.316228, 1};
           volume = "1";
       };
    };
    
    class CfgSFX {
       class dj76_radio_walkie_sfx 
       {
    sounds[] = {"dj76_radio_walkie_sfx"};
    name = "Radio Walkie SFX";
    dj76_radio_walkie_sfx[] = {"radio_18s.ogg", 1, 1, 0.6, 0.1, 0.5, 5};
       };
    };

    In the trigger "On Act." I just use playSound "Radio Walkie S" and it always pops up a message box saying "Sound Radio Walkie S not found".

    radio_18s.ogg is in the same dir as desciption.ext and mission.sqm.


  3. Add "-openal" to your shortcut then it will work. I have the exact same setup (well, except for the mobo but the Realtek chip is the same) Just set the Z5500 to PLII Music and don't worry it will be real 5.1 surround meaning the sound will rotate with your when you rotate your character. I guess OpenAL encodes true 5.1 signals for optical out.

    With the right sound mods those speakers and ArmA 2 really love each other. I cannot recommend both highly enough. The battle sounds so real! Too real actually... my hands are shaking, lol ;)


  4. Is anyone else seeing a green box flashing up on the top left corner of the screen when using ACE ?

    Yep, I have seen it too! Difficult to take a screenshot because it's only there for 0.5 s tops. No text as far as I can see and it's about the size of the tank's radar in vanilla OA.

    not really for a ticket - but is it possible to add earplugs to all units ?

    Yeah that'd be interesting ... maybe there's some sort of event handler that fires during the init of all units belonging to a mission?


  5. I just tried this map in the Editor by adding a OPFOR squad that I was fighting against. Took about 30 mins. I didn't notice any performance drops.

    I would say your RAM is a bit low but other than that you got a very decent rig. Your CPU should work ArmA 2 no sweat. But it is true, ArmA 2 likes a powerful CPU more than a powerful GPU.

    Say, is HT off because of the RAM amount?

    Also, try tinkering with -exThreads and -cpuCount in your shortcut line.

    In my case I used -exThreads=7 -cpuCount=4 (settings for quadcore - there are non for octocore) and it improved performance for me.

    (For comparison my rig:

    Intel Xeon 8-core @ 3 Ghz, 16 GB RAM, GeForce 285 GTX (1 GB VRAM), 1920x1200 (both), Vista x64

    Settings on all Very High, AA set to 5. Using ACE, ACEX, hand-picked mix of sound mods and quite a few units, items, islands and effects addons (like WarFX etc.).

    View distance 2000.

    Getting about 40 frames average on that map.

    Of course it ultimately means nothing.)

    Also when encountered stuttering earlier (on random maps) I found that my HD was working like crazy. It felt like FPS was low because the gfx card was too slow and tuning down PP helped a little bit but as it turned out it was the HD all along. Because I mixed and matched several sound mods in their entirety which where configured to play sounds for all the same wepon models basically what was happening was that whenever I fired a M16 it would try to read multiple sound files simultaneously from the same HD cluster. And this for each and every event that had sound playing!

    Try turning your speaker volume off and listen to your HD (while walking around or firing some weapons) if that also applies to you in some way (could also be paging issues?)

    Anyway that's all I can think of...

    HTH


  6. I'm getting random sound effects not even from the current mission, like tutorial narrations in mid sentences while playing the US weapons scenario for example.

    this could be becaue the steam client started playing ArmA 2 OA videos in the back on ArmA 2 OA's Steam Client product page. Had that happen to me too and it confused the heck out of me. If you alt tab to windows desktop and minimize the steam client window or stop the video from the steam client pause button it should go away.


  7. you don't need all the e:\addons ?

    Also I remember I was able to reproduce with Steam that after 254 characters for the mod line game just wouldn't launch.

    This seems to be a Steam limitation with args passed as string as only the "-mod=..." bit is contributing to the character count limit.

    (normal cmd.exe argument lines can be up to 4096 chars long if I remember correctly).

    Two ways around this:

    One was to combine certain mods like unit, object and effects addons into mix folders and loading those instead of their respective mod folders

    (e.g. if you have 3 unit mods @unit1;@unit2;@unit3; make a folder @allunits in there make a folder addons and extract all pbos from the unit1\addons, unit2\addons and unit3\addons folders there.

    then add @allunits to the mod line).

    Whatever you do though, do NOT (!) do this with sound mods and total conversion mods (like ACE, ACEX etc).

    With sound mods I found that due to multiple sounds firing to one single event (such as a gunshot) the hard drive's seek/burst rates would just grind to a halt and so the game because it would need to load multiple files on the same HD cluster all simultaneously. You really need to hand pick pbos from sound mods to make sure you are not loading two mods that cover one event or the same weapon model etc.

    Other way and probably easier is to not launch through steam.exe -applaunch 33930 in the .cmd file and call ArmA2OA.exe directly (which will launch steam anyway).

    For example my current .cmd file I start OA with contains the following launch line:

    "D:\Spiele\Steam\steam.exe" -applaunch 33930 -nosplash -noFilePatching -world=empty -exThreads=7 -cpuCount=4 -openal "-mod=d:\spiele\steam\steamapps\common\arma 2;EXPANSION;ca;@CBA;x\oac\oac_core;x\caa1;@ACE;@ACEX;@Items;@Units;@Islands;@Editing;@Sounds;@Sar;@Effects"

    but instead of "D:\Spiele\Steam\steam.exe" -applaunch 33930 I could also launch by "D:\Spiele\Steam\steamapps\common\arma 2 operation arrowhead\ArmA2OA.exe" and then I found the "-mod=..." bit could be as long as the cmd.exe limit.

    In the steam client if you choose to start OA a dialog box pops up that asks you if you want to start vanilla OA or CO. If you pick CO Steam will launch the file _runA2CO.cmd in the OA root folder. If you know what you're doing you can just create your own .cmd file and link with a shortcut from your Desktop and start the game that way.


  8. I think it was just the classic case of extra control characters at the end of the original file created by ArmaUnbin.exe that gave you that Some input after EndOfFile error. If you switch on Show All Characters in Notepad++ my guess is there's a NUL character at the end of the non working file.

    But whatever it's working now. Good for you. Good luck with your mod.


  9. Thanks for that, will try looking at it now. The SQF syntax is pretty odd to me, so this will help alot.

    Yep I thought that too. Been playing with SQF since a few days. It's like some weird marriage of LISP, LUA and C.

    Anyway, been using EditPlus 3 (not free, but inexpensive) and Notepad++ with the highlight plugin. If you want a SQF.stx file for EditPlus 3 then drop me a PM. I just translated it from the syntax file included with the N++ highlight plugin.


  10. I got combined ops a few days ago and in playing ArmA 2 I noticed lots of times that some sounds just vanish. A recreatable one is the scenario mission in ArmA 2 where you fly with the heli to some coast and raid a small town. The one pretty high up the list. There when in the helicopter when Koslovski speaks to his buddy if he is afraid I always get the rotor sounds vanishing and also all radio chatter is about 10% of its original volume. Suspending and reloading helps it tho.


  11. My god! I can't believe it... I spent the better part of a day and night

    trying to get around a problem in my toggle tracers script.

    Only to ultimately realise that all that was wrong was writing a capital M in a string instead of a small letter m.

    I mean, the scripting language is pretty much case insenstive for all its commands...

    but of course string comparisons of class names aren't - should have known.

    You wouldn't believe the amount of stuff I tried - the scripter in me died a few times over...

    but, nevertheless, learning a lot from this odyssey.

    Anyway here's my fSwapMagazines.sqf script in case someone finds it useful:

    // 
    //  Swap Magazines Script v0.01
    //
    //  Copyright 2010, djdeluxe76
    //
    //  License: Creative Commons Attribution-ShareAlike 3.0 Unported License.
    //  See http://creativecommons.org/licenses/by-sa/3.0
    //  
    //  What Is It
    //
    //  Makes it easier to swap just the magazines of a certain class name on a unit
    //  for magazines of another class name, either all of them or up to a specified limit.
    //
    //  Usage
    // 
    //  1. Add script to mission folder.
    //
    //            -Either-
    // 
    //  2a. Compile this script in your init.sqf like so:
    //      f_SwapMagazines = compile (preProcessFileLineNumbers "fSwapMagazines.sqf");
    // 
    //      Then call it in another script, trigger or init like so:
    //      nul = [<args>] call f_SwapMagazines;
    // 
    //      Where <args> is a placeholder for the script's arguments, 
    //      which are explained in detail below.
    //
    //             -Or-
    //
    //  2b. Use execVM like for example:
    //      nul = [<args>] execVM "fSwapMagazines.sqf";
    //
    //  Arguments
    // 
    //      unit        object      the unit whose mags should be swapped
    //      old ammo    string      class name of the current ammo
    //      new ammo    string      class name of the new ammo
    //      limit       number      how many should be swapped, or 0 for all of them
    //      reload      bool        automatically reload after swapping the mags?
    //
    //
    
    private ["_c", "_mc", "_max", "_lim", "_doReload"];
    
    _unit = _this select 0;
    _oldAmmo = _this select 1;
    _newAmmo = _this select 2;
    _lim = _this select 3; // limit
    _doReload = _this select 4;
    
    if (isNil "_unit") then { _unit = player; };
    _mc = count magazines _unit;
    
    if (_lim == 0) then {
       _lim = 1000;
    };
    if (_lim > _mc) then { 
       _lim = _mc; 
    };
    
    if (isNil "toggle") then {toggle = 1;};
    if (toggle == 1) then {
       toggle = 0;
    } else {
       _oldAmmo = _this select 2;
       _newAmmo = _this select 1;
       toggle = 1;
    };
    
    _max = 0;
    _c = 0; // counter
    if (_oldAmmo in (magazines _unit)) then {
       // hint formatText ["%1 has ammo type %2", _unit, _oldAmmo];
       // find out how many mags of type
       {
           if (_x == _oldAmmo) then {
               _c = _c + 1;
           };
       } forEach magazines _unit;
       // determine what is smaller _lim or _c 
       if (_c < _lim) then {
           _max = _c;
       } else {
           _max = _lim;
       };
       // remove all mags of type
       for "_i" from 1 to _max do {_unit removeMagazine _oldAmmo;};
       // add mags of other type
       for "_i" from 1 to _max do {_unit addMagazine _newAmmo;};
       // hint formatText ["magazines = %1, count = %2", (str (magazines _unit)), _max];
       if (_doReload) then {reload _unit;};
    } else {
       if (_newAmmo in (magazines _unit)) then {
               // find out how many mags of type
               {
                   if (_x == _newAmmo) then {
                       _c = _c + 1;
                   };
               } forEach magazines _unit;
               // determine what is smaller _lim or _c 
               if (_c > _lim) then {
                   _max = _lim;
               } else {
                   _max = _c;
               };
               // remove all mags of type
               for "_i" from 1 to _c do {_unit removeMagazine _newAmmo;};
               // add mags of other type
               for "_i" from 1 to _c do {_unit addMagazine _oldAmmo;};
               // hint formatText ["magazines = %1, count = %2", (str (magazines _unit)), _max];
               if (_doReload) then {reload _unit;};
       } else {
           hint formatText ["No mags found, neither %1 nor %2", _oldAmmo, _newAmmo];
           sleep 1;
           hint formatText ["magazines _unit = %1", str magazines _unit];
           sleep 2;
       };
    };
    

    And then I have the fToggleTracerAmmo.sqf script for the action:

    private ["_args", "_unit", "_normalAmmo", "_tracerAmmo", "_swapLimit"];
    
    _args = _this select 3;
    
    _unit = _args select 0;
    _normalAmmo = _args select 1;
    _tracerAmmo = _args select 2;
    _swapLimit = _args select 3;
    _reload = _args select 4;
    
    nul = [_unit, _normalAmmo, _tracerAmmo, _swapLimit, _reload] execVM "fSwapMagazines.sqf";

    which as one can see at line 2 is intended for the addAction extended syntax, for example in my init.sqf:

    waituntil {!isnull player};
    waituntil {time > 0};
    
    toggleAction = player addAction ["Toggle tracer ammo", "fToggleTracerAmmo.sqf", [player, "10Rnd_127x99_m107", "ACE_10Rnd_127x99_T_m107", 0, true], 1, false, true, "", "true"];
    

    Works quite nicely as in that it will swap the exact amount of mags

    that I had before with the same amount of tracer mags.

    To my mission this is somewhat crucial since the mission failed condition

    checks to see if you have hit all targets before running out of M107 bullets.

    Again thanks for all the help!

    DJ


  12. That class list sure is handy! I didn't know about that.

    Thanks for providing me with the link.

    I did what you suggested and it adds the tracer ammo just fine but it doesn't make it optional and also not via any action menu commands.

    It seems then some scripting is needed after all...

    Do you know how I can replace magazines of a unit, but just the ones of a specific type?

    I mean I'd need a command like "magazines" that accepts a string as parameter and returns an array with all the mags whose name/type matched that string.

    I suspect some form of stringing together for or forEach with count or somesuch?

    The biki seems a bit shallow on this end.

    Again thanks for helping :)


  13. Hi all,

    I am trying my first steps as mission creator, in that I want to create a sniper training mission.

    I have it all working quite nicely so far, I've got briefing, triggers and scripts that deal with task and objective state etc.

    What I want to do now is to add an action to the MOUSEWHEEL menu that lets you choose from using tracer ammo for the M107.

    As my mission will be centered around A.C.E. v2 v1.5b sniping interface, preferably using tracers from A.C.E. v2 (if vanilla doesn't have them) as to eliminate another mod dependency.

    I have found addAction but I can't seem to find out the class name regarding tracers so I can addMagazine them in the script that's bound to the action.

    Does anyone know what I need to make this possible from the action menu?

    Thanks for reading!

    DJ

×