#is there any guide on how tiles work?
1 messages · Page 1 of 1 (latest)
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
yea its numbered as red-1 yellow-2 green-3 blue-4
but the file name is just hill (number)
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
You can also set a tile group to each layer
im just looking on how to place tiles in order
sometimes a tile can duplicate, or swap around eachother
Not sure if that is posible, however
Forcetile command exist and maybe you can make a loop script
wait so then how does reclayed have consistent tiles?
Like?
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
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
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
There still the option of a force tile script but is a bit more complex
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
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
hmm
Can't really test myself since i'm not home
Would it be possible to deactivate such script and activate another one on command?
If so, that'd be really cool
Do you mean level commands?
ye
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```
That seems to be what I meant too! Nice
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
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
ok, so I assign the 51 in the beginning of the group and in a transition tile command?
Oki, I get it 
- make a tile group, without the "beginning" tile
- the "beginning" tile is a transition tile, which is called via "transition" command
thankyu!
you got it ;)
np!
I assume this is about the level tiles being initially loaded right?
If that's the case, then tile overrides inside the metadata commandarg is the answer.
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
I see.
for example, spawning the "left" corner of a cloud tile before triggering the cloud middle loop tiles
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);
"tileInitialFrontGroup": [1, 2, 3, 4, 10],
"tileInitialMidGroup": [1, 2, 3, 4],
"tileOverrides": {
"8": [ 1, 2 ]
},
what does this do?
This is a one-time tile setup used by metadata().
is that necessary?
also, Tile 8 does not exist, why is it called here
please elaborate?
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.
ok
It's honestly a lot more fun to experiment with tile overrides ourselves.
Tho I'll explain it anyway...
I just need to know what that thing does, I'll define all the tilegroups later anyways
The parenthesized numbers represent the layer where the tiles will be overriden.
Layer 1 is the closest or furthest
The array of numbers dictate which tile will be forcibly loaded in order.
Nearest.
ok
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.
why does this exist if I can just forceTile?
-# I guess to make things cleaner
Because forceTile doesn't load tiles immediately where you want it to be.
and how to summon an override?
This is how you do so.
That's because what you are talking about is one of the contents of the metadata() command.
Could you show an example of using an override?
This is the example.
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
When overriding tiles mid-level, use forceTile
This is specifically for starting up a level.
I know
wait( 50); forceTile("layer": 3, "tile": 54);
Hope this helps:
https://platypus-modding.claymatic.games/levelFiles
This website should contain all the supported level commands and their functions.
ok thanks
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
That's defineTileGroup right?
If so, then the game picks the given ones randomly.
okay, so the numbers are just to set a percent of chance in which the tile will spawn
Yes
-# I'm encountering many issues, but I'm also solving them