Page 1 of 9

Tib's Patch Pack v2.6 (r14004)

Posted: 12 Jun 2008 07:57
by Tiberius
Without a thread it was too hidden under Roest's thread ... :mrgreen:

(2008-08-07, V2.6):
Updated various patches, and congratulations to YAPP which made its way into trunk! 8)
Added Diesel Smoke
Added Timetable-based Separation
Added Realistic Acceleration fine-tune
REMOVED New Graphs since it need some hack to correctly support the new player pool in trunk

(2008-07-28, V2.5):
Fixed the AI problem in Distant Join Stations patch. Thanks makbeth (author of RCPP) for kindly providing a fix :D

The next version will incorporate the two-column NewGRF GUI with NewGRF presets function support ...
but I'm gonna play Valkyria Chronicles for a while, see ya :oops:

(2008-07-24, V2.4):
Updated to r13810.
AI IS BROKEN. I don't know which patch or patch combination is responsible to this, and I don't have time to debug this either. If you want to play with AI, please trace the bug yourself or use another build instead ...

NewGRF GUI should update to incorporate the new GRF preset function, but I don't have time.

New Graphs should update to accommodate the possibility of additional players, but I don't have time.

So ... please enjoy in its current form ... :roll:

(2008-07-15, V2.3):
Updated to r13704.
Fixed Transfer/Unload button problem (strange patch error ...)
Fixed GCC unhappy with graph_gui.cpp problem

(The SSE2 build is way more popular than I anticipated, honestly ...
Seems there are MANY people playing OTTD with a decent computer yes? :P )

(2008-07-12, V2.2):
Small edit on Copy & Paste so it would correctly copy various types of railway signals.

(2008-07-11, V2.1):
Fixed bugs in Daylength, Filter by Cargo, OpenGL Blitter.
Added Extra Large Maps, Order Jump based on Waiting/Accepted Cargo.

(2008-07-11, V2):
Updated to r13691.
Sorry for new patch suggestions, will try including them later ...

Perhaps you'd like to try the SSE2 build if you got a CPU supporting SSE2 (K8/P4/PM/Core) and planning to play with OpenGL blitter. Otherwise it's almost meaningless since the only places using floating point arithmetic in OTTD are TerraGenesis and OpenGL blitter ... :wink:

The OpenGL blitter still needs '-v win32gl/sdlgl -b opengl' or proper entries in openttd.cfg to activate, please refer to the specific topic for more info.

(2008-06-12, V1):
modified version string per request, added previously missing language files, and small update to trunk, otherwise not changed.

Included patches:

Build Templates (Copy & Paste)
Daylength (there seems some problems on AI starting date, try set-then-reset daylength if the AI didn't start)
Diesel smoke
Disable Tree Growth Setting
Distant Join Stations
Drag & Drop Land Purchase
Extra Large Maps
Fastest Bridge: Ctrl-Drag bridge instantly build fastest available
Filter by Cargo
Infrastructure Sharing + Closing Airports (v05_r13830)
Middle Stop: Trains shorter than the station stop at the middle of the platform
Multiengine Normalization
NewGRF GUI Window Replacement
New Graphs (REMOVED. Need some hack to correctly support new player pool ...)
OpenGL Blitter
Order Jump based on Waiting/Accepted Cargo
Quick Goto: Goto button already active, Ctrl+Click to full load
Realistic acceleration fine-tune (depot entering/exiting speed)
Timetable-based Separation
YAPP - Yet Another PBS Patch (already in trunk!)

Not extensively tested so expect bugs/desyncs ...
Comments and patches are welcomed :lol:
But for my current situation I won't be able to update this very often, so don't hold your breath.

Re: Tib's Patch Pack (r13434)

Posted: 12 Jun 2008 10:36
by CommanderZ
Looks great, I love your patch taste.

Testing right now.

EDIT: Did you build it with MSVS? This pack has the same bug as my Better Map Borders patch - it crashes while editing the random seed. That would mean this bug is not caused by me but by the MSVS compiler. Great!

EDIT2: It can't load my save game saved with C&P r13265 executable :(

EDIT3: Bug report: it shows question sign instead of euro and pound signs ingame. Dollar works.

Re: Tib's Patch Pack (r13434)

Posted: 12 Jun 2008 11:08
by tkz
Cheers for the update.

Is it possible to add the Minimum Town Distance just for me ;] I'm too much of a cretin to add patches myself :P

Re: Tib's Patch Pack (r13434)

Posted: 12 Jun 2008 16:05
by Ammler
> patch -p1 < patchpack-r13434.patch
(that wouldn't work with BOTTD, afaik.)

...
patching file src/currency.cpp
Hunk #1 FAILED at 1.
...
patching file src/table/namegen.h
Hunk #1 FAILED at 1.
...
(but only something with $Id$)

src/lang/afrikaans.txt:2614: warning: STR_TIMETABLE_DAYS: Param idx #1 '<empty>' doesn't match with template command 'NUM'
(similar errors with other languages...)


src/build_vehicle_gui.cpp: In function ‘void ShowBuildVehicleWindow(TileIndex, VehicleType)’:
src/build_vehicle_gui.cpp:843: warning: array subscript is below array bounds

And it shows still the revision r13434M, I thought, you changed that to something like r13434M-TiPP? (in rev.cpp.in)


Beside that it seems to work quite well... :-)

Greets
Ammler

Edit: Added the Linux Build
Edit2: Added my SVN diff and "a working" windows bin.
(You need to download copypaste.grf seperatly.
Edit3: Bins removed...

Re: Tib's Patch Pack (r13434)

Posted: 12 Jun 2008 21:35
by Tiberius
EDIT: Did you build it with MSVS? This pack has the same bug as my Better Map Borders patch - it crashes while editing the random seed. That would mean this bug is not caused by me but by the MSVS compiler. Great!
Yes, I built it with Visual Studio 2005 SP1.
Could you tell me where to 'edit the random seed' ?
Maybe I can catch this bug in a debug build ...
EDIT2: It can't load my save game saved with C&P r13265 executable :(
Multiengine normalization & Infrastructure sharing both changes savegame version, I don't know a way to make them compatible with trunk build while trunk build also evolves savegame version ...
EDIT3: Bug report: it shows question sign instead of euro and pound signs ingame. Dollar works.
Seems a VS2005 bug/lack of feature. It refuse to compile currency.cpp/namegen.h complaining they contain illegal characters, forcing me add a BOM to let VS2005 treat them (correctly) as UTF-8 encoded source files (and it won't do hurt to GCC, AFAIK).

But then it decided to 'convert' these strings into my current codepage, which don't contain euro/pound symbols, when creating object files ...

I don't know how to force VS2005 output them as-is (yet), so sorry about this.

(I guess this can be solved as a GRF providing currency information / town names, but I only glimpsed the NewGRF spec)
patching file src/currency.cpp
Hunk #1 FAILED at 1.
...
patching file src/table/namegen.h
Hunk #1 FAILED at 1.
...
(but only something with $Id$)
It's the UTF-8 BOM I added to these files.
src/lang/afrikaans.txt:2614: warning: STR_TIMETABLE_DAYS: Param idx #1 '<empty>' doesn't match with template command 'NUM'
(similar errors with other languages...)
The modified daylength patch will show time of the day in timetables, when daylength > 15, and the corresponding string aren't updated in these language files.
And it shows still the revision r13434M, I thought, you changed that to something like r13434M-TiPP? (in rev.cpp.in)
The pack can be applied to r13481, and I used 'r13481M-TibPP' as the version string.

Re: Tib's Patch Pack (r13434)

Posted: 13 Jun 2008 07:35
by CommanderZ
Yes, I built it with Visual Studio 2005 SP1.
Could you tell me where to 'edit the random seed' ?
Maybe I can catch this bug in a debug build ...
When you are creating a new game with TerraGenesis, you can manually change its random seed. And when you focus and modify this text field, the game crashes. It seems to be a bug in OTTD (or MSVS). I already posted it on flyspray.
Seems a VS2005 bug/lack of feature. It refuse to compile currency.cpp/namegen.h complaining they contain illegal characters, forcing me add a BOM to let VS2005 treat them (correctly) as UTF-8 encoded source files (and it won't do hurt to GCC, AFAIK).

But then it decided to 'convert' these strings into my current codepage, which don't contain euro/pound symbols, when creating object files ...

I don't know how to force VS2005 output them as-is (yet), so sorry about this.

(I guess this can be solved as a GRF providing currency information / town names, but I only glimpsed the NewGRF spec)
Ok. I will play with dollars :twisted:

Re: Tib's Patch Pack (r13434)

Posted: 13 Jun 2008 08:03
by Ammler
CommanderZ wrote: Ok. I will play with dollars :twisted:
Try my winbin: http://www.tt-forums.net/viewtopic.php?p=699697#p699697

Greets
Ammler

Re: Tib's Patch Pack (r13434)

Posted: 13 Jun 2008 08:31
by CommanderZ
Thanks, works great.

Btw, why are MSVS executables twice as small as others? They are always 1.8 MB or so and other exacutables are 3+ MB...

Re: Tib's Patch Pack (r13434)

Posted: 13 Jun 2008 08:48
by Indiana
I have Ammlers Linux version running on my Server:
http://www.openttd.org/server_detail.php?id=20358
Actually I'm most interested in the Infrastructure Sharing!
So share as many as posible :-)

Re: Tib's Patch Pack (r13434)

Posted: 13 Jun 2008 09:32
by Ammler
CommanderZ wrote:They are always 1.8 MB or so and other exacutables are 3+ MB...

Maybe those don't include the whole binary folder to the pack. I make a zip (exe isn't allowed) of the whole bin without checking, which files can be removed.

Greets
Ammler

Re: Tib's Patch Pack (r13434)

Posted: 13 Jun 2008 10:05
by CommanderZ
I mean the executables. Look - your exe has 3.38 MB while Tiberius' has 1.8. My executables are aways that small too.

Re: Tib's Patch Pack (r13434)

Posted: 13 Jun 2008 10:07
by Indiana
Maybe it is compiled as a static?

Re: Tib's Patch Pack (r13434)

Posted: 13 Jun 2008 11:11
by Tiberius
I think the size is affected by compilers & compiler settings. For my example, I use VC2005 with default OTTD visual studio project settings, full optimization & favor small code size, but not omitting frame pointer.

Not really benchmarked this but I once heard that smaller code size could better fit into CPU cache, thus not necessarily slower.

Also, omitting frame pointer on x86 will clear up a register, but it also makes all stack accessing code longer (using ESP instead of EBP need a longer prefix), so the code won't necessarily faster, too ...

Re: Tib's Patch Pack (r13434)

Posted: 14 Jun 2008 06:25
by wozzar
I just downloaded the pack and ran the game. How ever i have 7 un named AI and they are not doing anything.

Re: Tib's Patch Pack (r13434)

Posted: 14 Jun 2008 09:30
by planetmaker
Hm... I compiled a binary on my Mac - but the result is an executable which consumes 100% CPU without displaying anything at all :S ...

Re: Tib's Patch Pack (r13434)

Posted: 15 Jun 2008 20:20
by Tiberius
CommanderZ wrote: When you are creating a new game with TerraGenesis, you can manually change its random seed. And when you focus and modify this text field, the game crashes. It seems to be a bug in OTTD (or MSVS).
genworld_gui.cpp wrote: _settings_newgame.game_creation.generation_seed = minu(strtoul(this->edit_str_buf, NULL, sizeof(this->edit_str_buf) - 1), MAX_UVALUE(uint32) - 1);
I believe this line has a BIG problem. The third argument for strtoul() should be a number base to use (like 10), not the string length ...

Re: Tib's Patch Pack (r13434)

Posted: 15 Jun 2008 22:37
by glx
Fixed in trunk since r13508.

Re: Tib's Patch Pack (r13434)

Posted: 16 Jun 2008 08:32
by Indiana
Indiana wrote:I have Ammlers Linux version running on my Server:
http://www.openttd.org/server_detail.php?id=20358
Actually I'm most interested in the Infrastructure Sharing!
So share as many as posible :-)
Feedback:
Desync's are much less than with roests pack!
One night the Server died allways on the same Date (think some event ocure in-game) but after some restart it is now running without any bigger problems.

Re: Tib's Patch Pack (r13434)

Posted: 16 Jun 2008 10:57
by wozzar
glx wrote:Fixed in trunk since r13508.
What was fixed the problem i had or something else.

Re: Tib's Patch Pack (r13434)

Posted: 16 Jun 2008 15:52
by glx
wozzar wrote:
glx wrote:Fixed in trunk since r13508.
What was fixed the problem i had or something else.
What Tiberius noticed.