Okay, well that actually makes sense nowLobby wrote: ↑09 Jul 2017, 20:59For implementation reasons there's some binary logic behind it:
frame_index.png
Let's assume we have a fence at current tile. We then have to pick a frame dependent on the four neighbor tiles. To get the index of the frame we need we iterate over all neighbors and add the neighbor's value only to the index if there's a fence, too.
So, if no of the neighbors is a fence we use index = 0+0+0+0 = 0 (note that index 0 is the first frame)
If only neighbor north_east is a fence we use index = 0+2+0+0 = 2
If all neighbors are fence we use index = 1+2+4+8 = 15 (the last frame)
Now try again to see this pattern in the order:
fence.png
Fence Pack UPDATE by mdk_813 [Park]
Moderator: Plugin Moderators
- mdk_813
- Inhabitant of a Country
- Reactions:
- Posts: 857
- Joined: 16 Dec 2016, 02:38
- Location: Germany
- Plugins: Showcase Store
-
Platform
Re: Fence Pack by mdk_813 [Park]
- mdk_813
- Inhabitant of a Country
- Reactions:
- Posts: 857
- Joined: 16 Dec 2016, 02:38
- Location: Germany
- Plugins: Showcase Store
-
Platform
Re: Fence Pack by mdk_813 [Park]
@Lobby
I'm currently working on other packs, that include puzzle pieces, as well. For example a hedge for a modular park.
May I try and use the above json-file as a starting point for that? I mean, personally I'm used to puzzle pieces from playing SC4, but a linetool is obviously much more convenient.
P.S. I would also like to use the plain concrete texture from the game (in the park menu) for this park set, in order to make it blend in with the rest of the game. Would that be okay?
I'm currently working on other packs, that include puzzle pieces, as well. For example a hedge for a modular park.
May I try and use the above json-file as a starting point for that? I mean, personally I'm used to puzzle pieces from playing SC4, but a linetool is obviously much more convenient.
P.S. I would also like to use the plain concrete texture from the game (in the park menu) for this park set, in order to make it blend in with the rest of the game. Would that be okay?
- Lobby
- Developer
- Reactions:
- Posts: 3705
- Joined: 26 Oct 2008, 12:34
- Plugins: Showcase Store
- Version: Beta
-
Platform
Re: Fence Pack by mdk_813 [Park]
I made the json file for illustration, you're free to use it in any way you like
About the concrete it's as former member said: give us credit and it's ok
About the concrete it's as former member said: give us credit and it's ok
- mdk_813
- Inhabitant of a Country
- Reactions:
- Posts: 857
- Joined: 16 Dec 2016, 02:38
- Location: Germany
- Plugins: Showcase Store
-
Platform
Re: Fence Pack by mdk_813 [Park]
former member wrote: ↑20 Jul 2017, 17:38A quick suggestion
It doesn't rotate well.
When placed.
Also make them be placed like a wire
Please
Awesome job!
What exactly do you mean by "it doesn't rotate well"? As far as I've tested the set (my puzzle pieces) the fences rotate perfectly fine.
- mdk_813
- Inhabitant of a Country
- Reactions:
- Posts: 857
- Joined: 16 Dec 2016, 02:38
- Location: Germany
- Plugins: Showcase Store
-
Platform
Re: Fence Pack by mdk_813 [Park]
Ah sorry, I misunderstood then.former member wrote: ↑20 Jul 2017, 19:53Nevermind.
My suggestion is make it as the military fence so it can be placed like wires
Using the line tool property of plugins
Well, Lobby made a linetool from one of the fences (see one of the above posts). I tried to test it, but it didn't seem to work for me, probably because I was running an older version at that time and I have not tested it since...
So, I don't really know if I will turn it to a linetool plugin.
- NisekoKilla
- Inhabitant of a Megacity
- Reactions:
- Posts: 345
- Joined: 16 Nov 2016, 15:22
- Location: UK
- Plugins: Showcase Store
- Version: Beta
-
Platform
Re: Fence Pack by mdk_813 [Park]
these fences is good for military training grounds or farms..
- mdk_813
- Inhabitant of a Country
- Reactions:
- Posts: 857
- Joined: 16 Dec 2016, 02:38
- Location: Germany
- Plugins: Showcase Store
-
Platform
Re: Fence Pack UPDATE by mdk_813 [Park]
UPDATE
The fences have been turned into linetools and have a crime reductive influence now.
See first post above:
http://www.theotown.com/forum/viewtopic ... 165#p39165
The fences have been turned into linetools and have a crime reductive influence now.
See first post above:
http://www.theotown.com/forum/viewtopic ... 165#p39165
- CommanderABab
- AB
- Reactions:
- Posts: 11086
- Joined: 07 Jun 2016, 21:12
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
- TheSpaceFrontier
- Small-town resident
- Reactions:
- Posts: 31
- Joined: 13 May 2019, 08:42
- Location: Lost somewhere in space
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
Re: Fence Pack UPDATE by mdk_813 [Park]
May I use your linetool code as a template for my plug-in. @mdk_813
- mdk_813
- Inhabitant of a Country
- Reactions:
- Posts: 857
- Joined: 16 Dec 2016, 02:38
- Location: Germany
- Plugins: Showcase Store
-
Platform
Re: Fence Pack UPDATE by mdk_813 [Park]
Do you mean, you want the code as a model for your own linetool? Sure, go ahead. I used Lobby's tutorial to write it anyway.TheSpaceFrontier wrote: ↑14 Jun 2019, 15:23May I use your linetool code as a template for my plug-in. @mdk_813