Lock/water string errors

Got a problem with TTDPatch? Get help here.

Moderator: TTDPatch Moderators

Post Reply
User avatar
WWTBAM
Moderator
Moderator
Posts: 3689
Joined: 02 Apr 2005 07:01
Location: Sydney NSW Antipodea
Contact:

Lock/water string errors

Post by WWTBAM »

Is the lock tool supposed to be like that as I get the error Object in the way. When I drag it. I may have a look at it myself to try and disable it if t is not mean't to be dragable.
Formerly known as r0b0t_b0y2003, robotboy, roboboy and beclawat. The best place to get the most recent nightly builds of TTDPatch is: http://roboboy.users.tt-forums.net/TTDPatch/nightlies/
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Dragable lock tool

Post by wallyweb »

I never knew that the lock tool was dragable. Indeed it is ... adding canals when dragging more than 3 tiles. Similarly, dragging the canal tool over a slope adds a lock. I did not see any errors or warnings.
User avatar
WWTBAM
Moderator
Moderator
Posts: 3689
Joined: 02 Apr 2005 07:01
Location: Sydney NSW Antipodea
Contact:

Re: Dragable lock tool

Post by WWTBAM »

What about over say 4+ tiles. Are you trying in the game or scenario editor?
Formerly known as r0b0t_b0y2003, robotboy, roboboy and beclawat. The best place to get the most recent nightly builds of TTDPatch is: http://roboboy.users.tt-forums.net/TTDPatch/nightlies/
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Dragable lock tool

Post by wallyweb »

roboboy wrote:What about over say 4+ tiles.
8
I also was able to drag two locks in sequence, with the second one rising to the next level as intended.
Are you trying in the game or scenario editor?
both. 8)
User avatar
OzTrans
Tycoon
Tycoon
Posts: 1674
Joined: 04 Mar 2005 01:07

Re: Dragable lock tool

Post by OzTrans »

To be able to build a lock or two, you need 3 tiles that are 'flat/slope/flat' or a multiple of them with maybe some flat sections in between. If that is not the case you do get the message (with the incorrect text). No big drama.
User avatar
WWTBAM
Moderator
Moderator
Posts: 3689
Joined: 02 Apr 2005 07:01
Location: Sydney NSW Antipodea
Contact:

Re: Dragable lock tool

Post by WWTBAM »

Is there a standard string we can use or do we want to define a new one?
Formerly known as r0b0t_b0y2003, robotboy, roboboy and beclawat. The best place to get the most recent nightly builds of TTDPatch is: http://roboboy.users.tt-forums.net/TTDPatch/nightlies/
User avatar
OzTrans
Tycoon
Tycoon
Posts: 1674
Joined: 04 Mar 2005 01:07

Re: Dragable lock tool

Post by OzTrans »

roboboy wrote:Is there a standard string we can use or do we want to define a new one?
You could use an existing one in the General Strings section :

Code: Select all

0x0239 "\94...site unsuitable"
User avatar
WWTBAM
Moderator
Moderator
Posts: 3689
Joined: 02 Apr 2005 07:01
Location: Sydney NSW Antipodea
Contact:

Re: Dragable lock tool

Post by WWTBAM »

So far from what I can tell, it looks harder (for me) than I thought to fix as I think I will have to write an error handler for lock building.
Formerly known as r0b0t_b0y2003, robotboy, roboboy and beclawat. The best place to get the most recent nightly builds of TTDPatch is: http://roboboy.users.tt-forums.net/TTDPatch/nightlies/
User avatar
OzTrans
Tycoon
Tycoon
Posts: 1674
Joined: 04 Mar 2005 01:07

Re: Dragable lock tool

Post by OzTrans »

roboboy wrote:So far from what I can tell, it looks harder (for me) than I thought to fix as I think I will have to write an error handler for lock building.
There is already an error handler. Look in water.asm, lines 1498/99. It just uses the wrong text id 0x5800, which is 'Object in the way' instead of something more appropriate.
User avatar
WWTBAM
Moderator
Moderator
Posts: 3689
Joined: 02 Apr 2005 07:01
Location: Sydney NSW Antipodea
Contact:

Re: Dragable lock tool

Post by WWTBAM »

I was expecting it to be with the rest of them in watergui.asm

Edit: fixed. I will post a Diff and possibly an exe soon.

Edit again: here are said files. If the exe crashes for you. Delete your TTDLOADW.OVL.
Attachments
Fix-lock-error-popup-textid.diff
(384 Bytes) Downloaded 380 times
ttdpatchw-Lock-Error-Message-Fix.zip
(585.29 KiB) Downloaded 371 times
Formerly known as r0b0t_b0y2003, robotboy, roboboy and beclawat. The best place to get the most recent nightly builds of TTDPatch is: http://roboboy.users.tt-forums.net/TTDPatch/nightlies/
User avatar
WWTBAM
Moderator
Moderator
Posts: 3689
Joined: 02 Apr 2005 07:01
Location: Sydney NSW Antipodea
Contact:

Re: Lock/water string errors

Post by WWTBAM »

I found another bug. When I attempt to build a lock with out enough money, the error popup says Can't clear land rather than can't build lock. It only happens if I try to build the lock on a the slope in between two flat tiles. Do we consider that a bug?

Edit:

OpenTTD deals with the error of building a lock on flat or double slopped land with the error "Land sloped in wrong direction" and only allows for a lock to be built by clicking on a valid slope.
Formerly known as r0b0t_b0y2003, robotboy, roboboy and beclawat. The best place to get the most recent nightly builds of TTDPatch is: http://roboboy.users.tt-forums.net/TTDPatch/nightlies/
User avatar
WWTBAM
Moderator
Moderator
Posts: 3689
Joined: 02 Apr 2005 07:01
Location: Sydney NSW Antipodea
Contact:

Re: Lock/water string errors

Post by WWTBAM »

I am looking for

Code: Select all

00B5 \94Can't clear this area....
but can't find it's text id in either water.asm or waztergui.asm. I get that error when trying to build a lock without enough money but only when I click the slope tile, if I click on the flat tiles either side without enough money for a canal, I get the correct can't build canal/lock here. Any ideas which other files to look in. I ran:

Code: Select all

grep 00B5 *.asm
on the patches directory. The only place it found was in enhgui.asm for something unrelated.
Formerly known as r0b0t_b0y2003, robotboy, roboboy and beclawat. The best place to get the most recent nightly builds of TTDPatch is: http://roboboy.users.tt-forums.net/TTDPatch/nightlies/
User avatar
OzTrans
Tycoon
Tycoon
Posts: 1674
Joined: 04 Mar 2005 01:07

Re: Lock/water string errors

Post by OzTrans »

roboboy wrote:I found another bug. When I attempt to build a lock with out enough money, the error popup says Can't clear land rather than can't build lock. It only happens if I try to build the lock on a the slope in between two flat tiles. Do we consider that a bug?
Normally, when constructing anything, clearing of the land happens first, followed by the construction of the 'object'. Most probably, you did not have enough money to clear the land first. If you did, then, should you not have enough further funds to construct the lock, you get the correct message. I don't think it is a serious bug, not enough funds is indicated either way.
OpenTTD deals with the error of building a lock on flat or double slopped land with the error "Land sloped in wrong direction" and only allows for a lock to be built by clicking on a valid slope.
OpenTTD has seperate tools for canals and locks, whereas TTDPatch uses the same tool. You cannot really compare the two here.
... 'Can't clear this area ...
Clearing the area, before building the 'shiplift' !! happens in procedure cleararea in enhgui,asm line 1659 and there is your error too, in case something happened that prevented the clearing. This is a global procedure, most probably used by many construction events. I wouldn't touch it.
User avatar
WWTBAM
Moderator
Moderator
Posts: 3689
Joined: 02 Apr 2005 07:01
Location: Sydney NSW Antipodea
Contact:

Re: Lock/water string errors

Post by WWTBAM »

OzTrans wrote:
roboboy wrote:I found another bug. When I attempt to build a lock with out enough money, the error popup says Can't clear land rather than can't build lock. It only happens if I try to build the lock on a the slope in between two flat tiles. Do we consider that a bug?
Normally, when constructing anything, clearing of the land happens first, followed by the construction of the 'object'. Most probably, you did not have enough money to clear the land first. If you did, then, should you not have enough further funds to construct the lock, you get the correct message. I don't think it is a serious bug, not enough funds is indicated either way.
OpenTTD deals with the error of building a lock on flat or double slopped land with the error "Land sloped in wrong direction" and only allows for a lock to be built by clicking on a valid slope.
OpenTTD has seperate tools for canals and locks, whereas TTDPatch uses the same tool. You cannot really compare the two here.
... 'Can't clear this area ...
Clearing the area, before building the 'shiplift' !! happens in procedure cleararea in enhgui,asm line 1659 and there is your error too, in case something happened that prevented the clearing. This is a global procedure, most probably used by many construction events. I wouldn't touch it.
I wouldn't touch enhgui.asm either. If I cleared the three tiles for my lock first, the price didn't go down, but I am happy to leave it at that and just supply the patch to change the error when you have the money available.
Formerly known as r0b0t_b0y2003, robotboy, roboboy and beclawat. The best place to get the most recent nightly builds of TTDPatch is: http://roboboy.users.tt-forums.net/TTDPatch/nightlies/
Post Reply

Return to “Problems with TTDPatch”

Who is online

Users browsing this forum: No registered users and 0 guests