FGMEMBERS Server | How To Use

Omega
Posts: 52
Joined: Thu Sep 17, 2015 7:04 am

FGMEMBERS Server | How To Use

Postby Omega » Sat Sep 26, 2015 12:44 am

THE FOLLOWING CODE SNIPPETS HAVE BEEN AMENDED TO MATCH NEW SERVER IP AS OF DEC 31, 2015. PLEASE UPDATE YOUR FILES.
------------------------------------------------------------------------------------------------------------------------------------------------------------------


The FGMEMBERS multiplayer server is now available! This server is designed to provide a stable and oppression-free experience for aviation enthusiasts. Due to its strategic location in New Jersey, USA, the average pings are kept below 100ms for Central Europe and some of Eastern Europe.

Advantages over the official servers:
  • No banning without warning and valid reason.
  • Not interconnected with official servers; thus more freedom to fly in places such as SFO.
  • Other pilots and ATC are visible from up to 600 NM away! This allows for a larger ATC coverage and easier communication.

Disadvantages:
  • Isolation (Let's make it active!)
  • No tracking system (for the moment)

Connection info:

Code: Select all

Address: 172.93.103.204
Port: 16605


Configuration for Multiplayer Dialog

Do not skip the following configuration, otherwise you won't be able to connect through FG!

METHOD 1 (The Right Way):

  1. OPEN $FG_ROOT/gui/dialogs/multiplayer.xml (You can backup if you'd like)
  2. FIND this line:

    Code: Select all

    var static_serverList = [
  3. On the NEXT line, ADD this:

    Code: Select all

    ['172.93.103.204', 'New Jersey, USA'],
  4. FIND these lines:

    Code: Select all

            <layout>hbox</layout>
            <default-padding>10</default-padding>
            <empty><stretch>true</stretch></empty>
  5. Starting from the NEXT line, ADD this: (or alternatively, add after the first button)

    Code: Select all

          
            <button>
              <legend>Connect to FGMEMBERS</legend>
              <equal>false</equal>
              <enable>
                <not>
                  <property>/sim/multiplay/online</property>
                </not>
              </enable>
              <binding>
                <command>dialog-apply</command>
              </binding>
              <binding>
                <command>nasal</command>
                <script>
                fgcommand("multiplayer-connect",  props.Node.new({
                  "servername": "172.93.103.204 - New Jersey, USA",
                  "rxport": 16605,
                  "txport": 16605
                }));
                </script>
              </binding>
            </button>
  6. Save
  7. If you were running FG this whole time, go to Debug->Reload GUI to update the dialog.

METHOD 2 (The Quick and Dirty Way):
This is my configuration for FG 3.7, your version may be different. If this fails, try method 1.
  1. OPEN $FG_ROOT/gui/dialogs/multiplayer.xml (You can backup if you'd like)
  2. REPLACE ALL contents with this:

    Code: Select all

    <?xml version="1.0"?>


    <PropertyList>
        <name>multiplayer</name>
        <layout>vbox</layout>
        <resizable>false</resizable>

        <nasal>
            <open><![CDATA[
                if ((getprop("/sim/multiplay/selected-server") == nil) or
                    (getprop("/sim/multiplay/selected-server") == "" )   ){
                    var tx = getprop("/sim/multiplay/txhost");
                    var dlg = cmdarg();
                    var servers = cmdarg().getChildren("group")[1].getChildren("combo")[0].getChildren("value");
                    foreach (var s; servers) {
                        var server = s.getValue();
                        var host = split(" ", server)[0];
                        if (host == tx) {
                            setprop("/sim/multiplay/selected-server", server);
                        }
                    }
                }
               
                var servers = props.globals.getNode("/sim/gui/dialogs/multiplay/servers", 1);
                var updateServers = func(n) {
                    if( !n.getValue() ) return;
                    servers.removeChildren("value");               
                    # get the results list from the server
                    var serverlist = props.globals.getNode("/sim/multiplay/server-list", 1);
               
                    var i=0;
                    foreach (var s; serverlist.getChildren("server")) {
                       
                        if (!s.getNode("online").getBoolValue()) {
                          continue; # skip offline servers
                        }
                     
                    # label is name and location, for the moment
                    # should we include the number of users? or wait until we
                    # have a better UI toolkit?
                        var nm = s.getNode("hostname").getValue() ~ " - " ~ s.getNode("location").getValue();
                        servers.getNode("value[" ~ i ~ "]", 1).setValue(nm);
                        i += 1;
                    }

                    gui.dialog_update("multiplayer", "host");
                }
               
                var static_serverList = [
                   ['172.93.103.204', 'New Jersey, USA'],
                        ['mpserver01.flightgear.org', 'Frankfurt, Germany'],
                        ['mpserver02.flightgear.org', 'Kansas, USA'],
                        ['mpserver03.flightgear.org', 'Germany'],
                        ['mpserver04.flightgear.org', 'United Kingdom'],
                        ['mpserver05.flightgear.org', 'Chicago, USA'],
                        ['mpserver07.flightgear.org', 'Wisconsin, USA'],
                        ['mpserver08.flightgear.org', 'Frankfurt am Main, Germany'],
                        ['mpserver09.flightgear.org', 'Koln, Germany'],
                        ['mpserver10.flightgear.org', 'Montpellier, France'],
                        ['mpserver11.flightgear.org', 'Vilnius, Lithuania'],
                        ['mpserver12.flightgear.org', 'Amsterdam, Netherlands'],
                        ['mpserver13.flightgear.org', 'Grenoble, France']
                    ];
                   
                var updateServersFailed = func(n) {
                    if( !n.getValue() ) return;
                    debug.dump("Failed to retrieve server list!");
       
                    servers.removeChildren("value");
                    var i=0;
                    foreach (var s; static_serverList) {
                    # create the node the PUI combo
                        var nm = s[0] ~ " - " ~ s[1];
                        servers.getNode("value[" ~ i ~ "]", 1).setValue(nm);
                        i += 1;
                    }
                   
                    gui.dialog_update("multiplayer", "host");
                }
               
                # listen for results arriving
                setlistener("/sim/multiplay/got-servers", updateServers);
                setlistener("/sim/multiplay/get-servers-failure", updateServersFailed);
                fgcommand("multiplayer-refreshserverlist");
                ]]>
            </open>
           
            <close>
            </close>
        </nasal>
       
        <!-- titlebar -->
        <group>
            <layout>hbox</layout>
            <empty><stretch>1</stretch></empty>

            <text>
                <label>Multiplayer Settings</label>
            </text>

            <empty><stretch>1</stretch></empty>

            <button>
                <pref-width>16</pref-width>
                <pref-height>16</pref-height>
                <legend></legend>
                <keynum>27</keynum>
                <border>2</border>
                <binding>
                    <command>dialog-close</command>
                </binding>
            </button>
        </group>
        <hrule/>

        <!-- main dialog area -->
        <group>
            <layout>table</layout>
            <halign>center</halign>

            <text>
                <row>0</row>
                <col>0</col>
                <label>   Options:</label>
                <halign>right</halign>
            </text>
            <checkbox>
                <row>0</row>
                <col>1</col>
                <colspan>2</colspan>
                <halign>left</halign>
                <name>hide-replay</name>
                <label>Hide replay sessions over MP (less annoying to other players)</label>
                <property>/sim/multiplay/freeze-on-replay</property>
                <binding>
                    <command>dialog-apply</command>
                    <object-name>hide-replay</object-name>
                </binding>
            </checkbox>

            <checkbox>
                <row>1</row>
                <col>1</col>
                <colspan>2</colspan>
                <halign>left</halign>
                <name>ai-traffic</name>
                <label>Show AI Traffic (mixing MP and AI traffic may be confusing)</label>
                <property>/sim/traffic-manager/enabled</property>
                <binding>
                    <command>dialog-apply</command>
                    <object-name>ai-traffic</object-name>
                </binding>
            </checkbox>

            <text>
              <row>2</row><col>0</col>
              <halign>right</halign>
              <label>   Callsign:</label>
            </text>
            <input>
              <row>2</row><col>1</col>
              <halign>left</halign>
              <property>/sim/multiplay/callsign</property>
              <enable>
                <not>
                  <property>/sim/multiplay/online</property>
                </not>
              </enable>
            </input>

            <text>
              <row>3</row><col>0</col>
              <halign>right</halign>
              <label>Server:</label>
            </text>
            <combo>
                <name>host</name>
                <halign>left</halign>
                <row>3</row><col>1</col>
                <colspan>2</colspan>
                <pref-width>350</pref-width>
                <property>/sim/multiplay/selected-server</property>
                <editable>false</editable>
               
                <properties>/sim/gui/dialogs/multiplay/servers</properties>
            </combo>

            <!-- status area -->
            <text>
                <visible>
                    <not><property>/sim/multiplay/online</property></not>
                </visible>
                <row>5</row>
                <col>1</col>
                <halign>left</halign>
                <label>Not connected</label>
            </text>

            <text>
                <visible>
                    <property>/sim/multiplay/online</property>
                </visible>
                <row>5</row>
                <col>1</col>
                <halign>left</halign>
                <label>MMMMMMMMMMMMMMMMM</label>
                <format>Connected to %s</format>
                <property>/sim/multiplay/txhost</property>
                <live>true</live>
            </text>
        </group>

        <!-- button area -->
        <hrule/>
        <group>
            <layout>hbox</layout>
            <default-padding>10</default-padding>
            <empty><stretch>true</stretch></empty>

            <button>
              <legend>Connect</legend>
              <equal>true</equal>
              <enable>
                <not>
                  <property>/sim/multiplay/online</property>
                </not>
              </enable>
              <binding>
                <command>dialog-apply</command>
              </binding>
              <binding>
                <command>nasal</command>
                <script>
                fgcommand("multiplayer-connect",  props.Node.new({
                  "servername": getprop("/sim/multiplay/selected-server"),
                  "rxport": 5000,
                  "txport": 5000
                }));
                </script>
              </binding>
            </button>
          
            <button>
              <legend>Connect to FGMEMBERS</legend>
              <equal>false</equal>
              <enable>
                <not>
                  <property>/sim/multiplay/online</property>
                </not>
              </enable>
              <binding>
                <command>dialog-apply</command>
              </binding>
              <binding>
                <command>nasal</command>
                <script>
                fgcommand("multiplayer-connect",  props.Node.new({
                  "servername": "172.93.103.204 - New Jersey, USA",
                  "rxport": 16605,
                  "txport": 16605
                }));
                </script>
              </binding>
            </button>

            <button>
              <legend>Disconnect</legend>
              <equal>true</equal>
              <enable>
                <property>/sim/multiplay/online</property>
              </enable>
              <binding>
                <command>dialog-apply</command>
              </binding>
              <binding>
                <command>multiplayer-disconnect</command>
                <subsystem>mp</subsystem>
              </binding>
            </button>

            <button>
                <row>1</row><col>2</col>
                <legend>Server Status</legend>
                <binding>
                    <command>open-browser</command>
                    <path>http://mpmap01.flightgear.org/mpstatus/</path>
                </binding>
            </button>

            <button>
              <legend>Close</legend>
              <default>true</default>
              <equal>true</equal>
              <binding>
                <command>dialog-close</command>
              </binding>
            </button>

            <empty><stretch>true</stretch></empty>
        </group>
       
    </PropertyList>
  3. Save
  4. If you were running FG this whole time, go to Debug->Reload GUI to update the dialog.

Congrats! You now have this pretty button:
Image

Tracking and FGMap

In the near future, a tracking system will be made available. But for right now, there is no tracker!

As of now, FGMap is only available though external providers. Link
Last edited by Omega on Thu Dec 31, 2015 7:09 am, edited 4 times in total.

User avatar
IAHM-COL
Posts: 6456
Joined: Sat Sep 12, 2015 3:43 pm
Location: Homey, NV (KXTA) - U.S.A
Contact:

Re: FGMEMBERS Server | How To Use

Postby IAHM-COL » Sat Sep 26, 2015 1:06 am

Thanks Omega for setting this up :D

@ALL

If you are using FGDATA next with submodules, all you need to do is pull your fgdata repository, and the configuration will be updated :)

Code: Select all

git pull


Have a safe but FREE flight!

IH-COL
https://raw.githubusercontent.com/IAHM-COL/gpg-pubkey/master/pubkey.asc

R.M.S.
If we gave everybody in the World free software today, but we failed to teach them about the four freedoms, five years from now, would they still have it?

HOM001
Posts: 120
Joined: Thu Sep 17, 2015 8:26 pm
Location: KPHL
Contact:

Re: FGMEMBERS Server | How To Use

Postby HOM001 » Sat Sep 26, 2015 1:51 am

This is awesome! Thanks, Omega.

By the way, if the first method doesn't work, run flightgear with the console box debugger thing. If it says something like "Failed to parse LONG_FILEPATH/multiplayer.xml, then there is a dreaded syntax error....
Use http://www.w3schools.com/xml/xml_validator.asp to see where you screwed up.
FGAF_P3

User avatar
IAHM-COL
Posts: 6456
Joined: Sat Sep 12, 2015 3:43 pm
Location: Homey, NV (KXTA) - U.S.A
Contact:

Re: FGMEMBERS Server | How To Use

Postby IAHM-COL » Sat Sep 26, 2015 1:56 am

Image
https://raw.githubusercontent.com/IAHM-COL/gpg-pubkey/master/pubkey.asc

R.M.S.
If we gave everybody in the World free software today, but we failed to teach them about the four freedoms, five years from now, would they still have it?

User avatar
legoboyvdlp
Posts: 1757
Joined: Mon Sep 14, 2015 9:49 pm
Location: Venezuela

Re: FGMEMBERS Server | How To Use

Postby legoboyvdlp » Sat Sep 26, 2015 2:27 am

Whoa, dude!
Wonderful!
So, we need to tell others about the new server on the USA TOUR page or else ask for interlinking -- which probably won't work.
I assume it will not be used tomorrow?
~~Legoboyvdlp~~
Maiquetia / Venezuela Custom Scenery
Hallo! Ich bin Jonathan.
Hey!
Avatar created by InSapphoWeTrust CC BY-SA 2.0, https://commons.wikimedia.org/w/index.p ... d=27409879

User avatar
jwocky
Site Admin
Posts: 1833
Joined: Sat Sep 12, 2015 12:04 pm
Contact:

Re: FGMEMBERS Server | How To Use

Postby jwocky » Sat Sep 26, 2015 3:26 am

Wow, thanks a lot, that is awesome! Do we use it tomorrow or is the time to short to inform everyone?
Free speech can never be achieved by dictatorial measures!

User avatar
IAHM-COL
Posts: 6456
Joined: Sat Sep 12, 2015 3:43 pm
Location: Homey, NV (KXTA) - U.S.A
Contact:

Re: FGMEMBERS Server | How To Use

Postby IAHM-COL » Sat Sep 26, 2015 4:55 am

Yes! Let's try this out. Its range of 600 nm will help everyone to remain within radar of each other, specially if the head group is far from the tail group! :D :mrgreen: :ugeek:

Also very helpful if Omega wants to offer CTR services
https://raw.githubusercontent.com/IAHM-COL/gpg-pubkey/master/pubkey.asc

R.M.S.
If we gave everybody in the World free software today, but we failed to teach them about the four freedoms, five years from now, would they still have it?

User avatar
LesterBoffo
Posts: 790
Joined: Tue Sep 15, 2015 3:58 am
Location: Beautiful sunny, KOTH

Re: FGMEMBERS Server | How To Use

Postby LesterBoffo » Sat Sep 26, 2015 5:05 am

So I edited the GUI like Omega suggested and I got the button in the MP menu, but it's not connecting to anything?

Syntax error thingy?

User avatar
IAHM-COL
Posts: 6456
Joined: Sat Sep 12, 2015 3:43 pm
Location: Homey, NV (KXTA) - U.S.A
Contact:

Re: FGMEMBERS Server | How To Use

Postby IAHM-COL » Sat Sep 26, 2015 5:10 am

yes. Probably.

multiplayer.xml

Maybe just download the file above and replace your file in $FGDATA/gui/dialogs/multiplayer.xml

That could work (No. It does not, unless you are in FG 3.5 / FG 3.7)
https://raw.githubusercontent.com/IAHM-COL/gpg-pubkey/master/pubkey.asc

R.M.S.
If we gave everybody in the World free software today, but we failed to teach them about the four freedoms, five years from now, would they still have it?

User avatar
T-URBO
Posts: 117
Joined: Fri Sep 25, 2015 9:27 pm

Re: FGMEMBERS Server | How To Use

Postby T-URBO » Sat Sep 26, 2015 5:24 am

Its 11PM on the eve of the tour and I can't get it working. I have tried 4 ways. I don't have fgrun as I am running mac os 10.10 and they have there own GUI launcher (which you can't select the MP sever). Who ever designed that should be murdered, however that not the point of this post.

1. Omega Method One: I did the instructions word for word 5 time and when I load FG the menu won't pop up.

2. Omega Method Two: The meanu pops up however the connect and connect to FGMembers is greyed out and unclickable.

3. Tried to open FG via terminal but my computer decided FGFS doesn't exist. -Head Slap-

4. A combination of Method one and two: the two cone buttons are not greyed out but nothing happens when you click them.

I am trying my best to show up here and you not making it easy.


Return to “Multiplayer Servers”

Who is online

Users browsing this forum: No registered users and 1 guest