I've gotten the terrain query/modification to work perfectly in 38a, but it does not work in 33g. Specifically, the "dbg.getDesignationCoord()" call is returning a huge (6 digit+) y-coordinate. I think the problem is just a slightly off offset.
For anyone having trouble with the terrain modification, first make sure you are using the latest companion version, 0.8. Go into the scripts folder and run the file 'designator.py' just like you would run 'dfcompanion_prototype.py'. This is not a GUI, it is more like a classic utility, so you will have to first bring up the 'K' cursor and move it to a tile. It will output six numbers in the format "<num>/<num>/<num> -> <hexnum> <hexnum> <hexnum>". The last three hex numbers are the tile information.
Setting another tile to this information is a little more complicated. You'll have to use the script through the command line, which can be difficult. I've written a quick script that simplifies things a bit, based on bartavelle's. Download it here and put it in the scripts folder. Again, bring up the 'k' cursor and move it where you want the tile placed. Run the script, and when it asks you for the info, enter the last three numbers from above, separated by spaces. The program will loop, so you can use it again without rerunning it.
I hope this helps anyone trying to use this wonderful tool!
To bartavelle: Have you had any luck figuring out what the numbers mean? I've collected some samples of tiles you can look at here. The first number seems to indicate the type of material, the second flags like revealed or designated, and the third occupancy. The data is somewhat consistent, but there are sometimes inexplicable changes.
Addendum: It just occurred to me that if you're not using a Python IDE, the window might just flash away quickly. To fix this, put this line at the end of the designator.py script, unindented:
code:
raw_input("Press any key to continue")