Skip to content

Client emulator to play steam games on LAN without Internet connection.

Notifications You must be signed in to change notification settings

ArjixWasTaken/-SKYNET-Steam-Emulator

Β 
Β 

Repository files navigation

[SKYNET] Steam Emulator

This project is created with the aim of replacing the original steam_api.dll from Steam with this one and thus emulating a connection to be able to play games in LAN mode. This is not a steamworks wrapper like Steamworks.Net or Facepunch. The project is in an initial stage, so it is not functional yet for some Games.


Project forks Project stars Project issues


Screenshot

❔ How to use

Replacing the dll

When compiling the project, two folders are generated (x64 and x86) that contain the dll for different target platform, in the case of x64 you must rename the file to steam_api64.dll, to emulate the connection to Steam of a game you must replace the dll with the one that contains the game. In case the game engine is Unity you can rename the dll to CSteamworks.dll and replace it.

Client Emulator

To use the client you simply need to add the game and configure the appid. The client is currently under development.

πŸ“ Directory structure

πŸ“ Root client folder                     
β”œβ”€β”€πŸ“ x64                             // The x64 version of the SteamAPI dll that will be injected
β”œβ”€β”€πŸ“ x86                             // The x64 version of the SteamAPI dll that will be injected
β””β”€β”€πŸ“ Data
   β”œβ”€β”€πŸ“ Assemblies                   // Contains client libraries (Including cefsharp api or gecko) 
   β”œβ”€β”€πŸ“ Images                       // Contains app cache and avatar images 
   β”œβ”€β”€πŸ“ Injector                     // Contains the DLL injectors
   β”œβ”€β”€πŸ“ www                          // Contains the web files
   β”œβ”€β”€πŸ“ Storage                      // Contains stats and achievements files
   |  β””β”€β”€πŸ“ Remote                    // Contains game files
   β””β”€β”€πŸ“‘ Games.bin                    // Stored game list         

πŸ”— Features

User Stats manager         Save and Load user stats from local folder.
Achievements manager       Save and Load user achievements from local folder.
CSteamworks emulation      Rename the emu to CSteamworks.dll to emulate them.
Supported Game Engines     Works with multiple game engines like Source 2, Unity 3D etc.
Network communication      Network communication between clients through a configurable port.
Overlay                    External Overlay for steam and game messages.
DLC                        Unlock all downloaded DLCs.
Avatar support             Load avatar from file (Avatar.jpg) inside SKYNET folder and share it through the network.
Plugin system              Load external plugin to communicate with the emu.
In game voice              Fully functional voice system

πŸ”¨ Currently working on

Callback system implementation.
SteamInternal_ContextInit in x86 Games

πŸ“ Log

When File log option si enabled in settings, a log file will be created inside "root game folder/SKYNET" folder with the following name [SKYNET] steam_api.log

πŸ”Œ Plugin system

The plugin system is developed in order to establish a communication between the game and the game coordinator, the following example shows a basic plugin.

Interface for Game coordinator plugin:

namespace SKYNET.Plugin
{
    public interface IGameCoordinatorPlugin
    {
        uint Initialize();
        void MessageFromGame(byte[] bytes);
        EventHandler<Dictionary <uint, byte[]>> IsMessageAvailable { get; set; }
    }
}

Game coordinator plugin example:

namespace SKYNET.Plugin
{
    public class Dota2GameCoordinator : IGameCoordinatorPlugin
    {
        private uint AppID = 570;
        public EventHandler<Dictionary<uint, byte[]>> IsMessageAvailable { get; set; }

        public uint Initialize()
        {
            // TODO: Initialize all Game coordinator class
            return AppID;
        }

        public void MessageFromGame(byte[] bytes)
        {
            // Process message from game
            uint MsgType = MsgUtil.GetGCMsg(new MemoryStream(bytes).ReadUInt32L());
            IPacketGCMsg packetGCMsg = MsgUtil.GetPacketGcMsg(MsgType, bytes);
            // TODO: Process GC message
        }

        public void SendPacketToGame(uint msgType, byte[] packet)
        {
            Dictionary<uint, byte[]> message = new Dictionary<uint, byte[]>();
            message.Add(msgType, packet);
            IsMessageAvailable?.Invoke(this, message);
        }

        public void SendPacketToGame(Dictionary<uint, byte[]> messages)
        {
            IsMessageAvailable?.Invoke(this, messages);
        }
    }
}

⭐ Implemented Interfaces

Click to expand
  • ISteamAppDisableUpdate
    • SteamAppDisableUpdate001
  • ISteamAppList
    • ISteamAppList001
  • ISteamAppDisableUpdate
    • ISteamAppDisableUpdate001
  • ISteamApps
    • ISteamApps008
  • ISteamClient
    • ISteamClient017
    • ISteamClient018
    • ISteamClient019
    • ISteamClient020
  • ISteamController
    • ISteamController005
    • ISteamController006
    • ISteamController007
    • ISteamController008
  • ISteamFriends
    • ISteamFriends015
    • ISteamFriends017
  • ISteamGameCoordinator
    • ISteamGameCoordinator001
  • ISteamGameSearch
  • ISteamGameServer
    • ISteamGameServer012
    • ISteamGameServer014
  • ISteamGameServerStats
    • ISteamGameServerStats001
  • ISteamGameStats
    • ISteamGameStats001
  • ISteamHTMLSurface
    • ISteamHTMLSurface003
    • ISteamHTMLSurface004
    • ISteamHTMLSurface005
  • ISteamHTTP
    • ISteamHTTP002
    • ISteamHTTP003
  • ISteamInput
    • ISteamInput001
    • ISteamInput002
    • ISteamInput006
  • ISteamInventory
    • ISteamInventory002
    • ISteamInventory003
  • SteamMatchGameSearch
    • SteamMatchGameSearch001
  • ISteamMasterServerUpdater
  • ISteamMatchmaking
    • ISteamMatchmaking008
    • ISteamMatchmaking009
  • ISteamMatchmakingServers
    • ISteamMatchmakingServers002
  • ISteamMusic
    • ISteamMusic001
  • ISteamMusicRemote
    • ISteamMusicRemote001
  • ISteamNetworking
    • ISteamNetworking005
    • ISteamNetworking006
  • ISteamNetworkingMessages
    • SteamNetworkingMessages002
  • ISteamNetworkingSockets
    • ISteamNetworkingSockets008
    • ISteamNetworkingSockets009
    • ISteamNetworkingSockets012
  • ISteamNetworkingSocketsSerialized
    • ISteamNetworkingSocketsSerialized002
    • ISteamNetworkingSocketsSerialized003
    • ISteamNetworkingSocketsSerialized004
    • ISteamNetworkingSocketsSerialized005
  • ISteamNetworkingUtils
    • ISteamNetworkingUtils003
  • ISteamParentalSettings
    • ISteamParentalSettings001
  • ISteamRemotePlay
    • ISteamRemotePlay001
  • ISteamRemoteStorage
    • ISteamRemoteStorage013
    • ISteamRemoteStorage014
    • ISteamRemoteStorage016
  • ISteamScreenshots
    • ISteamScreenshots003
  • ISteamTV
  • ISteamUGC
    • ISteamUGC010
    • ISteamUGC012
    • ISteamUGC014
    • ISteamUGC015
    • ISteamUGC016
  • ISteamUnifiedMessages
    • SteamUnifiedMessages001
  • ISteamUser
    • ISteamUser019
    • ISteamUser020
    • ISteamUser021
  • ISteamUserStats
    • ISteamUserStats012
  • ISteamUtils
    • ISteamUtils009
    • ISteamUtils010
  • ISteamVideo
    • ISteamVideo002

About

Client emulator to play steam games on LAN without Internet connection.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 97.9%
  • Batchfile 2.0%
  • Other 0.1%