[mod] Empyrion Web Access

Discussion in 'Empyrion API' started by ASTIC, Nov 27, 2018.

  1. ASTIC

    ASTIC Captain

    Joined:
    Dec 11, 2016
    Messages:
    991
    Likes Received:
    707
    Mainwindow.png
    Empyrion Web Access

    Download:

    Was ist das?

    Empyrion Web Access ist eine MOD die den Zugriff auf das Spiel als Admin über einen Webbrowser ermöglicht.
    Dadurch das die MOD ohne Oberfläche oder Remotedesktop auf dem Server auskommt ist sie auch für den Einsatz bei Gamehoster geeignet.
    Sie startet und beendet sich automatisch mit dem Spiel und kann von beliebig vielen Admins gleichzeitig genutzt werden.

    Empyrion Web Access ist frei zur nicht kommerziellen Benutzung.<br>
    Über eine Aufmersamkeit würde ich mich aber freuen https://paypal.me/ASTICTC

    Viel Spaß beim Spielen und dem Serverbetrieb wünscht
    ASTIC/TC

    Installation
    • Den Inhalt der ZIP Datei ind das Verzeichnis [EGS]\Content\Mods entpacken.
    • EGS starten und dann im Savegameverzeichnis [Savegame]\Mods\EWA die Datei "xstart.txt" in "start.txt" umbenennen
    !!! WICHTIG !!! EmpyrionWebAccess startet nicht automatisch sondern es muss eine "start.txt" Datei im Verzeichnis [Savegame]\MODs\EWA liegen. Jetzt muss also eine solche Datei erstellt werden.

    WebServer Konfiguration
    Standardmässig ist der EWA unter https://[Rechnername] zu erreichen.

    Soll dies auf einem anderen Port oder Url geschehen muss die Textdatei "appsettings.json" im Savegameverzeichnis unter [Savegame]\MODs\EWA konfiguriert werden. Es werden mehrere ServerURL VORGESCHLAGEN - unter Http und HttpsDefaultCert darf jeweils nur ein Eintrag "Url" unkommentiert stehen bleiben die anderen MÜSSEN per // auskommentiert sein werden.

    Hinweis: Der Webserver läuft ausschließlich über HTTPS und nutzt das HTTP nur zur Weiterleitung auf HTTPS.

    Erstes Login
    Wenn man nun den EGS-Server startet sollte Empyrion Web Access unter der ausgewählten ServerURL eine Anmeldemaske anzeigen.

    Als erster Benutzer wird hier das Kürzel und Kennwort automatisch in der Benutzerdatenbank hinterlegt und akzeptiert. Alle Benutzer können nachher über die Oberfläche angelegt, geändert oder gelöscht werden.

    Hinweis: Da das HTTPS Zertifikat des EWA selbst signiert ist, zeigt der Browser eine Warnung an das die Verbinug nicht sicher sein. Diese kann hier ignoriert werden.

    Das Hauptfenster
    System-/Spielinformation
    Rechts oben werden Informationen zum Server (CPU, RAM, HDD), dem Spiel (Spieler online, Anzahl der Playfieldserver, der Reserveserver und deren Speicherverbrauch) und der Version angezeigt.
    Auch befundet sich hier unter den drei sehrechten Punkten das Menü zu weiteren Fenstern un zum Logout.

    Chatbereich
    Hier laufen alle Chatmeldungen des Spiels ein. Der Admin kann von hier ebenfalls Chatmeldungen in das Spiel absetzen in dem er den Text im "Message" Eingabefeld eingibt und mit Enter/Return bestätigt. Wenn der Haken "Chat as NNNN" gesetzt ist wird dabei automatisch für die Spieler im Spiel ein NNNN: vor die Chatmeldung gesetzt.
    Um mit einem Spieler direkt zu Chatten kann dieser mit dem Chatsymbol ausgewählt werden. Sein name wird dann unter dem Eingabefeld angezeigt. Um wieder mit allen Spieler chatten zu können kann dann einfach der Haken bei "Chat to all" wieder gesetzt werden.

    Aktive Playfields und die Spieler welche sich darin aufhalten
    Hier werden die aktiven Playfields mit ihrem Namen und der Anzahl Spieler aufgelistet.
    Die Spieler werden mit Fraktion und Namen angezeigt.
    Das Chatsymbol dient dazu mit dem Spieler direkten Kontakt aufzunehmen und das Fahnensymbol, dessen aktuelle Position zu speichern (s. Warp).

    Die Liste der bekannten Spieler
    Hier werden alle Spieler angezeigt die seid in der Laufzeit von EWA mal online waren und deren PLY Datei sich noch im Savegame befindet.
    Der Spieler wird hier mit seinem Onlinestatus, Namen, Fraktion, Herkunft ... angezeigt.
    • Das Chatsymbol dient dazu mit dem Spieler direkten Kontakt aufzunehmen und das Fahnensymbol, dessen aktuelle Position zu speichern (s. Warp).
    • Das Warpsymbol (Gamepadsymbol) dient dazu das Warpfenster für den Spieler aufzurufen mit dem die Position des Spielers im Spiel verändert werden kann.

    Inventaranzeige
    Hier wird das Inventar des ausgewählten Spielers angezeigt. Von hier aus kann man
    • Items hinzufügen
    • Einen alten Zustand des Backpacks wiederherstellen
    • Items löschen

    Spielerdetails
    Hier werden die Daten des ausgewählten Spielers angezeigt und können geändert werden.
    • ban/unban und wipe
    Fabrik
    Hier können Items in die Fabrik des Spielers hinzugefügt, die Anzahl geändert oder der aktuelle Bauauftrag fertiggestellt werden.

    Strukturen
    Hier werden alle Strukturen des Spiels aufgelistet:
    • Sie können Teleportiert werden
    • Die Position kann in den Speicher für ein Warp übertragen werden
    • Die Strukturen können gelöscht werden
    • Die Fraktion der Strukturen kann auf Adm, Aln oder die des ausgewählten Spielers gesetzt werden
    Playfieldansicht
    Playfieldansicht mit den Strukturen.
    Hinweis: Um eine Karte des Playfields einblenden zu können muss diese map.png erst aus dem Cache eines Clients in das
    \\MODs\\EWA\\Maps\\\[Playfield\]\\map.png
    Verzeichnis kopiert werden

    Restore
    Wiederherstellung von Backpacks, Strukturen, Spielerdateien und Playfields aus Backups

    Start/Stop EWA
    Wenn in dem Verzeichnis \[Empyrion\]\\Content\\Mods\\EWALoader\\Client eine Datei "stop.txt" liegt wird der EWA automatisch gestoppt.
    Wird die Datei gelöscht oder umbenannt startet der EWA wieder.

    Erweiterte Konfiguration
    Erstellen eines eigenen selbst signierten Zertifikates für die HTTPS Verbindung
    Der EWA enthält bereits ein selbst signirtes Zertifikat. Sie können jedoch auch ein eigenes mit der PowerShell anfertigen:
    1. New-SelfSignedCertificate -certstorelocation cert:\localmachine\my -dnsname EmpyrionWebAccess -NotAfter (Get-Date).AddYears(10)
      --> CE0976529B02DE058C9CB2C0E64AD79DAFB18CF4
    2. $pwd = ConvertTo-SecureString -String "Pa$$w0rd" -Force -AsPlainText
    3. Export-PfxCertificate -cert cert:\localMachine\my\CE0976529B02DE058C9CB2C0E64AD79DAFB18CF4 -FilePath EmpyrionWebAccess.pfx -Password $pwd
    4. Nun muss die EmpyrionWebAccess.pfx Datei auf dem Server abgelegt werden und der Dateipfad und das Kennwort in der appsettings.json Datei im \[Savegame\]\\MODs\\EWA Verzeichnis eigetragen werden

    Freigabe von Ports
    Ggf. müssen die Ports und Adressen noch für den Benutzer, unter dessen Account EGS läuft, freigegeben werden. Dazu muss man in einer Admin-PowerShel Console folgende Befehle absetzen.
    1. Für HTTP
    * netsh http add urlacl url=http://[computername][:Port]/ user=[domain/computer]\[user]
    * netsh http add urlacl url=http://[IP-Adress][:Port]/ user=[domain/computer]\[user]
    1. Für HTTPS
    * netsh http add urlacl url=https://[computername][:Port]/ user=[domain/computer]\[user]
    * netsh http add urlacl url=https://[IP-Adress][:Port]/ user=[domain/computer]\[user]

    Weitere Infos und den Quelltext gibt es hier
    https://github.com/GitHub-TC/EmpyrionWebAccess

    The internal plugins work with
    Ist similiar to the original EmpyrionAPITools - only with async await and .NET 4.6
    https://github.com/GitHub-TC/EmpyrionNetAPIAccess

    mod managing via
    https://github.com/GitHub-TC/EmpyrionModHost

    Was kommt noch?
    • ChatBot Hilfsbefehle
    • VirtualAutominer
    • ...
    • was wir/ich sonst noch so brauchen :)

    Hinweis:
    In der Version 0.9.0 ist ein Löschen der Datenbanken im Saves/Mods/EWA notwendig :-(

    ========================================================================
    English Version
    ========================================================================

    Empyrion Web Access
    What's this?
    Empyrion Web Access is a MOD that allows access to the game as an admin via a web browser.
    The fact that the MOD gets along without a surface or remote desktop on the server, it is also suitable for use with game host.
    It starts and ends automatically with the game and can be used by any number of admins at the same time.

    Empyrion Web Access is free for non-commercial use.
    About a donation I would be happy but https://paypal.me/ASTICTC

    Have fun playing and server operation wishes
    ASTIC/TC

    First login
    So that the integrated web server knows under which URL he should be attainable a text file "appsettings.json" in the
    Savegame directory can be created under \[Savegame\]\\MODs\\EWA.
    The following entry must be set up there:
    Defaultsettings:

    {
    "Kestrel": {
    "Endpoints": {
    "Http": {
    "Url": "http://localhost:5000"
    },
    "HttpsDefaultCert": {
    "Url": "https://localhost:5001"
    }
    }
    }
    }

    Instead of "localhost" the name or the IP of the computer must be specified. The port can be chosen "almost" as desired, but must be enabled by the firewall.
    The default port for HTTP is 80 and for HTTPS 443.
    Note: The web server runs exclusively via HTTPS and uses the HTTP only for forwarding to HTTPS.
    If you now start the EGS server Empyrion Web Access should be at the address

    https://[hostname][:port]

    display a login mask.
    As the first user, the abbreviation and password are automatically stored and accepted in the user database. All users can be subsequently created, changed or deleted via the interface.

    The main window
    System/Game Information
    Top right information about the server (CPU, RAM, HDD), the game (online players, number of Playfield servers, the reserve server and their memory consumption) and the version is displayed.
    Also under the three right-most points is the menu for further windows and the logout.

    Chat area
    Here are all the chat messages of the game. The admin can also place chat messages in the game from here by entering the text in the "Message" input field and confirming with Enter/Return. If the check mark "Chat as NNNN" is set, an NNNN: is automatically set for the players in the game before the chat message.
    To chat directly with a player, you can select it with the chat icon. Its name is then displayed below the input field. To be able to chat again with all players then simply the hook at "Chat to all" be set again.

    Active playfields and the players who are in it
    Here the active playfields are listed with their name and number of players.
    Players are shown with faction and name.
    The chat symbol is used to make direct contact with the player and to save the flag symbol, its current position (see Warp).

    The list of known players
    Here are all players displayed that were in the runtime of EWA times online and their PLY file is still in the savegame.
    The player is shown here with his online status, name, faction, origin ...
    • The chat symbol is used to make direct contact with the player and to save the flag symbol, its current position (see Warp).
    • The warp icon (gamepad icon) is used to bring up the Warp window for the player to change the position of the player in the game.

    Inventory display
    Here the inventory of the selected player is displayed. From here you can
    • Add items
    • Restore an old condition of the backpack

    Player details
    Here, the data of the selected player is displayed and can be changed.
    Note: Still open: ban / unban and wipe

    Structures
    Here are all the structures of the game listed:
    • They can be teleported
    • The position can be transferred to the memory for a warp
    • The structures can be deleted
    • The faction faction can be set to Adm, Aln, or the selected player
    Playfieldview
    Playfield view with the structures.
    Note: In order to be able to show a map of the playfield, this map.png first has to be copied from the cache of a client into the
    \\MODs\\EWA\\Maps\\\[Playfield\]\\map.png
    Directory are copied

    Restore
    Recovery of backpacks, structures, player files and playfields from backups


    Start/Stop EWA
    If there is a file "stop.txt" in the directory \[Empyrion\]\\Content\\Mods\\EWALoader\\Client the EWA will be stopped automatically.
    If the file is deleted or renamed, the EWA restarts.

    Advanced configuration
    Create your own self-signed certificate for the HTTPS connection
    The EWA already contains a self-signed certificate. But you can also make your own with PowerShell:
    1. New-SelfSignedCertificate -certstorelocation cert: \localmachine \my -dnsname EmpyrionWebAccess -NotAfter (get-date) .AddYears (10)
      ->CE0976529B02DE058C9CB2C0E64AD79DAFB18CF4
    2. $pwd = ConvertTo-SecureString -String "Pa $$ w0rd" -Force -AsPlainText
    3. Export-PfxCertificate -cert cert: \localMachine \my \CE0976529B02DE058C9CB2C0E64AD79DAFB18CF4 -FilePath EmpyrionWebAccess.pfx -Password $pwd
    4. Now the EmpyrionWebAccess.pfx file must be placed on the server and the file path and the password in the appsettings.json file in the \[Savegame\]\\MODs\\EWA directory must be entered

    Release of ports
    Possibly. the ports and addresses must still be released for the user under whose EGS account is running. To do this, you need to issue the following commands in an Admin PowerShel Console.
    1. For HTTP
    * netsh http add urlacl url = http://[computername] [: port]/user = [domain/computer]\[user]
    * netsh http add urlacl url = http://[ipaddress] [: port]/user = [domain/computer]\[user]
    1. For HTTPS
    * netsh http add urlacl url = https://[computername] [: port]/user = [domain/computer]\[user]
    * netsh http add urlacl url = https://[ipaddress] [: port]/user = [domain/computer]\[user]

    Further information and the source code can be found here
    https://github.com/GitHub-TC/EmpyrionWebAccess
    The internal plugins work with
    Is similiar to the original EmpyrionAPITools - only with async await and .NET 4.6
    https://github.com/GitHub-TC/EmpyrionNetAPIAccess
    mod managing via
    https://github.com/GitHub-TC/EmpyrionModHost

    What else is coming?
    • ...
    • what else do we need :)
     
    #1
    Last edited: Feb 13, 2019
    Don't Panic, Ephoie, mR_kAt and 7 others like this.
  2. ECubed

    ECubed Commander

    Joined:
    Sep 29, 2016
    Messages:
    48
    Likes Received:
    46
    Very impressive sir.
     
    #2
  3. ASTIC

    ASTIC Captain

    Joined:
    Dec 11, 2016
    Messages:
    991
    Likes Received:
    707
    Hauptfenster/Main window
    Mainwindow.png

    Backpack wiederherstellen/Restore backpack
    RestoreBackpack.png

    Strukturenliste / Structures
    Structures.png

    Spielerdaten/Player details
    PlayerDetails.png
    Spielerfabrik (Add Item)/Factory (Add Item)
    FactoryAddItem.png
    Restore Structure
    RestoreStructure.png
    Timetable
    Timetable.png
    Serversettings & EWA Update/Upload

    ServerSettings.png
    Backup delete protection
    BackupProtect.png
    Chat translate
    ChatTranslate.png
    ...
     
    #3
    Last edited: Jan 2, 2019
    Sephrajin, Cluascorp, ECubed and 2 others like this.
  4. ASTIC

    ASTIC Captain

    Joined:
    Dec 11, 2016
    Messages:
    991
    Likes Received:
    707
    Playfieldview
    PlayfieldView.png
    Restore Player
    RestorePlayer.png
    Restore Playfield

    RestorePlayfields.png
    Zerstörte Strukturen des aktuellen SaveGames wiederherstellen / Restore destroyed structures of current savegame
    RestoreDestroyedStructure.png

    Mod Manager
    ModManagerInstall.png

    ModManagerConfig.png

    ModManagerRun.png
    LetsEncrypt Support
    LetsEncryptSupport.png
    A History Book / Combat Log ...
    [​IMG]
    Galaxy map and sectors list
    upload_2019-2-22_2-17-36.png
     
    #4
    Last edited: Feb 22, 2019
    Ephoie, Exacute and ECubed like this.
  5. ECubed

    ECubed Commander

    Joined:
    Sep 29, 2016
    Messages:
    48
    Likes Received:
    46
    Yet impressive sir.
     
    #5
  6. ASTIC

    ASTIC Captain

    Joined:
    Dec 11, 2016
    Messages:
    991
    Likes Received:
    707
    Thanks
     
    #6
  7. SifVerT

    SifVerT Commander

    Joined:
    Nov 23, 2018
    Messages:
    63
    Likes Received:
    51
    Nice job! I might try out your tool soon, but the upcoming features need to be implemented about backup and restore playfields. If it has more or less the same features as EAH there's no question about it.

    Keep up the good work!
     
    #7
  8. ASTIC

    ASTIC Captain

    Joined:
    Dec 11, 2016
    Messages:
    991
    Likes Received:
    707
    The backup is already complete ;-) only the restore currently needs an FTP or RDP access ... but that will come soon for playfields and players within the EWA
     
    #8
  9. SifVerT

    SifVerT Commander

    Joined:
    Nov 23, 2018
    Messages:
    63
    Likes Received:
    51
    That's cool. I'll see if I can get around to test it out soon.
     
    #9
  10. ASTIC

    ASTIC Captain

    Joined:
    Dec 11, 2016
    Messages:
    991
    Likes Received:
    707
    arrghh ... duplicated Entry in the Localization.csv ... "Start Game," ... ok EWA fix to handle it 1.9.2 :-(((
     
    #10
  11. Zxcoldx

    Zxcoldx Ensign

    Joined:
    Jun 27, 2019
    Messages:
    3
    Likes Received:
    0
    in the doing my best to set up a serve right now with nitrado and have the base game running with a few mods and wondering if this works with it since i believe i have followed the tutorials and no matter what url i try, (after swapping them in appsetting.json and stopping then starting server up again) i cant seem to get the url to connect i any sort of way. any help?
     
    #11
  12. ASTIC

    ASTIC Captain

    Joined:
    Dec 11, 2016
    Messages:
    991
    Likes Received:
    707
    I fear that Nitrado blocks the URL from outside.
    Make a ticket to their support with the demand.
    PS: Is it now possible to upload Mod DLLs to Nitrado? It did not work for a long time.
     
    #12
  13. Zxcoldx

    Zxcoldx Ensign

    Joined:
    Jun 27, 2019
    Messages:
    3
    Likes Received:
    0
    [QUOTE = "ASTIC, post: 319375, member: 16593"] I fear that Nitrado blocks the URL from outside.
    Make a ticket to their support with the demand.
    PS: Is it now possible to upload Mod DLLs to Nitrado? It did not work for a long time. [/ QUOTE]
    thx so much for the information and ill making a ticket
    EmpAdminHelper that work with nitrado or should i try a different provider?

    e i came up with the idea to start up the server locally from a back up install the mods that way, then send the new files back to nitrado, wont get web access that way but will (hopefully) have all the mods running correctly then.
     
    #13
    Last edited: Jun 29, 2019
  14. Zxcoldx

    Zxcoldx Ensign

    Joined:
    Jun 27, 2019
    Messages:
    3
    Likes Received:
    0
    OK i tried to edit the above comment not so well but i was trying to say that im trying to run the serve locally to get eh mods installed the n send the new files back to nitrado. but all i have to work with is and ftp client and nitrado's own web page.
     
    #14
  15. DKz_Rook_IE

    DKz_Rook_IE Ensign

    Joined:
    Jul 9, 2018
    Messages:
    3
    Likes Received:
    0

    Attached Files:

    #15
    Last edited: Aug 21, 2019
  16. ASTIC

    ASTIC Captain

    Joined:
    Dec 11, 2016
    Messages:
    991
    Likes Received:
    707
    You ONLY have to download the EWALoaderXYZ.ZIP file from the 'releases' tab an unzip it to the mod folder
    https://github.com/GitHub-TC/EmpyrionWebAccess/releases/download/4.6.0/EWALoader.4.6.0.zip
    and NOT the SourceCode ;-)
     
    #16
  17. DKz_Rook_IE

    DKz_Rook_IE Ensign

    Joined:
    Jul 9, 2018
    Messages:
    3
    Likes Received:
    0
    Do you have the files for the web access and not the sourse code. the link to Google drive does not work and got hub only has sourse code.
     
    #17
  18. SifVerT

    SifVerT Commander

    Joined:
    Nov 23, 2018
    Messages:
    63
    Likes Received:
    51
    The link above is to the zip file. I checked.
     
    #18
  19. DKz_Rook_IE

    DKz_Rook_IE Ensign

    Joined:
    Jul 9, 2018
    Messages:
    3
    Likes Received:
    0
    I placed the extracted files in the mod folder. It seems like there would be more to it since there is a hole web site to interact with. If you could give me screen shots of the mod folder, settings file, and the ewa folder. It would help
     
    #19
  20. Taelyn

    Taelyn Guest

    The settings file get on start server automaticly created in your save game directory / Mods

    Edit there the settings then start the service and you can access it with the IP/ port you defined in the settings
     
    #20

Share This Page