res/ind car identification

Learn here how to create and use plugins.

Moderator: Plugin Moderators

User avatar
Lobby
Developer
Reactions:
Posts: 3705
Joined: 26 Oct 2008, 12:34
Plugins: Showcase Store
Version: Beta

Platform

res/ind car identification

#1

Post by Lobby »

Hi, in the past you had to override one of the cars "$carres00", ..., "$carind00", ... in order to get your own residential/commercial/industrial cars into the game. Version 437 will change that behavior. The game will then identify such cars not by their id but by the tags they set.

To mark your car as level1 residential car use :json

Code: Select all

"meta":{
  "tags":{
    "carres0":{}
  }
}
For a level 3 industrial car use :json

Code: Select all

"meta":{
  "tags":{
    "carind2":{}
  }
}
The complete definition of a level 1 residential car would look like :json

Code: Select all

 {
  "id":"$carres00",
  "type":"car",
  "frames":[
    {"x":512,"y":512,"w":12,"h":10,"count":8}
  ],
  "v2":true,
  "auto colorize":true,    // Can be used to color white frames
  "flag normal":false,     // This is not a normal car as it's not a truck
  "flag pkw":true,         // And only for person transport
  "meta":{
    "tags":{
      "carres0":{}         // You may use mutliple tags for one car
    }
  }
}
I consider to will add support for plugins that aren't updated to these changes (as by default, a override would remove any tag information, therefore outdated plugins wouldn't work anymore). These changes are needed in order to add more rci cars without tampering with the existing ones.

Plugin creators who might find this information useful: @CommanderABab @Josh @JustAnyone @KoalaGuy @A dutch Guy @22Alpha @Borbor

User avatar
Borbor
Inhabitant of a Conurbation
Reactions:
Posts: 360
Joined: 27 Apr 2017, 14:03
Location: Republic of Turkey
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: ⚠ Important change in res/ind car identification

#2

Post by Borbor »

@lobby[Posts][PM] only extensions that use the override feature will not work?

User avatar
Lobby
Developer
Reactions:
Posts: 3705
Joined: 26 Oct 2008, 12:34
Plugins: Showcase Store
Version: Beta

Platform

Re: ⚠ Important change in res/ind car identification

#3

Post by Lobby »

Yes, cars that override $carres00 etc. might not work as expected anymore. I suggest to use your own id for your cars then and add the appropriate tags as shown above.

User avatar
A dutch Guy
Inhabitant of a Megacity
Reactions:
Posts: 174
Joined: 26 Dec 2017, 14:41
Location: The Netherlands
Plugins: Showcase Store

Plugin Creator

Platform

Re: ⚠ Important change in res/ind car identification

#4

Post by A dutch Guy »

This is indeed very useful for me

User avatar
Lobby
Developer
Reactions:
Posts: 3705
Joined: 26 Oct 2008, 12:34
Plugins: Showcase Store
Version: Beta

Platform

Re: Change in res/ind car identification

#5

Post by Lobby »

Service cars can now be tagged the same way. So you can just add new medic cars for example.

Code: Select all

"meta":{"tags":{"fire brigade":{}}}

Code: Select all

"meta":{"tags":{"medic":{}}}

Code: Select all

"meta":{"tags":{"police":{}}}

Code: Select all

"meta":{"tags":{"swat":{}}}
@Borbor

User avatar
A dutch Guy
Inhabitant of a Megacity
Reactions:
Posts: 174
Joined: 26 Dec 2017, 14:41
Location: The Netherlands
Plugins: Showcase Store

Plugin Creator

Platform

Re: Change in res/ind car identification

#6

Post by A dutch Guy »

Lobby wrote:
17 Apr 2018, 10:34
Service cars can now be tagged the same way. So you can just add new medic cars for example.

Code: Select all

"meta":{"tags":{"fire brigade":{}}}

Code: Select all

"meta":{"tags":{"medic":{}}}

Code: Select all

"meta":{"tags":{"police":{}}}

Code: Select all

"meta":{"tags":{"swat":{}}}
is there a tag for military vehicles as well?

User avatar
Lobby
Developer
Reactions:
Posts: 3705
Joined: 26 Oct 2008, 12:34
Plugins: Showcase Store
Version: Beta

Platform

Re: Change in res/ind car identification

#7

Post by Lobby »

I will add

Code: Select all

"meta":{"tags":{"military tank":{}}}
and

Code: Select all

"meta":{"tags":{"military truck":{}}}
The difference between the two is the building they spawn from.

User avatar
ElephantEthan
Inhabitant of a Megacity
Reactions:
Posts: 294
Joined: 26 Aug 2018, 14:07
Plugins: Showcase Store

Platform

Re: Change in res/ind car identification

#8

Post by ElephantEthan »

Is there a tag for farm tractors? Can also trailers/tails be added using this method?

User avatar
CommanderABab
AB
Reactions:
Posts: 11080
Joined: 07 Jun 2016, 21:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Change in res/ind car identification

#9

Post by CommanderABab »

Probably:

Code: Select all

"meta":{
  "tags":{
    "carind0":{}
  }
}
.or similar.

#tail let's see.

Car Chains

User avatar
ElephantEthan
Inhabitant of a Megacity
Reactions:
Posts: 294
Joined: 26 Aug 2018, 14:07
Plugins: Showcase Store

Platform

Re: Change in res/ind car identification

#10

Post by ElephantEthan »

Right, I thought tails were in the car spawner for some reason. Thank you very much for the info @CommanderABab !

User avatar
A dutch Guy
Inhabitant of a Megacity
Reactions:
Posts: 174
Joined: 26 Dec 2017, 14:41
Location: The Netherlands
Plugins: Showcase Store

Plugin Creator

Platform

Re: Change in res/ind car identification

#11

Post by A dutch Guy »

@Lobby

Is there also a tag for the airport cars?

User avatar
Lobby
Developer
Reactions:
Posts: 3705
Joined: 26 Oct 2008, 12:34
Plugins: Showcase Store
Version: Beta

Platform

Re: Change in res/ind car identification

#12

Post by Lobby »

@A dutch Guy Great idea!
I'll add the tag "airport taxi" for it. Usage:

Code: Select all

"meta":{"tags":{"airport taxi":{}}}

User avatar
Lakan Haraya
Metropolitan
Reactions:
Posts: 131
Joined: 28 Mar 2019, 09:34
Location: Philippines
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: res/ind car identification

#13

Post by Lakan Haraya »

Is there a tag for bus?

Code: Select all

"meta":{"tags":{"bus":{}}}
Last edited by Lakan Haraya on 27 Jan 2020, 11:25, edited 1 time in total.

User avatar
Lobby
Developer
Reactions:
Posts: 3705
Joined: 26 Oct 2008, 12:34
Plugins: Showcase Store
Version: Beta

Platform

Re: res/ind car identification

#14

Post by Lobby »

The tag is:

Code: Select all

"meta":{"tags":{"idle bus":{}}}

User avatar
Uncle Koala
Metropolitan
Reactions:
Posts: 142
Joined: 05 Apr 2020, 14:53
Location: Pitcairn Islands
Plugins: Showcase Store
Version: Beta
Contact:

Plugin Creator

Platform

Re: res/ind car identification

#15

Post by Uncle Koala »

I understand this was made to prevent incompatiblity, but is there any way to override those IDs anyway? I wanted to edit semi-trucks because they are not realistic in their current state and they usually block traffic with their weird trailer chains (this is why shops in real life use smaller trucks too.). The traffic system works way better with the older trucks. I guess the semis could be used for long distance transport to the end of the map? (neighbour connections) :bq

User avatar
Yakka
Inhabitant of a Conurbation
Reactions:
Posts: 413
Joined: 06 Jan 2020, 09:57
Location: Java-indonesia
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: res/ind car identification

#16

Post by Yakka »

How to make custom one

User avatar
CERRERA
Townsman
Reactions:
Posts: 48
Joined: 25 Jan 2020, 06:19
Location: Philippines
Plugins: Showcase Store
Version: Beta
Contact:

Plugin Creator

Platform

Re: res/ind car identification

#17

Post by CERRERA »

Lobby wrote:
25 Feb 2018, 14:16
Hi, in the past you had to override one of the cars "$carres00", ..., "$carind00", ... in order to get your own residential/commercial/industrial cars into the game. Version 437 will change that behavior. The game will then identify such cars not by their id but by the tags they set.

To mark your car as level1 residential car use :json

Code: Select all

"meta":{
  "tags":{
    "carres0":{}
  }
}
For a level 3 industrial car use :json

Code: Select all

"meta":{
  "tags":{
    "carind2":{}
  }
}
The complete definition of a level 1 residential car would look like :json

Code: Select all

 {
  "id":"$carres00",
  "type":"car",
  "frames":[
    {"x":512,"y":512,"w":12,"h":10,"count":8}
  ],
  "v2":true,
  "auto colorize":true,    // Can be used to color white frames
  "flag normal":false,     // This is not a normal car as it's not a truck
  "flag pkw":true,         // And only for person transport
  "meta":{
    "tags":{
      "carres0":{}         // You may use mutliple tags for one car
    }
  }
}
I consider to will add support for plugins that aren't updated to these changes (as by default, a override would remove any tag information, therefore outdated plugins wouldn't work anymore). These changes are needed in order to add more rci cars without tampering with the existing ones.

Plugin creators who might find this information useful: @CommanderABab @Josh @JustAnyone @KoalaGuy @A dutch Guy @22Alpha @Borbor @former member
May I see all the tag list

Post Reply Previous topicNext topic

Return to “Tutorials and Documentation”