GetTileID

Modders can post their questions on scripting and more.

Moderators: Slitherine Core, BA Moderators

Post Reply
Amaris
Captain - Heavy Cruiser
Captain - Heavy Cruiser
Posts: 929
Joined: Fri Jul 23, 2010 11:08 am
Location: France
Contact:

GetTileID

Post 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 ;-)
pipfromslitherine
Site Admin
Site Admin
Posts: 9937
Joined: Wed Mar 23, 2005 10:35 pm

Post 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
Amaris
Captain - Heavy Cruiser
Captain - Heavy Cruiser
Posts: 929
Joined: Fri Jul 23, 2010 11:08 am
Location: France
Contact:

Post by Amaris »

Great thanks :-)

Refer to the text is probably more practical.
Post Reply

Return to “Battle Academy : Modders Corner ”