Skip to content

KGMats/PTD2-Server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Goals

  • Make Story mode playable
  • Make 1v1 mode playable
  • Make Gym Challenges playable
  • Implement Mystery gifts
  • Recreate pokecenter
  • Implement multiplayer (Trainer VS)
  • Implement MySQL-based saves

How to host my own PTD2 server?

Requirements:

  • nginx
  • php-fpm

download the server code and unzip it

open a text editor with administrative permissions and open nginx.conf file, it is located on "/etc/nginx/" if you are using linux and "C:/Program Files/nginx/conf" if you are using windows, and change the server root to:

/{absolute path to PTD2-Server-Code}/public

Uncomment php FastCGI lines

location ~ \.php$ {
	fastcgi_pass    127.0.0.1:9000;
	fastcgi_index   index.php;
	fastcgi_param   SCRIPT_FILENAME;
	include   fastcgi_params
	}

set fastcgi_param to

SCRIPT_FILENAME  $document_root$fastcgi_script_name

now just run nginx and php-fpm, and you will have a working PTD2 server on your computer!

For developers:

The code is divided as follows:

  • Things related to save are in json.php, for json saves (use only as fallback or in non-public servers) and in MySQL.php for SQL saves.
  • Server methods (save/load accounts etc.) are in ptd2_save_12.php
  • Functions to obfuscation and deobfuscation of data are in obfuscation.php

About

An open source reverse-engineered server for Pokemon Tower Defense 2

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages