Maps Railroad Online Savegames to a SVG map

Overview

RailroadOnlineMapper

@ian76g#6577

Environments

DEV - https://zwackelmann.online/ QA - https://ohnezahn.online/ PROD - https://minizwerg.online/

Getting Started

Run locally

PHP Setup

  1. Ensure you have PHP (v<8) installed, or download here

  2. Rename php.ini.development to php.ini

  3. Set the extension_dir of php.ini to ext

    extension_dir = "ext"

  4. in ini file enable extensions mb

    extension=mbstring

Project setup

  1. Clone this repo to your local machine
  2. Copy your save file from %localappdata%/arr/Saved/SaveGames (or ./setup) to the root of the project (eg. ./slot1.sav)
  3. Run the convertor

    php converter.php slot1.sav

  4. Find output html in ./done

Host on webserver

  1. Copy everything to a folder of your webserver
  2. Done

Output

xx.json The save in nice readable JSON

db.db A database used for hosting with filename, user, switches, trains, etc.

Contributers

@JKD#0205
@iScripters#9408

Comments
  • Zero length rail

    Zero length rail

    Warning: Division by zero in /var/www/web960/html/minizwerg/classes/Mapper.php on line 373

    Warning: Division by zero in /var/www/web960/html/minizwerg/classes/Mapper.php on line 378

    Warning: Cannot modify header information - headers already sent by (output started at /var/www/web960/html/minizwerg/classes/Mapper.php:373) in /var/www/web960/html/minizwerg/upload.php on line 54

    opened by hsnopi 2
  •  industry list

    industry list

    Like player list an industry list? Reason: Sometimes the industry have a lot of tracks, cars and other stuff nearby so the informations like Input/Output are not visible. Can you specify the Input/output? Right now there are only values. Maybe like: Smelter - Input: 35/1000 Ore, 15/100 Cordwood - Output: 12/100 Beams, 10/100 Rails

    enhancement 
    opened by ian76g 1
  • Read save

    Read save

    This PR changes the way save files are read and displayed:

    • Store the .sav on server instead of generating a HTML file from it
    • Instead of a dedicated .html file for each save, there is now a single map.php which gets the name from GET parameters
    • When map.php is openen with a valid name, GVASParser will create a JSON string from the .sav file and gives it to mapper.js
    • mapper.js generates all the content needed to display the map in SVG

    There are some other changes as well, but most notably the 'new way' of reading a save file.

    opened by iScripters 0
  • Index.php changes

    Index.php changes

    • Cleaned up folders names to ensure they get created
    • Reset path for $db variable
    • Reduced data for main table and condensed some data
    • Updated variable for time check
    • Link created now for only files in saves/public/ folder
    opened by fbane 0
  • Updated for proper upload link

    Updated for proper upload link

    • Updated to create the saves/ and saves/public/ if doesn't exist and removed the creation of public/
    • Modified code to create proper link if save file exists in /saves/public/ and will be black if the upload user did not choose public
    • Currently placeholder number in place for the links to show expired; Will make another PR after this to reflect that code change as well.
    opened by fbane 0
Releases(release_2.2)
Owner
Sebastian Köhler
Sebastian Köhler
REDAXO-Addon mit nützlichen Methoden im Umgang mit dem Picture-Element, Responsive Bilder, SVG-Ausgabe, u.v.m.

REDAXO-Addon mit nützlichen Methoden im Umgang mit dem Picture-Element, Responsive Bilder, SVG-Ausgabe, u.v.m.

alex+ Informationsdesign 8 Dec 15, 2022
REDAXO-Addon mit nützlichen Methoden im Umgang mit dem Picture-Element, Responsive Bilder, SVG-Ausgabe, u.v.m.

REDAXO-Addon mit nützlichen Methoden im Umgang mit dem Picture-Element, Responsive Bilder, SVG-Ausgabe, u.v.m.

alex+ Informationsdesign 8 Dec 15, 2022
Utilities to scan PHP code and generate class maps.

composer/class-map-generator Utilities to generate class maps and scan PHP code. Installation Install the latest version with: $ composer require comp

Composer 55 Dec 26, 2022
Sitepackage for TYPO3 CMS that adheres to the recommended standards, maps all conceivable functional areas and contains examples for common use cases.

TYPO3 CMS Sitepackage This sitepackage sticks as closely as possible to the recommended standard and maps all conceivable functional areas. There are

Eric Bode 3 Dec 18, 2022
Allows generate class files parse from json and map json to php object, including multi-level and complex objects;

nixihz/php-object Allows generate class files parse from json and map json to php object, including multi-level and complex objects; Installation You

zhixin 2 Sep 9, 2022
PHP library that helps to map any input into a strongly-typed value object structure.

Valinor • PHP object mapper with strong type support Valinor is a PHP library that helps to map any input into a strongly-typed value object structure

Team CuyZ 873 Jan 7, 2023
A plugin to test Server->getPlayerExact() vs Map performance

PeformanceTests A plugin to test Server->getPlayerExact() vs Map<username, Player> performance Timings with Server->getPlayerExact() https://timings.p

KingOfTurkey38 1 Feb 25, 2022
Google map with autocomplete

Nova Google Map With Autocomplete Field Package This field allows you to work with Google Places API to autocomplete and Google Map on user input and

TrinityRank DevTeam 2 Jul 29, 2022
Generate static map url for maptiler.com

PHP static maps url generator The package is used for static maps (images) URL generate. For now, it works only with maptiler.com. I welcome your comm

Andrey Surzhikov 2 Sep 8, 2022
This module aims to validate if the pilot made his flights online on the IVAO and VATSIM networks

SMPirepValidator This module aims to validate if the pilot made his flights online on the IVAO and VATSIM networks SMPirepValidator v.1.0 for phpVMS (

SmartModules for phpVMS 1 Dec 13, 2021
Authoring Tool and Language Workbench for Online Courses

Authoring Tool and Language Workbench for Online Courses

sellquiz 1 Feb 2, 2022
Simple Online Automated Provision

Simple Online Automated Provisioning Simply put, SOAP automates PXE network booting and OS installation. With SOAP, you can submit the network informa

xTom 4 Dec 9, 2021
Online Food Ordering system with admin, owner, rider panel

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

sumit paul 1 Jun 17, 2022
A platform to create an online marketplace

About MarketplaceKit MarketplaceKit is a platform for building different types of online marketplaces. MarketplaceKit attempts to reduce the developme

MarketplaceKit Team 667 Nov 30, 2022
An open-source Laravel 8 online store, client area, and billing software specially made for Pterodactyl panel

PteroBilling An open-source Laravel 8 online store, client area, and billing software specially made for Pterodactyl panel           Announcement: An

PteroBilling 18 Nov 12, 2022
Magento 2 Blog Extension - FREE, fully featured, powerful Blog solution for your online store!

Blog MX | Magento 2 Blog Module by Mirasvit FREE, fully featured, powerful Blog solution for your online store! Magento 2 Blog MX allows you to open a

Mirasvit 71 Dec 7, 2022
The Laravel eCommerce ABA Payment Gateway module allows the admin to integrate the ABA payment gateway to the online store.

Introduction Bagisto ABA Payment Gateway. Requirements: Bagisto: v1.3.2. Installation with composer: Run the following command composer require bagist

Bagisto 3 May 31, 2022
StickWithIt is an online food ordering website created using PHP. You can view and purchase various items as well as remove items from the cart.

StickWithIt (App Name) StickWithIt is an online food ordering website created using PHP. The database used here is MYSQL database. The tool used here

Jenil Gajjar 1 May 11, 2022
Online Food Delivery Website created using HTML, CSS, PHP and MySQL which delivers food at your doorstep on Cash-On-Delivery.

Food-Delivery-Website Online Food Delivery Website created using HTML, CSS, PHP and MySQL which delivers food at your doorstep on Cash-On-Delivery. Th

null 2 Dec 1, 2022