Jump to content

Melody_Mike

Member
  • Content Count

    239
  • Joined

  • Last visited

  • Medals

Posts posted by Melody_Mike


  1. Hi everyone. 
    After getting some help elsewhere, I've gotten a working piece of code. 

    I wasn't being very sharp, and forgot that when hosting locally (eg Eden "Play in Multiplayer") you are the server, not the client. So IDD 53 would have not worked in my test case, but 52 did.
    The code has been amended to check for server, client, briefing screen, or mission start.
    ===
    Long story short: this will allow players to click a piece of text and see a specific ORBAT entry. Enter this into your initplayerlocal.sqf file:

    player createDiaryRecord ["Diary", ["Situation"," 
     
        <execute expression=' 
            [ configFile >> ""CfgORBAT"" >> ""BIS"" >> ""O_Brigade"", findDisplay (if (isMultiplayer &amp;&amp; {getClientState isEqualTo ""BRIEFING SHOWN""}) then { [53, 52] select isServer } else { [37, 46] select (time > 0) }), [], 4, [""ConfigClass_1"",{systemChat ""ConfigClass_1""}] ] call BIS_fnc_ORBATOpen;
        '>     
        Open ORBAT 
        </execute> 
    "], taskNull, "", false];

     
    See other pages for information on how to write your own ORBAT entries, such as this one: 

     
    Enjoy!

    • Like 3

  2. Hiya everyone.
     

    My aim is to make an animated briefing in a multiplayer mission using the ORBAT. 


    To start off, I want to be able to call BIS_fnc_ORBATOpen during the initial briefing screen. 

    I've adapted the example from the BIKI: https://community.bistudio.com/wiki/BIS_fnc_ORBATOpen

    But this expression only works if it's run from the debug console during a mission. Not in the initial briefing screen, which, let's face it, is the only time players will want to look at an ORBAT. If used there, Arma will hard lock to a black screen, without an error in the RPT. You need to cntrl-alt-del to manually end the program.
     

    Turns out the initial briefing screen and map screen have different IDDs. So I drafted this expression, which creates a diary record with the the words "Open ORBAT". When clicked, it checks whether the mission has already started, and then chooses the expression with the appropriate IDD. Please excuse my excessive indentation:
     

    player createDiaryRecord ["Diary", ["Situation"," // diary record
    
    	<execute expression=' // execute code when clicking text
    		if (time > 0) then 
    			{ 
    				[ configFile >> ""CfgORBAT"" >> ""BIS"" >> ""O_Brigade"",findDisplay 46, [], 4, [""ConfigClass_1"",{systemChat ""ConfigClass_1""}] ] call BIS_fnc_ORBATOpen;
    			}
    		else 
    			{
    				[ configFile >> ""CfgORBAT"" >> ""BIS"" >> ""O_Brigade"",findDisplay 37, [], 4, [""ConfigClass_1"",{systemChat ""ConfigClass_1""}] ] call BIS_fnc_ORBATOpen;	
    			}
    	'>	
    	Open ORBAT // the bit of text
    	</execute>
    "], taskNull, "", false];

    However, although this expression works in singleplayer, it does not in multiplayer.

    The list https://community.bistudio.com/wiki/Arma_3:_IDD_List says IDD 53 should work. But it doesn't. 
     

    So my question is: what is the correct IDD for the initial briefing screen of clients in multiplayer?

    (or am I missing something else entirely?)

    with thanks,

     


  3. @NeisAEL In what situations (mods) are you getting these errors? And with what line are you calling bomb.sqf? I've just tested the newest version of the test mission in local hosted multiplayer. I don't get your errors. 

    On 4/18/2022 at 2:22 PM, NeisAEL said:

    "fn_getCondition.sqf, Line 10 Type String, expected Bool"

     

    or 

     

    "fn_soundLoop.sqf Line 4 Type String, expected Bool"


    These two errors refer to parameters in bomb.sqf; specifically _object and _needKit . Do you also get it when you use the default init line on a default (metal barrel) object:

    null = [this, 10, true, false] execVM "bomb\bomb.sqf";

    ?
    =====

    I also however, have a minor bug to report. 
    I don't run ACE, and I have tried setting the _disableAce3 value to both true and false. But the game will still give this error:

    Error in expression <[_unit] call ace_common_fnc_isEngineer
    
    if( _isEOD || _isEngineer ) then 
    {
    _isE>
    Error position: <if( _isEOD || _isEngineer ) then 
    {
    _isE>
    
    Error Missing ;
    
    File (...)\mikehudak-a3_bomb.vr\bomb\functions\fn_isExpert.sqf..., line 18 

    -every time the mission is (re)loaded in editor or previewed, and ignore the _expertMultiplier value, unless I comment out the ACE part of fn_isExpert.sqf (lines 13-18). It's not strictly game breaking. But it is tedious for non-ACE users.  


  4. This is good stuff. 
    It's a straightforward original story. The missions have a short but well scripted interactive briefing with a little bit of voice acting. No long winded paragraphs of text. 
    The missions are clearly defined, but you are given multiple tools (such as artillery, mines, and launchers) to complete them. Your need to divide the equipment and weapons amongst your (4 player coop team) at the start. 
    But what's really special is that it runs without being dependent on mods, and without any bugs. Props to this achievement!
     


  5. (NB: If any earlier posters of this thread object, I'll of course remove this "necro" of the topic)

    I'm thankful that this function exists. It solved a number of problems in finding both icons and textures (such as examples for all the Art of War canvas objects which are still in .ebo). 
     

    But this function didn't find a set of icons that I needed: the default terrain icons. Specifically the one for the wind generators. I've cropped a screenshot that looks quite artifacted when zoomed at any level: https://ibb.co/CKM6rb4
    image.png
    I spent two evening dinners combing through the enormous output of the function, but didn't find the .paa . Don't know which .pbo to look either. Does anyone have a suggestion?


  6. Wait, I'm a little confused. If you login as admin and Zeus, then you don't get this graphical artifacting, but logged out as admin, but playing as Zeus, you do? I would have no explanation for that.

    Unless I am reading it wrong, and you get the artifacting/glitching when you are in Zeus mode, versus (what I guess) is regular Spectator cam when taking a player slot as an admin. And that is plausible, because the viewdistance is different between Zeus and Spectator cameras (and Arma sometimes bugs when loading in LODs and textures).


  7. Hullo everyone. 

    I'm trying to set a campaign set shortly after the events of the "Steel Pegasus" campaign. Figured a shortcut to making the ORBAT would be to modify the existing entries from that campaign. 

    Indeed the mission.sqm files do have ORBAT modules with references and ceilings such as:

    configFile >> "cfgOrbat" >> "BIS" >> "B_I_1"
    configFile >> "cfgOrbat" >> "BIS" >> "B_I_FIA"

    -respectively.


    Unfortunately the PBO, missions_f_tank.pbo, has almost none of these config entries. The config.bin (unbinarised) file in the root of the PBO has a few entries referring to some of the AAF units. 

    I've skimmed through the other PBO's in the Tanks folder, and they don't seem to have it either. That's to be expected. But where would I find these CfgORBAT entries instead?
     


  8. Oh that's interesting. Never read this method before. I tried it, and it does seem to work on my end. I did not have CBA loaded, however. My first thought would be that (any) mod could be conflicting. 
     

    But I assure you from experience, that my described method will give a fully working Zeus slot for non-admins in a multiplayer (listen/dedicated/JIP compatible) environment. 

    Good luck! :)


  9. Hi @HCStrike, welcome to the forums :). 

    The Game Master modules work when they are linked to units. They can be BLUFOR, OPFOR, civilian. Doesn't matter. They are the ones you can give variable names zCreator and zCreator2.

    You can also hide and disable simulation the units in their attributes, then check forceInterface in the Game Master modules, to make sure the players stay in the Zeus interface.

    Have fun! 


  10. At risk of "necro-ing" the thread, I'd like to point out to future users who find this article that yes, you can add an action to objects that are not stationary. 

    Make sure you use the correct sphere (classname "Sign_Sphere100cm_Geometry_F").
    Attach the sphere object (here given variable name _sphere) with whatever offset to your object. In this case, the hood of a civilian van:

    _sphere attachTo [_van, [0,3.5,-0.5]];

    And then execute an addaction unto the sphere from whatever init or script file.
    The sphere (and addaction) will move with the vehicle.

    Thought I'd save someone a few hours messing with selectionNames and addAction syntax...
     
     

    • Like 1

  11. Hi bub. 

    I assume your picture shows a static prop from this mod: https://steamcommunity.com/sharedfiles/filedetails/?id=1685039592
    ?imw=5000&imh=5000&ima=fit&impolicy=Lett

    So not a boat vehicle. That means you only have to "teleport" your units to the ship walkway, using setposATL or setposASL (https://community.bistudio.com/wiki/setPosASL).
    Assuming you can get the speedboat to travel close enough, you could just put a trigger next to the walkway.

    The next, much bigger problem, is getting your AI units to move on the ship prop. Because the prop is not terrain, they probably won't.
    If you're willing to go the extra mile, you can script their path, using this: https://forums.bohemia.net/forums/topic/222856-generate-ai-path-for-building/ 

    I will say, if you get this to work, that you will made some really unique :)!


  12. Thank you for responding @beno_83au. I've posted this twice in the Discord as well. You are the first person even to respond. People don't even tell me I'm going about it the wrong way.

    It seems I may perhaps be breaking new ground here with the communication menu scripting. 

    Of course I have taken a look at the default game scripting for CAS within "A3\modules_f\supports\...". It's about 16 script files and 8 FSM files. Before I reverse engineer the code to not make it an Eden module, remove the unnecessary features, then make it work again as a mission script (in multiplayer!), it'll be a while. But I do like a challenge.

    Cheers,

    - MeM

    • Like 1

  13. On 11/15/2021 at 11:58 PM, mikey74 said:

    Try this.  Place a trigger. lol It'll be easier just to look at my mission. This Arty script will work with most if not all artillery.

    https://www.dropbox.com/s/68atxkce1t51635/annihilate.Stratis.rar?dl=0

     

    video

    Thank you for this!

    Seems a lot more robust then other workshop compositions and "reveal" scripts.

    So if I understand it, the Dest_Zone trigger starts a command in init.sqf that detects a list of enemies within 200m of the trigger. That list is passed (globally) to all artillery units, which then do a range check, have all their targets automatically lased, then fire continuously until there are no more enemies in the list, friendlies are detected, or ammo finished. 

    I guess I have 2 questions:
    I would like players to cross a large area and not have the AI empty its ammo at first sight: Can I set it with multiple dest_zone triggers? And can I restrict the artillery to fire periodically?


  14. Aim: 
    To enable CAS using unmanned drones for players, without significant bugs, using mission scripting.
     

    Issue: 
    The default CAS module (SupportProvider_CAS_Bombing) is rather bugged when synced with a UAV (B_UAV_02_dynamicLoadout_F or O_UAV_02_dynamicLoadout_F). 

    If for example, a bombing run is requested and that UAV is too close, then it will circle the target endlessly, with the player unable to request new runs. Similarly, if the player requests a laser-guided bomb or unguided bomb, but the UAV does not have the correct loadout, it will similarly loiter. See picture below:

    CAS-loadout-error.jpg
    So there are several easily triggered soft-locks that I wish to design around. 
     

    Solution attempt #1: 
    Create individual bombing runs (without a constant provider) using the zeus module. 

    Looking at beno83_au 's script (https://forums.bohemia.net/forums/topic/219155-release-mil_cas/ )
    I found a reference to the zeus CAS module. This is easily copied and set as a new function in description.ext . I modified the start position of the CAS runs to the start position of my regular CAS provider unit. It allows me to specify the type of run, and respawns the CAS unit, so there's no soft locking due to to loadout OR position. But-

    It's completely missing the player UI. There's no communications menu, no notifications, no sound. The strike is called using script commands.


    Solution attempt #2:
    Recreate the support provider module, remove the "unguided bomb" command menu option, and script respawning modules and units after every CAS. 

    I found that the module 'SupportProvider_CAS_Bombing' uses scripts within modules_f.pbo > supports . I unpacked those, thinking "if I just cut out that single line, then recompiled it all back into functions, this should replace the vanilla function without problems". But they also include a set of FSM 's and BikB dialog files. And I've gotten rather stuck on where to find my relevant line and remove it. 

    This solution would restore the complete UI of the vanilla CAS request, sans loadout error. Deleting the vehicle and recreating the setup would be pretty straightforward. 

    So this is me at the moment. I'm stuck with the user interface of the Close Air Support Modules. The BIKI article on comm menus seems helpful- 
    https://community.bistudio.com/wiki/Arma_3:_Communication_Menu  
    But I am having trouble locating the vanilla menus and editing them. 
     

    Any thoughts on how I should proceed?


    With thanks,

    -MeM
     


  15. @Solarcode red I removed the comments (init fields don't like those) and removed the optional arguments. Here ya go:

    this addAction 
    [ 
     "Set weather clear skies", 
     { 
     0 setOvercast 0;  
     forceWeatherChange;  
     } 
    ];
    
    this addAction 
    [ 
     "Set weather overcast", 
     { 
     0 setOvercast 0.6;  
     forceWeatherChange;  
     } 
    ];
    
    this addAction 
    [ 
     "Set weather stormy", 
     { 
     0 setOvercast 1;  
     forceWeatherChange;
     0 setRain 1;
     } 
    ];

     

    • Like 2

  16. Hi @Solarcode red; welcome to the forums!

    What you describe has been exactly implemented by the following, excellently made mission, by none other than our beloved @Lou Montana:

    However, if you wish to create your own, a simplistic way would be-

    Place a laptop object. Paste the following code into its init box:

    this addAction
    [
    	"Set weather clear skies",	// title
    	{
    	0 setOvercast 0;
    	forceWeatherChange; // script
    	},
    	true,		// showWindow
    	false,		// hideOnUse
    	"true", 	// condition
    	3,			// radius
    	false,		// unconscious
    	"",			// selection
    	""			// memoryPoint
    ]; 
    
    
    this addAction
    [
    	"Set weather overcast",	// title
    	{
    	0 setOvercast 0.5;
    	forceWeatherChange; // script
    	},
    	true,		// showWindow
    	false,		// hideOnUse
    	"true", 	// condition
    	3,			// radius
    	false,		// unconscious
    	"",			// selection
    	""			// memoryPoint
    ]; 
    
    this addAction
    [
    	"Set weather storm",	// title
    	{
    	0 setOvercast 1;
    	forceWeatherChange; // script
    	},
    	true,		// showWindow
    	false,		// hideOnUse
    	"true", 	// condition
    	3,			// radius
    	false,		// unconscious
    	"",			// selection
    	""			// memoryPoint
    ]; 


    Hopefully this will give you an idea how it works. Assuming I have not mistyped anything on my phone :float:. Note: this method has multiple bugs. Changing weather may cause stuttering in multiplayer. Players joining mid-mission (JIP) may find duplicate actions in their menu. And others. But it works fine for a quick mission with friends.


     

    • Like 2

  17. ACE has a rather complicated weather system that affects things like ballistics and artillery as well. I have had similar problems with scripted weather being removed after a few seconds when ACE was loaded. Have you tried disabling (not loading) the ACE mod from the launcher and tested that?


  18.  

    1 hour ago, asdsadasddsa said:

    Hello, thank you very much for your help, but I did not understand how to write code. I mean can you write me the code, please, it is very important for me.

    How many Altian dollars are you willing to spend? :icon_cool:

    More seriously, you have picked a pretty good topic to start playing with scripting. 

    Skim read this: https://community.bistudio.com/wiki/Introduction_to_Arma_Scripting

    Read the links I sent you and type a command into the debug console ( "Execute" ) when you play a mission from the Eden Editor. 
    Debug console:
    A3_console_mission.jpg

    Example command:

    player setVelocity [20, 0, 10];

    Play around with this, and if you try enough and ask a question that shows you made an effort, someone may help you.

    Good luck!

×