TRANSPORT CHANGE COLOR

Learn here how to create and use plugins.

Moderator: Plugin Moderators

User avatar
Jaforzem
Villager
Reactions:
Posts: 9
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 126 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 126 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 5 times

User avatar
Ostrovsk
Small-town resident
Reactions:
Posts: 40
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: 9
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

Post Reply Previous topicNext topic

Return to “Tutorials and Documentation”