action 0 general variable ID 16

Got a problem with TTDPatch? Get help here.

Moderator: TTDPatch Moderators

Post Reply
User avatar
hovering teacup
Route Supervisor
Route Supervisor
Posts: 429
Joined: 03 Feb 2004 12:40

action 0 general variable ID 16

Post by hovering teacup »

This variable ID (cost of dynamiting an empty grass tile) causes a strange bug; if you set its property 08 to 03 then towns build almost no buildings. The same (or similar) thing happens with some other nombers like 40 if I remember well.
------------------------
Image
Patchman
Tycoon
Tycoon
Posts: 7575
Joined: 02 Oct 2002 18:57
Location: Ithaca, New York
Contact:

Post by Patchman »

I think it's intentional. Towns have limited funds for their expansion, so if you make it too expensive, they won't be able to expand.
Josef Drexler

TTDPatch main | alpha/beta | nightly | manual | FAQ | tracker
No private messages please, you'll only get the answering machine there. Send email instead.
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

But setting prop 08 to 03 should scale the cost *down* by a factor of 32, should it not?
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
Patchman
Tycoon
Tycoon
Posts: 7575
Joined: 02 Oct 2002 18:57
Location: Ithaca, New York
Contact:

Post by Patchman »

Oh, hmm, yes you're right.

In that case I can't explain this behaviour and will require the appropriate tools to investigate (configs, a grf file displaying the bug, and a scenario or savegame just before the town builds a building without the grf, but doesn't with the grf).
Josef Drexler

TTDPatch main | alpha/beta | nightly | manual | FAQ | tracker
No private messages please, you'll only get the answering machine there. Send email instead.
User avatar
hovering teacup
Route Supervisor
Route Supervisor
Posts: 429
Joined: 03 Feb 2004 12:40

Post by hovering teacup »

here's the grf and the cfg. but i tryed with a newly created cfg and the result was no different. also the grf contains only one significative line (the action 0 in question here).

this bug is reproduceable at will---just use the scenario editor or start a new random map to see a bunch of ghost towns.

thanks
Attachments
exemple2.grf
(50 Bytes) Downloaded 34 times
ttdpatch.cfg
(32.68 KiB) Downloaded 34 times
------------------------
Image
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

I can confirm; highly reproducable, but not with my newgrfw.cfg; I had to remove all the other grf files first. I'm not sure which GRF file is suppressing the bug, but I can try to figure that out, if it's useful.
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
Patchman
Tycoon
Tycoon
Posts: 7575
Joined: 02 Oct 2002 18:57
Location: Ithaca, New York
Contact:

Post by Patchman »

Very odd. TTD has the following code in the house construction action:

Code: Select all

if (!NewHouseAllowedOnBareLand)
    if (CostToClearWasZero)  // zero cost implies it was bare land
        fail_construction;
NewHouseAllowedOnBareLand is set to 1 only briefly while periodically replacing old buildings with new ones. I'm not sure I understand what this code is really supposed to do, so I don't know how to fix it.

The problem at hand, then, is that the given change sets the cost to clear an empty tile to zero, so that this can never succeed. But as I said, it's not obvious to me what the fix should be, until I understand why TTD does not normally build houses on bare (already cleared) land.
Josef Drexler

TTDPatch main | alpha/beta | nightly | manual | FAQ | tracker
No private messages please, you'll only get the answering machine there. Send email instead.
User avatar
krtaylor
Tycoon
Tycoon
Posts: 11784
Joined: 07 Feb 2003 01:58
Location: Texas, USA
Contact:

Post by krtaylor »

Patchman wrote:But as I said, it's not obvious to me what the fix should be, until I understand why TTD does not normally build houses on bare (already cleared) land.
Tweak it so it does, and then watch what happens! Houses everywhere, I bet! :lol:
Development Projects Site:
http://www.as-st.com/ttd
Japan, American Transition, Planeset, and Project Generic Stations available there
Patchman
Tycoon
Tycoon
Posts: 7575
Joined: 02 Oct 2002 18:57
Location: Ithaca, New York
Contact:

Post by Patchman »

I did, and I couldn't detect an immediate effect.

It may perhaps only be to stop towns from building on a tile that the player has just cleared for himself. But I'm not sure if that's the only reason.
Josef Drexler

TTDPatch main | alpha/beta | nightly | manual | FAQ | tracker
No private messages please, you'll only get the answering machine there. Send email instead.
User avatar
Szappy
Chief Executive
Chief Executive
Posts: 689
Joined: 29 Mar 2004 14:35
Location: Budapest, Hungary
Contact:

Post by Szappy »

Just a random idea, but the 'buy land' symbol has a cleared tile underneath it. I never understood, why. Maybe TTD towns determine occupancy by the 'tile clear' status...
It should be easy for you to test it, just buy the land around a town, and hack it to build on cleared tiles.
Image please use email instead of PM
User avatar
Csaboka
Tycoon
Tycoon
Posts: 1202
Joined: 25 Nov 2002 16:30
Location: Tiszavasvári, Hungary
Contact:

Post by Csaboka »

No, the "owned land" sign is different from a bare land tile, the fact that it has bare land for ground sprite doesn't mean anything internally. (Bare land is class 0, owned land is class A, so they are handled differently)
Reality is that which, when you stop believing in it, doesn't go away.—Philip K. Dick
Post Reply

Return to “Problems with TTDPatch”

Who is online

Users browsing this forum: No registered users and 32 guests