How to write a plugin

Find tutorials, documentation, and resources for creating and using TheoTown plugins.
Previous topicNext topic
Chinasapling
Townsman
Reactions:
Posts: 48
Joined: 11 Nov 2018, 03:33
Plugins: Showcase Store

Platform

Re: How to write a plugin

Post by Chinasapling » 17 Nov 2018, 13:32

CommanderABab wrote: 17 Nov 2018, 12:01
Show
show quotes
Chinasapling wrote: 17 Nov 2018, 11:04
CommanderABab wrote: 17 Nov 2018, 02:17 What's going on here?
Show
you do use a comma here :)
Image
Screenshot_20181117-063130.jpg
thankyou thankyou thankyou
Chinasapling
Townsman
Reactions:
Posts: 48
Joined: 11 Nov 2018, 03:33
Plugins: Showcase Store

Platform

Re: How to write a plugin

Post by Chinasapling » 20 Nov 2018, 13:03

I don't know why the Chinese entering game in JSON will show the question mark.
User avatar
JustAnyone
Honorary Contributor
Reactions:
Posts: 3664
Joined: 23 Jul 2017, 10:45
Location: Easter Island
Plugins: Showcase Store

Platform

Re: How to write a plugin

Post by JustAnyone » 21 Nov 2018, 13:49

That's due to encoding.
:pickle:
Chinasapling
Townsman
Reactions:
Posts: 48
Joined: 11 Nov 2018, 03:33
Plugins: Showcase Store

Platform

Re: How to write a plugin

Post by Chinasapling » 21 Nov 2018, 14:02

JustAnyone wrote: 21 Nov 2018, 13:49 That's due to encoding.
Then what should I do?
Chinasapling
Townsman
Reactions:
Posts: 48
Joined: 11 Nov 2018, 03:33
Plugins: Showcase Store

Platform

Re: How to write a plugin

Post by Chinasapling » 26 Nov 2018, 13:13

CommanderABab wrote: 16 Jun 2018, 16:49 A 1x1 tile would be 32x16 pixels.

Screenshot_20180616-121759.jpg
Screenshot_20180616-121826.jpg
Screenshot_20180616-121930.jpg
Screenshot_20180616-122035.jpg
Can you send me the software for drawing pixel images on your mobile phone?very thankyou
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: How to write a plugin

Post by Bearbear76 » 06 Dec 2018, 21:56

Chinasapling wrote: 26 Nov 2018, 13:13
CommanderABab wrote: 16 Jun 2018, 16:49 A 1x1 tile would be 32x16 pixels.

Screenshot_20180616-121759.jpg
Screenshot_20180616-121826.jpg
Screenshot_20180616-121930.jpg
Screenshot_20180616-122035.jpg
Can you send me the software for drawing pixel images on your mobile phone?very thankyou
I would recommend pixly
Just my opinion
retired
Chinasapling
Townsman
Reactions:
Posts: 48
Joined: 11 Nov 2018, 03:33
Plugins: Showcase Store

Platform

Re: How to write a plugin

Post by Chinasapling » 07 Dec 2018, 09:03

Bearbear65 wrote: 06 Dec 2018, 21:56
Chinasapling wrote: 26 Nov 2018, 13:13
CommanderABab wrote: 16 Jun 2018, 16:49 A 1x1 tile would be 32x16 pixels.

Screenshot_20180616-121759.jpg
Screenshot_20180616-121826.jpg
Screenshot_20180616-121930.jpg
Screenshot_20180616-122035.jpg
Can you send me the software for drawing pixel images on your mobile phone?very thankyou
I would recommend pixly
Thank you very much
NagorniKarabikh
Settler
Reactions:
Posts: 6
Joined: 29 Dec 2018, 18:30
Plugins: Showcase Store

Re: How to write a plugin

Post by NagorniKarabikh » 17 Jan 2019, 15:05

Gives error
Unterminated object at character 182 of [
{
"id":"$sample.plugin.unique.id.res00",
"type":"residential",
"author":"NagorniKarabikh",
"width":1,
"height":1,
"frames":[{"png":"Romanian.png}],
"smoke":[{"id":"$smoke07","x":15,"y":-17}],
"level":1
}
]
:bc correcting the same as same whom is me?
:bc джорреджтинг тье саме ас саме вхом ис ме?
User avatar
CommanderABab
AB
Reactions:
Posts: 11263
Joined: 07 Jun 2016, 19:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: How to write a plugin

Post by CommanderABab » 17 Jan 2019, 16:13

NagorniKarabikh wrote: 17 Jan 2019, 15:05 Gives error
Unterminated object at character 182 of [
{
"id":"$sample.plugin.unique.id.res00",
"type":"residential",
"author":"NagorniKarabikh",
"width":1,
"height":1,
"frames":[{"png":"Romanian.png}],
"smoke":[{"id":"$smoke07","x":15,"y":-17}],
"level":1
}
]
You have:

Code: Select all

[
  {
    "id":"$sample.plugin.unique.id.res00",
    "type":"residential",
    "author":"NagorniKarabikh",
    "width":1,
    "height":1,
    "frames":[{"png":"Romanian.png}],
    "smoke":[{"id":"$smoke07","x":15,"y":-17}],
    "level":1
  }
]
Try:

Code: Select all

[
  {
    "id":"$sample.plugin.unique.id.res00",// use a different id
    "type":"residential",
    "author":"NagorniKarabikh",
    "width":1,
    "height":1,
    "frames":[{"bmp":"Romanian.png"}],
    "smoke":[{"id":"$smoke07","x":15,"y":-17}],
    "level":1
  }
]
Missing " after Romanian.png caused the error.
my avatar:
User avatar
JohnSallow
Townsman
Reactions:
Posts: 64
Joined: 29 Jan 2020, 16:45
Location: Buenos Aires, Argentina
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: How to write a plugin

Post by JohnSallow » 06 Feb 2020, 18:06

This question might be dumb, but how can I do to have two or more buildings in the same plugin?

I tried doing this...

Code: Select all

[
{
"id":"$nijocali.residentials.plugin_01_residential",
"type":"residential",
"author":"johnsallow",
"width":2,
"height":2,
"frames":[{"bmp":"nijocali_01.png"}],
"level":2
},
{
"id":"$nijocali.residentials.plugin_02_residential",
"type":"residential",
"author":"johnsallow",
"width":2,
"height":2,
"frames":[{"bmp":"nijocali_02.png"}],
"level":2
}
]
... but the second building doesn't appear in the plugin.

Yes, I'm very confused with it :calc
As I won't be online on TheoTown anymore, you can freely use my plugins' database if you want to, they are all of them uploaded in this forum, just remember to gime me credits before ;)
For any doubts, don't hesitate in sending me a Discord DM: johnsallow
User avatar
CommanderABab
AB
Reactions:
Posts: 11263
Joined: 07 Jun 2016, 19:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: How to write a plugin

Post by CommanderABab » 06 Feb 2020, 20:42

That should work.
It might be that the images are the same or similar, so you don't notice the second one.
my avatar:
User avatar
JohnSallow
Townsman
Reactions:
Posts: 64
Joined: 29 Jan 2020, 16:45
Location: Buenos Aires, Argentina
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: How to write a plugin

Post by JohnSallow » 07 Feb 2020, 00:29

CommanderABab wrote: 06 Feb 2020, 20:42 That should work.
It might be that the images are the same or similar, so you don't notice the second one.
Ok, I'll verify that. Thanks
As I won't be online on TheoTown anymore, you can freely use my plugins' database if you want to, they are all of them uploaded in this forum, just remember to gime me credits before ;)
For any doubts, don't hesitate in sending me a Discord DM: johnsallow
Triceymicy
Settler
Reactions:
Posts: 1
Joined: 29 Apr 2020, 15:41
Plugins: Showcase Store

Re: How to write a plugin

Post by Triceymicy » 25 Jun 2020, 18:20

Explain How To Start, Like A Button.
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: How to write a plugin

Post by TheFennekin » 26 Jun 2020, 13:50

Triceymicy wrote: 25 Jun 2020, 18:20 Explain How To Start, Like A Button.
What "like a button" do you mean? You can see different topics about how to make different kind of plugins.
Image
Lorange7.
Settler
Reactions:
Posts: 2
Joined: 06 Nov 2020, 06:55

Re: How to write a plugin

Post by Lorange7. » 06 Nov 2020, 21:36

is it possible to create a moving object?
if it is how can you do it?
Lorange7.
Settler
Reactions:
Posts: 2
Joined: 06 Nov 2020, 06:55

Re: How to write a plugin

Post by Lorange7. » 06 Nov 2020, 21:36

is it possible to create a moving object?
if it is how can you do it?
User avatar
CommanderABab
AB
Reactions:
Posts: 11263
Joined: 07 Jun 2016, 19:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: How to write a plugin

Post by CommanderABab » 06 Nov 2020, 22:38

Yes, what kind of moving object?
my avatar:
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: How to write a plugin

Post by TheFennekin » 10 Nov 2020, 01:21

Animations do the trick
Image
User avatar
CommanderABab
AB
Reactions:
Posts: 11263
Joined: 07 Jun 2016, 19:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: How to write a plugin

Post by CommanderABab » 10 Nov 2020, 02:16

Yes, but there can also be helicopters, planes, vehicles, (pedestrians), and somehow pumpkins. :)
my avatar:
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: How to write a plugin

Post by TheFennekin » 10 Nov 2020, 02:24

Wait how do I spawn pumpkins in the version 941? The other halloween stuff were removed I think...
Image
Previous topicNext topic