Git Product home page Git Product logo

yugioh-game's Introduction

Description

This is a text-based Yu-Gi-Oh MUD server, written in Python. It allows multiple players to duel with Yu-Gi-Oh cards.

Install dependencies

Lua is needed for ygopro-core. To make sure a matching lua version is used, we will compile it on our own:

wget https://www.lua.org/ftp/lua-5.3.5.tar.gz
tar xf lua-5.3.5.tar.gz
cd lua-5.3.5
make linux CC=g++ CFLAGS='-O2 -fPIC'

Install Python dependencies: pip3 install -r requirements.txt

Building

The following commands will assume your custom lua build to be found in your home directory. Adapt the corresponding lines to your liking.

ygopro-core and ygopro-scripts must be placed one level up from here.

git clone https://github.com/Fluorohydride/ygopro-core
git clone https://github.com/Fluorohydride/ygopro-scripts
cd ygopro-core
patch -p0 < ../yugioh-game/etc/ygopro-core.patch
g++ -shared -fPIC -o ../yugioh-game/libygo.so *.cpp -I$HOME/lua-5.3.5/src -L$HOME/lua-5.3.5/src -llua -std=c++14
cd ../yugioh-game
python3 duel_build.py
ln -s ../ygopro-scripts script

Compile language catalogues

This game supports multiple languages (english, spanish, german and french right now). To compile the language catalogues, run the following:

./compile.sh de
./compile.sh es
./compile.sh fr

To update the plain text files into human-readable format, run the following:

./update.sh de
./update.sh es
./update.sh fr

The generated files in locale//LC_MESSAGES/game.po can be given to translators afterwards.

Card databases

You'll need to grab the card databases for all languages you'd like to enable on your server. You'll at least need the database for the primary language (mostly english). Those can be found on various sources on the net, but it would be the best to checkout the official ygopro2 discord server, download and update the full package and use the files which can be found inside the cdb folder.

ATTENTION: the most up-to-date english databases can be found directly within the cdb folder (no sub-folder), so just grab all *.cdb files and copy them over into the locale/en/ folder to get the server up and running.

The YGOPRO2 discord server can be found here.

Running

python3 ygo.py

The server will start on port 4000.

Upgrading

ygopro-scripts

When upgrading ygopro-scripts, always upgrade ygopro-core with it to prevent crashes. To do so, git pull the repositories cloned earlier and execute the build commands from above again.

This game

We might change several basic things from time to time, like adding additional c-level helper functions or modify the database layout, so don't forget to run the following commands whenever pulling a major upgrade:

python3 duel_build.py
alembic upgrade head

Always remember that, even though we try to prevent it, upgrading the database might fail and leave your database in a broken state, so always back it up before proceeding.

yugioh-game's People

Contributors

tspivey avatar timtam avatar thyhellcat avatar sorressean avatar jpavonabian avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.