COOP mission tutorial - How to get your friends to join you on any mission you want.
The purpose of this tutorial it to teach people how easy it really is to create a co-operative mission in this game. It was suggested after I got this working that I post so others may have a chance
at doing the same.
I searched and tested for some time before a combination of a few solutions allowed my co-op missions to work.
This has been tested on 3 different missions with friends over the last day in Team Fusion 4 and works fairly seamlessly from what I have seen.
Summary:
* Modify config files a tiny bit
* Rename a script file
* Load a lobby
* Type a few commands to choose a plane
* Fly
NOTE: Only the server needs to make the following changes. Your friends don't have to do anything.
Steps:
1) You must add the following line to your conf.ini or confs.ini
[rts]
scriptAppDomain = 0
http://farm4.staticflickr.com/3819/1...8f20737c_b.jpg
http://farm4.staticflickr.com/3686/1...84eb1974_b.jpg
2) Create a new mission in the full mission builder or use an existing single player mission and save it in the coop folder described below.
3) Save the below linked file as your mission name but with .cs as the extension. e.g. scrambledeggs.cs.
This is the small script which makes this coop stuff all possible
http://www.mediafire.com/?ana2d8u85kmp6zb
Put the file into the folder described below.
If you are using vanilla under windows 7
C:\Users\yourusername\Documents\1C SoftClub\il-2 sturmovik cliffs of dover\missions\Multi\Co-Op
If you are using TeamFusion under windows 7
C:\Users\yourusername\Documents\1C SoftClub\il-2 sturmovik cliffs of dover - mod\missions\Multi\Co-Op
You should end up with two files. A .mis file which is the mission you made and saved and a .cs file which is the coop mission script
http://farm6.staticflickr.com/5527/1...7674cf53_b.jpg
4) Load up il2 Cliffs of Dover and go to multiplayer. Start a multiplayer lobby.
http://farm6.staticflickr.com/5483/1...f02f3070_b.jpg
http://farm8.staticflickr.com/7400/1...3755f52f_b.jpg
http://farm6.staticflickr.com/5488/1...a154076a_b.jpg
5) Tell your friends to go to multiplayer and join you in the lobby.
Your friends should start appearing in the lobby.
6) When everybody has arrives press play. DO NOT do this before everybody is in the lobby.
7) In the server screen make sure you select realism and turn off (deselect so no dot appears) anything under aircraft switching.
This is very important to allow people to select their aircraft.
http://farm8.staticflickr.com/7377/1...07e6cb2f_b.jpg
7.5) Your friends should be able to press "play" as soon as you press ok in
the server screen.
8) Start the battle (note you may have to start battle before anybody can type the commands.
9)At the server briefing screen get your friends to type the following commands
!aircraft - This will show a list of all available aircraft starting with the id of the aircraft
!select# - This will place the player into the aircraft, replace # with the id of the aircraft, e.g. !select0 will place you into the first aircraft and so on.
!help - This will show the available commands if need be
http://farm4.staticflickr.com/3833/1...45fdda3e_b.jpg
http://farm4.staticflickr.com/3717/1...e358a89b_b.jpg
http://farm4.staticflickr.com/3702/1...e42046dd_b.jpg
10) Get everybody to press fly if they do not go directly into the battle
http://farm6.staticflickr.com/5498/1...7bec6cf4_b.jpg
11) When anybody dies they may press escape to get back to the chat window and type commands again to enter any left over AI aircraft.
You should now be able to see each other by steam name in game if you have icons allowed turned on.
Apparently this even works with single player missions. Put the script in with the correct mission name and in the coop folder.
Use the method above to start a server.
Thanks go to the below chaps for their stella help:
1lokos
danperin
ATAG_Lolsav
41Sqn_Banks
Original Post
http://forum.1cpublishing.eu/showpos...99&postcount=1
P.S. I recommend turning any firewalls off for initial testing.
Re: COOP mission tutorial - How to get your friends to join you on any mission you wa
Played with 3 other mates tonight. Worked well. But had to make a new lobby few times to change missions.
http://farm3.staticflickr.com/2834/1...8c7a5c74_b.jpg
Re: COOP mission tutorial - How to get your friends to join you on any mission you wa
Hi, how can add a chat comand to remove a idle airgroup?
Example
if (msg.StartsWith("!inicio"))
{
AiAirGroup[] army_groups = GamePlay.gpAirGroups(i);
foreach (AiAirGroup group in army_groups)
{
group.Idle = false;
}
thx
Re: COOP mission tutorial - How to get your friends to join you on any mission you wa
Adding more information
For those who play Coop a extra "snippet" should be added to the script because the ingame triggers were not responding.
FG28_Kodiak gave the solution:
Quote:
You should add these lines to the script (insert it before the last bracket):
Code:
public override void OnTrigger(int missionNumber, string shortName, bool active)
{
base.OnTrigger(missionNumber, shortName, active);
AiAction action = GamePlay.gpGetAction(ActorName.Full(missionNumber, shortName));
if (action != null)
{
action.Do();
}
}
Complete Script with the extra snippet added at the end
It can be saved as "NameOfYourMission.cs". Just copy paste to notepad, but make sure the extension is "cs" and not "txt". Then place it on the same folder as the mission.mis file is.
Code:
using System;
using System.Collections.Generic;
using System.Text;
using maddox.game;
using maddox.game.world;
//$reference parts/core/gamePlay.dll
public class Mission : AMission
{
public override void OnBattleInit()
{
base.OnBattleInit();
if (GamePlay is GameDef)
{
(GamePlay as GameDef).EventChat += new GameDef.Chat(Mission_EventChat);
}
}
void Mission_EventChat(IPlayer from, string msg)
{
if (msg.StartsWith("!help"))
{
Chat("Commands: !aircraft, !select#", from);
}
if (msg.StartsWith("!aircraft") || msg.StartsWith("!select"))
{
List<Tuple<AiAircraft, int>> aircraftPlaces = new List<Tuple<AiAircraft, int>>();
if (GamePlay.gpArmies() != null && GamePlay.gpArmies().Length > 0)
{
foreach (int army in GamePlay.gpArmies())
{
if (GamePlay.gpAirGroups(army) != null && GamePlay.gpAirGroups(army).Length > 0)
{
foreach (AiAirGroup airGroup in GamePlay.gpAirGroups(army))
{
if (airGroup.GetItems() != null && airGroup.GetItems().Length > 0)
{
foreach (AiActor actor in airGroup.GetItems())
{
if (actor is AiAircraft)
{
AiAircraft Aircraft = actor as AiAircraft;
for (int place = 0; place < Aircraft.Places(); place++)
{
aircraftPlaces.Add(new Tuple<AiAircraft, int>(Aircraft, place));
}
}
}
}
}
}
}
}
if (msg.StartsWith("!aircraft"))
{
int i = 0;
foreach (Tuple<AiAircraft, int> aircraftPlace in aircraftPlaces)
{
string playerName = "";
Player player = aircraftPlace.Item1.Player(aircraftPlace.Item2);
if (player != null)
{
playerName = " " + player.Name();
}
Chat("#" + i + ": " + aircraftPlace.Item1.Name() + " " + aircraftPlace.Item1.TypedName() + " " + aircraftPlace.Item1.CrewFunctionPlace(aircraftPlace.Item2) + " " + playerName, from);
i++;
}
}
else if (msg.StartsWith("!select"))
{
msg = msg.Replace("!select", "");
int i = -1;
if (int.TryParse(msg, out i) && i < aircraftPlaces.Count)
{
Tuple<AiAircraft, int> aircraftPlace = aircraftPlaces[i];
if (aircraftPlace.Item1.Player(aircraftPlace.Item2) == null)
{
from.PlaceEnter(aircraftPlace.Item1, aircraftPlace.Item2);
}
else
{
Chat("Place occupied.", from);
}
}
else
{
Chat("Please enter a valid aircraft number, e.g. !select0, !select1, !select2, ...", from);
}
}
}
}
public void Chat(string line, IPlayer to)
{
if (GamePlay is GameDef)
{
(GamePlay as GameDef).gameInterface.CmdExec("chat " + line + " TO " + to.Name());
}
}
public override void OnTrigger(int missionNumber, string shortName, bool active)
{
base.OnTrigger(missionNumber, shortName, active);
AiAction action = GamePlay.gpGetAction(ActorName.Full(missionNumber, shortName));
if (action != null)
{
action.Do();
}
}
}
Re: COOP mission tutorial - How to get your friends to join you on any mission you wa
I tried it ,but it seems like it doesn't work anymore, when my friend type !aircraft in , nothing happened
Re: COOP mission tutorial - How to get your friends to join you on any mission you wa
*bump*
Snapper this one needs a sticky in this section
Re: COOP mission tutorial - How to get your friends to join you on any mission you wa
Same here.
Tried doing this with a single player mission with no effect.
typing !aircraft gives no aircraft list
I made sure that both my conf and confs have the needed line added
And I made sure that the .cs script is named after the mission and in the coop folder with the .mis and briefing.
My group can join and see the server briefing, select the appropriate flag, but when the type !aircraft nothing comes up.
Re: COOP mission tutorial - How to get your friends to join you on any mission you wa
Has anyone fixed this yet?
Re: COOP mission tutorial - How to get your friends to join you on any mission you wa
This works! It does not need fixing. If you are trying this and it isn't working, re-read the instructions (the paths to your missions are not what you think they should be). Also, you should open your ports that are used in the game, which is 27015.
Re: COOP mission tutorial - How to get your friends to join you on any mission you wa
Quote:
Originally Posted by
Uwe
Same here.
Tried doing this with a single player mission with no effect.
typing !aircraft gives no aircraft list
I made sure that both my conf and confs have the needed line added
And I made sure that the .cs script is named after the mission and in the coop folder with the .mis and briefing.
My group can join and see the server briefing, select the appropriate flag, but when the type !aircraft nothing comes up.
The mission needs spawn points on airfields to work online. A singleplayer mission will never work correctly online.
Re: COOP mission tutorial - How to get your friends to join you on any mission you wa
Hi Destraex
Recently I installed on my second computer (a laptop) a separate Steam account. I undertook this on behalf of kind advice I got from ATAG_Colander Furthermore I bought a separate IL-2 CLOD Blitz game. This was a preliminary step in order to be able to enjoy with a young member of the family a single-mission game with dogfighting.
It seemed that the following steps were not easy to take. But after a while I succeeded in finding on the ATAG forum your post. Here were the meticulous instructions leading to the procedure that has to be executed for getting things right.
And things were getting right: the procedure works, gaming can start and I’m very pleased now, I can tell you.Thanks very much!
Two questions if I may ask:
Is there a way for players to send messages to each other?
Could it be arranged that while filling in the server password you can see the typed- in letters so as a result faults can be avoided?
Re: COOP mission tutorial - How to get your friends to join you on any mission you wa
Quote:
Is there a way for players to send messages to each other?
Have you tried the in-game chat system? I should work OK though I haven't tried it in this exact setup.
It's in one of the in-game windows and you can send to friendly, enemy, all, etc.
Quote:
Could it be arranged that while filling in the server password you can see the typed- in letters so as a result faults can be avoided?
We usually use short, simple passwords for this exactly reason. "abc" simple type things (though not that exactly, of course). But this isn't a super-high security setting - you're just trying to keep a few randos out and for the most part, no one is even going to try to get in.
So 3-4 letters or numbers will do it. It's not like your bank where you need 12 characters and be sure to mix in upper case, lower case, numerals, special characters etc. If your security fails (which it won't, but let's just say it does), the consequence is you've got someone in your server flying with you. Which 99% of the time is not even going to be a problem - you can just kick them out rather easily if you're running the server.