Page 1 of 1

Slight issue with plugin code

Posted: 20 Jul 2020, 21:29
by ArekkusuTheFox
currently working on the first version of a small, fairly complicated, railway plugin and I've encountered a few problems.

problem 1: several formatting errors I can't seem to get rid of. my code looks like this so far.

testing the trains and station so far, it'll be compatible with the in-game rails eventually.

Code: Select all

[
  {
    "id":"$arekkusu_loco00",
    "type":"car",
	"author":"Arekkusu",
	"flag normal":false,
	"flag train":true,
	"frames":[
      {"bmp":"NASteam.png","w":17,"h":13,"count":4}
    ],
    "v2":true
  },
  
    {
    "id":"$arekkusu_tender00",
    "type":"car",
	"author":"Arekkusu",
	"flag normal":false,
	"flag train":true,
    "frames":[
      {"bmp":"NASteamtender.png","w":18,"h":12,"count":4}
    ],
    "v2":true
  }
  
    {
    "id":"$arekkusu_steam00",
    "type":"car",
	"author":"Arekkusu",
	"flag normal":false,
	"flag train":true,
    "frames":[
      {"bmp":"NASteam.png","w":17,"h":13,"count":4}
	  "tail":["$arekkusu_tender00"]
  }
{
    "id":"$arekkusu_station00",
    "type":"railway station",
    "width":3,
    "height":3,
    "influence passenger train": 20,
    "frames":[
      {"bmp":"NA_train_sprites.png",
	  "x":2,"y":0,"w":33,"h":16,"count":1},
    ]
      "car spawner":[
      {
        "cars":["$arekkusu_steam00"],
        "radius":10,
        "count":10,
        "targets":["$arekkusu_station00"]
      }
    ]
  }
]
Problem 2: wanting to make a working signal system like in the diagram below, but don't know if that's possible.

signal 1<-----block 1------> signal 2 <------block 2------->signal 3
Signal 1 is red until signal 2 is passed
signal 2 is red until signal 3 is passed, signal 1 is green
continue like so for desired track length

Problem 3: I've found some sprites from a graphics set for OpenTTD I like and can legally use. I'll replace them once I get better at drawing sprites of my own, do I need to modify the size in any way?

any and all help is massively appreciated!

-Arekkusu