Construction cranes

Learn here how to create and use plugins.

Moderator: KoalaGuy

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

Construction cranes

Post by Matison55557 » Fri Oct 27, 2017 18:19

How to make cranes that will spawn on construction sites when a building is being built:

A crane JSON consists of only the ID, type and frames.

Code: Select all

 
[
   {
          "id":"$sample_crane",
	  "type":"crane",
	  "frames":[{"bmp":"sample_crane.png","w":64,"h":32,"count":4}]
   }
]
The png file has 4 frames: 2 for the tower, and 2 for the actual crane structure (heading east and north-east).
As an example here's my custom crane image. The image is always 256x64.
matisoncrane.png
matisoncrane.png (1.97 KiB) Viewed 315 times
You can create your pictures based on this one, but keep in mind the original one was created by Theo Lobby.

Of course, cranes will only appear in easy, middle and hard modes.
410410
    graph.org/telegraph
🔸5️⃣5️⃣5️⃣5️⃣7️⃣🔸

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

Re: Construction cranes

Post by CommanderABab » Fri Oct 27, 2017 20:30

Matison55557 wrote:
Fri Oct 27, 2017 18:19
...How to make cranes that will spawn on construction sites when a building is being built:

A crane JSON consists of only the ID, type and frames.

Code: Select all

 
[
   {
          "id":"$sample_crane",
	  "type":"crane",
	  "frames":[{"bmp":"sample_crane.png","w":64,"h":32,"count":4}]
   }
]
...The png file has 4 frames: 2 for the tower, and 2 for the actual crane structure (heading east and north-east).
As an example here's my custom crane image. The image is always 256x64.
matisoncrane.png
You can create your pictures based on this one, but keep in mind the original one was created by Theo.

Of course, cranes will only appear in easy, middle and hard modes.
Thank you for sharing this! Does that crane replace one of the ingame ones, or does it add to the repertoire of cranes?
410 :bp 410Currently using beta 410. 410 What's new? Your plugin can change weather! :)
ImageTelegram - t.me/
🆎️🆎️🆎️🆎️Commander🆎️🆎️

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

Re: Construction cranes

Post by Matison55557 » Fri Oct 27, 2017 20:34

If you use a custom id, it will be added along the default ones. :)
410410
    graph.org/telegraph
🔸5️⃣5️⃣5️⃣5️⃣7️⃣🔸

User avatar
TheFennekin
Inhabitant of a Planet
Reactions:
Posts: 1486
Joined: Thu Aug 24, 2017 11:17
Location: Here
Plugins: Show
Version: Beta
Phone: Samsung Galaxy Tab4

Re: Construction cranes

Post by TheFennekin » Wed Nov 01, 2017 3:23

Thanks
410Bus routes!

The Fennekin in Dark Cyan?
Anyone?
:mine Plugin pack by me coming soon! :plugin

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

Re: Construction cranes

Post by Lobby » Thu Nov 30, 2017 22:13

The ingame crane has the id "$crane" and contains all available cranes. If you add one with an own id it will be picked with a chance of 50%. Cranes are almost hardcoded and have therefore no features :space
...Have a nice stay

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

Re: Construction cranes

Post by Matison55557 » Fri Dec 01, 2017 8:24

That's why the custom crane appear so often for me :lol:
410410
    graph.org/telegraph
🔸5️⃣5️⃣5️⃣5️⃣7️⃣🔸

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest