How to write a plugin

Find tutorials, documentation, and resources for creating and using TheoTown plugins.
Previous topicNext topic
User avatar
たどころこうじ
Settler
Reactions:
Posts: 5
Joined: 25 Aug 2021, 15:22

Re: How to write a plugin

Post by たどころこうじ » 08 Oct 2021, 19:41

The process went well until I got the JSON file, but I can't figure out how to copy it to the Theotown / plugins folder, so I can't build my own plugins in town at all... By the way, I have an iPhone and an Android.
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 » 21 Mar 2022, 10:03

Naufhal wrote: 21 Mar 2022, 09:45 Lobby. How to see the width and height in building while creating plugin?
Each tile is about 32px wide in a canvas. 1×1= 32, 2×2 = 64, 3×3 = 96, 4×4 = 128 etc...
Image
User avatar
rtobby
Inhabitant of a Megacity
Reactions:
Posts: 170
Joined: 23 May 2018, 20:18
Location: Lithuania
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: How to write a plugin

Post by rtobby » 21 Mar 2022, 20:27

Naufhal wrote: 21 Mar 2022, 09:45 Lobby. How to see the width and height in building while creating plugin?
Width and height are the templates you make your building on! If you choose a 2x2 template, the width and height will be equal to 2. 4x4 template - w and h are 4.
Storing the plugin moderators, plugining the moderator store and moderating the plugin store since 2022!
User avatar
rtobby
Inhabitant of a Megacity
Reactions:
Posts: 170
Joined: 23 May 2018, 20:18
Location: Lithuania
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: How to write a plugin

Post by rtobby » 14 Apr 2022, 11:06

Naufhal wrote: 13 Apr 2022, 09:05
The26 wrote: 21 Mar 2022, 20:27
Naufhal wrote: 21 Mar 2022, 09:45 Lobby. How to see the width and height in building while creating plugin?
Width and height are the templates you make your building on! If you choose a 2x2 template, the width and height will be equal to 2. 4x4 template - w and h are 4.
No angry the26.
>:(
Storing the plugin moderators, plugining the moderator store and moderating the plugin store since 2022!
SunAJ01
Settler
Reactions:
Posts: 2
Joined: 12 Jan 2022, 18:07

Plugin Creator

Platform

Re: How to write a plugin

Post by SunAJ01 » 28 Apr 2022, 19:56

Hi, I just created my first plugin. Though, it looks nice and functions more like ordinary commercial building but I want it to function like banks to deposit money, take loans and make monthly gains as well but I can't figure it out.
Any help?
TheoTown-PluginFrames-AkwaSavings.png
Tekiao_22-04-28_20.42.48.png
:android
You do not have the required permissions to view the files attached to this post.
Passion makes me do awesome stuffs.
...and thinking of :space :wink:
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 » 29 Apr 2022, 00:47

1. You probably can using Lua
2. I suggest improving your building first. Wrong and missing shadows, add shading and textures etc.
Image
SunAJ01
Settler
Reactions:
Posts: 2
Joined: 12 Jan 2022, 18:07

Plugin Creator

Platform

Re: How to write a plugin

Post by SunAJ01 » 29 Apr 2022, 02:23

TheFennekin wrote: 29 Apr 2022, 00:47 1. You probably can using Lua
2. I suggest improving your building first. Wrong and missing shadows, add shading and textures etc.
Thanks.
Any guide on how to add to missing shadows?
Passion makes me do awesome stuffs.
...and thinking of :space :wink:
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 » 30 Apr 2022, 04:37

Image
DisconnectedSkin12
Settler
Reactions:
Posts: 2
Joined: 15 Jan 2022, 14:01

Re: How to write a plugin

Post by DisconnectedSkin12 » 04 May 2022, 17:01

When I tried to download my first plugin from the plugin store on my phone, I got a loading error message saying:

java.lang.IllegalStateException: When loading "Small_Synagogue_DiSk12.h": No value for x

Does anyone know what this means and what I should do to resolve this?
You do not have the required permissions to view the files attached to this post.
User avatar
Mako1137
Metropolitan
Reactions:
Posts: 122
Joined: 05 Dec 2021, 20:31
Location: Sacramento, CA
Plugins: Showcase Store

Platform

Re: How to write a plugin

Post by Mako1137 » 12 Aug 2022, 02:07

What does PPA/PPAPH on the debug mean?
The Shark who eats Sea Pickles (:
User avatar
Mako1137
Metropolitan
Reactions:
Posts: 122
Joined: 05 Dec 2021, 20:31
Location: Sacramento, CA
Plugins: Showcase Store

Platform

Re: How to write a plugin

Post by Mako1137 » 12 Aug 2022, 16:06

The Shark who eats Sea Pickles (:
User avatar
Kulche
Inhabitant of a Continent
Reactions:
Posts: 1194
Joined: 07 Jun 2017, 18:28
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: How to write a plugin

Post by Kulche » 12 Aug 2022, 17:05

Please stop pinging the admins for unimportant reasons.
get yoked!!
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 » 14 Aug 2022, 17:37

Clearly, it means pen pineapple apple pen H
JackIscool
Settler
Reactions:
Posts: 1
Joined: 30 Apr 2023, 09:33

Re: How to write a plugin

Post by JackIscool » 30 Apr 2023, 10:29

Yeah I did it wooo
Adiwira
Settler
Reactions:
Posts: 2
Joined: 14 Oct 2021, 14:36

Re: How to write a plugin

Post by Adiwira » 16 Jun 2023, 03:30

I want to make a plugin, but it seems difficult
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 » 16 Jun 2023, 13:29

Adiwira wrote: 16 Jun 2023, 03:30 I want to make a plugin, but it seems difficult
Making plugins is quite easy for simple buildings.
You can use websites like https://pca.theotown.com/ to write the code for you. All you have to do now is create
the texture which can be slightly tricky at first but also quite fun if I say so. :)
Just my opinion
retired
Caistrophytum
Settler
Reactions:
Posts: 4
Joined: 23 Jul 2023, 06:13

Re: How to write a plugin

Post by Caistrophytum » 23 Jul 2023, 15:58

What do I write when I want to put night animations / rotations of the building for day and night?
Frodo01
Settler
Reactions:
Posts: 5
Joined: 13 Sep 2020, 19:25

Re: How to write a plugin

Post by Frodo01 » 28 Sep 2023, 09:38

Hello everyone, I have been struggling with one problem for a long time, is there a way to remove road decorations if there is a certain car at its coordinates?
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 » 28 Sep 2023, 16:04

Frodo01 wrote: 28 Sep 2023, 09:38 Hello everyone, I have been struggling with one problem for a long time, is there a way to remove road decorations if there is a certain car at its coordinates?
#acertaincar
my avatar:
Frodo01
Settler
Reactions:
Posts: 5
Joined: 13 Sep 2020, 19:25

Re: How to write a plugin

Post by Frodo01 » 29 Sep 2023, 07:52

CommanderABab wrote: 28 Sep 2023, 16:04
Frodo01 wrote: 28 Sep 2023, 09:38 Hello everyone, I have been struggling with one problem for a long time, is there a way to remove road decorations if there is a certain car at its coordinates?
#acertaincar
Sorry, but I didn’t understand your answer, I clicked on the hashtag, but only one match appeared and is this your comment or do you mean something else?
Last edited by Frodo01 on 29 Sep 2023, 08:19, edited 1 time in total.
Previous topicNext topic