Page 1 of 1

Approaches for setting xrel and yrel values

Posted: 18 Sep 2006 13:30
by Prebral
I have recently tried to set xrel and yrel values for a new ship. However, using this wiki page guide...
http://wiki.ttdpatch.net/tiki-index.php ... oordinates
...did not help. I set xrel and yrel to negative half sizes of the vehicle as described, but it is still far off it's desired position. The ship is quite small and is obviously located too far from tile edge if it has to be in it's centre and thus "jumps" while turning, runs on land etc.
I tried to use grf creator helper in newgrf window, but because it shows only the sprite itself and not it's location on a background tile (and determining this is hard on sea, because there are no tile boundaries), I found it quite time-consuming.
Am I missing something? Is there a convenient way to determine these coordinates for a custom grf vehicle if you do not have a background (rails, road...) to check it against it?

Posted: 18 Sep 2006 13:57
by Purno
I've once tried coding a signal grf manually, but indeed, finding xrel and yrel is a huge amount of work. After that I tried GRF Maker which actually knows default xrel and yrel values (or sth), so that took quite less time. All I had to do is move all sprites 6 pixels upwards, but that was done with a few clicks.

Dunno about other tools there are for this problem, but GRF Maker might be worth trying out (PM Szappy for it).

Posted: 18 Sep 2006 14:50
by DaleStan
As long as you avoid its numerous crash and tight-loop bugs, NFOEditor is pretty good for editing xrel and yrel. The GRFAuthorHelperWindow is also useful, and less likely to crash too, but probably a little more work when you're adjusting lots of sprites.

Posted: 18 Sep 2006 14:55
by eis_os
Start a train/ship/whatever, then open the grf helper window and you see your work in realtime how it looks ingame :-) You don't use the gray window to do the xrel,yrel but your actually game! About your tile problem, simple put your ship onto a canals tile....