Announcement

Collapse
No announcement yet.

Journal (and requests for help) of a new mission developer.

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Journal (and requests for help) of a new mission developer.

    I'm working on learning how to do multiplayer mission editing for ArmA, and although I'm fairly competent at being able to research and figure things out on my own, I may need some help with a few things from time to time or 'mis-research' and learn something wrong.

    With that in mind, I figured a fun way to help myself learn multiplayer mission editing would be to post a dev journal of sorts for my first mission idea. The idea is to share some of the process and knowledge I'm learning (making me have to re-explain ideas I'm learning), show where I'm having problem areas, and invite suggestions, criticisms, advice, and help along the way.

    With that, here is the mission outline:

    Main Idea: A TvT map where a player controlled VIP needs to be protected by BLUFOR, while OPFOR tries to assassinate the VIP.

    Rules: Unlimited Respawn and JIP for both sides. BLUFOR loses if the VIP is killed, OPFOR loses if they run out of time (one hour). I'm considering some sort of alternative win for BLUFOR, such as escorting the VIP to a safezone or somesuch.

    Location: Celle island, in the southern developed area including the city Celle and the surrounding towns.

    I chose TvT because I figured it'd be slightly less complicated then a co-op mission to start with. JIP and infinite respawn because these are key mechanics that I will need to learn, and the concept because I thought it'd be a fun objective other than 'capture the town' that should be fairly simple to setup.

    With that, let's get started:


    Here's the basics, a female civillian named Cindy Hudson for lulz, and a squad of BLUFOR. I've not bothered to give the correct descriptions or loadouts to the BLUFOR soldiers for two reasons: This is likely not the final squad makeup/chain of command, and I'm looking for an easy way to quickly generate loadouts.

    Now, let's setup a spawn area for BLUFOR. I notice that in the Celle Center mission, there are gamelogics marking the FOBs, I assume this is hooked up to scripting somewhere, so I'll follow suit and take apart scripts until I find what I'm looking for.


    (click to embiggen)

    Found it in Beta's init script. This part's simple enough though: if a side has no tickets then kick them to the spectator script, if not, set them to the position of the appropriate FOB. The call for the spectator script is a bit unfamiliar, I'll have to look at it later, but since it won't be particularly relevant for this mission I'll ignore it for now.

    However,
    Code:
    if (!isServer && isNull player) then  //JIP player
    {
    	waitUntil {!isNull player};
    I'm still struggling with multiplayer code, and while I understand the !isServer, the isNull and the waituntil {!isNull player}; is somewhat mystifying. I understand that it's differentiating between a JIP and a normal connect at least.

    Next, it looks like he's calling some scripts, briefing, markers, playerDeath, and radioAdd. I believe radioAdd just adds the radio option to take objectives in his mission, so I shouldn't have to worry about that. The briefing script is straightforward enough. Markers.sqf looks like it's just hiding the opposing team's markers from view. I believe this is being done for each player because markers are local to the client. I think I understand what his deathscript is doing although I haven't looked at rekitout.sqf. In the meantime, I will need a similar script eventually, so I'll go ahead and write a skeleton version of it now. Looks like I'll only use it to requip a player when they respawn

    Code:
    //////////////////////////////////////////////////////////////////
    // Function file for Armed Assault
    // Created by: Andrew "Zonr_0" W.
    // Purpose: Monitors a player for their death and requips them.
    //////////////////////////////////////////////////////////////////
    
    sleep 1; //wait for mission start
    
    while {true} do //this loop continuously monitors the player.
    {
    
    	while {!alive player} do {sleep 0.05;}; //wait here until the player is dead.
    	
    	//TODO: Requip player.
    	
    };
    Right now, it does a whole lot of nothing obviously. So let's get respawn working. Time to go watch pClipse's video tutorials.

    Alright, looks like the gamelogics have nothing to do with it. Let's just lay down a pair of markers and setup the description.ext... And after a bunch of frustrating testing with respawn not working in singleplayer, I finnally had the insight to try editing in multiplayer, and wonders of wonders it actually worked. With the respawns working, I will leave this journal here for now and post more later. Any comments, suggestions, helpful advice, particularly on the mission premise would be greatly apreciated.

    Things to do:
    Add OPFOR
    Find a final squad makeup and add descriptions
    create loadouts
    rekit people on respawn
    Add markers
    Add tasks/objectives and victory/loss conditions
    Add an AO limit
    Create a visual FOB area for both sides

  • #2
    Re: Journal (and requests for help) of a new mission developer.

    Regarding this bit:
    Code:
    if (!isServer && isNull player) then  //JIP player
    {
    	waitUntil {!isNull player};
    player is a variable supposed to reference the player object, i.e. the player character. However when a JIP player joins the variable doesn't exist from start. It takes a little while before the player is 'handed' the character by the server, and the player variable becomes declared (i.e. gets a value).

    Before the player variable has got a real value (meaning the player has got a character to control) there is no 'local' (regarding locality in multiplayer) character for the client to apply client-side scripts on.

    Thus, for all scripts that need to affect the player object, you need to wait until the variable is properly defined since it means that the JIP player now owns a character to actually do things to, since before that the object was local only on the server.



    Comment


    • #3
      Re: Journal (and requests for help) of a new mission developer.

      Thanks Inkompetent!

      Placed the win and lose conditions last night, although I'm a bit iffy on whether I got the locality on it correct. I'll have to test it with a dedicated server later. However, now I'm onto the briefing which is straightforward enough although it took me a second to realize how to do multiple briefings for each faction. I'm creating four different functions for this briefing: briefing.sqf which calls the appropriate from briefblu.sqf briefred.sqf briefcin.sqf.

      After a couple of hours testing, I'm having some issues, with getting the briefing, debriefing and tasks to show up. I'll take a short break and look at it later.

      edit: I'm officially stupid. I had saved the init in the wrong directory. >_> Still having trouble with the debriefing however.

      Hmm, after doing some testing, I'm noticing how screwed the player controls are for Cindy Hudson. I may have to forget the gag and replace her with some sort of soldier since it seems BI is rather sexist. Cindy can't run unless she hits the sprint key (double tap w), and she can't carry any weapons and barely has any inventory slots at all. I'll play around with other models and classes to see if I can't keep the gag with a different model.

      2nd edit: Wow. Just wow. None of the female civillians can carry weapons or more than 2-3 inventory slots, but all the men civilians have full inventories!
      Last edited by Zonr_0; 06-23-2010, 05:11 PM.

      Comment


      • #4
        Re: Journal (and requests for help) of a new mission developer.

        Alright, I think for simplicity sake I'll have the units keep their default kit on spawn and instead just customize the gearboxes. Unfortunately, I don't know my military hardware very well, and I'm not sure what to give each side. I'm fairly happy with blufor, but opfor needs a more modern russian army arsenal rather than a guerrilla layout. I know the commands, I just need a good list of equipment to add. I know there's one in the script bank, but it's outdated with ACE I believe. Right now, basing it off of op black diamond, I have the following: (loop and clearing of previous contents not included)

        BLUFOR
        Code:
        _this addWeaponCargo ["ACE_SOC_M4A1_GL_AIMPOINT",5];
        _this addWeaponCargo ["ACE_SOC_M4A1_Aim",200];
        _this addWeaponCargo ["ACE_SOC_M4A1_AIM_SD",200];
        _this addWeaponCargo ["M16A4",200];
        _this addWeaponCargo ["M16A4_GL",5];
        _this addWeaponCargo ["ACE_SOC_M4A1_Eotech",200];
        _this addWeaponCargo ["ACE_SOC_M4A1_GL_EOTECH",5];
        _this addWeaponCargo ["ACE_HK416_D10_COMPM3",200];
        _this addWeaponCargo ["ACE_HK416_D10_COMPM3_SD",200];
        _this addWeaponCargo ["ACE_HK416_D10_AIM",200];
        _this addWeaponCargo ["ACE_HK416_D14_COMPM3",200];
        _this addWeaponCargo ["ACE_HK416_D14_COMPM3_M320",5];
        _this addWeaponCargo ["ACE_MP5A4",200];
        _this addWeaponCargo ["MP5A5",200];
        _this addWeaponCargo ["MP5SD",200];
        _this addWeaponCargo ["M240",3];
        _this addWeaponCargo ["Mk_48",2];
        _this addWeaponCargo ["ACE_M249Para",5];
        _this addWeaponCargo ["M24",2];
        _this addWeaponCargo ["ACE_M110",3];
        _this addWeaponCargo ["Colt1911",200];
        _this addWeaponCargo ["M9",200];
        _this addWeaponCargo ["M136",10];
        _this addWeaponCargo ["ACE_Glock17",200];
        _this addWeaponCargo ["M107",1];
        _this addWeaponCargo ["ACE_USP",200];
        _this addWeaponCargo ["ACE_USPSD",200];
        _this addWeaponCargo ["ACE_P226",200];
        _this addWeaponCargo ["M9SD",200];
        _this addWeaponCargo ["Binocular",200];
        _this addWeaponCargo ["NVGoggles",200];
        _this addWeaponCargo ["ACE_Earplugs",500];
        
        
        _this addMagazineCargo ["30Rnd_556x45_Stanag",500];
        _this addMagazineCargo ["30Rnd_556x45_StanagSD",500];
        _this addMagazineCargo ["10Rnd_127x99_m107",20];
        _this addMagazineCargo ["ACE_10Rnd_127x99_raufoss_m107",6];
        _this addMagazineCargo ["30Rnd_9x19_MP5",500];
        _this addMagazineCargo ["30Rnd_9x19_MP5SD",500];
        _this addMagazineCargo ["1Rnd_HE_M203",200];
        _this addMagazineCargo ["FlareWhite_M203",200];
        _this addMagazineCargo ["FlareGreen_M203",200];
        _this addMagazineCargo ["FlareRed_M203",200];
        _this addMagazineCargo ["FlareYellow_M203",200];
        _this addMagazineCargo ["1Rnd_Smoke_M203",200];
        _this addMagazineCargo ["1Rnd_SmokeRed_M203",200];
        _this addMagazineCargo ["1Rnd_SmokeGreen_M203",200];
        _this addMagazineCargo ["1Rnd_SmokeYellow_M203",200];
        _this addMagazineCargo ["100Rnd_762x51_M240",500];
        _this addMagazineCargo ["200Rnd_556x45_M249",500];
        _this addMagazineCargo ["5Rnd_762x51_M24",200];
        _this addMagazineCargo ["ACE_20Rnd_762x51_SB_M110",300];
        _this addMagazineCargo ["7Rnd_45ACP_1911",500];
        _this addMagazineCargo ["15Rnd_9x19_M9",500];
        _this addMagazineCargo ["15Rnd_9x19_M9SD",500];
        _this addMagazineCargo ["HandGrenade_West",500];
        _this addMagazineCargo ["SmokeShell",200];
        _this addMagazineCargo ["SmokeShellRed",200];
        _this addMagazineCargo ["SmokeShellGreen",200];
        _this addMagazineCargo ["SmokeShellYellow",200];
        _this addMagazineCargo ["ACE_17Rnd_9x19_G17",500];
        _this addMagazineCargo ["ACE_12Rnd_45ACP_USP",500];
        _this addMagazineCargo ["ACE_12Rnd_45ACP_USPSD",500];
        _this addMagazineCargo ["ACE_15Rnd_9x19_P226",500];
        _this addMagazineCargo ["ACE_Knicklicht_R",500];
        _this addMagazineCargo ["ACE_Knicklicht_W",500];
        _this addMagazineCargo ["ACE_Knicklicht_G",500];
        _this addMagazineCargo ["ACE_IRStrobe",500];
        _this addMagazineCargo ["ACE_M7A3",500];
        _this addMagazineCargo ["ACE_M84",500];
        _this addMagazineCargo ["ACE_M34",500];
        _this addWeaponCargo ["ACE_GlassesGasMask_US",500];
        OPFOR
        Code:
        _this addWeaponCargo ["AK_74",20];
        _this addWeaponCargo ["AK_74_GL",10];
        _this addWeaponCargo ["AK_47_M",50];
        _this addWeaponCargo ["AK_47_S",50];
        _this addWeaponCargo ["AKS_74_kobra",10];
        _this addWeaponCargo ["AKS_74_U",20];
        _this addweaponCargo ["AK_107_GL_kobra",10];
        _this addweaponCargo ["AK_107_kobra",10];
        _this addWeaponCargo ["PK",5];
        _this addWeaponCargo ["RPK_74",1];
        _this addWeaponCargo ["SVD",1];
        _this addWeaponCargo ["Makarov",10];
        _this addWeaponCargo ["RPG7V",2];
        _this addWeaponCargo ["Binocular",10];
        _this addWeaponCargo ["ACE_FAL_Para",20];
        _this addWeaponCargo ["ACE_SKS",20];
        _this addWeaponCargo ["ACE_Scorpion",20];
        _this addWeaponCargo ["ACE_Earplugs",200];
        _this addWeaponCargo ["AKS_GOLD",1];
        
        
        _this addMagazineCargo ["30Rnd_545x39_AK",300];
        _this addMagazineCargo ["30Rnd_762x39_AK47",300];
        _this addMagazineCargo ["1Rnd_HE_GP25",100];
        _this addMagazineCargo ["FlareWhite_GP25",100];
        _this addMagazineCargo ["1Rnd_SMOKE_GP25",100];
        _this addMagazineCargo ["100Rnd_762x54_PK",200];
        _this addMagazineCargo ["75Rnd_545x39_RPK",200];
        _this addMagazineCargo ["10Rnd_762x54_SVD",200];
        _this addMagazineCargo ["8Rnd_9x18_Makarov",200];
        _this addMagazineCargo ["ACE_20Rnd_765x17_vz61",200];
        _this addMagazineCargo ["ACE_20Rnd_762x51_B_FAL",300];
        _this addMagazineCargo ["ACE_10Rnd_762x39_B_SKS",300];
        _this addMagazineCargo ["PG7V",30];
        _this addMagazineCargo ["HandGrenade",100];
        _this addMagazineCargo ["HandGrenade_East",100];
        _this addMagazineCargo ["ACE_RDG2",50];
        _this addMagazineCargo ["ACE_RDGM",50];
        _this addMagazineCargo ["ACE_Pomz_M",10];

        Comment


        • #5
          Re: Journal (and requests for help) of a new mission developer.

          For classes in ArmA2 and ACE2, check: http://browser.dev-heaven.net/

          Regarding civilians: Male civilians are a bit lackluster in in 'features' and stats in the game (at a disadvantage compared to all soldiers) but they work. Women however have a very lackluster skeleton and animations, and are completely unsuitable for anything but unarmed statists. BIS didn't rig them for more than they were used for in the campaign, which is almost nothing at all.

          You can simplify the briefings quite a lot and back into one single file with a simple switch-case statement.

          Code:
          switch (side player) do
          {
              case WEST:
              {
                  // West briefing here
              };
          
              case EAST:
              {
                  // East briefing here
              };
          
              case RESISTANCE
              {
                  // Independent's briefing here
              };
          
              case CIVILIAN
              {
                  // Civilian briefing here
              };
          };



          Comment


          • #6
            Re: Journal (and requests for help) of a new mission developer.

            Thanks again Inkompetent, I'm familiar with case statements, but I ended up using three if/then's out of preference. The link you threw up was invaluable too.
            After some tweaking and dropping of a few things, I think I have it finished, and I've tested it with a dedicated server I threw up. I'll submit it tonight or tomorrow unless somebody wants to take a look at it and try to find any obvious errors.

            www.cloudajw.com/TG/TvT27_ViPHuntV1.Celle.pbo

            Comment


            • #7
              Re: Journal (and requests for help) of a new mission developer.

              Took a look at it.

              The only things I can notice that might give you issues are these:

              - for your weapon crates;

              Code:
              _h = this execVM "BLUammo.sqf"
              might throw you an error about a local variable in a global space, if it does make it "h" (or similar) instead of the local "_h".

              - your ammo scripts for the crates MIGHT be local to each client addMagazineCargo + scripts can lead to funky stuff sometimes

              - dealing with JIP players, currently they will JIP and start where they were placed in the editor, not sure if that's how you want it, but looking at how the mission is designed, it will probably be OK

              Comment


              • #8
                Re: Journal (and requests for help) of a new mission developer.

                Thanks a lot for looking at it Beita, I haven't noticed any errors regarding the local _h, and when we tested last night, the ammo crates seemed to spawn okay. JIP location is working as intended. :) I did notice a few typos last night in the briefing I need to fix, but after that, I should be ready to submit.

                Comment

                Connect

                Collapse

                TeamSpeak 3 Server

                Collapse

                Advertisement

                Collapse

                Twitter Feed

                Collapse

                Working...
                X