Cars

Find tutorials, documentation, and resources for creating and using TheoTown plugins.
Previous topicNext topic
User avatar
TheFennekin
Inhabitant of a Galaxy Cluster
Reactions:
Posts: 2714
Joined: 24 Aug 2017, 09:17
Location: honsing around
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Cars

Post by TheFennekin » 23 Feb 2022, 02:06

Q: How do you put night anims on cars? Is it just like how you do it for buildings or no? Also, if I have for example multiple variants of a single car on one image and id, how do I put night anims on them?
Image
User avatar
TheFennekin
Inhabitant of a Galaxy Cluster
Reactions:
Posts: 2714
Joined: 24 Aug 2017, 09:17
Location: honsing around
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Cars

Post by TheFennekin » 02 Mar 2022, 01:32

Q: Is it possible to override in-game buses?
Image
User avatar
Yakka Works
Inhabitant of a Conurbation
Reactions:
Posts: 412
Joined: 06 Jan 2020, 07:57
Location: Java-indonesia
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Cars

Post by Yakka Works » 02 Mar 2022, 05:41

TheFennekin wrote: 02 Mar 2022, 01:32 Q: Is it possible to override in-game buses?
Yes if you know the id of it,im remembering it just something like $bus00 $bus01 and so on.
My plugins,up to date and it's free on my website. So check it out.
My website
Community/Creators Discord Server List
User avatar
TheFennekin
Inhabitant of a Galaxy Cluster
Reactions:
Posts: 2714
Joined: 24 Aug 2017, 09:17
Location: honsing around
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Cars

Post by TheFennekin » 02 Mar 2022, 09:06

I'll try. Hopefully the new bus system won't be a hassle
Image
User avatar
TheFennekin
Inhabitant of a Galaxy Cluster
Reactions:
Posts: 2714
Joined: 24 Aug 2017, 09:17
Location: honsing around
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Cars

Post by TheFennekin » 29 Mar 2022, 04:11


Anyway, I offset the truck by using the "v2" (I don't remember what its actually for) and it worked but I concern this is not the correct way.

Code: Select all    Reset

"frames":[{"bmp":"JBPM_Scania.png","count":4,"h":22,"w":23}], "id":"$carfirebrigade00", "meta":{"tags":{"medic":{},"swat"{}}}, "speed":1.1, "type":"car", "v2":[-2,-2,-2,-2], "override":true
JSON checker
Check

What does the "v2":[insert value] do? How do I use them?
Image
User avatar
Yakka Works
Inhabitant of a Conurbation
Reactions:
Posts: 412
Joined: 06 Jan 2020, 07:57
Location: Java-indonesia
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Cars

Post by Yakka Works » 29 Mar 2022, 11:40

:lua:
TheFennekin wrote: 29 Mar 2022, 04:11

Anyway, I offset the truck by using the "v2" (I don't remember what its actually for) and it worked but I concern this is not the correct way.

Code: Select all    Reset

"frames":[{"bmp":"JBPM_Scania.png","count":4,"h":22,"w":23}], "id":"$carfirebrigade00", "meta":{"tags":{"medic":{},"swat"{}}}, "speed":1.1, "type":"car", "v2":[-2,-2,-2,-2], "override":true
JSON checker
Check

What does the "v2":[insert value] do? How do I use them?
Something like hadle y for frames.
My plugins,up to date and it's free on my website. So check it out.
My website
Community/Creators Discord Server List
User avatar
TheFennekin
Inhabitant of a Galaxy Cluster
Reactions:
Posts: 2714
Joined: 24 Aug 2017, 09:17
Location: honsing around
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Cars

Post by TheFennekin » 29 Mar 2022, 13:41

Figured it out
Image
User avatar
TheFennekin
Inhabitant of a Galaxy Cluster
Reactions:
Posts: 2714
Joined: 24 Aug 2017, 09:17
Location: honsing around
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Cars

Post by TheFennekin » 30 Mar 2022, 11:43

Screenshot_20220330_182849_info.flowersoft.theotown.theotown.jpg
Failed lol

Code: Select all    Reset

[ { "id":"toyotaae86.trueno", "type":"car", "frames":[ {"bmp":"normal.png","count":4,"w":11,"h":8}], "v2":[0,0,0,0,0,0,0,0], "speed":1.3, "frames per variant" :8 }, { "id":"toyotaae86.trueno.drift", "type":"car", "frames per variant" :8, "frames":[ {"bmp":"drift.png","count":4,"w":11,"h":8}], "v2":[0,0,0,0,0,0,0,0], "speed":1 } ]
JSON checker
Check
Don't mind the offset vaules, it's just a test
You do not have the required permissions to view the files attached to this post.
Image
User avatar
TheFennekin
Inhabitant of a Galaxy Cluster
Reactions:
Posts: 2714
Joined: 24 Aug 2017, 09:17
Location: honsing around
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Cars

Post by TheFennekin » 30 Mar 2022, 11:44

I also made a drift mode (frames are intended to be offset) but I got this instead (for both cars)
Image
Ryk_Mak_2050
Settler
Reactions:
Posts: 4
Joined: 25 Dec 2021, 16:57

Re: Cars

Post by Ryk_Mak_2050 » 22 May 2022, 11:29

Can I have the code on Police Cars that works when I press the emergency button? I wanna have 7 Police Cars in my 3x3 Dense Big Police Station plugin that I currently working on.
Last edited by Ryk_Mak_2050 on 22 May 2022, 12:40, edited 3 times in total.
User avatar
THEMAX
Inhabitant of a Universe
Reactions:
Posts: 4311
Joined: 14 Sep 2017, 15:30
Location: Astrellia, UHAE
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Cars

Post by THEMAX » 06 Jun 2022, 17:13

I have been working on a car plugin this week-end, and I'd like to know if there is a way to create a group of cars (different models & different colours) for one category (TTT residential, T industrial, police and so on) to override vanilla cars with new ones. Is that something feasible
Emperor of Atlantean federated empire
Image
Founder state of Internationxal council
Leader of AEOY and steel pact
User avatar
CommanderABab
AB
Reactions:
Posts: 11263
Joined: 07 Jun 2016, 19:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Cars

Post by CommanderABab » 06 Jun 2022, 22:53

Yes
my avatar:
User avatar
CommanderABab
AB
Reactions:
Posts: 11263
Joined: 07 Jun 2016, 19:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Cars

Post by CommanderABab » 07 Jun 2022, 01:49

  1. You can see how to override cars at the start of this thread, but to add cars to certain types of buildings, use this instead.
    Screenshot_20220606-185227_Chrome.jpg
  2. :)
You do not have the required permissions to view the files attached to this post.
my avatar:
Ryk_Mak_2050
Settler
Reactions:
Posts: 4
Joined: 25 Dec 2021, 16:57

Re: Cars

Post by Ryk_Mak_2050 » 29 Jun 2022, 03:18

I have a code problem that is not working when adding some codes. And causes this. Please help.
Screenshot_20220615-155130_TheoTown.jpg
Here's my code:

[
{
"id": "$dense.pol.station.150",
"type": "police",
"author": "Plugin creator website 3.0 & Ryk_Mak_2050",
"width": 3,
"height": 3,
"frames": [
{
"bmp": "Dense Police Station.png"
}
],
"title": "Dense Police Station",
"text": "To accommodate your densely populated city. It has 7 Police Cars to patrol and respond to crime quickly.",
"price": 70000,
"influence police": 120,
"performance": true,
"car spawner": [{
"id": "$carpolice00",
"type": "car",
"frames": [{
"x": 896,
"y": 618,
"w": 32,
"h": 20,
"count": 4
}],
"frames per variant": 4,
"flag military": true,
"flag airport": true,
"flag emergency": true,
"chargeable": false,
"meta":{"tags":{"$carpolice00":{}}}
],
"monthly price": 150,
"build time": 47,
"power": -15,
"water": -15
}
]
You do not have the required permissions to view the files attached to this post.
Ryk_Mak_2050
Settler
Reactions:
Posts: 4
Joined: 25 Dec 2021, 16:57

Re: Cars

Post by Ryk_Mak_2050 » 10 Aug 2022, 03:26

CommanderABab wrote: 07 Jun 2022, 01:49
  1. You can see how to override cars at the start of this thread, but to add cars to certain types of buildings, use this instead.

    Screenshot_20220606-185227_Chrome.jpg
  2. :)
I've got the easy code to increase Police count in my Dense Police Station plugin. which is:

"service cars": <# of cars

Or in my case:

"service cars": 7

P.S. this reply was veerrry late hehe
Londoncuz II
Settler
Reactions:
Posts: 3
Joined: 11 Aug 2022, 12:17

Re: Cars

Post by Londoncuz II » 02 Nov 2022, 00:17

Hello? Yes, I'm trying to override existing vanilla police/fire/ambulance cars by using this in my code
"Id":"$carswat00"
And adding
"override":"true,
With my code but It wont work. Has the code been changed or am I doing it wrong?
Full code
[
{
"id":"$carswat00",
"v2":true,
"type":"bus",
"override":true,
"frames":[{bmp":"swatvan.png","w":15,"h":"14",count":4}]
}
]
User avatar
Bearbear76
Inhabitant of a Multiverse
Reactions:
Posts: 5701
Joined: 10 Feb 2017, 12:53
Location: L2 cache
Plugins: Showcase Store

Plugin Creator

Platform

Re: Cars

Post by Bearbear76 » 02 Nov 2022, 10:51

Londoncuz II wrote: 02 Nov 2022, 00:17 Hello? Yes, I'm trying to override existing vanilla police/fire/ambulance cars by using this in my code
"Id":"$carswat00"
And adding
"override":"true,
With my code but It wont work. Has the code been changed or am I doing it wrong?
Full code
[
{
"id":"$carswat00",
"v2":true,
"type":"bus",
"override":true,
"frames":[{bmp":"swatvan.png","w":15,"h":"14",count":4}]
}
]
I'm going to assume this is just a typo in the post. Do you get any errors? What do you mean when you say it doesn't work? :)

Code: Select all    Reset

[ { "id":"$carswat00", "v2":true, "type":"bus", "override":true, "frames":[{bmp":"swatvan.png","w":15,"h":"14",count":4}] } ]
JSON checker
Check
Just my opinion
retired
Londoncuz II
Settler
Reactions:
Posts: 3
Joined: 11 Aug 2022, 12:17

Re: Cars

Post by Londoncuz II » 07 Nov 2022, 19:47

Sorry should of explained better, the error I have when loading the json code is - "when loading "$carswat00", no value for X"
I double checked the code for the car and it should work as its identical to my other cars I have working in game without issue, that's why I came to the conclusion that theres and issue with the ID, unless I'm wrong.
User avatar
CommanderABab
AB
Reactions:
Posts: 11263
Joined: 07 Jun 2016, 19:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Cars

Post by CommanderABab » 07 Nov 2022, 21:38

You have no quote in front of bmp.
my avatar:
User avatar
burgernamn
Inhabitant of a Megacity
Reactions:
Posts: 173
Joined: 15 Apr 2022, 08:32
Plugins: Showcase Store

Plugin Creator

Platform

Re: Cars

Post by burgernamn » 04 Dec 2022, 05:16

is "v2" optional or is it required
im more active on my discord
Previous topicNext topic