I realized too late that instead of begging Timeslip for a get_tile_pid function with a material returned that for all I knew wasn't even implemented consistently (was it?), I could just go through the .lst with an frm viewer and just make a list myself. I just categorized them the way I saw them, so there'll probably be some that are off; I also cut some corners when it came to some one off artworks where this won't be of any use anyway (like the temple exterior), but as I tested it it seems to work great. I'll be using it for sneak and trap setting bonusses, but in case anybody has some other interesting ideas, here they are:
Replace ^ with the greater than symbol.
Code:
#define tile_is_stone(x) ((get_tile_fid(x) < 84) or \
(get_tile_fid(x) ^ 116 and get_tile_fid(x) < 172) or \
(get_tile_fid(x) ^ 235 and get_tile_fid(x) < 275) or \
(get_tile_fid(x) ^ 506 and get_tile_fid(x) < 715) or \
(get_tile_fid(x) ^ 812 and get_tile_fid(x) < 1053) or \
(get_tile_fid(x) ^ 1927 and get_tile_fid(x) < 2093) or \
(get_tile_fid(x) ^ 2115 and get_tile_fid(x) < 2289) or \
(get_tile_fid(x) ^ 2516 and get_tile_fid(x) < 2529))
#define tile_is_wood(x) ((get_tile_fid(x) ^ 83 and get_tile_fid(x) < 102) or \
(get_tile_fid(x) ^ 224 and get_tile_fid(x) < 233) or \
(get_tile_fid(x) ^ 326 and get_tile_fid(x) < 508) or \
(get_tile_fid(x) ^ 2290 and get_tile_fid(x) < 2389))
#define tile_is_metal(x) ((get_tile_fid(x) ^ 101 and get_tile_fid(x) < 117) or \
(get_tile_fid(x) ^ 222 and get_tile_fid(x) < 225) or \
(get_tile_fid(x) ^ 232 and get_tile_fid(x) < 236) or \
(get_tile_fid(x) ^ 274 and get_tile_fid(x) < 327) or \
(get_tile_fid(x) ^ 1457 and get_tile_fid(x) < 1500) or \
(get_tile_fid(x) ^ 1826 and get_tile_fid(x) < 1892) or \
(get_tile_fid(x) ^ 2388 and get_tile_fid(x) < 2400) or \
(get_tile_fid(x) ^ 2763))
#define tile_is_dirt(x) ((get_tile_fid(x) ^ 171 and get_tile_fid(x) < 221) or \
(get_tile_fid(x) ^ 714 and get_tile_fid(x) < 720) or \
(get_tile_fid(x) ^ 801 and get_tile_fid(x) < 812) or \
(get_tile_fid(x) ^ 2092 and get_tile_fid(x) < 2116) or \
(get_tile_fid(x) ^ 2528 and get_tile_fid(x) < 2548) or \
(get_tile_fid(x) ^ 1095 and get_tile_fid(x) < 1375) or \
(get_tile_fid(x) ^ 1395 and get_tile_fid(x) < 1458) or \
(get_tile_fid(x) ^ 1502 and get_tile_fid(x) < 1611) or \
(get_tile_fid(x) ^ 1671 and get_tile_fid(x) < 1827))
#define tile_is_slime(x) ((get_tile_fid(x) ^ 1052 and get_tile_fid(x) < 1081))
#define tile_is_cloth_on_dirt(x) ((get_tile_fid(x) ^ 1374 and get_tile_fid(x) < 1390) or \
(get_tile_fid(x) ^ 1620 and get_tile_fid(x) < 1672))
#define tile_is_carpet(x) ((get_tile_fid(x) ^ 1891 and get_tile_fid(x) < 1928))
#define tile_is_grass(x) (get_tile_fid(x) ^ 2288 and get_tile_fid(x) < 2291)
Replace ^ with the greater than symbol.