Page 1 of 1

res/ind car identification

Posted: 25 Feb 2018, 14:16
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

Re: ⚠ Important change in res/ind car identification

Posted: 25 Feb 2018, 15:19
by Borbor
@lobby[Posts][PM] only extensions that use the override feature will not work?

Re: ⚠ Important change in res/ind car identification

Posted: 25 Feb 2018, 15:21
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.

Re: ⚠ Important change in res/ind car identification

Posted: 25 Feb 2018, 19:47
by A dutch Guy
This is indeed very useful for me

Re: Change in res/ind car identification

Posted: 17 Apr 2018, 10:34
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

Re: Change in res/ind car identification

Posted: 19 Jul 2018, 17:59
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?

Re: Change in res/ind car identification

Posted: 19 Jul 2018, 23:31
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.

Re: Change in res/ind car identification

Posted: 29 Aug 2018, 21:08
by ElephantEthan
Is there a tag for farm tractors? Can also trailers/tails be added using this method?

Re: Change in res/ind car identification

Posted: 29 Aug 2018, 23:26
by CommanderABab
Probably:

Code: Select all

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

#tail let's see.

Car Chains

Re: Change in res/ind car identification

Posted: 30 Aug 2018, 06:14
by ElephantEthan
Right, I thought tails were in the car spawner for some reason. Thank you very much for the info @CommanderABab !

Re: Change in res/ind car identification

Posted: 08 Nov 2018, 18:48
by A dutch Guy
@Lobby

Is there also a tag for the airport cars?

Re: Change in res/ind car identification

Posted: 10 Nov 2018, 12:30
by Lobby
@A dutch Guy Great idea!
I'll add the tag "airport taxi" for it. Usage:

Code: Select all

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

Re: res/ind car identification

Posted: 31 Jul 2019, 16:57
by Lakan Haraya
Is there a tag for bus?

Code: Select all

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

Re: res/ind car identification

Posted: 31 Jul 2019, 23:43
by Lobby
The tag is:

Code: Select all

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

Re: res/ind car identification

Posted: 15 Aug 2020, 19:16
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

Re: res/ind car identification

Posted: 13 Sep 2021, 16:01
by Yakka
How to make custom one

Re: res/ind car identification

Posted: 10 Dec 2021, 09:28
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