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 ) ;
}
}
}