Autofiller (filling entities)

Read tips and guides about teeworlds-related subjects (mapping, compiling, ..).
Post Reply
Pulsar
Posts: 72
Joined: Fri Jun 09, 2017 2:39 pm

Autofiller (filling entities)

Post by Pulsar »

Autofiller (filling entities)
written 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
1.png (403.41 KiB) Viewed 11117 times

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
2.png (100.29 KiB) Viewed 11117 times

Whichever entity you're trying to fill now, set its image to autofiller, this is temporary. In my case it's hookthrough.
3.png
3.png (348.32 KiB) Viewed 11117 times

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
4.png (383.35 KiB) Viewed 11117 times

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
5.png (452 KiB) Viewed 11117 times
6.png
6.png (364.73 KiB) Viewed 11117 times

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).
Cursor's gone... It should be in top-left corner.
Cursor's gone... It should be in top-left corner.
7.png (556.01 KiB) Viewed 11117 times
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
8.png (453.32 KiB) Viewed 11117 times

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
9.png (452.4 KiB) Viewed 11117 times
10.png
10.png (412.47 KiB) Viewed 11117 times

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
11.png (423.5 KiB) Viewed 11117 times
12.png
12.png (412.59 KiB) Viewed 11117 times

Now I bring back my real tileset for hookthrough. And that's pretty much it.
13.png
13.png (404.1 KiB) Viewed 11117 times

I also used automapper for this map to randomize tiles a little and after that it's ready.
14.png
14.png (419.97 KiB) Viewed 11117 times


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
15.png (421.42 KiB) Viewed 11117 times
16.png
16.png (440.39 KiB) Viewed 11117 times
17.png
17.png (485.88 KiB) Viewed 11117 times
Now I could do it with every other layer and fill every entity just as quick.
autofiller.pngShow
autofiller.png
autofiller.png (6.51 KiB) Viewed 11117 times
autofiller.rules
(1.1 KiB) Downloaded 277 times
Last edited by Pulsar on Wed May 02, 2018 10:08 am, edited 2 times in total.
User avatar
lola
Posts: 351
Joined: Thu Jan 04, 2018 10:23 pm
Location: France

Re: Autofiller (filling entities)

Post by lola »

I didn't understand a word but sounds cool!
triki
Posts: 144
Joined: Mon Mar 30, 2015 8:44 pm
Player profile: http://ddnet.tw/players/triki/

Re: Autofiller (filling entities)

Post by triki »

It was hard but i got it.
+if u need need smth change on ur map it is faster
User avatar
Jimmy Jazz The 1st
Posts: 321
Joined: Wed Jul 27, 2016 7:25 pm
Player profile: https://ddnet.tw/players/Jimmy-32-Jazz/
Mapper profile: https://ddnet.tw/mappers/Jimmy-32-Jazz/

Re: Autofiller (filling entities)

Post by Jimmy Jazz The 1st »

Awesome work Pulsar!
You've just been Jimmy Jazzed.
User avatar
meew'
Posts: 519
Joined: Mon Jul 20, 2015 7:17 pm
Player profile: http://ddnet.tw/players/meew-39-/
Clan: Möhre

Re: Autofiller (filling entities)

Post by meew' »

sadly only works on simple designs
911 mapping police
Pulsar
Posts: 72
Joined: Fri Jun 09, 2017 2:39 pm

Re: Autofiller (filling entities)

Post by Pulsar »

Not really. No matter what design you have, you need to mark entites anyway and doing it by hand takes some time.
Im 'corneum
Posts: 1052
Joined: Thu Oct 30, 2014 4:58 pm
Clan: ☭birming

Re: Autofiller (filling entities)

Post by Im 'corneum »

i have been waiting for this
reply to this post or your mom will die in her sleep tonight
User avatar
Shishigami
Posts: 188
Joined: Sat Nov 26, 2016 6:01 pm
Location: Germany
Player profile: https://ddnet.tw/players/Shishigami/
Mapper profile: https://ddnet.tw/mappers/Shishigami/
Clan: TOP
Website: http://www.shishigami.eu

Re: Autofiller (filling entities)

Post 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:
Image
User avatar
Konsti
Posts: 1188
Joined: Mon Sep 28, 2015 9:01 pm
Location: Germany
Player profile: http://ddnet.tw/players/Konsti/
Mapper profile: https://ddnet.tw/mappers/Konsti/
Clan: flawLess
Website: http://ddnet.tw/players/Konsti

Re: Autofiller (filling entities)

Post 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
Image
Image
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests