Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Mon Jul 23, 2018 2:19 am

All times are UTC




Post new topic  Reply to topic  [ 14 posts ] 
Author Message
 Post subject: Lock/water string errors
PostPosted: Fri Aug 02, 2013 2:19 pm 
Offline
Moderator
Moderator
User avatar

Joined: Sat Apr 02, 2005 7:01 am
Posts: 3679
Location: Sydney NSW Antipodea
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/


Top
   
 Post subject: Re: Dragable lock tool
PostPosted: Fri Aug 02, 2013 4:21 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Nov 27, 2004 3:05 pm
Posts: 5243
Location: Canada
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.

_________________
wallyweb on tt-forums: Screenshots - Projects - Releases
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018


Top
   
 Post subject: Re: Dragable lock tool
PostPosted: Fri Aug 02, 2013 4:24 pm 
Offline
Moderator
Moderator
User avatar

Joined: Sat Apr 02, 2005 7:01 am
Posts: 3679
Location: Sydney NSW Antipodea
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/


Top
   
 Post subject: Re: Dragable lock tool
PostPosted: Fri Aug 02, 2013 4:35 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Nov 27, 2004 3:05 pm
Posts: 5243
Location: Canada
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.

Quote:
Are you trying in the game or scenario editor?
both. 8)

_________________
wallyweb on tt-forums: Screenshots - Projects - Releases
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018


Top
   
 Post subject: Re: Dragable lock tool
PostPosted: Fri Aug 02, 2013 4:45 pm 
Offline
Tycoon
Tycoon

Joined: Fri Mar 04, 2005 1:07 am
Posts: 1491
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.


Top
   
 Post subject: Re: Dragable lock tool
PostPosted: Fri Aug 02, 2013 5:14 pm 
Offline
Moderator
Moderator
User avatar

Joined: Sat Apr 02, 2005 7:01 am
Posts: 3679
Location: Sydney NSW Antipodea
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/


Top
   
 Post subject: Re: Dragable lock tool
PostPosted: Fri Aug 02, 2013 5:28 pm 
Offline
Tycoon
Tycoon

Joined: Fri Mar 04, 2005 1:07 am
Posts: 1491
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:
0x0239 "\94...site unsuitable"


Top
   
 Post subject: Re: Dragable lock tool
PostPosted: Sat Aug 03, 2013 9:26 am 
Offline
Moderator
Moderator
User avatar

Joined: Sat Apr 02, 2005 7:01 am
Posts: 3679
Location: Sydney NSW Antipodea
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/


Top
   
 Post subject: Re: Dragable lock tool
PostPosted: Sat Aug 03, 2013 9:46 am 
Offline
Tycoon
Tycoon

Joined: Fri Mar 04, 2005 1:07 am
Posts: 1491
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.


Top
   
 Post subject: Re: Dragable lock tool
PostPosted: Sat Aug 03, 2013 9:47 am 
Offline
Moderator
Moderator
User avatar

Joined: Sat Apr 02, 2005 7:01 am
Posts: 3679
Location: Sydney NSW Antipodea
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 139 times
ttdpatchw-Lock-Error-Message-Fix.zip [585.29 KiB]
Downloaded 140 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/
Top
   
PostPosted: Sat Aug 03, 2013 10:42 am 
Offline
Moderator
Moderator
User avatar

Joined: Sat Apr 02, 2005 7:01 am
Posts: 3679
Location: Sydney NSW Antipodea
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/


Top
   
PostPosted: Sun Aug 04, 2013 4:42 am 
Offline
Moderator
Moderator
User avatar

Joined: Sat Apr 02, 2005 7:01 am
Posts: 3679
Location: Sydney NSW Antipodea
I am looking for
Code:
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:
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/


Top
   
PostPosted: Sun Aug 04, 2013 11:07 am 
Offline
Tycoon
Tycoon

Joined: Fri Mar 04, 2005 1:07 am
Posts: 1491
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.

Quote:
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.

Quote:
... '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.


Top
   
PostPosted: Sun Aug 04, 2013 12:23 pm 
Offline
Moderator
Moderator
User avatar

Joined: Sat Apr 02, 2005 7:01 am
Posts: 3679
Location: Sydney NSW Antipodea
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.

Quote:
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.

Quote:
... '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/


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 14 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000-2018 phpBB Limited

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2018.
Hosted by Zernebok Hosting.