SKYNET Steam Emulator
1.0.0

该项目的创建是为了用蒸汽从蒸汽中替换原始的steam_api.dll ,从而模拟连接,以便能够在LAN模式下玩游戏。这不是Steamworks包装器,例如Steamworks.Net或Facepunch 。该项目处于初始阶段,因此对于某些游戏而言尚不正常。
一段时间以前

编译项目时,生成了两个文件夹(x64和x86),其中包含用于不同目标平台的DLL,在X64的情况下,您必须将文件重命名为Steam_api64.dll,以模仿游戏的蒸汽连接,您必须用包含游戏的dll替换DLL。如果游戏引擎是Unity,则可以将DLL重命名为csteamworks.dll并替换。
要使用客户端,您只需添加游戏并配置appid即可。客户目前正在开发中。
? 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
? Root server folder
└──? Data
├──? Assemblies // Contains server libraries
├──? Images // Contains app cache and avatar images
├──? MongoDB // Contains local MongoDB server
└──? Storage // Contains some server files
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
回调系统实现。
x86游戏中的steaminternal_contextinit
在设置中启用文件日志选项Si时,将在“ root Game文件夹/Skynet”文件夹中创建一个日志文件,其中包含以下名称[SKYNET] steam_api.log
为了在游戏和游戏协调员之间建立通信而开发插件系统,以下示例显示了一个基本插件。
游戏协调器插件的接口:
namespace SKYNET . Plugin
{
public interface IGameCoordinatorPlugin
{
uint Initialize ( ) ;
void MessageFromGame ( byte [ ] bytes ) ;
EventHandler < Dictionary < uint , byte [ ] > > IsMessageAvailable { get ; set ; }
}
}游戏协调器插件示例:
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 ) ;
}
}
}