Author Topic: About how to integrate prebuilt tile groups in other level files  (Read 1529 times)

0 Members and 1 Guest are viewing this topic.

Offline Forestidia86

  • Posts: 619
  • inactive
    • View Profile
About how to integrate prebuilt tile groups in other level files
« on: December 07, 2017, 09:30:49 PM »
Probably everybody knows this already or maybe there is even something implemented but I just wanted to share how I integrated the large bridge tiles (in fact made of 4 Simon bridge tiles) into the existing Clam levels as I converted the oriental ones.

1st Create a level file with the desired tile groups

This one is maybe obvious but you can build tile groups (connect them as tile groups) in the ingame editor and save. This creates a level file with the tile group data. The level will show missing hatches but you can edit it and so work with the tile groups (copying, deleting etc. them as you need). You so create a template that you could use if you want to build new levels with these tile groups.

2nd Copy the tile group data of the desired tile groups in the desired level file

But I wanted to integrate them in existing files.
So you can open your template level file with the tile group data and copy that data + (at least) one instance of that group in the desired existing file.

The structure of the tile group data is like that (example: one of the big bridge tiles):

$BEGIN_TILE_GROUP 0
:simon/oriental/bridge1: 0 22
:simon/oriental/bridge1: 44 0
:simon/oriental/bridge1: 0 65 rr
:simon/oriental/bridge1: 44 43 rr
$END_TILE_GROUP

You have a bracket of $BEGIN_TILE_GROUP 0 and $END_TILE_GROUP and inbetween the tile data of which the tile group is composed. (0 indicates which tile group it is.)
You have to integrate that and then one instance, which for example looks like that:

:Group-0: 112 132 rr

Group-0 is the name of the tile group, so if you want to integrate more than one tile group you have to look for the number. (The colon at the beginning seems to be some sort of separator, the numbers are the coordinates and rr seems to indicate that I turned it twice.)
And you need to give different numbers to different tile groups in the tile group data.

I have attached a template level of the big bridge tiles:
tile group 0 is the angled bridge tile group that is built roughly on the shape of the old tiles.
tile group 1 is the straight bridge tile group (built roughly on the shape of the old tiles).
tile group 2 is the angled bridge tile group that is built to fit to the straight ones.

You can look at this file to get an impression how it looks like with more than one tile group.

I have attached a pointless test level as well, where I integrated one of the big bridge tiles, which is another reference how to exactly integrate such tile groups.
The easiest way seems to be to just integrate it after the skill enumeration. (Make sure that everything concerning tile group data is in different lines.) (It will be probably reordered after you have saved in the ingame editor but that shouldn't be a problem.)

If you have integrated them you can copy, delete etc. them in the ingame editor as you wish and so work with them.

Just a side note in the end: Since I converted the levels I mainly text edited and used find and replace (all) to replace the old tiles with the new tile groups (and didn't need to integrate an (extra) instance of the tile groups). But I got as I side information how to integrate such tile groups, which could in turn be used for level building. 

I hope that explanation was not redundant and not too confusing.
« Last Edit: December 09, 2017, 04:47:07 AM by Forestidia86 »

Offline geoo

  • Administrator
  • Posts: 1389
    • View Profile
Re: About how to integrate prebuilt tile groups in other level files
« Reply #1 on: December 07, 2017, 10:36:04 PM »
I think this could actually make a useful feature request: Keeping the copy buffer across levels, or implementing a copy buffer in the first place.
I believe Lix doesn't currently have a copy buffer (no Ctrl+C), it just copies your current selection if you copy something.

A copy buffer would allow to keep something memorized to be inserted later. I've felt that this in itself would be have useful sometimes, instead of extending the
level size to keep something around. And maintaining this copy buffer even across levels would then allow to simply copy some pieces from one level
and inserting it to another level. A few times I wished I had something like that, and used some workaround (probably text-editor editing) instead.

Offline Forestidia86

  • Posts: 619
  • inactive
    • View Profile
Re: About how to integrate prebuilt tile groups in other level files
« Reply #2 on: December 08, 2017, 07:26:20 AM »
I think this could actually make a useful feature request

The post was partly meant as workaround for issue 76, which is about saving and loading tile groups as new terrain pieces.
You can actually save these tile groups but you don't seem to be able to load them in another level from within the game. The workaround then is to integrate them via text edit, which actually doesn't seem that big of a deal, especially concerning newer level files where everything is neatly line by line. (I don't know how it is with really big tile clusters though since I only had relatively small tile groups.)
(Of course loading them from within the game or storing them in copy buffer as you suggested would be more convenient. But in my particular situation of level conversion I had to text edit anyways.)
 

Offline Forestidia86

  • Posts: 619
  • inactive
    • View Profile
Re: About how to integrate prebuilt tile groups in other level files
« Reply #3 on: December 28, 2017, 05:02:30 PM »
I would actually speak against closing  issue 76 since it would be generally a useful feature. But I agree that it is nothing (urgent) that has to be implemented in near future. If you don't want to deal with it better defer it but leave it open.
Copy buffer would be generally a nice feature but for some cases still just a workaround but sufficient for time being.
« Last Edit: December 28, 2017, 05:07:48 PM by Forestidia86 »

Offline Simon

  • Administrator
  • Posts: 3046
    • View Profile
    • Lix
Re: About how to integrate prebuilt tile groups in other level files
« Reply #4 on: December 28, 2017, 06:08:48 PM »
Yeah, I'll leave the issue open for a while. Should I make a copy buffer, we can re-evaluate.

In the 1.5 years of the grouping feature, I have only once copied a group from one map into another, by text-editing. That was the locomotive for Derailed Level. Others might need this more often.

-- Simon