TRANSPORT CHANGE COLOR

Learn here how to create and use plugins.

Moderator: Plugin Moderators

User avatar
Jaforzem
Villager
Reactions:
Posts: 11
Joined: 04 Jul 2020, 23:51
Location: Mexico
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

TRANSPORT CHANGE COLOR

#1

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
TLL0AM.png (3.17 KiB) Viewed 543 times

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
FacLM.png (2.34 KiB) Viewed 543 times

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
(17.51 KiB) Downloaded 13 times
User avatar
Ostrovsk
Small-town resident
Reactions:
Posts: 41
Joined: 13 Oct 2023, 18:31

Re: TRANSPORT CHANGE COLOR

#2

Post by Ostrovsk »

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

Plugin Creator

Platform

Re: TRANSPORT CHANGE COLOR

#3

Post by Zidaan25 »

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

Plugin Creator

Platform

Re: TRANSPORT CHANGE COLOR

#4

Post by Jaforzem »

Zidaan25 wrote: 09 Feb 2026, 19: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, 14:49

Re: TRANSPORT CHANGE COLOR

#5

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: 11
Joined: 04 Jul 2020, 23:51
Location: Mexico
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: TRANSPORT CHANGE COLOR

#6

Post by Jaforzem »

youkyuu wrote: 15 Apr 2026, 20: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, 14:49

Re: TRANSPORT CHANGE COLOR

#7

Post by youkyuu »

Jaforzem wrote: 15 Apr 2026, 21:01
youkyuu wrote: 15 Apr 2026, 20: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.
Post Reply Previous topicNext topic

Return to “Tutorials and Documentation”