How to write a plugin

Learn here how to create and use plugins.

Moderator: Plugin Moderators

User avatar
CommanderABab
Inhabitant of a Multiverse
Reactions:
Posts: 5883
Joined: Tue Jun 07, 2016 21:12
Plugins: Show
Version: Beta

Re: How to write a plugin

Post by CommanderABab » Tue Apr 10, 2018 10:40

Blyat009 wrote: โ†‘
Tue Apr 10, 2018 8:40
In /storage/emulated 0/TheoTown/plugins/hentaikusodokata/hentaikusodokata json: org json. JSONException: Unterminated object at character 130 of "id" shittypervertworker, type park, "author" Blyat009, "width" 100, "height" 100, frames" bmp hentaikusodokata.png,

Why was this error caused? :calc

Code: Select all

"id":"spworker",
"type":"park", 
"author":"putyournamehere", 
"width":100, 
"height":100, 
"frames":[
  {"bmp" :"hentaikusodokata.png"}
 ],
Is the correct form.

Error caused by lack of correct .json. :)
497497Currently using 497. 497 What's new? :)
Save bug squashed!
:)

Telegram - t.me/
๐Ÿ†Ž๏ธ๐Ÿ†Ž๏ธ๐Ÿ†Ž๏ธ๐Ÿ†Ž๏ธCommander๐Ÿ†Ž๏ธ๐Ÿ†Ž๏ธ

User avatar
Blyat009
Villager
Reactions:
Posts: 9
Joined: Tue Apr 03, 2018 2:29
Location: Nippon
Plugins: Show
Contact:

Re: How to write a plugin

Post by Blyat009 » Wed Apr 11, 2018 6:45

Thank you very much, my tongue was torn
Hello from Japan I am an amateur Japanese user. Please teach me :json

I am poor at English, so I will talk using translation. Do you like unnatural language?

https://plus.google.com/112257444632425179217
โ†‘If it's okay to contact me ;)

User avatar
Caliber
Metropolitan
Reactions:
Posts: 126
Joined: Wed Jan 24, 2018 3:48
Location: Somewhere in the Philippines
Plugins: Show
Version: Beta
Phone: SamsungGalaxyJ5 2015

Re: How to write a plugin

Post by Caliber » Sat May 12, 2018 1:23

How to save my Plugins to .plugin files?
Creator of the Aouie
Im Filipino
My First Plugin Boundary
My Second Plugin Decarbonator Tower

User avatar
CommanderABab
Inhabitant of a Multiverse
Reactions:
Posts: 5883
Joined: Tue Jun 07, 2016 21:12
Plugins: Show
Version: Beta

Re: How to write a plugin

Post by CommanderABab » Sat May 12, 2018 3:12

In the console, type

Code: Select all

export:"directory name of plugin"
It will be placed in the Theotown folder.
497497Currently using 497. 497 What's new? :)
Save bug squashed!
:)

Telegram - t.me/
๐Ÿ†Ž๏ธ๐Ÿ†Ž๏ธ๐Ÿ†Ž๏ธ๐Ÿ†Ž๏ธCommander๐Ÿ†Ž๏ธ๐Ÿ†Ž๏ธ

User avatar
Caliber
Metropolitan
Reactions:
Posts: 126
Joined: Wed Jan 24, 2018 3:48
Location: Somewhere in the Philippines
Plugins: Show
Version: Beta
Phone: SamsungGalaxyJ5 2015

Re: How to write a plugin

Post by Caliber » Sat May 12, 2018 8:32

I mean for making plugin must be .plugin not .json
Creator of the Aouie
Im Filipino
My First Plugin Boundary
My Second Plugin Decarbonator Tower

User avatar
Bearbear65
Inhabitant of a Universe
Reactions:
Posts: 4290
Joined: Fri Feb 10, 2017 14:53
Plugins: Show
Version: Beta
Phone: ASUS ZenPad 10 z300c

Re: How to write a plugin

Post by Bearbear65 » Sat May 12, 2018 10:13

Caliber wrote: โ†‘
Sat May 12, 2018 8:32
I mean for making plugin must be .plugin not .json
.plugin is an encrypted version of .zip
.json cannot be changed
ImageJust my opinion

User avatar
Caliber
Metropolitan
Reactions:
Posts: 126
Joined: Wed Jan 24, 2018 3:48
Location: Somewhere in the Philippines
Plugins: Show
Version: Beta
Phone: SamsungGalaxyJ5 2015

Re: How to write a plugin

Post by Caliber » Sat May 12, 2018 10:48

So how to make encrypted version of .zip a.k.a. .plugin?
Creator of the Aouie
Im Filipino
My First Plugin Boundary
My Second Plugin Decarbonator Tower

User avatar
JustAnyone
Feature manager
Reactions:
Posts: 2082
Joined: Sun Jul 23, 2017 12:45
Location: TheoTown command centre
Plugins: Show
Version: Beta
Phone: Xiaomi Redmi 3s

Re: How to write a plugin

Post by JustAnyone » Sat May 12, 2018 12:02

Read above
Founder and owner of DSA
TheoTown discord manager
Developer of Plugin Creator Application.

User avatar
KentuckyFriedChicken
Townsman
Reactions:
Posts: 57
Joined: Wed Jan 31, 2018 17:55
Plugins: Show
Version: Beta
Phone: 06603643410
Contact:

Re: How to write a plugin

Post by KentuckyFriedChicken » Wed Jun 13, 2018 14:24

Hi Lobby!
I think there are alot more Json codes.
like sounds when click or sounds.
May you post that in the forums or PM?

I BELIVE I CAN FLY
I BELIVE I CAN FLY

I BELIVE I CAN FLY

User avatar
JustAnyone
Feature manager
Reactions:
Posts: 2082
Joined: Sun Jul 23, 2017 12:45
Location: TheoTown command centre
Plugins: Show
Version: Beta
Phone: Xiaomi Redmi 3s

Re: How to write a plugin

Post by JustAnyone » Wed Jun 13, 2018 15:08


User avatar
Caliber
Metropolitan
Reactions:
Posts: 126
Joined: Wed Jan 24, 2018 3:48
Location: Somewhere in the Philippines
Plugins: Show
Version: Beta
Phone: SamsungGalaxyJ5 2015

Re: How to write a plugin

Post by Caliber » Thu Jun 14, 2018 5:10

JustAnyone wrote: โ†‘
Sat May 12, 2018 12:02
Read above
Give me example of making .plugin files I don't get it๐Ÿ˜ญ
Creator of the Aouie
Im Filipino
My First Plugin Boundary
My Second Plugin Decarbonator Tower

Matison55557
Inhabitant of a Universe
Reactions:
Posts: 4879
Joined: Mon Jul 04, 2016 18:49
Plugins: Show
Version: Beta

Re: How to write a plugin

Post by Matison55557 » Thu Jun 14, 2018 10:18

Open experimental features using settings.
Then in the menu a new console option will appear.
Write to the console

Code: Select all

export:"x"
replacing x with the directory of the plugin you want to encrypt to plugin file. Then confirm the command and the plugin file will appear in the main TheoTown directory. I hope I helped
Goodbye.

User avatar
Caliber
Metropolitan
Reactions:
Posts: 126
Joined: Wed Jan 24, 2018 3:48
Location: Somewhere in the Philippines
Plugins: Show
Version: Beta
Phone: SamsungGalaxyJ5 2015

Re: How to write a plugin

Post by Caliber » Fri Jun 15, 2018 5:13

Matison55557 wrote: โ†‘
Thu Jun 14, 2018 10:18
Open experimental features using settings.
Then in the menu a new console option will appear.
Write to the console

Code: Select all

export:"x"
replacing x with the directory of the plugin you want to encrypt to plugin file. Then confirm the command and the plugin file will appear in the main TheoTown directory. I hope I helped
its not work, the directory is on my Phone Storage
Whats wrong in this code
maybe you can share your exact example. :cry:

Code: Select all

export:"storage/emulated/0/Boundary by Caliber v1.2.zip"
Creator of the Aouie
Im Filipino
My First Plugin Boundary
My Second Plugin Decarbonator Tower

Matison55557
Inhabitant of a Universe
Reactions:
Posts: 4879
Joined: Mon Jul 04, 2016 18:49
Plugins: Show
Version: Beta

Re: How to write a plugin

Post by Matison55557 » Fri Jun 15, 2018 7:58

First, unzip it. Move the unpacked folder to the plugins directory.
Then you should be able to do

Code: Select all

export:"Boundary by Caliber v1.2"
Goodbye.

User avatar
CommanderABab
Inhabitant of a Multiverse
Reactions:
Posts: 5883
Joined: Tue Jun 07, 2016 21:12
Plugins: Show
Version: Beta

Re: How to write a plugin

Post by CommanderABab » Fri Jun 15, 2018 17:32

And you use the folder name, not the name of the json file.
497497Currently using 497. 497 What's new? :)
Save bug squashed!
:)

Telegram - t.me/
๐Ÿ†Ž๏ธ๐Ÿ†Ž๏ธ๐Ÿ†Ž๏ธ๐Ÿ†Ž๏ธCommander๐Ÿ†Ž๏ธ๐Ÿ†Ž๏ธ

ChocolateGuerreiroBr
Settler
Reactions:
Posts: 5
Joined: Sat Jun 16, 2018 16:24
Plugins: Show

Re: CommanderABab

Post by ChocolateGuerreiroBr » Sat Jun 16, 2018 18:36

How do I put 36x16 on Pixly?

User avatar
CommanderABab
Inhabitant of a Multiverse
Reactions:
Posts: 5883
Joined: Tue Jun 07, 2016 21:12
Plugins: Show
Version: Beta

Re: How to write a plugin

Post by CommanderABab » Sat Jun 16, 2018 18:49

A 1x1 tile would be 32x16 pixels.
Screenshot_20180616-121759.jpg
Screenshot_20180616-121759.jpg (5.41 KiB) Viewed 270 times
Screenshot_20180616-121826.jpg
Screenshot_20180616-121930.jpg
Screenshot_20180616-122035.jpg
497497Currently using 497. 497 What's new? :)
Save bug squashed!
:)

Telegram - t.me/
๐Ÿ†Ž๏ธ๐Ÿ†Ž๏ธ๐Ÿ†Ž๏ธ๐Ÿ†Ž๏ธCommander๐Ÿ†Ž๏ธ๐Ÿ†Ž๏ธ

ChocolateGuerreiroBr
Settler
Reactions:
Posts: 5
Joined: Sat Jun 16, 2018 16:24
Plugins: Show

Re: How to write a plugin

Post by ChocolateGuerreiroBr » Sat Jun 16, 2018 22:35

Why?
Attachments
Screenshot_2018-06-16-16-43-00.png
a rectangle
Screenshot_2018-06-16-17-34-22.png
different from this format, why?

User avatar
CommanderABab
Inhabitant of a Multiverse
Reactions:
Posts: 5883
Joined: Tue Jun 07, 2016 21:12
Plugins: Show
Version: Beta

Re: How to write a plugin

Post by CommanderABab » Sun Jun 17, 2018 3:21

Screenshot_20180616-204504.jpg
The colored pixels of this road texture section are the normal base of a 1x1 tile, 32 pixel wide x 16 pixel high. Only 15 pixels of the height should be used as the base, because the center of the height is only one pixel high. The center of the width is 4 pixels, two pixels each side of the center line.

Why should the texture be 32x16 when only 32x15 are used? Because, 15 as an odd number doesn't scale up well. :)
497497Currently using 497. 497 What's new? :)
Save bug squashed!
:)

Telegram - t.me/
๐Ÿ†Ž๏ธ๐Ÿ†Ž๏ธ๐Ÿ†Ž๏ธ๐Ÿ†Ž๏ธCommander๐Ÿ†Ž๏ธ๐Ÿ†Ž๏ธ

Post Reply

Return to โ€œTutorials and Documentationโ€

Who is online

Users browsing this forum: No registered users and 1 guest

๏ปฟ