TRANSPORT CHANGE COLOR

Find tutorials, documentation, and resources for creating and using TheoTown plugins.
Previous topicNext topic
User avatar
Jaforzem
Villager
Reactions:
Posts: 10
Joined: 04 Jul 2020, 21:51
Location: Mexico
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

TRANSPORT CHANGE COLOR

Post by Jaforzem »

Ok, To get started, you should first read the following tutorials:
- Cars: viewtopic.php?t=2346
- Car Chains viewtopic.php?t=5248
- The ACTUAL tutorial on flags: viewtopic.php?t=7441
- Transportation System Extension: viewtopic.php?t=28157

SmartSelect_20251216-133404_TheoTown.jpg



To make our transport, whether bus or train (any one that falls within the TSE (Transport System Extension)) change color according to the color of the line, we are going to need to make our base graph.

TLL0AM.png

This will need to be white where it's going to be colored and black where it's not (whether it's windows, doors, or another design), In another graph we will have our fixed colors (in this case it will be a white layer) where we will color with the colors that we want to be fixed, such as windows, doors, tires and other decorations.

FacLM.png

This 2nd chart will be like a blanket for the first one. Now with the json we're going to do this. For everything to work we must put the next line inside the convoy (bus or train), in this case it will be a train.

Code: Select all

"auto colorize":true
To put the colors fixed we must declare that the graphic 2 (we will call it "The blanket") is an animation, taking the train as an example.

Code: Select all

{
  "id":"$DML0AM",
  "type":"animation",
  "frames":[
      {"bmp":"FacLM.png","count": 4,"w":29}
      ],
  "rotation aware":true
}
And then we declare the Convoy, bringing the animation together with it so that they work together.

Code: Select all

  {
    "id":"$TLL0AM",
    "type":"car",
    "frames":[
        {"bmp":"TLL0AM.png","count":4,"x":0,"w":29,"h":21,"length":25}
    ],
    "animation":[
      {
        "id":"$DML0AM",
        "x":0,
        "y":0
      } 
    ], 
    "v2":[ -5, 1, -6, 0], 
    "auto colorize":true,
    "flag train":true,
    "flag normal":false
  },
And that's it, there is a wagon left, now we need to do the same with the head and the end of the train, if you want I leave you here the ZIP so you can see and analyze it yourself, I hope and it will serve you for your future Plugins.

CONVOYS.zip
You do not have the required permissions to view the files attached to this post.
O
Ostrovsk
Townsman
Reactions:
Posts: 43
Joined: 13 Oct 2023, 16:31
Location: Rostov-on-Don
Plugins: Showcase Store
Version: Beta

Re: TRANSPORT CHANGE COLOR

Post by Ostrovsk »

Very good course, thank you👍🏻✨
Z
Zidaan25
Settler
Reactions:
Posts: 2
Joined: 16 Sep 2024, 05:34

Plugin Creator

Platform

Re: TRANSPORT CHANGE COLOR

Post by Zidaan25 »

this can't be combined with night animation?
User avatar
Jaforzem
Villager
Reactions:
Posts: 10
Joined: 04 Jul 2020, 21:51
Location: Mexico
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: TRANSPORT CHANGE COLOR

Post by Jaforzem »

Zidaan25 wrote: 09 Feb 2026, 17:03 this can't be combined with night animation?
Yes, This can be combined with the use of night lights
User avatar
youkyuu
Villager
Reactions:
Posts: 10
Joined: 29 Jan 2025, 12:49

Re: TRANSPORT CHANGE COLOR

Post by youkyuu »

why did I make the same but the colorize parts are frames of the car but not the animation? and the animation part do not colorize?it's totally on the contrary.

Code: Select all    Reset

[{ "id": "yukyuu.colorfulTrain00_head.color00", "type": "animation", "frames": [ { "bmp": "renewTrain00headColor.png", "count": 8, "h": 16, "w": 20 } ], "rotation aware": true }, { "id": "yukyuu.colorfulTrain00_head", "type": "train car", "v2": true, "flag elevated train": true, "flag normal": false, "flag train": true, "frames": [ { "bmp": "renewTrain00head.png", "count": 8, "h": 16, "w": 20 } ], "frames per variant": 8, "auto colorize": true, "chargeable": false, "animation": [ { "id": "yukyuu.colorfulTrain00_head.light00" }, { "id": "yukyuu.colorfulTrain00_head.light01" }, { "id": "yukyuu.colorfulTrain00_head.color00" } ] } ]
JSON checker
Check
User avatar
Jaforzem
Villager
Reactions:
Posts: 10
Joined: 04 Jul 2020, 21:51
Location: Mexico
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: TRANSPORT CHANGE COLOR

Post by Jaforzem »

youkyuu wrote: 15 Apr 2026, 18:54 why did I make the same but the colorize parts are frames of the car but not the animation? and the animation part do not colorize?it's totally on the contrary.

Code: Select all    Reset

[{ "id": "yukyuu.colorfulTrain00_head.color00", "type": "animation", "frames": [ { "bmp": "renewTrain00headColor.png", "count": 8, "h": 16, "w": 20 } ], "rotation aware": true }, { "id": "yukyuu.colorfulTrain00_head", "type": "train car", "v2": true, "flag elevated train": true, "flag normal": false, "flag train": true, "frames": [ { "bmp": "renewTrain00head.png", "count": 8, "h": 16, "w": 20 } ], "frames per variant": 8, "auto colorize": true, "chargeable": false, "animation": [ { "id": "yukyuu.colorfulTrain00_head.light00" }, { "id": "yukyuu.colorfulTrain00_head.light01" }, { "id": "yukyuu.colorfulTrain00_head.color00" } ] } ]
JSON checker
Check
The part that changes color is the frames not the animation, in fact the animation is for parts that are not colored like windows, lights, and colors or fixed figures
User avatar
youkyuu
Villager
Reactions:
Posts: 10
Joined: 29 Jan 2025, 12:49

Re: TRANSPORT CHANGE COLOR

Post by youkyuu »

Jaforzem wrote: 15 Apr 2026, 19:01
youkyuu wrote: 15 Apr 2026, 18:54 why did I make the same but the colorize parts are frames of the car but not the animation? and the animation part do not colorize?it's totally on the contrary.

Code: Select all    Reset

[{ "id": "yukyuu.colorfulTrain00_head.color00", "type": "animation", "frames": [ { "bmp": "renewTrain00headColor.png", "count": 8, "h": 16, "w": 20 } ], "rotation aware": true }, { "id": "yukyuu.colorfulTrain00_head", "type": "train car", "v2": true, "flag elevated train": true, "flag normal": false, "flag train": true, "frames": [ { "bmp": "renewTrain00head.png", "count": 8, "h": 16, "w": 20 } ], "frames per variant": 8, "auto colorize": true, "chargeable": false, "animation": [ { "id": "yukyuu.colorfulTrain00_head.light00" }, { "id": "yukyuu.colorfulTrain00_head.light01" }, { "id": "yukyuu.colorfulTrain00_head.color00" } ] } ]
JSON checker
Check
The part that changes color is the frames not the animation, in fact the animation is for parts that are not colored like windows, lights, and colors or fixed figures
so is there a method to make the animation colorize? I wanna to get a colorize lights animation.
Previous topicNext topic