#is there any guide on how tiles work?

1 messages · Page 1 of 1 (latest)

umbral blade
#

i made colourcoded tiles to see how they work in level

#

heres how they are meant to be ordered

cedar condor
#

Is important how you number the file

It can be name + number which is asigned in the level

Also remenber they go in
Level/tiles folder

umbral blade
#

yea its numbered as red-1 yellow-2 green-3 blue-4

#

but the file name is just hill (number)

cedar condor
#

So you see sometimes some tiles have 2 numbers

The second is the layer number which makes the tile only usable in that layer
If no second number is there it can be used by any layer

umbral blade
#

ohh ok lemme try that

cedar condor
#

You can also set a tile group to each layer

umbral blade
#

im just looking on how to place tiles in order

#

sometimes a tile can duplicate, or swap around eachother

cedar condor
#

Not sure if that is posible, however

Forcetile command exist and maybe you can make a loop script

umbral blade
#

wait so then how does reclayed have consistent tiles?

cedar condor
#

Like?

umbral blade
#

their hills dont seem to be cut or appear disorganised during the game looking through their tiles it isnt like each hill is individual

#

its hard to desvribe sorry

cedar condor
#

I think that is because they use transition tiles then switch to another tile group

#

As most i seen tiles are generated randomly, but i may be wrong

umbral blade
#

oh yea i figured

#

theres no order but the tiles made for the game are connected seamlessly

#

the ony ones that aren are peices placed when switching to a tile group

cedar condor
#

There still the option of a force tile script but is a bit more complex

umbral blade
#

forcetile woudlt be optimal if im gonna make a whole area with it, if it were a few orr less maybe then it be useful

cedar condor
#

Should be easy to setup

Make a new file with a forcetiles commands
That loops

Then execute the script in the main file

So it always run in the background

umbral blade
#

hmm

cedar condor
#

Can't really test myself since i'm not home

rare rune
#

Would it be possible to deactivate such script and activate another one on command?

#

If so, that'd be really cool

fathom kayak
#

Do you mean level commands?

rare rune
#

ye

echo cargo
#

Believe Tar tary is referring to these commands:

### spawnCommandHandler(string fileName, [string name])
Spawns a new parallel command handler that loads a level file similar to importLevel
It will run for as long as the parent handler is active and for as long as the new handler has commands in its stack
Optionally can take a name for early removal via `removeCommandHandler` or `removeAllCommandHandlers`

Unnamed handlers are executed in the order they were spawned
Named Handler execution happens after all unnamed handlers. The order is undefined!

### removeCommandHandler(string name)
Remove a named command handler. essentially stopping it permanently
See `spawnCommandHandler` for more details

### removeAllCommandHandlers()
Remove both named and unmamed command handlers. Stopping all of them. Useful for making sure no enemies spawn during evaluation
See `spawnCommandHandler` for more details```
rare rune
#

That seems to be what I meant too! Nice

mental thorn
#

how does the game recognise what tile should go first in a tileset?
Talking about tile that is the beginning of a mountain for example

rare rune
#

I think you simply assign it before summoning the mountain loop

#

For example, you make a tile 51 (or whatever number you want) be the beginning of the mountain

#

Then make tiles 52 and 53 the mountain middle / loop tiles, for example

#

Then use the command.. I think it was:
switchTileGroup("mountain loop", "transition tile": 51)

#

I think you can also set the layer that you want the tiles to switch on

#

Before all that, you also have to assign tiles 52 and 53 (+ whatever other mountain loop tiles you have) with the command setTileGroup("mountain loop", [52, 53])

I think it was something like that... at least it's what I remember

mental thorn
#

ok, so I assign the 51 in the beginning of the group and in a transition tile command?
Oki, I get it BonSmile

  • make a tile group, without the "beginning" tile
  • the "beginning" tile is a transition tile, which is called via "transition" command
fathom kayak
#

If that's the case, then tile overrides inside the metadata commandarg is the answer.

rare rune
#

I think that's a different topic, but I know what you mean
initial level tiles do indeed prioritize the ones in metadata overrides

#

what bonnie was talking about was how to use a transition tile before starting a loop, though

fathom kayak
#

I see.

rare rune
#

for example, spawning the "left" corner of a cloud tile before triggering the cloud middle loop tiles

fathom kayak
#

The hills on the first level of the base game greatly exemplifies this.

#
ifNotFastForwarding("places": 1);
    wait(   0); switchTileGroup("layer": 7, "name": "mainMid", "transition": 92);
mental thorn
#

"tileInitialFrontGroup": [1, 2, 3, 4, 10],
"tileInitialMidGroup": [1, 2, 3, 4],
"tileOverrides": {
"8": [ 1, 2 ]
},
what does this do?

fathom kayak
#

This is a one-time tile setup used by metadata().

mental thorn
#

is that necessary?

fathom kayak
#

Yes

#

This is very useful when initially loading a level.

mental thorn
#

also, Tile 8 does not exist, why is it called here

mental thorn
fathom kayak
#
metadata(
    "name": "levelTar4_data",
    "tilesetPath": "Scenery/Stage tar4/Tiles",

    "hackStage3Clouds": false,
    "enableWaterfalls": false,

    "clearBackground": true,
    "clearColor": "#2D2140",

    "firewait": 80,
    "skyRise": 0,
    "skyDayAmount": 0.3,

    "groundSprite": "BG Gradient/Ground/lake",

    "tileInitialFrontGroup": [ 1 ],
    "tileInitialMidGroup": [ 10, 11, 12, 13, 14 ],
    "tileInitialBackGroup": [ 9 ],

    "tileOverrides": {
        "1": [ 2, 2, 2, 2, 2, 2, 2, 2 ],
        "2": [ 10, 11, 12, 13, 14 ],
        "3": [ 13, 10, 11, 14, 12 ],
        "4": [ 14, 12, 13, 10, 11 ],
        "5": [ 11, 14, 10, 12, 13 ],
        "6": [ 12, 13, 14, 11, 10 ],
        "7": [ 9, 9, 9, 9, 9, 9, 9, 9 ],
        "8": [ 8 ]
    },

    "dynamicTileScaling": true
);
#

Let's begin explaining what tile overrides do.

mental thorn
#

ok

fathom kayak
#

It's honestly a lot more fun to experiment with tile overrides ourselves.

#

Tho I'll explain it anyway...

mental thorn
#

I just need to know what that thing does, I'll define all the tilegroups later anyways

fathom kayak
#

The parenthesized numbers represent the layer where the tiles will be overriden.

mental thorn
#

Layer 1 is the closest or furthest

fathom kayak
#

The array of numbers dictate which tile will be forcibly loaded in order.

fathom kayak
mental thorn
#

ok

fathom kayak
#

The last value in an array represents the forced tile load on the right side.

#

Put more values before that, essentially, more tiles will be loaded toward the left.

mental thorn
#

why does this exist if I can just forceTile?
-# I guess to make things cleaner

fathom kayak
#

Because forceTile doesn't load tiles immediately where you want it to be.

mental thorn
#

ah ok

#

so I set the overrides, so I can summon them mid-game?

fathom kayak
#

Yes.

#

Immediately as the level loads.

mental thorn
#

and how to summon an override?

mental thorn
#

doesn't look like a full command

#

this is just a list of available overrides

fathom kayak
mental thorn
#

Could you show an example of using an override?

mental thorn
#

let's say I want to summon Override 1 mid-level

#

here's a random piece of code

#

wait( 0); randSaucers("saucers": 1);
wait( 5); randSaucers("saucers": 2);
wait( 60); randSaucers("saucers": 1);

wait( 0); defineTileGroup("name": "mainFront", "tiles": [1, 2, 4, 10]]);
wait( 100); squid("x": 700, "y": 600, "focus_x": 500, "focus_y": 200);

wait( 200); randSaucers("saucers": 1);

wait( 0); skipIfDiffBelow("difficulty": "Hard", "places": 9);
wait( 0); squid("x": 700, "y": -200, "focus_x": 600, "focus_y": 250);
wait( 50); squid("x": 700, "y": -200, "focus_x": 600, "focus_y": 150);

wait(  50); setBonusCounter("bonus": 2, "value": 5);
wait(   0); setBonusReward("bonus": 2, "type": "AutoFireFishStar");
wait(  10); redSaucer1("bonus": 2, "y": 350, "x": 0);
wait(  10); redSaucer1("bonus": 2, "y": 350, "x": 0);
wait(  10); redSaucer1("bonus": 2, "y": 350, "x": 0);
wait(  10); redSaucer1("bonus": 2, "y": 350, "x": 0);
wait(  10); redSaucer1("bonus": 2, "y": 350, "x": 0);
#

I want to insert an override somewhere inside

fathom kayak
#

When overriding tiles mid-level, use forceTile

fathom kayak
mental thorn
#

I know

mental thorn
fathom kayak
#

This website should contain all the supported level commands and their functions.

mental thorn
#

ok thanks

mental thorn
#

if I set a TileGroup like [1, 2, 3], the game will just keep displaying 1 2 3 1 2 3 1 2 3?

#

Or the game picks randomly

fathom kayak
#

That's defineTileGroup right?
If so, then the game picks the given ones randomly.

mental thorn
#

okay, so the numbers are just to set a percent of chance in which the tile will spawn

fathom kayak
#

Yes

mental thorn
#

-# I'm encountering many issues, but I'm also solving them