Upgrades (for buildings)

Learn here how to create and use plugins.

Moderator: KoalaGuy

Post Reply
User avatar
KoalaGuy
TheoTown Veteran
Reactions:
Posts: 5830
Joined: Mon Mar 06, 2017 21:45
Location: Pitcairn Islands
Plugins: Show
Version: Beta
Phone: SamsungGalaxyJ5 2017

Upgrades (for buildings)

Post by KoalaGuy » Wed Jun 21, 2017 21:00

In this topic, I'll show you how to add upgrades to your plugin. (Example: Waterslide upgrade for pool)

This is how an upgrade may look in a plugin:

Code: Select all

[
  {
    "id": "$sample.plugin.unique.id.park00",
    "type": "park",
    "author": "Lobby & theotheoderich",
    "width": 1,
    "height": 1,
    "frames": [
      {
        "bmp": "sample_bmp.png"
      }
    ],
    "influence park":40,    
    "upgrades":[
      {
        "id":"$sample.plugin.unique.id.park01"
        "frames":[
          {"bmp":"someupgrade_bmp"}
        ],
        "price":2000,
        "monthly price":20,
        "influence park":20
      }
    ]
  }
]
This will add "$sample.plugin.unique.id.park01" to our park. Upgrades can use same functions like normal buildings. Upgrade frame should have same resolution as their building, but height can be different.

Functions

"upgrades" - defines upgrades for the building


I hope this helped you, have fun with your upgrading! :D
My plugins will always be free, :bx to :bd
TheoTown Translator (Serbian)
Once Best Plugin Creator
(My plugins)
Contributor
Once top poster
Most reactions
Made some graphics for TheoTown
Made some smilies

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

Re: Upgrades

Post by Lobby » Wed Jun 21, 2017 21:08

Thank you :)

Some additional notes:
  • price, monthly price, water, power and influences will be added to corresponding values of the building when the upgrade is applied
  • You can also provide animations as for regular buildings, but no smoke
  • You can set "only one":true in an upgrade to state that no other upgrade may be active at the same time. We use this for example for the radio station were you can have selected only one program at the same time.
...Have a nice stay

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

Re: Upgrades (for buildings)

Post by CommanderABab » Wed Jun 21, 2017 22:25

Something new learned everyday!
410 :bp 410Currently using beta 410. 410 What's new? Your plugin can change weather! :)
ImageTelegram - t.me/
๐Ÿ†Ž๏ธ๐Ÿ†Ž๏ธ๐Ÿ†Ž๏ธ๐Ÿ†Ž๏ธCommander๐Ÿ†Ž๏ธ๐Ÿ†Ž๏ธ

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

Re: Upgrades (for buildings)

Post by CommanderABab » Wed Jun 21, 2017 22:27

Is there anything that upgrade won't work upon?
410 :bp 410Currently using beta 410. 410 What's new? Your plugin can change weather! :)
ImageTelegram - t.me/
๐Ÿ†Ž๏ธ๐Ÿ†Ž๏ธ๐Ÿ†Ž๏ธ๐Ÿ†Ž๏ธCommander๐Ÿ†Ž๏ธ๐Ÿ†Ž๏ธ

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

Re: Upgrades (for buildings)

Post by Lobby » Wed Jun 21, 2017 22:49

They should work on any building. Have you tried something specific?
...Have a nice stay

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

Re: Upgrades (for buildings)

Post by CommanderABab » Wed Jun 21, 2017 22:50

No, just asking. :)
410 :bp 410Currently using beta 410. 410 What's new? Your plugin can change weather! :)
ImageTelegram - t.me/
๐Ÿ†Ž๏ธ๐Ÿ†Ž๏ธ๐Ÿ†Ž๏ธ๐Ÿ†Ž๏ธCommander๐Ÿ†Ž๏ธ๐Ÿ†Ž๏ธ

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

Re: Upgrades (for buildings)

Post by CommanderABab » Wed Jun 21, 2017 23:29

Does the upgrade require a frame?
410 :bp 410Currently using beta 410. 410 What's new? Your plugin can change weather! :)
ImageTelegram - t.me/
๐Ÿ†Ž๏ธ๐Ÿ†Ž๏ธ๐Ÿ†Ž๏ธ๐Ÿ†Ž๏ธCommander๐Ÿ†Ž๏ธ๐Ÿ†Ž๏ธ

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

Re: Upgrades (for buildings)

Post by Lobby » Thu Jun 22, 2017 0:09

Actually not, you may write

Code: Select all

"frames":[]
...Have a nice stay

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

Re: Upgrades (for buildings)

Post by CommanderABab » Thu Jun 22, 2017 7:18

Lobby wrote: โ†‘
Wed Jun 21, 2017 22:49
They should work on any building. Have you tried something specific?
I have now!

It does indeed work with influences, price, monthly price.

It does not work with provide aspect.
410 :bp 410Currently using beta 410. 410 What's new? Your plugin can change weather! :)
ImageTelegram - t.me/
๐Ÿ†Ž๏ธ๐Ÿ†Ž๏ธ๐Ÿ†Ž๏ธ๐Ÿ†Ž๏ธCommander๐Ÿ†Ž๏ธ๐Ÿ†Ž๏ธ

User avatar
KINGTUT10101
1,000,000 inhabitants
Reactions:
Posts: 1437
Joined: Thu Jul 07, 2016 22:50
Location: 'Merica
Plugins: Show
Version: Beta
Phone: Moto Z Force Droid

Re: Upgrades (for buildings)

Post by KINGTUT10101 » Mon Jun 26, 2017 21:49

So if the values in the upgrade add onto the other values will negative numbers subtract from it?

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

Re: Upgrades (for buildings)

Post by Lobby » Mon Jun 26, 2017 23:18

Yes, that's how math works :bc
...Have a nice stay

User avatar
KINGTUT10101
1,000,000 inhabitants
Reactions:
Posts: 1437
Joined: Thu Jul 07, 2016 22:50
Location: 'Merica
Plugins: Show
Version: Beta
Phone: Moto Z Force Droid

Re: Upgrades (for buildings)

Post by KINGTUT10101 » Mon Jun 26, 2017 23:58

Just wondering if the game supported that.

User avatar
JustAnyone
Inhabitant of a Planet
Reactions:
Posts: 1429
Joined: Sun Jul 23, 2017 12:45
Location: Space Station 478B
Plugins: Show
Version: Beta
Phone: Xiaomi Redmi 3s

Re: Upgrades (for buildings)

Post by JustAnyone » Mon Aug 28, 2017 11:05

Hello,
I have A question to give:
"How to make add a little part of frame on full frame using upgrade?"
Example: Stadium/Main fire station.
President of Domkisas
Founder and owner of DSA
Official TheoTown discord manager
I will reply if someone says ANYONE
Developer of Plugin Creator.

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

Re: Upgrades (for buildings)

Post by CommanderABab » Mon Aug 28, 2017 17:13

Animation.
410 :bp 410Currently using beta 410. 410 What's new? Your plugin can change weather! :)
ImageTelegram - t.me/
๐Ÿ†Ž๏ธ๐Ÿ†Ž๏ธ๐Ÿ†Ž๏ธ๐Ÿ†Ž๏ธCommander๐Ÿ†Ž๏ธ๐Ÿ†Ž๏ธ

User avatar
JustAnyone
Inhabitant of a Planet
Reactions:
Posts: 1429
Joined: Sun Jul 23, 2017 12:45
Location: Space Station 478B
Plugins: Show
Version: Beta
Phone: Xiaomi Redmi 3s

Re: Upgrades (for buildings)

Post by JustAnyone » Tue Aug 29, 2017 16:27

CommanderABab wrote: โ†‘
Mon Aug 28, 2017 17:13
Animation.
Gimme code example.
President of Domkisas
Founder and owner of DSA
Official TheoTown discord manager
I will reply if someone says ANYONE
Developer of Plugin Creator.

User avatar
KoalaGuy
TheoTown Veteran
Reactions:
Posts: 5830
Joined: Mon Mar 06, 2017 21:45
Location: Pitcairn Islands
Plugins: Show
Version: Beta
Phone: SamsungGalaxyJ5 2017

Re: Upgrades (for buildings)

Post by KoalaGuy » Mon Jan 08, 2018 14:09

@Lobby
"preview frames" and "ordinal" definitions do not work for upgrades.
However, game will detect the ordinal and display it under upgrade description next to id (#ordinal), but won't change the order of upgrades in the menu.
My plugins will always be free, :bx to :bd
TheoTown Translator (Serbian)
Once Best Plugin Creator
(My plugins)
Contributor
Once top poster
Most reactions
Made some graphics for TheoTown
Made some smilies

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

Re: Upgrades (for buildings)

Post by Lobby » Mon Jan 08, 2018 18:20

True, thank you :bc
About ordinal for upgrades, it doesn't really matter as the order in which you define them will be used and you have access to change it.
...Have a nice stay

User avatar
khadafi laidi
Inhabitant of a Continent
Reactions:
Posts: 1219
Joined: Fri Dec 16, 2016 13:11
Location: ternate,indonesia
Plugins: Show
Version: Beta
Phone: Oppo neo 5

Re: Upgrades (for buildings)

Post by khadafi laidi » Tue Jan 09, 2018 0:13

Upgrade can use coordinate X and Y?
Fact about me:
-President of FINDONEZIA
-Plugin illustrator
-Motivator
-Comedian B)
-Indonesian translator (Stoped)
-I hate soccer :x
-Now i am the Wiki Editor

User avatar
Matison55557
Inhabitant of a Universe
Reactions:
Posts: 4213
Joined: Mon Jul 04, 2016 18:49
Plugins: Show
Version: Beta
Phone: Huawei P9 lite mini

Re: Upgrades (for buildings)

Post by Matison55557 » Tue Jan 09, 2018 1:03

It can, since the ingame buildings use it.
408408: Automatic disasters :bb
XD. sorry, no aizat so someone has to do the jobย ย ย  graph.org/telegraph
๐Ÿ”ธ5๏ธโƒฃ5๏ธโƒฃ5๏ธโƒฃ5๏ธโƒฃ7๏ธโƒฃ๐Ÿ”ธ

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest