Tile measurement tool [v.8]
Moderator: OpenTTD Developers
Version 4 is out.
There are no slight bugs except measuring height. Now it's up to you to make decissions, please
I mean, suggestions are welcome:
There are no slight bugs except measuring height. Now it's up to you to make decissions, please

- Colour - what should be the colour of measurement? Currently it's light blue.
Behaviour - v4 shows only when shift is pressed. Would you like it as patch-option? Personally I see point of it only when pressing shift, but you are the players.
Small distances - do you want information like area = 1x1 or length = 1? I think I'd hide it, but again, you are the players, and you may want to see such a info.
Autorail, diagonal directions - you think it is allright as it is or the measurement is too big by one tile?
- Attachments
-
- measurement_4.patch
- r4457
- (16.73 KiB) Downloaded 344 times
-
- measurement_4_win32.rar
- Win32 binary
- (496.92 KiB) Downloaded 273 times
Well nice to see a attached win32 exe but i prefer a picture to look at myself 
I think show it without shift is better, but a patch option would be good too. So the User can switch between "off", "Always on" and "when shift pressed"
Small distances and areas are not needed. I read somewhere that humans can count to 4 with one look, if is has more then 4 you begin to count each. So i think you can let it disabled for small distances and areas
edit 1: stupid question: what version of lang files are used? damn win32 exe .. i want not to compile it myself today
But i have to if i want to test since they are not included in the archive
edit 2: looks nice, the color is ok i think. just fixing some bugs
yesterday i found something in the suggestion forum:
http://www.tt-forums.net/viewtopic.php?p=283401#283401
maybe you can implement that too, would be nice

I think show it without shift is better, but a patch option would be good too. So the User can switch between "off", "Always on" and "when shift pressed"
Small distances and areas are not needed. I read somewhere that humans can count to 4 with one look, if is has more then 4 you begin to count each. So i think you can let it disabled for small distances and areas
edit 1: stupid question: what version of lang files are used? damn win32 exe .. i want not to compile it myself today

edit 2: looks nice, the color is ok i think. just fixing some bugs

yesterday i found something in the suggestion forum:
http://www.tt-forums.net/viewtopic.php?p=283401#283401
maybe you can implement that too, would be nice

- webfreakz.nl
- Director
- Posts: 627
- Joined: 11 Aug 2005 08:22
- Location: Localhost, 127.0.0.1, [The Netherlands: South Holland-> Westland]
- Contact:
- webfreakz.nl
- Director
- Posts: 627
- Joined: 11 Aug 2005 08:22
- Location: Localhost, 127.0.0.1, [The Netherlands: South Holland-> Westland]
- Contact:
Yes, that would even have a positive side effect: You don't need an if-statement like this anymore:MeusH wrote:I'll take a look how does it look red, but I think it will be black, as peter1138 suggested, too.
How about short distances? Do we need info like Area: 1x1 or Length: 1?
if(distance == 1)
{
// dont display
}

# Programming is like sex, one mistake and you have to support it for the rest of your life. (Michael Sinz)
Can you add a cost "preview"? (mostly for the tracks)
Does this work for the stations too?
Does this work for the stations too?
OTTDCoop NewGRF Pack|Different sets of GRFs for TTDPatch (some of them work in OTTD) - 1|- 2|GRF sets for OTTD|OTTD nightly

I hooked up my accelerator to my brake lights. I hit the gas, people behind me stop, and I'm gone.
Understeer is when you hit the wall with the front of the car. Oversteer is when you hit the wall with the rear of the car. Horsepower is how fast you hit the wall. Torque is how far you take the wall with you. Spoilers and bodykits are how much of the wall you take with you. Rollcages and windownets are how much of a mess you leave on the wall.
I hooked up my accelerator to my brake lights. I hit the gas, people behind me stop, and I'm gone.
Understeer is when you hit the wall with the front of the car. Oversteer is when you hit the wall with the rear of the car. Horsepower is how fast you hit the wall. Torque is how far you take the wall with you. Spoilers and bodykits are how much of the wall you take with you. Rollcages and windownets are how much of a mess you leave on the wall.
- webfreakz.nl
- Director
- Posts: 627
- Joined: 11 Aug 2005 08:22
- Location: Localhost, 127.0.0.1, [The Netherlands: South Holland-> Westland]
- Contact:
Meush, I compiled r4478 with your patch and MSVC6 showed me these warnings in attached text-file. A while ago I had the same warnings just with clean SVN source, you can find it in this topic: http://tt-forums.net/viewtopic.php?t=22 ... ight=c4096
----------------------------------------------------------------------------------------
And I think it still counts wrong? See attached image
----------------------------------------------------------------------------------------
And I think it still counts wrong? See attached image
- Attachments
-
- meush_compile_log.txt
- (6.92 KiB) Downloaded 334 times
-
- meush_measure.png (25.78 KiB) Viewed 7351 times
# Programming is like sex, one mistake and you have to support it for the rest of your life. (Michael Sinz)
This would be very nice! I think that's even more useful than the length/height/area measurements! Overall, it's a good patch.gkirilov wrote:Can you add a cost "preview"? (mostly for the tracks)
Does this work for the stations too?
Does it also work for tunnels? (do not have time to test). Next to this, it looks best, I think, when all characters are black.
I did a quick hack some time ago to have a full-featured autorail with red tiles where it can't be built, etc. The same principle would apply to the cost-preview. The problem is that this would make it pretty CPU-intensive since for every drag you will have to execute the build command in query mode.ganzpopp wrote:This would be very nice! I think that's even more useful than the length/height/area measurements! Overall, it's a good patch.gkirilov wrote:Can you add a cost "preview"? (mostly for the tracks)
Does this work for the stations too?
Does it also work for tunnels? (do not have time to test). Next to this, it looks best, I think, when all characters are black.
TrueLight: "Did you bother to read any of the replies, or you just pressed 'Reply' and started typing?"
<@[R-Dk]FoRbiDDeN> "HELP, this litte arrow thing keeps following my mouse, and I can't make it go away."
<@[R-Dk]FoRbiDDeN> "HELP, this litte arrow thing keeps following my mouse, and I can't make it go away."
I still think this should be 12x5; the area of land you are flattening rather than the number of grid points. I think the current reading is rather confusing; if you were trying to flatten land for a 13x6 station, for example.
(in fact I can't think of a single case right now where 13x6 is more logical than 12x5...are there any times when you are not flattening land for the purpose of building something on it?)
(in fact I can't think of a single case right now where 13x6 is more logical than 12x5...are there any times when you are not flattening land for the purpose of building something on it?)
- Attachments
-
- landheight.png (49.5 KiB) Viewed 7297 times
Hmm. Bot_40: You faced me against a big problem. Many tools use presizing, but the measurements must be changed (-1) for one tool. I'll think on how to fix that.
Grilkov and Ganzpopp: Just like Darkvater said, this may result in bad performace. Imagine station building processed 30 times per second just to show the result, which is the price. Shift+Click is a good behaviour IMO.
Ganzpopp: It works for tunnels and docks, too - Why for docks? Because docks use the same functions as tunnels.
webfreakz.nl: Was this serious? Such a statement doesn't hurt anybody, but IMO information about length = 1 is ridiculous.
Thanks for all comments and suggestions, keep up
Grilkov and Ganzpopp: Just like Darkvater said, this may result in bad performace. Imagine station building processed 30 times per second just to show the result, which is the price. Shift+Click is a good behaviour IMO.
Ganzpopp: It works for tunnels and docks, too - Why for docks? Because docks use the same functions as tunnels.
webfreakz.nl: Was this serious? Such a statement doesn't hurt anybody, but IMO information about length = 1 is ridiculous.
Thanks for all comments and suggestions, keep up

Slightly over thirty-seven times, actually. Once every 27 ms.MeusH wrote:Grilkov and Ganzpopp: Just like Darkvater said, this may result in bad performace. Imagine station building processed 30 times per second just to show the result, which is the price. Shift+Click is a good behaviour IMO.
It might be possible to only recalculate every time the mouse moved; this might reduce processor usage. Not that I think this is a good idea. Shift-click exists for a reason.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
- webfreakz.nl
- Director
- Posts: 627
- Joined: 11 Aug 2005 08:22
- Location: Localhost, 127.0.0.1, [The Netherlands: South Holland-> Westland]
- Contact:
- webfreakz.nl
- Director
- Posts: 627
- Joined: 11 Aug 2005 08:22
- Location: Localhost, 127.0.0.1, [The Netherlands: South Holland-> Westland]
- Contact:
I'm still here, and I'd like to show you new version of the patch.
What has changed? Not much, but what else should be changed? (this was the question to you, people, please reply with suggestions. But please do so fast, as I'm leaving really very soon)
The height difference is now counted (more) properly - It takes under account possible usage of "build on slopes" feature.
I haven't touched autorail yet, but I'll do it, and maybye I'll even post version 6 of the patch.
From the visual side, the tooltip is just black and simple.
Bot_40 - I considered your suggestion, and I'll do my best to fix the area measurement, but I don't promise anything. It may be either very simple or impossible. Time will reveal everything.
Also I know the code is messy somewhere. Like comments, or not needed {BLACK} in english.txt. But this is just in case you want other color than black, like red or something
What has changed? Not much, but what else should be changed? (this was the question to you, people, please reply with suggestions. But please do so fast, as I'm leaving really very soon)
The height difference is now counted (more) properly - It takes under account possible usage of "build on slopes" feature.
I haven't touched autorail yet, but I'll do it, and maybye I'll even post version 6 of the patch.
From the visual side, the tooltip is just black and simple.
Bot_40 - I considered your suggestion, and I'll do my best to fix the area measurement, but I don't promise anything. It may be either very simple or impossible. Time will reveal everything.
Also I know the code is messy somewhere. Like comments, or not needed {BLACK} in english.txt. But this is just in case you want other color than black, like red or something
- Attachments
-
- measurement_5.patch
- r5442
- (16.2 KiB) Downloaded 279 times
- webfreakz.nl
- Director
- Posts: 627
- Joined: 11 Aug 2005 08:22
- Location: Localhost, 127.0.0.1, [The Netherlands: South Holland-> Westland]
- Contact:
I get the following errors while compiling using MSVS2005 r:
music_gui.c
misc_gui.c
.\misc_gui.c(679) : error C2220: warning treated as error - no 'object' file generated
.\misc_gui.c(679) : warning C4013: 'GetStringPtr' undefined; assuming extern returning int
.\misc_gui.c(679) : warning C4047: '=' : 'const unsigned char *' differs in levels of indirection from 'int'
main_gui.c
# Programming is like sex, one mistake and you have to support it for the rest of your life. (Michael Sinz)
Who is online
Users browsing this forum: Bing [Bot] and 17 guests