Page 1 of 1

Autofiller (filling entities)

Posted: Tue May 01, 2018 10:33 pm
by Pulsar
So today I came up with an amazing solution for mappers who map with entities and then struggle for ages making design. Of course this will not make a whole map for you (unless you use automappers for everything), but it's a huge time saver, especially when you have a huge map with some randomly shaped parts. And it works for every map.



Autofiller is a set of simple rules (that filter out common entities) combined with an empty tileset. Yep that's all.. If you use it right, you can pretty much say farewell to entity bugs and save hours.



So how does this work?
TutorialShow
Place files:
- autofiller.rules in data -> editor
- autofiller.png in data -> mapres



As an example I will use Flux 2, but keep in mind that you should not use autofiller on partially designed layers, cause you might not benefit from it... I mean you could always make additional layers, use autofiller there and then copy parts that are designed to those layers, but eh nevermind, I will leave that to you.



So I'll get rid of hookthrough from entire map and bring it back quickly with autofiller just to show you how it's done.
1.png

Add autofiller.png as an external image. It will be used only to enable automappers, so don't embed it. Actually you can now forget that this image is there (jao will cry but who cares).
2.png

Whichever entity you're trying to fill now, set its image to autofiller, this is temporary. In my case it's hookthrough.
3.png

Now you need to select all tiles from Game layer. There is a simple trick for that.
Scroll map to bottom-right corner.
4.png

Hold space bar and select top-left tile, then release space bar while still holding mouse button. It will create selection from top-left corner of your map. Then you just drag cursor to bottom-right corner, release mouse button and whole game layer is selected.
5.png
6.png

Now you just press Refocus to go back to top-left corner, select your layer of the entity you want to fill (hookthrough for me) and paste there everything (just click on top-left corner of your map and make sure everything is aligned with entities).
7.png
Cursor's gone... It should be in top-left corner.
Note: You can do above steps for all layers at once. Then it's even faster.


Now you should see that all entities are covered with this autofiller tileset.
8.png

Ok time for a trick. You need to filter out the entity you want to fill, in my case it's hookthrough. I prepared a set of most common entities:
(A) Air -> empty tiles
(G) Hookable
(G) Unhookable
(G) Hookthrough
(G) Kill
(G) Freeze
(G) Unfreeze
(G) Deep
(G) Undeep
(G) Walljump
(G) Stopper -> all stoppers
(G) Other Features -> endless, no hammer, solo, no collision, infinite jumps, jetpack, no hook
(G) Start/Finish
(T) Blue Teleport -> from and cfrm
(T) Red Teleport -> from and cfrm
(S) Laser Source -> turrets, pulling lasers, doors
(S) Activate -> activators
(S) Deactivate -> deactivators

(G) -> Game layer
(T) -> Tele layer
(S) -> Switch layer
You can always add more if you need more.
9.png
10.png

After that you might want to set default filler i.e. set which tile of your actual tileset should be a filler. It's especially useful for some custom freeze/unhook tilesets etc. To do that you need to go to autofiller.rules and either edit index for Default Filler or add a new rule.
...

[Default Filler]
Index 1
Pos 0 0 FULL


If you use some tilesets very often I'd suggest to add a new rule, something like:
...

[Default Filler]
Index 1
Pos 0 0 FULL

[Default Filler basic_freeze]
Index 4
Pos 0 0 FULL

[Default Filler ddnet_tiles]
Index 18
Pos 0 0 FULL

Then for entities like freeze, teleport, unfreeze etc. You can simply click on Default Filler basic_freeze and for start line and finish line Default Filler ddnet_tiles. This might be better than constantly changing index value for every tileset you use.
Note: remember to reload map after changing autofiller.rules in order to update automapper.

In my case index 1 is good so I can just use Default Filler.
11.png
12.png

Now I bring back my real tileset for hookthrough. And that's pretty much it.
13.png

I also used automapper for this map to randomize tiles a little and after that it's ready.
14.png


So in the end, in like 30sec I have designed every hookthrough tile on my map and I'm 100% sure I didn't miss anything.
15.png
16.png
17.png
Now I could do it with every other layer and fill every entity just as quick.
autofiller.pngShow
autofiller.png
autofiller.rules
(1.1 KiB) Downloaded 17 times

Re: Autofiller (filling entities)

Posted: Tue May 01, 2018 10:50 pm
by lola
I didn't understand a word but sounds cool!

Re: Autofiller (filling entities)

Posted: Wed May 02, 2018 7:50 am
by triki
It was hard but i got it.
+if u need need smth change on ur map it is faster

Re: Autofiller (filling entities)

Posted: Wed May 02, 2018 8:31 am
by Jimmy Jazz The 1st
Awesome work Pulsar!

Re: Autofiller (filling entities)

Posted: Wed May 02, 2018 9:41 am
by meew'
sadly only works on simple designs

Re: Autofiller (filling entities)

Posted: Wed May 02, 2018 9:59 am
by Pulsar
Not really. No matter what design you have, you need to mark entites anyway and doing it by hand takes some time.

Re: Autofiller (filling entities)

Posted: Wed May 02, 2018 10:12 am
by Im 'corneum
i have been waiting for this

Re: Autofiller (filling entities)

Posted: Wed May 02, 2018 10:22 am
by Shishigami
Im 'corneum wrote:
Wed May 02, 2018 10:12 am
i have been waiting for this
Time to increase the maximum number of maps in the section to 10 :?: :lol:

Re: Autofiller (filling entities)

Posted: Thu May 03, 2018 7:58 am
by Konsti
Mapping gametiles before design > stucking in placing entities on a shit annoying design

Nice work anyways but i hope it wont end in more maps from u