Multiplayer development workflow

Multiplayer development workflow

« posted: Jul 09, 2014, 05:05 PM »
Hi,

I was wondering if anyone with more experience would care to comment on how they go about multiplayer coding. As far as I can see the workflow would be code, pbo, upload to server, restart server, test and repeat. As a beginner to mp coding, I'm going to be doing a lot of small changes, looking at results, making more changes etc, while I find my feet, is there a faster way of running through a cycle that I'm missing?

Cheers
  • Offline AgentRev
  • Developer
  • Veteran
  • ******
  • Posts: 2326

Re: Multiplayer development workflow

« Reply #1 posted: Jul 09, 2014, 07:56 PM »
Here's my workflow and some tips:

- All my mission folders / repositories are in My Documents\Arma 3 - Other Profiles\AgentRev\missions, so they can be loaded in the editor quite easily.

- I create symbolic links from the mission folders I work on in MPMissions from the game's install folder, so they can be chosen in the mission list when you create a multiplayer lobby ingame.

- I set #define DEBUG to true in init.sqf, which causes custom functions to be recompiled from the files everytime they are called. This causes a 20-ish FPS drop, but you don't have to restart the mission just to test minor changes. I forgot a couple times to disable it before packaging updates ;D

- I test the mission inside a LAN lobby created via Multiplayer > Host Server. If you change stuff that requires a restart to test (like the init.sqf or world saving load script), you can just go back to the lobby to restart the mission.

- If you change stuff in description.ext and/or anything relating to GUI config, you have to go back to the mission selection list before restarting the mission, which is just before the lobby.

- The game locks write access to files when they are being compiled or execVM'd. So if you have a file that is getting called often (like addAction scripts), you might get read-only warnings if you try to edit them. addAction scripts in particular can be paused by opening the Esc menu. Otherwise, you have to wait for their execution to be completed before editing them, or go back to the lobby and do the edits.

- Once you are ready to deploy an update, just create a PBO from the mission folder like normally.

- Like PBOs, all mission folders have to be suffixed with ".Altis" or ".Stratis" to be available ingame.


Hope it helps.

Re: Multiplayer development workflow

« Reply #2 posted: Jul 09, 2014, 09:56 PM »
Cheers, that's a great help, saved me what would have been countless head scratching hours struggling to figure it out on my own. I'd clocked that DEBUG was switching how it compiled functions in mf_compile but hadn't realised it was to allow on the fly edits. Been working through the wasteland code trying to get a handle on how it all works but it'll be good to be able to get into the stuff that's been puzzling me and poking it with a stick to see how it works. Cheers again for taking the time to answer.

  • Offline AgentRev
  • Developer
  • Veteran
  • ******
  • Posts: 2326

Re: Multiplayer development workflow

« Reply #3 posted: Jul 09, 2014, 10:15 PM »
Also, disabling vehicle spawning via A3Wasteland_settings does help a lot with the restart times.

Re: Multiplayer development workflow

« Reply #4 posted: Jul 09, 2014, 10:16 PM »
Aye, that would make sense if I'm just wanting to poke about code. I'll give that a shot.

Re: Multiplayer development workflow

« Reply #5 posted: Jul 23, 2014, 05:37 PM »
thanks agentrev  - set it up that way now.

Re: Multiplayer development workflow

« Reply #6 posted: Jun 05, 2016, 04:50 PM »
Sorry for bringing up an old topic AgentRev.

I've created a custom "main mission" for our server and all is great so far, but after hours of Google searches and forum reading, I am still no closer to understanding how to get the mission from the *.sqm file it created to being able to add it to our server.

All mission files under ...server\missions in the main *.stratis pbo file are in sqf format.

I would really appreciate your help in understanding this.

It is quite a hard core mission, and I will be happy to share it with you ones it is "wasteland friendly" to make available to the community if you want to.

Kind Regards

SpeedBirdNam
  • Offline AgentRev
  • Developer
  • Veteran
  • ******
  • Posts: 2326

Re: Multiplayer development workflow

« Reply #7 posted: Jun 05, 2016, 08:43 PM »
Do you have the final PBO you want to use, or you don't know how to pack the PBO?

Re: Multiplayer development workflow

« Reply #8 posted: Jun 06, 2016, 12:26 AM »
Do you have the final PBO you want to use, or you don't know how to pack the PBO?

I can compile the PBO. But I don't know how to generate the mission's *.sqf files.

I found converters on the net for *.sqm to *.sqf, but not the other way round.
  • Offline AgentRev
  • Developer
  • Veteran
  • ******
  • Posts: 2326

Re: Multiplayer development workflow

« Reply #9 posted: Jun 06, 2016, 12:35 AM »
What the heck are you talking about. Nobody uses "converters" for anything, a PBO is a compressed file containing one SQM and multiples SQFs.

Re: Multiplayer development workflow

« Reply #10 posted: Jun 06, 2016, 12:43 AM »
What the heck are you talking about. Nobody uses "converters" for anything, a PBO is a compressed file containing one SQM and multiples SQFs.

I know the main "Example.Stratis.pbo" contains both "mission.sqm" and the eg. "mission_TownInvasion.sqf" etc under the "..\server\missions\sideMissions\" etc.

But the missions you created with either the 2D or 3D editor also compile in a "mission.sqm" and I don't know how to get it from the mission I made with the editor to "mainMissions" or "sideMissions" on the server.

Creampie said I should look for a converter...

CRE4MPIE™: format afaik
CRE4MPIE™: google sqm -> sqf

  • Offline AgentRev
  • Developer
  • Veteran
  • ******
  • Posts: 2326

Re: Multiplayer development workflow

« Reply #11 posted: Jun 06, 2016, 12:48 AM »
I don't know how to get it from the mission I made with the editor to "mainMissions" or "sideMissions" on the server.

I don't know what that means. mainMissions and sideMissions are not created in the editor, they are manually-written script files with a very strict order of execution. Are you talking about like base objects for the Outpost mission or something?

Re: Multiplayer development workflow

« Reply #12 posted: Jun 06, 2016, 12:58 AM »
No. Creating a new mission eg. hostage.

Apparently the new Eden editor supports it. Might just have to look into updating mine cause I can't find it.

http://steamcommunity.com/sharedfiles/filedetails/?id=630702051

Export all/selected objects as SQF (copies to clipboard) Tools > Export As SQF

If it's next to impossible for someone to "create" a new mission and import it to the server, then I give up.
But there are other side missions, so there has to be a way to do it.

If all else fails, can you please tell me of a good place to find extra missions for Wasteland?
  • Offline AgentRev
  • Developer
  • Veteran
  • ******
  • Posts: 2326

Re: Multiplayer development workflow

« Reply #13 posted: Jun 06, 2016, 01:08 AM »
You cannot create an A3W mission/objective in the editor. That's not how it works. The code must be written manually, the objective system I created must be fed very specific arguments in a strict order.

The editor is for creating missions that you host on the server and that players join directly and leave when they're done. A3W main/side missions are an entirely different thing. What Creampie told you is not what you're looking for.

Re: Multiplayer development workflow

« Reply #14 posted: Jun 06, 2016, 01:29 AM »
You cannot create an A3W mission/objective in the editor. That's not how it works. The code must be written manually, the objective system I created must be fed very specific arguments in a strict order.

The editor is for creating missions that you host on the server and that players join directly and leave when they're done. A3W main/side missions are an entirely different thing. What Creampie told you is not what you're looking for.

So if I am understanding this correctly, basically the mission "we" can create in the editor would only work for mpmissions hosted on a LAN or so from a user's PC?

Is there a good place to look for more Wasteland missions for Stratis?

We just want to create some diversity. Playing the same missions over and over and over day in and day out will let the server fall flat before long.