Cars

Learn here how to create and use plugins.

Moderator: Plugin Moderators

User avatar
rjroldan1
Inhabitant of a Conurbation
Reactions:
Posts: 463
Joined: Mon Jul 17, 2017 16:16
Location: philippines
Plugins: Show
Version: Beta
Contact:

Platform

Plugin Creator

Re: Cars

#21

Post by rjroldan1 » Sun Jul 30, 2017 15:06

Lobby wrote:
Tue Jul 25, 2017 18:59
Here some graphics:
yacht_green.pngyacht_blue.pngship.png
As always, please give me and theo credit when you reuse it for a plugin. Don't use it outside of TheoTown without permission.

The json looks fairly simple. Use ship as type and provide at least 4 frames. For the yacht it may looks like

Code: Select all

[
  {
    "id":"$shipyacht00",
    "type":"ship",
    "frames":[
      {"bmp":"yacht_green.png","w":17,"h":15,"count":4,"handle x":8,"handle y":12},
      {"bmp":"yacht_blue.png","w":17,"h":15,"count":4,"handle x":8,"handle y":12}
    ]
  }
]
Here we provide 8 frames, 4 for each variant of the yacht. The game will pick a variant randomly when spawning a ship. Move frames using handle x and handle y until it looks good. Setting them correctly is difficult, so do it by trial and error.

If your ship is longer than one tile use

Code: Select all

"length":2,
to indicate this. However, the longer the ship the more likely are graphic issues. That's why we never added the long container ships.

Spawning ships from a building is fairly simple. It looks similar to car spawning before car spawners were added:

Code: Select all

"ships":["$shipyacht00"],
"ship count":4,
"ship radius":16,
"ship radius" is currently ignored. Use it for the future.


How to make customize ship?
Silent

President of Metropole region

____________________________________________________________________________________
I LOVE PHILIPPINES

Barky
TheoTown Cartographer
Reactions:
Posts: 2074
Joined: Mon Apr 17, 2017 22:13
Location: Ireland
Plugins: Show

Platform

Re: Cars

#22

Post by Barky » Sun Jul 30, 2017 15:21

Please don't quote where not nessesary

User avatar
rjroldan1
Inhabitant of a Conurbation
Reactions:
Posts: 463
Joined: Mon Jul 17, 2017 16:16
Location: philippines
Plugins: Show
Version: Beta
Contact:

Platform

Plugin Creator

Re: Cars

#23

Post by rjroldan1 » Sun Jul 30, 2017 15:24

Sorry can you help me
Silent

President of Metropole region

____________________________________________________________________________________
I LOVE PHILIPPINES

User avatar
CommanderABab
AB
Reactions:
Posts: 7707
Joined: Tue Jun 07, 2016 21:12
Plugins: Show
Version: Beta

Platform

Plugin Creator

Re: Cars

#24

Post by CommanderABab » Sun Jul 30, 2017 16:07

You would draw your ships in the four directions like in the example, all the same width and the same height. Then use those values for the w and h in the frames statement(s).
759!759Currently using beta 759. 759 What's new? :)
way to make fence!!
:)

Telegram - t.me/
🆎️🆎️🆎️🆎️Commander🆎️🆎️

User avatar
rjroldan1
Inhabitant of a Conurbation
Reactions:
Posts: 463
Joined: Mon Jul 17, 2017 16:16
Location: philippines
Plugins: Show
Version: Beta
Contact:

Platform

Plugin Creator

Re: Cars

#25

Post by rjroldan1 » Wed Aug 09, 2017 13:12

can you please thread the limo id
Silent

President of Metropole region

____________________________________________________________________________________
I LOVE PHILIPPINES

User avatar
Lobby
Developer
Reactions:
Posts: 3345
Joined: Sun Oct 26, 2008 12:34
Plugins: Show
Version: Beta
Phone model: S7 edge

Platform

Re: Cars

#26

Post by Lobby » Wed Aug 09, 2017 16:21

It's just $carres02 (both, black and white limo)
...Have a nice stay

User avatar
rjroldan1
Inhabitant of a Conurbation
Reactions:
Posts: 463
Joined: Mon Jul 17, 2017 16:16
Location: philippines
Plugins: Show
Version: Beta
Contact:

Platform

Plugin Creator

Re: Cars

#27

Post by rjroldan1 » Wed Aug 09, 2017 17:14

Lobby wrote:
Wed Aug 09, 2017 16:21
It's just $carres02 (both, black and white limo)
thank you lobby
Silent

President of Metropole region

____________________________________________________________________________________
I LOVE PHILIPPINES

User avatar
actemendes
Metropolitan
Reactions:
Posts: 131
Joined: Fri Jan 20, 2017 16:53
Location: Russia
Plugins: Show

Platform

Re: Cars

#28

Post by actemendes » Sun Aug 20, 2017 21:59

Is there any code that allows helicopters to spawn, including the animation of their take-off and landing. For example, as in a large fire department
Do not bend under a volatile world,
One day he will bend under us.Theo of tomorrow in developing.

User avatar
Lobby
Developer
Reactions:
Posts: 3345
Joined: Sun Oct 26, 2008 12:34
Plugins: Show
Version: Beta
Phone model: S7 edge

Platform

Re: Cars

#29

Post by Lobby » Tue Aug 22, 2017 17:36

No.

The question is, what should such an helicopter do? Just fly around a bit? I think it's not that much work to add it, but I currently have no time to.
...Have a nice stay

User avatar
actemendes
Metropolitan
Reactions:
Posts: 131
Joined: Fri Jan 20, 2017 16:53
Location: Russia
Plugins: Show

Platform

Re: Cars

#30

Post by actemendes » Tue Aug 22, 2017 22:22

Lobby wrote:
Tue Aug 22, 2017 17:36
No.

The question is, what should such an helicopter do? Just fly around a bit? I think it's not that much work to add it, but I currently have no time to.
In general, sending a helicopter from point A to point B. This is the main one. Of course, you can do it the way you said. Fly around the point. I do not think it's complicated. In addition, such a thing already exists in the game. Is there a way to access all the codes of the game yourself? I would like to study some mechanics, if possible
Do not bend under a volatile world,
One day he will bend under us.Theo of tomorrow in developing.

User avatar
Lobby
Developer
Reactions:
Posts: 3345
Joined: Sun Oct 26, 2008 12:34
Plugins: Show
Version: Beta
Phone model: S7 edge

Platform

Re: Cars

#31

Post by Lobby » Tue Aug 22, 2017 23:29

The code isn't open source, so there's no easy access. However, I may leak some code files for better (or less) understanding.
...Have a nice stay

User avatar
Josh
Graphic designer
Reactions:
Posts: 2214
Joined: Sat Mar 11, 2017 19:20
Location: The Netherlands
Plugins: Show
Version: Beta
Phone model: Iphone 7

Platform

Plugin Creator

Re: Cars

#32

Post by Josh » Wed Aug 23, 2017 9:14

It sounds interesting, I also would like to know more about codes
Proud TheoTown player sinds update 1.1.50

Creator of Aldorria, Covinton Empire, West Country, Sunnydale

Save nature, before it kills you🌲

User avatar
Lobby
Developer
Reactions:
Posts: 3345
Joined: Sun Oct 26, 2008 12:34
Plugins: Show
Version: Beta
Phone model: S7 edge

Platform

Re: Cars

#33

Post by Lobby » Wed Aug 23, 2017 11:15

https://github.com/LobbyDivinus/TheoTown-public

Without proper documentation. FlyingTrafficHandler handles things like helicopters, rockets, and airplanes. The folder flyingobjectcontrollers contains the corresponding controllers for each type of flying object (for plugins a generic helicopter controller would be needed similar to the implementation for cars).
...Have a nice stay

User avatar
Josh
Graphic designer
Reactions:
Posts: 2214
Joined: Sat Mar 11, 2017 19:20
Location: The Netherlands
Plugins: Show
Version: Beta
Phone model: Iphone 7

Platform

Plugin Creator

Re: Cars

#34

Post by Josh » Wed Aug 23, 2017 16:15

@Lobby do you know a good & fast way to learn java?
Proud TheoTown player sinds update 1.1.50

Creator of Aldorria, Covinton Empire, West Country, Sunnydale

Save nature, before it kills you🌲

Barky
TheoTown Cartographer
Reactions:
Posts: 2074
Joined: Mon Apr 17, 2017 22:13
Location: Ireland
Plugins: Show

Platform

Re: Cars

#35

Post by Barky » Wed Aug 23, 2017 16:21

There is no fast way to learn programming. It takes time and effort. I'm not very good at self-teaching myself so I'm waiting until I can learn a coding launguage in school.

User avatar
Josh
Graphic designer
Reactions:
Posts: 2214
Joined: Sat Mar 11, 2017 19:20
Location: The Netherlands
Plugins: Show
Version: Beta
Phone model: Iphone 7

Platform

Plugin Creator

Re: Cars

#36

Post by Josh » Wed Aug 23, 2017 16:23

Barky wrote:
Wed Aug 23, 2017 16:21
There is no fast way to learn programming. It takes time and effort. I'm not very good at self-teaching myself so I'm waiting until I can learn a coding launguage in school.
Yes, I know there is no fast way, but maybe Lobby has some tips
Proud TheoTown player sinds update 1.1.50

Creator of Aldorria, Covinton Empire, West Country, Sunnydale

Save nature, before it kills you🌲

User avatar
Lobby
Developer
Reactions:
Posts: 3345
Joined: Sun Oct 26, 2008 12:34
Plugins: Show
Version: Beta
Phone model: S7 edge

Platform

Re: Cars

#37

Post by Lobby » Wed Aug 23, 2017 18:11

Doing something meaningful can be motivating in learning a language, although you will probably abort most of your starting projects. When I learned coding there were not coding video tutorials for it like you find them nowadays on platforms like Youtube. I'm not sure about that, but they are probably also really helpful.
...Have a nice stay

User avatar
JustAnyone
Junior Developer
Reactions:
Posts: 2620
Joined: Sun Jul 23, 2017 12:45
Location: No idea either
Plugins: Show

Plugin Creator

Platform

Re: Cars

#38

Post by JustAnyone » Sat Sep 23, 2017 11:50

Lobby, could I get swat car Texture and modify it?

User avatar
Lobby
Developer
Reactions:
Posts: 3345
Joined: Sun Oct 26, 2008 12:34
Plugins: Show
Version: Beta
Phone model: S7 edge

Platform

Re: Cars

#39

Post by Lobby » Sat Sep 23, 2017 12:20

Sure :img
swat.png
swat.png (618 Bytes) Viewed 1828 times
...Have a nice stay

Jesus
Villager
Reactions:
Posts: 13
Joined: Wed Jul 26, 2017 21:22
Plugins: Show
Version: Beta

Platform

Re:Cars

#40

Post by Jesus » Tue Sep 26, 2017 0:01

Lobby wrote:
Wed May 03, 2017 21:28
It's just $cartv00 :)
can i get the texture of the tv car?

Post Reply Previous topicNext topic

Return to “Tutorials and Documentation”