《命令与征服™:重制版》

《命令与征服™:重制版》

《命令与征服™》重制版合集工作坊
创建、共享和畅玩各种模组,尽情享受自定义的《命令与征服》游戏体验!还内含全新地图编辑器。欢迎回来,指挥官。
了解更多
the_parrot_is_dead 2023 年 1 月 28 日 上午 3:47
How do tileset layouts work? "Shape" in XML
I have been looking a bit into the file formats for CnC Remastered, the tilesets specifically, and one thing that puzzles me is how the layout for the combined tiles work. For example TD_TERRAIN_TEMPERATE.XML. Multiple tile images can build a combined tile, this is signified by them having the same name and a different "shape" index. But where is the general shape of the combined tile specified? Aka the combined length and width that should tell us which shape goes where in the combined tile? Because the combined tiles can be quite irregular in shape. I tried looking into the map editor source code but while I know some programming and C#, bigger projects are often very confusing to me. Would appreciate some help, thank you.
< >
正在显示第 1 - 3 条,共 3 条留言
Nyerguds 8 2023 年 1 月 28 日 上午 4:31 
There is no general shape defined. They are saved in the mission files per single tile, by ID, so the overall shape is irrelevant. The map editor has the shapes hardcoded, and that's enough.

Though there are a few errors in the map editor data concerning that; specifically on which tiles are not actually supposed to be used in-game. My upgraded version of the editor has all that double-checked and fixed.

Red Alert tiles contain more information (like the terrain types), but that info is all inside the classic files, not the Remaster ones.
最后由 Nyerguds 编辑于; 2023 年 1 月 28 日 上午 4:34
DDF3 40 2023 年 1 月 28 日 上午 10:52 
If you look at the Map editor source code in TiberianDawn\TemplateTypes.cs you will see the tile shapes sizes like "w1", 1, 1,

You can also find them in the Tiberian Dawn source code in the CDATA.CPP file
static TemplateTypeClass const Road3( TEMPLATE_ROAD3, THEATERF_WINTER|THEATERF_DESERT|THEATERF_TEMPERATE, "D03", TXT_ROAD, LAND_CLEAR, 1,2, LAND_CLEAR, NULL


in this case it is a 1 x 2 tile

But they are only used as a complete tile in the map editor so you can see what you are placing and you might be able to see them as complete tiles in some of the tools

as Nyerguds stated they are placed in the map by their Tile ID and frame number

and for RedAlert the fastest way to see their tile sizes is to check out the map editor source REDALert\TemplateTypes.cs

The tile sizes are in the actual template files in the original images
最后由 DDF3 编辑于; 2023 年 1 月 28 日 上午 10:56
the_parrot_is_dead 2023 年 1 月 28 日 下午 1:14 
I agree, for the map data itself the combined tiles are probably irrelevant. For the map editor I probably would have expected data and code to be more separated there, but whatever. Thanks a lot for the quick help. Cheers.
< >
正在显示第 1 - 3 条,共 3 条留言
每页显示数: 1530 50