Page 1 of 1

GetTileID

Posted: Mon May 16, 2011 2:52 pm
by Amaris
@ Pip : To complete the command PlaceObject, I looked the commands associated with tiles and I found this command:

//returns the ID of a given pairing of set/tile. -1 means the tile doesn't exist. These are the internal folder/tile names, not the displayed localised names. NOTE: this will not be a constant as game data and custom data changes, so don't rely on it.
GetTileID(set, name)

I understand that it is not displayed localised names. So, where i can find this set/name ? At last, if possible ;-)

In the meantime I found an other way to work with tiles:
- I place on precise coordinates the tiles that interest me (offmap).
- And I use in scripts and functions GetTileOnTile and PlaceTile to generate by copying and pasting what I need.

I get to build roads and rivers with a script :D A first step in creating random maps ;-)

Posted: Mon May 16, 2011 3:20 pm
by pipfromslitherine
The tile names are found in the TILES.TXT file in each folder, and the set name is in fact the folder name.

Like your clever approach - although you can do the same kind of thing using the names, but whatever works best for you :)

Cheers

Pip

Posted: Mon May 16, 2011 3:23 pm
by Amaris
Great thanks :-)

Refer to the text is probably more practical.