Jump to content
esfumato

Newbie wants to create MP game Mode.

Recommended Posts

Hello everyone, I want to create a MP game Mode for Arma 3, i have been reading tutorials of all kind but i can't start with my idea because the information i find doesn't fit my needs. Most of the tutorials are created to do COOP missions but for multiplayer game modes there is not much.

Also I know that to create my concept I will need scripting skills, but I don't have any experience with scripting and the tutorials I find... well i can't understand them. I have read the BIKI but I still being ignorant about scripting.

I have decided to look for help in the forum. The first question I have is about FIA. I would like to have FIA as an independent faction, I would like to let players to choose from NATO, CSAT, AAF, FIA and civilians.

I would like to know how to allow the FIA option in lobby.

ttkb.png

Edited by Esfumato

Share this post


Link to post
Share on other sites

The simplest way to get FIA on independent, is by creating an independent unit, set his "Probability of presence" to 0, then group FIA units to him. This will make the FIA units independent as they're added to a group of the independent side, while the "Probability of presence" will make sure the actual independent unit you placed as leader won't spawn. (Making the first grouped FIA unit leader).

Share this post


Link to post
Share on other sites

You cant unfortunately do what the post above me suggests, since the AAF is already indi, you can't have FIA as Indi too, and its doesn't really work when it comes to the lobby menu. Feel free to fire any more questions you have onto this thread.

Share this post


Link to post
Share on other sites

Well, The New FIA faction looks like is not posible by the moment.

Another thing I would like to do is to set some Start positions (Bases) one for each Side (Bluefor, Opfor, Independents) and make them in some predefined areas where everytime the match starts the base of each side is selected randomly. I mean, I want that no matter you play the same mission most of the times every faction start in a diferent location. Or at least, there are some diferent combinations that make the match diferent.

I want to do a PVP MP mission.

Share this post


Link to post
Share on other sites
Well, The New FIA faction looks like is not posible by the moment.

Another thing I would like to do is to set some Start positions (Bases) one for each Side (Bluefor, Opfor, Independents) and make them in some predefined areas where everytime the match starts the base of each side is selected randomly. I mean, I want that no matter you play the same mission most of the times every faction start in a diferent location. Or at least, there are some diferent combinations that make the match diferent.

I want to do a PVP MP mission.

What I would do is label all characters, say opfor are o1-20, and blufor are b1-20, and then have multiple starting areas named start1, start2, start3, etc. I would then select two start points at random, making sure the same point isn't selected twice by removing the first selection from the array, and setPos the respective faction's soldiers to a random position within a few meters of the start# marker location.

It is dirty, yes, but because it is done only once and before player == player it will not be noticeable.

Share this post


Link to post
Share on other sites
;2628907']What I would do is label all characters' date=' say opfor are o1-20, and blufor are b1-20, and then have multiple starting areas named start1, start2, start3, etc. I would then select two start points at random, making sure the same point isn't selected twice by removing the first selection from the array, and setPos the respective faction's soldiers to a random position within a few meters of the start# marker location.

It is dirty, yes, but because it is done only once and before player == player it will not be noticeable.[/quote']

Thanks for the response, but I don't know how to script so I need more information or some kind of example.

labeling the players I suppose that is giving them a name in the editor.

How can I create Start points? and once them are created how can I select them at random.?

Share this post


Link to post
Share on other sites

As Dan said, by labeling I mean naming them via the editor. The "start points" are markers, named start0, start1, etc. Made the script for you. Not as dirty as I thought, for whatever reason I thought setPos didn't have collision detection, and I didn't even think of using allUnits. Check it out.

This script is all-inclusive. This means 2 things. Good: No need to name any characters anything (I said o0-9 and b0-9 earlier, but that is no longer necessary). Bad: Because it is all inclusive, it is all inclusive. Every character, human or AI, is effected. If its a true PvP, then that shouldn't be a worry. Which is why I did it this way. The other way is possible though, let me know if you need it for some reason. Anyway, all you need to do is create 6 markers in the editor named start0 through start5 (you can change the amount by altering the 2nd line to change the 5 to whatever you want, just note the number 0 is counted). Place them where you want. Then in your init.sqf, put the following:

if (isServer) then { 
execVM "randomspawn.sqf";
};

Then, create a file called randomspawn.sqf and put the following in it:

_startarray = [];
for "_i" from 0 to 5 do {
_startmkrsel = [format["start%1",_i]];
_startarray = _startarray + _startmkrsel;
};

_opforstart = _startarray call BIS_fnc_selectRandom;
_startarray = _startarray - [_opforstart]; 
_bluforstart = _startarray call BIS_fnc_selectRandom; 
_opforstart = getMarkerPos _opforstart;
_bluforstart = getMarkerPos _bluforstart;

{
if ((side _x) == WEST) then {
	_x setPos _bluforstart;
}
else
{
	_x setPos _opforstart;
};
} forEach allUnits;

I've tested this and it works, so be sure to follow my instructions. This is NOT JIP compatible. Let me know if you want it to be, and I'll make a 2nd part. Enjoy!

Edited by Grimes [3rd ID]

Share this post


Link to post
Share on other sites

It works but not in the way I wanted.

The mision have independent units and civilians. And they are affected to the start position so west units start all together, and OPFOR AFF and CIvilians Start mixed in diferent places. Also I should need to link the respawn markers I placed in the editor to the startpositions.

Because when units get killed them start to respawn at the respawn markers and not in the start positions.

Well... I think that I need some SQF tutorials... things are getting complicated :butbut:

Share this post


Link to post
Share on other sites

:P So, those details are a little important. Thanks for telling me. Below is the updated version, assuming you are using BASE respawn. In there you'll see the marker names of the respawn markers (respawn_west, etc), if they are not correct (ie, you put _1 or something), just fix it up. All of the commands are there, you just may need to adjust for your names.

_startarray = [];
for "_i" from 0 to 5 do {
_startmkrsel = [format["start%1",_i]];
_startarray = _startarray + _startmkrsel;
};

_opforstart = _startarray call BIS_fnc_selectRandom;
_startarray = _startarray - [_opforstart]; 

_bluforstart = _startarray call BIS_fnc_selectRandom; 
_startarray = _startarray - [_bluforstart]; 

_guerstart = _startarray call BIS_fnc_selectRandom; 
_startarray = _startarray - [_guerstart]; 

_civstart = _startarray call BIS_fnc_selectRandom; 
_startarray = _startarray - [_civstart]; 

{
deleteMarker _x;
} forEach _startarray;

_opforstart = getMarkerPos _opforstart;
_bluforstart = getMarkerPos _bluforstart;
_guerstart = getMarkerPos _guerstart;
_civstart = getMarkerPos _civstart;

_opforrespawn = "respawn_east"; 
_bluforrespawn = "respawn_west";
_guerrespawn = "respawn_guerrila";
_civrespawn = "respawn_civilian";

_opforrespawn setMarkerPos _opforstart;
_bluforrespawn setMarkerPos _bluforstart;
_guerrespawn setMarkerPos _guerstart;
_civrespawn setMarkerPos _civstart;

{
switch (side _x) do {
	case WEST: {_x setPos _bluforstart};
	case EAST: {_x setPos _opforstart};
	case GUER: {_x setPos _guerstart};
	case CIV: {_x setPos _civstart};
};
} forEach allUnits;

Edited by Grimes [3rd ID]

Share this post


Link to post
Share on other sites

I've experience in many script languages and have been a hardcore pc geek for about 20 years. Even with a pretty decent amount of experience coding, arma was not exactly easy to pick up. The documentation is scattered and often vague. The community is full of examples, but when you see 20 ways to do one thing you've either got to understand the differences or just pick one and move on.

My arma editing journey has now spanned about 3 months. I am finally getting a clue as to what is going on. Creating scripts is pretty much a must if you want to have a mission that performs well. Even more so on MP, and even more than that on dedicated servers. JIP (join in progress) has its own set of issues to deal with.

The only way you are going to create good missions is to start at the beginning and write code and use the editor. Make the mistakes and look for the solutions. As you write your own code rather than just copy/pasting others, you will begin to understand what the functions do, what they return. You will get errors and begin to piece together that a certain function expects a certain TYPE of input and that your input was not correct. Its a huge journey that eventually leads you to the knowledge needed to make some great missions.

The end result can be very good. I am almost done with my first full blown mission, with about 50% of the code made by myself with the help of community examples and whatever documentation I can find. All my other missions were doggy doo-doo compared to this one. And it took all that doggy doo-doo to get me to the point that I am at.

Practice practice practice. That is the key.

Best tip from me, enable showing script errors and work in windowed mode. Learn how to read your .rpt file and learn how to use diag_log or hint a lot. You've got to be able to see your errors. The goal is to have no errors in your .rpt file.

Second best tip, go here

https://community.bistudio.com/wiki/Code_Optimisation

and try to put into practice from the beginning. Build good habits, not bad ones. Granted, it takes some time to understand, but I learned a long time ago how much difference one little bad habit can make. Best just not to have bad habits :)

Share this post


Link to post
Share on other sites
;2629711']:P So' date=' those details are a little important. Thanks for telling me. Below is the updated version, assuming you are using BASE respawn. In there you'll see the marker names of the respawn markers (respawn_west, etc), if they are not correct (ie, you put _1 or something), just fix it up. All of the commands are there, you just may need to adjust for your names.

_startarray = [];
for "_i" from 0 to 5 do {
_startmkrsel = [format["start%1",_i]];
_startarray = _startarray + _startmkrsel;
};

_opforstart = _startarray call BIS_fnc_selectRandom;
_startarray = _startarray - [_opforstart]; 

_bluforstart = _startarray call BIS_fnc_selectRandom; 
_startarray = _startarray - [_bluforstart]; 

_guerstart = _startarray call BIS_fnc_selectRandom; 
_startarray = _startarray - [_guerstart]; 

_civstart = _startarray call BIS_fnc_selectRandom; 
_startarray = _startarray - [_civstart]; 

{
deleteMarker _x;
} forEach _startarray;

_opforstart = getMarkerPos _opforstart;
_bluforstart = getMarkerPos _bluforstart;
_guerstart = getMarkerPos _guerstart;
_civstart = getMarkerPos _civstart;

_opforrespawn = "respawn_east"; 
_bluforrespawn = "respawn_west";
_guerrespawn = "respawn_guerrila";
_civrespawn = "respawn_civilian";

_opforrespawn setMarkerPos _opforstart;
_bluforrespawn setMarkerPos _bluforstart;
_guerrespawn setMarkerPos _guerstart;
_civrespawn setMarkerPos _civstart;

{
switch (side _x) do {
	case WEST: {_x setPos _bluforstart};
	case EAST: {_x setPos _opforstart};
	case GUER: {_x setPos _guerstart};
	case CIV: {_x setPos _civstart};
};
} forEach allUnits;

[/quote']

Now it works.. at the begining some sides appeared in the middle of nowhere. But now it works perfectly. Start Positions are selected randomly every time the mission starts and the respawn place is exactly the start position for each side, Great!

I changed the las part by this:

{
   switch (side _x) do {
       case WEST: {_x setPos _bluforstart};
       case EAST: {_x setPos _opforstart};
       case RESISTANCE: {_x setPos _guerstart};
       case CIVILIAN: {_x setPos _civstart};
   };
} forEach allUnits; 

Because the script worked fine only for East and West.

---------- Post added at 04:31 PM ---------- Previous post was at 04:28 PM ----------

And now... does anyone know how to remove the civilian clothes and give the civilian units FIA clothes and gear? I have seen in lots of missions that all the slots are set as rifleman, and once in the game you can have different gear, How can I do that?

Share this post


Link to post
Share on other sites
Does anyone know how the respawn templates work?

https://community.bistudio.com/wiki/Arma_3_Respawn#Respawn_Templates

I would like to have the option to select gear in the respawn menu.

#11 post has great points!!

However, I do not know if you necessarily need to learn how to script ArmA or just use already made scripts how you need.

Is this a PvP style mission? MP? could you define this more?

Blufor / FIA, AAF, OPfor, Civ would all have their own spawns, template is easy, just place marker names in Description.ext. #2 is correct IF you place units in editor and sync to side, make side higher rank, presence = 0 for that unit, BUT you can also script this, but I am confused on what your trying to do anyways, so they may not do any good.

Marker names in {};

respawnTemplatesWest[] = {"respawn_west","",""};

respawnTemplatesEast[] = {"respawn_east",''''};

respawnTemplatesGuer[] = {"respawn_Guer",""};<----AAF

respawnTemplatesCiv[] = {"respawn_Civ,"""};

Share this post


Link to post
Share on other sites

I will post a general desing about 1 of the desings I have in mind.

The first one, and the easiest, is an Infantry MP game mode similar to Red Orchestra or Day of Defeat.

The Place.

Ii's just about building a town in Altis using X-Cam Mod by Silola, between Zaros and Therisa towns. It is a flat area of Altis with some earth roads with no buildings and a size of 1.1 x 1.1 kilometers, so it could fit for my pourposes.

RlPvFPG.jpg[/img]

Gameplay.

As I said I want 4 teams NATO CSAT AAF and FIA (civilians with FIA gear).

Start Points should be selected at start at random. (So there is 24 diferent combinations of starting points)

Max Players As the game mode is designed only for infantry maybe it can handle lots of players maybe 20 players per team, 80 players in game.

Objective: Capture the town. The town should have 12 Points represented with 12 High capturable Buildings. Yellow squares at image.

Respawn. I would like to have a Wave respawn, as Red Orchestra or Day of Defeat, the first teammate who dies start a countdown and at the end of the countdown all the dead players of the team respawn at once.

Respawn Point The respawn points are moving from the start position to a closer position to the captured zones the team already have, so the teams are pushing each other outside of the town.

Wining Condition: The team that capture 7 of the 12 Capturable buildings win the match.

I am waiting for x-cam mod or the BIS 3D Editor to start doing the town. I tryed once with zeus giving something like this.

VUVE6PN.jpg[/img]

If someone could give me some lessons to achieve something like that the help ould be welcome.

Edited by Esfumato

Share this post


Link to post
Share on other sites

With the Eden Editor released. I started to do the City in the Area. But now I need some higher enterable buildings. I wanted to use some of the Arma 2 buildings.

 

Does anyone know how to make an addon with the buildings I want from Arma 2 and introduce them in my mission *.pbo?

Share this post


Link to post
Share on other sites
Guest

Basic idea : Instead of pasting other people code without understanding it, why not follow those coop tutorials, learn the wiki basics, create a few singleplayer senarios, download missions and understand their code and finally create your own multiplayer gamemode understanding the basis (debug, functions ...) and allow us to help you well without having to explain every damn line we give you.

Share this post


Link to post
Share on other sites
Guest

Give one line to me or shut the fuck up...

I am printing the scripts right now the try to follow them and understand them because most of the info in the wiki and this forums is useless like your reply.

 

Okay buddy.

Then gtfo.

 

 

...

Basicly what you need to understand is that you can't create something or even understand scripts if you don't have the basis.

I mean developping basics, like debuging etc... You can't just type a function in the wiki and then "okay cool it does that" because at the end you will get "But how I use it ? What are the arguments ? Var...ia..ble the heck is that ? Damn my if else does not work, what a condition ? What condition ?"

We can't be good at helping you if we need to explain that to you.

Share this post


Link to post
Share on other sites

To be fair, it wouldn't hurt to explain how to read the wiki for functions. If they're entirely new to scripting and coding in general, there isn't an actual guide on how to read the information given for functions; sometimes it can be confusing even to someone who understands how to read them!

Share this post


Link to post
Share on other sites
Guest

To be fair, it wouldn't hurt to explain how to read the wiki for functions. If they're entirely new to scripting and coding in general, there isn't an actual guide on how to read the information given for functions; sometimes it can be confusing even to someone who understands how to read them!

 

Most of the functions (at least the most used) are very documented and it's easy to understand if you have some basis at conding stuff.

Still you need that base to understand and reuse the functions.

Share this post


Link to post
Share on other sites

With the Eden Editor released. I started to do the City in the Area. But now I need some higher enterable buildings. I wanted to use some of the Arma 2 buildings.

 

Does anyone know how to make an addon with the buildings I want from Arma 2 and introduce them in my mission *.pbo?

Can anybody resolve the question?

Share this post


Link to post
Share on other sites

A mod is just the config patch  + textures + models +   sounds maybe.

Share this post


Link to post
Share on other sites

You are playing wrong game, avoiding really useful advices.

Without understanding basics you will create nothing.

For example, I am in arma scripting for 1.5 years (besides years in IT industry) and only now I have started developing own MP game mode, after gaining some practice in writing own scripts and fixing others'.

Developing a game mode is not about placing a town in flat area of a map, but about mission dynamics, speed and audience. Mp game for ones who just relax after work, and MP mode for ones who is thursty for hardcore simulation are very big differencies.

Planning a game mode - is a stage with paper and pencil, designing the experience the player will get joining the server running your mission.

When the concept is ready (in details) you can approach technical side of this challenge. And this requires times and practice, from simple to complex things, as engine has about 1000+ stock commands and scripts, it is vital to understand its internals, test things and code, code,code.

this is why we do not have much variety of MP game modes.

This is just another chance to show that you are starting from a wrong place.

PS if you have a good game concept, community will accept, I am sure you will find people who will help to implement that mission. But I see not concept here.

  • Like 2

Share this post


Link to post
Share on other sites

For some reason with the code that Grimes [3rd id] gave to me, don't enables the base respawn. It makes a random selection for the start positions but The players respawn at the death place not at the Base respawn marker.

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

×