Page 1 of 1

res/ind car identification

Posted: Sun Feb 25, 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 @former member

Re: ⚠ Important change in res/ind car identification

Posted: Sun Feb 25, 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: Sun Feb 25, 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: Sun Feb 25, 2018 19:47
by A dutch Guy
This is indeed very useful for me

Re: Change in res/ind car identification

Posted: Tue Apr 17, 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: Thu Jul 19, 2018 17:59
by A dutch Guy
Lobby wrote:
Tue Apr 17, 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: Thu Jul 19, 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: Wed Aug 29, 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: Wed Aug 29, 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: Thu Aug 30, 2018 6: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: Thu Nov 08, 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: Sat Nov 10, 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: Wed Jul 31, 2019 16:57
by Lakan Haraya
Is there a tag for bus?

Code: Select all

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

Re: res/ind car identification

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

Code: Select all

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