Making a fence

Learn here how to create and use plugins.

Moderator: Plugin Moderators

TheoTownFan
Townsman
Reactions:
Posts: 52
Joined: Wed Jul 25, 2018 1:31
Location: Arkansas, USA
Plugins: Show
Version: Beta
Phone model: Samsung Galaxy J3

Platform

Making a fence

#1

Post by TheoTownFan » Fri Sep 13, 2019 3:22

Okay so I downloaded a Barbed Wire fence as a plugin and it's been chilling there in my decorations folder with kinda gets on my nerves. Now that we got the new beta update for fences my OCD with this plugin is really ticking me off, lol.

Here's some pictures to let you understand.
20190912_193751.jpg
20190912_193820.jpg
20190912_193820.jpg (37.56 KiB) Viewed 1561 times
This is the category I want the barbed wire plugin inside. But I don't know how!
20190912_193903.jpg
Can someone please help me. I have ES File Explorer so I don't mind with the coding as long as you guys can tell me the steps.

Thank you,
โ˜… Official TheoTown Idea Giver and Suggester โ˜…

User avatar
CommanderABab
AB
Reactions:
Posts: 8425
Joined: Tue Jun 07, 2016 21:12
Plugins: Show
Version: Beta

Platform

Plugin Creator

Re: Making a fence

#2

Post by CommanderABab » Fri Sep 13, 2019 6:16

Fence frames:
atm2.png
atm2.png (200 Bytes) Viewed 1554 times

Code: Select all

[{"id":"$atmfence",
	   "type":"fence",
	
	   "category":"$cat_fence00",
	
		"build time": 1,
		"price": 100,
		"removable": true,
		"frames": [{"bmp":"atm2.png","w":16,"count":2,"handle y":4}]
		"width": 1,
		"height": 1
		
},
{"id":"$useatmfence",
      
	   "category":"$cat_fence00",
		
		"price": 0,
		"removable": true,
		"needs road": false,
		
		"draw ground": true,
		"max count":16,
		"people":256,
		"type": "industrial",
		"level":3,
		"use fence":"$atmfence",
		"frames": [],
		"width": 1,
		"height": 1
		
}]
The fence is drawn at the bottom of the tile I believe. Let's give this a try. :)

So to get it in the desired category, use this line in the code:

Code: Select all

   "category":"$cat_fence00",
To get it to use the fence tool, it needs to be defined like $atmfence above.
826!826Currently using beta 826. 826 What's new? :)
diagonal road tool!!
:)

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

User avatar
CommanderABab
AB
Reactions:
Posts: 8425
Joined: Tue Jun 07, 2016 21:12
Plugins: Show
Version: Beta

Platform

Plugin Creator

Re: Making a fence

#3

Post by CommanderABab » Fri Sep 13, 2019 7:53

The fence tool uses two frames of width 16. Frame 0 is the left side, frame 1 is the right side.
826!826Currently using beta 826. 826 What's new? :)
diagonal road tool!!
:)

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

User avatar
JohnSallow
Small-town resident
Reactions:
Posts: 25
Joined: Wed Jan 29, 2020 18:45
Plugins: Show

Platform

Re: Making a fence

#4

Post by JohnSallow » Sun Feb 16, 2020 15:25

Can I put night animations in a fence? :calc
I rly don't care about anything at this height of my life...


Never mind

.

User avatar
CommanderABab
AB
Reactions:
Posts: 8425
Joined: Tue Jun 07, 2016 21:12
Plugins: Show
Version: Beta

Platform

Plugin Creator

Re: Making a fence

#5

Post by CommanderABab » Sun Feb 16, 2020 16:43

JohnSallow wrote: โ†‘
Sun Feb 16, 2020 15:25
Can I put night animations in a fence? :calc
No, I don't think so. I tried calling an animation from a fence. I did not see it being used.

Using null frames

Code: Select all

"frames":[]
for example in a fence results in a crash error when the game tries to draw it as it is expecting two bitmaps.

Code: Select all

"frames":[,]
works however.
826!826Currently using beta 826. 826 What's new? :)
diagonal road tool!!
:)

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

User avatar
Player_no_Zero
Small-town resident
Reactions:
Posts: 37
Joined: Mon May 06, 2019 9:18
Location: Somewhere in Manila, Philippines
Plugins: Show
Phone model: NASA's poor computer

Plugin Creator

Platform

Re: Making a fence

#6

Post by Player_no_Zero » Thu Apr 09, 2020 15:50

Wait what's "people" code?
I'VE BEEN A COMMANDER BEFORE. EVERYTHING GOES BY THE DETAIL.


CONTECT ME FIRST BEFORE YOU CAN USE MY WORKS.
NOT ALL OF MY WORKS ARE FREE TO USE FOR YOUR OWN GOOD.

User avatar
CommanderABab
AB
Reactions:
Posts: 8425
Joined: Tue Jun 07, 2016 21:12
Plugins: Show
Version: Beta

Platform

Plugin Creator

Re: Making a fence

#7

Post by CommanderABab » Thu Apr 09, 2020 16:03

It's the same as "workers".
826!826Currently using beta 826. 826 What's new? :)
diagonal road tool!!
:)

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

User avatar
AntarcticTreay
Villager
Reactions:
Posts: 16
Joined: Thu Nov 07, 2019 8:06
Plugins: Show
Version: Beta
Phone model: Moto e5 play

Platform

Plugin Creator

Re: Making a fence

#8

Post by AntarcticTreay » Fri Apr 10, 2020 21:26

Value?
SUPREME DICTATOR OF THE A.M.M.R FEDERATION
WELCOME EVERYONE

User avatar
CommanderABab
AB
Reactions:
Posts: 8425
Joined: Tue Jun 07, 2016 21:12
Plugins: Show
Version: Beta

Platform

Plugin Creator

Re: Making a fence

#9

Post by CommanderABab » Fri Apr 10, 2020 22:55

Something sensible for the size of the building. :)

1x1 buildings are automatically limited.
826!826Currently using beta 826. 826 What's new? :)
diagonal road tool!!
:)

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

Post Reply Previous topicNext topic

Return to โ€œTutorials and Documentationโ€

Who is online

Users browsing this forum: No registered users and 1 guest

๏ปฟ