I am trying to make a simple GRF that creates scaled towns (ie a 2000 Town only gets small houses instead of big blocks...) -> see attached image. As a first attempt in manipulating town zones i want to try to force zones at different populations (<1000 = zone 0; 1000-2500 = zone 1,...).
The GRF compiles, but nothing happenes. I am shure that i miss something, but i do not know what.
Code: Select all
grf {
grfid: "BW\01\01";
name: string(STR_GRF_NAME);
desc: string(STR_GRF_DESCRIPTION);
version: 0;
min_compatible_version: 0;
}
if (!extended_feature_test("town_zone_callback")) {
error(FATAL, string(STR_UNSUPPORTED_VERSION));
}
switch (FEAT_TOWN, SELF, townTest, population_uncapped){
0..1000: return 0x100;
1000..2500: return 0x101;
2500..3000: return 0x102;
3000..5000: return 0x103;
return 0x104;
}
item (FEAT_TOWN, town_cb, GENERIC_CALLBACK) {
graphics{
town_zone: townTest;
}
}
What am i doing wrong?
Thank you for any help!