YGOCore
YGOCore is a duel server for the popular game YGOPro written in C#.
Beta Details
The main goal of this project is to lower the entry level for new and experienced programmers. The server now runs on windows and linux systems when compiled with mono and supplyed with the native ocgcore.dll/so for that system. A sample client to work with the server can be found here.
Supported Features
- Single, Match and Tag dueling modes.
- Joining games in progress.
- Semi-automatic match making system.
- Duel setting customization.
How to use
To run the server you will require the card scripts, database and the banlist, check the following file/folder structure for a better understanding:
In order for users out side your LAN to connect to the server you will need to port forward the relevant port, in this case port 8911 is used by default.
The server is designed in such a way that when new card effects and rulings are added to the game just recompiling ocgcore.dll from Fluorohydride/ygopro/ocgcore will continue keep the server compatible with all YGOPro clients. You can download a precompiled version of ocgcore from the release section but this version might not be the latest version available, if possible always recompile. If you have handshuffling enabled you will need a ocgcore.dll from Buttys/ygopro after the relivant and latest changes have been merged down.
##Configuration##
ygoserver.exe takes two parameters, a port, and a *.ini format configuration file with these configurations. Without parameters YGOCore will look for the above file structure after tying to load config.txt. For example c:\ygocore\ygoserver.exe 9101 alternative-configuration.ini. Will start the server on port 9101 ignoring the configuration files serverport and load alternative-configuration.ini and not config.ini.
serverportwhat server port to listen on, default8911pathdefault relative path, default '.'.scriptfolderpath to the script folder default `script'.cardcdbpath to the card database defaultcards.cdb.banlistpath to the banlist file defaultlflist.conf.errorlogenable logging to file on fatal error, default trueconsolelogenable console logging, default truehandshuffleenable disable hand shuffling, do not use with out the Buttys/ygoproocgcore.dlland not Fluorohydride/ygoproautoendturnenable auto ending the turn of players that run over time.clientversionset the version of the core is expectingsplashscreenenable disable the startup art, default enabled. Requiresconsolelogstdoutsupportenable additional standard streams API support for MyCard and SalvationDevelopment, and new programmers that do not wish to develop against YGOPro's TCP network protocols.recycledisable the recycle feature, by default the server keeps running until exit by external means. When set tofalseserver will exit with code 0 after one game.maxdecksizeMaximum number of cards in a deck default 60. Used for legacy formats.mindecksizeMinimum number of cards in a deck default 40. Used for draft formats.maxextradecksizeMaximum number of cards in the extra deck default 15. Used for legacy and anime formats.
##Standard Streams API##
The ygocore and the management software communicate via standard streams or TCP network. The core signals the management software its current state via a specific API, standard out stream comes via the console/terminal, these signals should not be confused with debug messages. Each call starts with :::: to check for if you are programming against it, this is an indication of a standard stream API call and not a debug message.
::::network-readysignal that the core has loaded and is listening on its given port::::network-endsignal that the game has ended, ie kill core request.::::join-slot|roomname|#|PlayerNamePlayerName has joined the duel in slot #.::::left-slot|roomname|#|PlayerNamePlayerName has left the duel in slot #.::::spectator|roomname|#number of spectators where # is an integer.::::lock-slot|roomname|#|boolslot #'s deck is locked in/out, andboolis True orFalse.::::startduel|roomnameRPS has started, this signals that the game has started.::::endduel|roomname|WinningPlayerSlot#|Reasonthe winning player slot integer, and how they won.::::chat|roomname|PlayerName|msgPlayerName sent a message containing the text ofmsg. If the server speaks PlayerName is[Server].
By default these commands are off. Requires stdoutsupport = true in the config.txt be set to true. For more information see the wikipedia article about it.
##Request Strings## When YGOCore recieves a game request command from a connecting client it will parse and handle the request in one of 3 ways. First it will see if a game using that sting is currently active and then conncect the requesting client to that game. If not it will parse the request
Percy/FH/TDOANE Notation
0-2 0-2 O/T O/T O/T Lifepoints, Initial Draw Count, Draws per turn, Password
nnOOOnnnn,n,n,n,xxxxx
DevPro Notation
0-2 0-2 O/T O/T O/T Lifepoints, Initial Draw Count, Draws per turn, Ranked/Unranked [Locked], Password
nnOOOnnnn,n,n,,n,nN,xxxxx
M/F Notation
