Patch: Create realistic heightmap, water & town placement

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

mikeel
Engineer
Engineer
Posts: 69
Joined: 03 Jun 2002 09:55

Re: Patch: Create realistic heightmap, water & town placement

Post by mikeel »

does anybody managed to compile this patch with the latest trunk (non-water edges)?
i think that the png-loader for water tiles is really useful to create scenarioes.
greets
mikeel
andypoth
Engineer
Engineer
Posts: 5
Joined: 16 May 2009 19:47

Re: Patch: Create realistic heightmap, water & town placement

Post by andypoth »

I've been experimenting with this now for a couple of weeks, as I'm trying to create a realistic map to make a "model" of the Somerset & Dorset Railway (in UK) on, as my grandad used to drive trains for them.

But I've hit on a few problems. The water and hills are in the right place, so that's fine. As are most of the towns, but it's with some of these I'm having the problem.

1. The S&D served a lot of rural communities and there were quite a few stations serving tiny villages. I've tried adding these to the Cities_1k.txt file (with suitably large populations) but they don't seem to appear when I generate the towns and cities. I basically copied a previous entry in the file, changed the reference number at the start of the entry to another (unique) value then altered the values for the name, population and locations accordingly. One of the villages I tried to place (Shirehampton) is nowhere near enough to any other towns to be absorbed into it.
2. The other problem is similar. Towns/cities like Bristol, Bath had several stations in suburbs (e.g. Bath has Bath Spa (still present) & Green Park in the centre, along with Oldfield Park, Twerton, Weston, Hampton Row and Bathford. I've again tried adding these as new towns, using the location of the station for the co-ordinates, but of course these are all close enough to the main town and end up as part of it.

Ideally I would like to be able to have another file with the extra towns/villages/stations/whatever in it that would be used along with the cities file to plot those places on the map, but I have no idea how to do this. Otherwise, just being able to add these to the Cities file (and have them placed) would be great.
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: Patch: Create realistic heightmap, water & town placement

Post by petert »

If i make this scenario with this version, can the scenario be played with older/newer versions?
andypoth
Engineer
Engineer
Posts: 5
Joined: 16 May 2009 19:47

Re: Patch: Create realistic heightmap, water & town placement

Post by andypoth »

Yes you should be able to.
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Patch: Create realistic heightmap, water & town placement

Post by planetmaker »

petert wrote:If i make this scenario with this version, can the scenario be played with older/newer versions?
Newer: yes
Older: no
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: Patch: Create realistic heightmap, water & town placement

Post by petert »

And newer would count as latest nightly?
User avatar
cmoiromain
Chief Executive
Chief Executive
Posts: 655
Joined: 15 Jan 2007 21:45
Location: FRANCE
Contact:

Re: Patch: Create realistic heightmap, water & town placement

Post by cmoiromain »

yes, and other nightlies too as long as they are more recent than the version you made the scenario with.
I am little, ugly, and nasty. How do you do?
Roujin
Tycoon
Tycoon
Posts: 1884
Joined: 08 Apr 2007 04:07

Re: Patch: Create realistic heightmap, water & town placement

Post by Roujin »

cmoiromain wrote:yes, and other nightlies too as long as they are more recent than the version you made the scenario with.
Add to this all branches branched off after the revision the patch is based on (r13922 if version 0v7 found in the first post is the most recent one). For example the 0.7 branch (branched off in ... r15734). Which in turn means you should also be able to load it with any 0.7.x version. :)
* @Belugas wonders what is worst... a mom or a wife...
<Lakie> Well, they do the same thing but the code is different.

______________
My patches
check my wiki page (sticky button) for a complete list

ImageImage
ImageImageImageImageImageImageImage
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: Patch: Create realistic heightmap, water & town placement

Post by petert »

Here is a binary of the latest version for anyone that needs it.
Attachments
realistic_map_and_towns_wolkottept_r13922_0v7.rar
realistic_map_and_towns_wolkottept_r13922_0v7
(2.54 MiB) Downloaded 290 times
Davie_UCF
Traffic Manager
Traffic Manager
Posts: 155
Joined: 11 Sep 2004 19:55
Location: Colchester, Essex, United Kingdom

Re: Patch: Create realistic heightmap, water & town placement

Post by Davie_UCF »

How do I install it? I'm using 0.7.2

Sorry if obvious im new to this stuff!

Thanks
East of England/East Anglia scenario/map released!! http://www.tt-forums.net/viewtopic.php?p=205440#205440
orendel
Engineer
Engineer
Posts: 1
Joined: 01 Sep 2009 11:47

Re: Patch: Create realistic heightmap, water & town placement

Post by orendel »

This is a great patch. Unfortunately I'm on windows and can not run the shell script for making the necessary mapfiles. If somebody could be so kind and create a set of files for:
N 56
W 5
S 47
E 23

This would cover central Europe (Germany, Poland, Czech republic...)

With 200 pixels per degree this would result in 3600x1800 maps.

Thank you so much!
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: Patch: Create realistic heightmap, water & town placement

Post by DaleStan »

If you're on Windows, then you need to install Cygwin or MinGW/MSYS.
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
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: Patch: Create realistic heightmap, water & town placement

Post by petert »

DaleStan wrote:If you're on Windows, then you need to install Cygwin or MinGW/MSYS.
Honestly, if your writing anything in the OpenTTD Development section, you should already have Cygwin, MinGW/MSYS.
Wasila
Tycoon
Tycoon
Posts: 1498
Joined: 15 Mar 2008 07:02

Re: Patch: Create realistic heightmap, water & town placement

Post by Wasila »

Sorry if this has already been answered, but does this patch work with 0.7.2? I had a large number of failed hunks.

$ patch -p0 -i realistic_map_and_towns_wolkottept_r13922_0v7.diff
patching file `src/settings.cpp'
Hunk #1 succeeded at 64 with fuzz 2.
patching file `src/fios.cpp'
Hunk #1 succeeded at 124 with fuzz 2 (offset -8 lines).
Hunk #2 FAILED at 389.
1 out of 2 hunks FAILED -- saving rejects to src/fios.cpp.rej
patching file `src/toolbar_gui.cpp'
Hunk #1 succeeded at 333 (offset 73 lines).
patching file `src/lang/english.txt'
Hunk #1 succeeded at 631 (offset -109 lines).
Hunk #2 succeeded at 2030 with fuzz 1 (offset 42 lines).
Hunk #3 succeeded at 3616 with fuzz 2 (offset 15 lines).
patching file `src/genworld_gui.cpp'
Hunk #1 succeeded at 31 (offset -3 lines).
Hunk #2 succeeded at 116 with fuzz 2 (offset 12 lines).
Hunk #3 succeeded at 281 (offset 34 lines).
Hunk #4 succeeded at 364 (offset 12 lines).
Hunk #5 succeeded at 410 with fuzz 1 (offset 34 lines).
Hunk #6 succeeded at 401 with fuzz 1 (offset 12 lines).
Hunk #7 FAILED at 411.
Hunk #8 succeeded at 476 with fuzz 2 (offset 46 lines).
Hunk #9 succeeded at 532 (offset 25 lines).
Hunk #10 succeeded at 565 (offset 46 lines).
Hunk #11 succeeded at 552 (offset 25 lines).
Hunk #12 FAILED at 920.
Hunk #13 succeeded at 985 (offset 36 lines).
Hunk #14 succeeded at 1019 with fuzz 2 (offset 47 lines).
Hunk #15 succeeded at 1176 with fuzz 2 (offset 40 lines).
Hunk #16 succeeded at 1215 with fuzz 2 (offset 51 lines).
Hunk #17 succeeded at 1270 with fuzz 2 (offset 40 lines).
Hunk #18 succeeded at 1298 (offset 51 lines).
Hunk #19 succeeded at 1320 with fuzz 1 (offset 40 lines).
2 out of 19 hunks FAILED -- saving rejects to src/genworld_gui.cpp.rej
patching file `src/town.h'
Hunk #1 succeeded at 367 with fuzz 2 (offset -3 lines).
patching file `src/misc_gui.cpp'
Hunk #1 succeeded at 1376 with fuzz 2 (offset 35 lines).
Hunk #3 succeeded at 1472 with fuzz 1 (offset 43 lines).
Hunk #4 succeeded at 1489 with fuzz 1 (offset 12 lines).
Hunk #5 succeeded at 1624 with fuzz 1 (offset 44 lines).
Hunk #6 succeeded at 1728 (offset 27 lines).
Hunk #7 succeeded at 1789 (offset 43 lines).
patching file `src/realistic_towns_gui.cpp'
patching file `src/town_cmd.cpp'
Hunk #1 FAILED at 1363.
Hunk #2 FAILED at 1426.
Hunk #3 succeeded at 2153 with fuzz 2 (offset 54 lines).
2 out of 3 hunks FAILED -- saving rejects to src/town_cmd.cpp.rej
patching file `src/realistic.h'
patching file `src/window_type.h'
Hunk #1 FAILED at 94.
1 out of 1 hunk FAILED -- saving rejects to src/window_type.h.rej
patching file `src/fios.h'
patching file `src/water.h'
Hunk #1 succeeded at 17 with fuzz 2.
patching file `src/terraform_gui.cpp'
Hunk #1 succeeded at 31 (offset 2 lines).
Hunk #2 succeeded at 457 (offset 13 lines).
Hunk #3 succeeded at 458 (offset 2 lines).
Hunk #4 FAILED at 493.
Hunk #5 succeeded at 669 (offset 23 lines).
Hunk #6 FAILED at 724.
2 out of 6 hunks FAILED -- saving rejects to src/terraform_gui.cpp.rej
patching file `src/town_gui.cpp'
Hunk #1 succeeded at 30 with fuzz 1 (offset 1 line).
Hunk #2 FAILED at 677.
Hunk #3 FAILED at 685.
Hunk #4 FAILED at 701.
Hunk #5 succeeded at 804 with fuzz 2 (offset 51 lines).
Hunk #6 FAILED at 834.
4 out of 6 hunks FAILED -- saving rejects to src/town_gui.cpp.rej
patching file `src/heightmap.cpp'
Hunk #1 succeeded at 14 with fuzz 2 (offset -3 lines).
Hunk #2 succeeded at 425 (offset 4 lines).
patching file `src/water_cmd.cpp'
Hunk #1 succeeded at 85 (offset -8 lines).
patching file `src/gui.h'
can't find file to patch at input line 1916
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Index: src/saveload.h
|===================================================================
|--- src/saveload.h (revision 13922)
|+++ src/saveload.h (working copy)
--------------------------
File to patch:
Skip this patch? [y]
Skipping patch.
1 out of 1 hunk ignored
patching file `src/realistic.cpp'
patching file `src/realistic_towns.cpp'
patching file `src/signs_func.h'
Hunk #1 succeeded at 10 with fuzz 2.
patching file `src/realistic_heightmap.cpp'
patching file `src/asc.h'
patching file `src/realistic_water.cpp'
patching file `src/signs.cpp'
Reversed (or previously applied) patch detected! Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to src/signs.cpp.rej
patching file `source.list'
Hunk #1 succeeded at 906 (offset 252 lines).

and during compile:

[SRC] Compiling ai/ai_gui.cpp
[SRC] Compiling ai/ai_info.cpp
[SRC] Compiling ai/ai_info_dummy.cpp
[SRC] Compiling ai/ai_instance.cpp
In file included from C:/msys/ottdsrc/0.7.2/src/ai/ai_storage.hpp:12,
from C:/msys/ottdsrc/0.7.2/src/ai/ai_instance.cpp:23:
C:/msys/ottdsrc/0.7.2/src/ai/../signs_func.h:15: warning: redundant redeclaration of `void MarkSignDirty(Sign*)' in same scope
C:/msys/ottdsrc/0.7.2/src/ai/../signs_func.h:13: warning: previous declaration of `void MarkSignDirty(Sign*)'
[SRC] Compiling ai/ai_scanner.cpp
[SRC] Compiling ai/api/ai_abstractlist.cpp
[SRC] Compiling ai/api/ai_accounting.cpp
[SRC] Compiling ai/api/ai_airport.cpp
In file included from C:/msys/ottdsrc/0.7.2/src/ai/api/ai_airport.cpp:10:
C:/msys/ottdsrc/0.7.2/src/ai/api/../../town.h:371: error: `TownSizeMode' has not been declared
C:/msys/ottdsrc/0.7.2/src/ai/api/../../town.h:371: error: ISO C++ forbids declaration of `size_mode' with no type
make[1]: *** [ai/api/ai_airport.o] Error 1
make[1]: Leaving directory `/ottdsrc/0.7.2/objs/release'
make: *** [all] Error 2

I noticed the patch said it was for r13922, but I thought that some one might have forgotten to change the name. Is it actually this old? If so, no wonder it didn't work...
Terkhen
OpenTTD Developer
OpenTTD Developer
Posts: 1034
Joined: 11 Sep 2008 07:32
Location: Spain

Re: Patch: Create realistic heightmap, water & town placement

Post by Terkhen »

Create your scenario with r13922. It will be compatible with 0.7.2 and trunk.
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Patch: Create realistic heightmap, water & town placement

Post by planetmaker »

Wasila wrote:Sorry if this has already been answered, but does this patch work with 0.7.2? I had a large number of failed hunks.

I noticed the patch said it was for r13922, but I thought that some one might have forgotten to change the name. Is it actually this old? If so, no wonder it didn't work...
Obviously.... And no, it's hard to "forget" to change the name. Each time you create one, you're asked for a filename... (usually).
Wasila
Tycoon
Tycoon
Posts: 1498
Joined: 15 Mar 2008 07:02

Re: Patch: Create realistic heightmap, water & town placement

Post by Wasila »

I've never actually created a patch.

Where can I get my hands on the right release? I know how to get to the branches but are regular nightlies also archived?
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: Patch: Create realistic heightmap, water & town placement

Post by petert »

If you sucessfully make a binary, please upload it. Mine went array.
Roujin
Tycoon
Tycoon
Posts: 1884
Joined: 08 Apr 2007 04:07

Re: Patch: Create realistic heightmap, water & town placement

Post by Roujin »

Use subversion, and specify the revision number to fetch. You can obtain any revision you like this way.

If you're using TurtoiseSVN, you can do the same by entering the desired revision in some field in the window...
* @Belugas wonders what is worst... a mom or a wife...
<Lakie> Well, they do the same thing but the code is different.

______________
My patches
check my wiki page (sticky button) for a complete list

ImageImage
ImageImageImageImageImageImageImage
Wasila
Tycoon
Tycoon
Posts: 1498
Joined: 15 Mar 2008 07:02

Re: Patch: Create realistic heightmap, water & town placement

Post by Wasila »

Erm, do I have to install TortoiseSVN or is there a command on msys? I've always used trunk...
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 2 guests