Giter VIP home page Giter VIP logo

dayzservlet's Introduction

DayZServlet

A python-flask implementation of the servlet used for the legacy versions of DayZ.

This has only been tested on version 0.44.123800.

What does this do?

Older versions of DayZ Standalone make post/get requests to certain endpoints that relate to the saving, killing and creation of players. DayZServlet replicates these endpoints in order to allow you to play legacy versions of DayZ with player saves. Instead of storing data in a MySQL database like how the game normally does it, I decided to use MongoDB as it is easier and faster to use.

Endpoints
/DayZServlet/lud0/find
/DayZServlet/lud0/load
/DayZServlet/lud0/create
/DayZServlet/lud0/save
/DayZServlet/lud0/queue
/DayZServlet/lud0/kill
/DayZServlet/world/get
/DayZServlet/world/add
/DayZServlet/world/remove
/DayZServlet/world/count

Running DayZServlet

First, you wil need to configure config.py so it is setup with the credentials to your MongoDB instance.

Then, run these commands;

pip install -r requirements.txt

python server.py

Then, in your init.sqf file in your mission, add this line at the bottom;

dbSelectHost "http://localhost:5000/DayZServlet/";

dayzservlet's People

Contributors

doge avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

dayzlegacydev

dayzservlet's Issues

Changes won't commit to MongoDB instance

I am currently attempting to use this servlet on DayZ 0.44.123800. I want to start by hosting the database locally to ensure save functionality so I've installed MongoDB and have the daemon running. I connect to it with MongoDB Compass and create a "dayz" database, and "players" collection. I configure my credentials in config.py and start the server with server.py. It is then specified in my init.sqf as http://localhost:5000/DayZServlet

The Python server is listening to and detects API calls from the game. The MongoDB instance detects a new connection from CPython when I launch the save server. When the game server attempts to save, the save server will report "Saved player" for that UID. The next intended behavior would be for it to find my character and retrieve it from the database, however, after disconnecting (which triggers another save) and reconnecting, the console message I receive is "player not found" for my particular UID. It appears that everything is working except the data is not being committed to my MongoDB instance.

How does this servlet currently know how to store variables such as pos_x, items, etc? I don't see any of these entries being referenced in this repository. Am I missing a piece of the puzzle?

I've tried this on clean copies of DayZ 0.44, 0.45, and 0.46 (the version you had tested) and all of them produce the same result, so I don't believe there's anything wrong with my mission files. If there's any other info I can provide to get this issue resolved please let me know and I appreciate any assistance you might have to offer

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.