Tramroads for OTTD

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

User avatar
Octopussy
Engineer
Engineer
Posts: 122
Joined: 01 May 2006 21:57

Post by Octopussy »

Toni Babelony wrote:I've found a few GRFs that contain trams:

-Hiroshima Tram set (including Iyo-Dentetsu trams drawn by me);
-German Tram set;
-Serbian tram set;
-Czech tram set;
On GRF Crawler I have fond only two GRF which contain tram : the German and the Serbian Set
User avatar
Valance
Engineer
Engineer
Posts: 28
Joined: 06 Feb 2007 07:17

Post by Valance »

But what GRF we need ?
Seems to be time to edit the first posting in this thread to be used for changelog and downloads. But not now ;)

Here is the needed grf (you still need one with tram vehicles) and a win32 binary (with lang files). I hope it works, wine says it's ok...
Attachments
tramroads.grf
(41.03 KiB) Downloaded 1235 times
tramroads_win32.7z
(1.37 MiB) Downloaded 1436 times
User avatar
Celestar
Director
Director
Posts: 574
Joined: 02 Jul 2004 10:56
Contact:

Post by Celestar »

Could you update your working copy? I've been trying to read through the diff and its full of the drive-through-roadstop code which is in trunk already, which makes reading it kind of hard :)

Celestar
User avatar
Octopussy
Engineer
Engineer
Posts: 122
Joined: 01 May 2006 21:57

Post by Octopussy »

Yeah, your diff file is incorrect Valance.

I have another problem with your .exe file : I have build a tram depot and it's impossible to build a tram in it, there are no tram available.

I have previously installed the Geman Tram Set..
Attachments
No Trams available to build in the depot
No Trams available to build in the depot
Nartfingley Transport, Trams.png (66.35 KiB) Viewed 1544 times
User avatar
jklamo
Engineer
Engineer
Posts: 66
Joined: 30 May 2004 00:10
Contact:

Post by jklamo »

Octopussy wrote:Yeah, your diff file is incorrect Valance.

I have another problem with your .exe file : I have build a tram depot and it's impossible to build a tram in it, there are no tram available.

I have previously installed the Geman Tram Set..
same with me, can build tramtracks and depot, have loaded tram GRF (CSTramSet), but no tram available...

EDIT: magic resetengines console command worked OK. With small issues works also for tunnels and bridges. Good work !
Attachments
Test Transport 7th Sep 2040.png
(111.33 KiB) Downloaded 353 times
Last edited by jklamo on 25 Feb 2007 19:04, edited 2 times in total.
User avatar
Valance
Engineer
Engineer
Posts: 28
Joined: 06 Feb 2007 07:17

Post by Valance »

Yeah, your diff file is incorrect Valance.
I'm sorry for this :(
I have another problem with your .exe file : I have build a tram depot and it's impossible to build a tram in it, there are no tram available.
After cross compiling ottd I started the binary with wine, just to see whether the binary will work under windows, I didn't check building tramrails / trams. But did you see the game year (2001) in my screenshots? Tram vehicles have an construction year, change your starting year or proceed in game time and tram vehicles will become available. They are using same code as normal road vehicles, making me believe it's not a bug ;)
Could you update your working copy? I've been trying to read through the diff and its full of the drive-through-roadstop code which is in trunk already, which makes reading it kind of hard Smile
After getting remove roads/tramrails working correct (I hope) I updated it yesterday. But I'm rather unhappy with my tramsupport functions (in road_map / road_cmd). Perhaps you have some better ideas?
Attachments
tramrails-2402-1.diff
(51.33 KiB) Downloaded 397 times
User avatar
Octopussy
Engineer
Engineer
Posts: 122
Joined: 01 May 2006 21:57

Post by Octopussy »

Thanks for your diff :D
After getting remove roads/tramrails working correct (I hope) I updated it yesterday. But I'm rather unhappy with my tramsupport functions (in road_map / road_cmd).

Yes
I have several errors in
road_cmd.cpp
road_gui.cpp
build_vehicule_gui.cpp

:evil:
User avatar
Valance
Engineer
Engineer
Posts: 28
Joined: 06 Feb 2007 07:17

Post by Valance »

Hm, but you tried to apply it to rev 8858? (I really should write on which rev my diff is based... silly-me)
Rubidium
OpenTTD Developer
OpenTTD Developer
Posts: 3815
Joined: 09 Feb 2006 19:15

Post by Rubidium »

Octopussy, you should apply the patch against revision 8858 of trunk. Anything else it likely to give rejects and thus compile errors; it compiles just fine for me.

Valance, could you explicitly tell against which revision you have made the patches? Preferably in the name of the diff, so something like tramroads-r8858.diff.

And another request, could you check that your editor actually reads the files as UTF8, because it made a mess of gfxinit.cpp.
User avatar
Valance
Engineer
Engineer
Posts: 28
Joined: 06 Feb 2007 07:17

Post by Valance »

And another request, could you check that your editor actually reads the files as UTF8, because it made a mess of gfxinit.cpp.
Oh :( Not again this silly utf8 problem :shock: This time Eclipse produced it... back to vim again.
User avatar
Octopussy
Engineer
Engineer
Posts: 122
Joined: 01 May 2006 21:57

Post by Octopussy »

Rubidium wrote:Octopussy, you should apply the patch against revision 8858 of trunk. Anything else it likely to give rejects and thus compile errors; it compiles just fine for me.
OK very nice :P

0 error for patching it :D

Thanks at all !

And only 9 warnings for conversion between int, byte and bool

but under MSVC these warnings are errors... :?
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

Could you actually quote the error messages, instead of just mentioning their existence?
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
User avatar
Octopussy
Engineer
Engineer
Posts: 122
Joined: 01 May 2006 21:57

Post by Octopussy »

DaleStan wrote:Could you actually quote the error messages, instead of just mentioning their existence?
OK

but it is in french :)
Compilation...
road_cmd.cpp
\source-svn\src\road_cmd.cpp(570) : error C2220: avertissement considéré comme une erreur - aucun fichier objet généré
\source-svn\src\road_cmd.cpp(570) : warning C4800: 'uint32' : valeur forcée à la valeur booléenne 'true' ou 'false' (avertissement sur les performances)
road_gui.cpp
\source-svn\src\road_gui.cpp(431) : error C2220: avertissement considéré comme une erreur - aucun fichier objet généré
\source-svn\src\road_gui.cpp(431) : warning C4800: 'int' : valeur forcée à la valeur booléenne 'true' ou 'false' (avertissement sur les performances)
\source-svn\src\road_gui.cpp(432) : warning C4800: 'int' : valeur forcée à la valeur booléenne 'true' ou 'false' (avertissement sur les performances)
\source-svn\src\road_gui.cpp(433) : warning C4800: 'int' : valeur forcée à la valeur booléenne 'true' ou 'false' (avertissement sur les performances)
\source-svn\src\road_gui.cpp(434) : warning C4800: 'int' : valeur forcée à la valeur booléenne 'true' ou 'false' (avertissement sur les performances)
build_vehicle_gui.cpp
\source-svn\src\build_vehicle_gui.cpp(656) : error C2220: avertissement considéré comme une erreur - aucun fichier objet généré
\source-svn\src\build_vehicle_gui.cpp(656) : warning C4805: '!=' : mélange risqué de type 'bool' et de type 'byte' dans l'opération
Génération de code en cours...
User avatar
glx
OpenTTD Developer
OpenTTD Developer
Posts: 623
Joined: 02 Dec 2005 15:43
Location: Drancy(93) - France
Contact:

Post by glx »

Here is the translation of the warnings :
C4800 = 'type' : forcing value to bool 'true' or 'false' (performance warning)
C4805 = 'operation' : unsafe mix of type 'type' and type 'type' in operation
User avatar
Valance
Engineer
Engineer
Posts: 28
Joined: 06 Feb 2007 07:17

Post by Valance »

And another request, could you check that your editor actually reads the files as UTF8, because it made a mess of gfxinit.cpp.
After 4 hours reading howto's, manuals and forums, I didn't find out whats wrong with gentoos unicode support. A bit disappointed about this conclusion I tried to load original gfxinit.cpp with iso-8859-1 (my older linux distros were using it) encoding instead of utf8. It worked :) The same helped me in Eclipse. Now it seems to me, sources aren't utf8 encoded, or my svn converts them from utf8 to iso-8859-1 while checking out. But never mind, problem solved for me ;)
And only 9 warnings for conversion between int, byte and bool
I'll fix those warnings.
User avatar
Octopussy
Engineer
Engineer
Posts: 122
Joined: 01 May 2006 21:57

Post by Octopussy »

You should also deactivate the truck station button in the tramroad construction box and replace it by a autoreplace button (for making the conversion between road and tramroad automatically).

And in the tram station box there are 4 unexpected choices..

Good luck 8)
User avatar
Valance
Engineer
Engineer
Posts: 28
Joined: 06 Feb 2007 07:17

Post by Valance »

deactivate the truck station button in the tramroad construction box and replace it by a autoreplace button (for making the conversion between road and tramroad automatically).
Truck (drive-through) station will stay enabled, ttdpatch didn't disable it and perhaps someone will make a grf with trams capable of transporting other cargo than passangers (mail, for example).

Hm, conversion between road and tramrails..., I think the manual conversion like it's already working is enough ;)

Conversion between bus stops and tram stops (and bus/tram stops) will be done by placing the needed roadtype (road/tramrails) onto them (later it will be possible to convert a bus stop into a bus/tram stop while placing a line of tramrails). Conversion from bus/tram stop to just bus stop (and bus/tram to just tram stop) will be done by remove road (or tramrail) from bus/tram stop. (same principle will do converting bridges and tunnels) Hope my explanation is somewhat understandable ;)
And in the tram station box there are 4 unexpected choices..
In my first diff (I think) I had the buttons for normal roadstops disabled, but at the moment they are enabled again. (don't forget, diffs are just work in progress snapshots)
User avatar
Octopussy
Engineer
Engineer
Posts: 122
Joined: 01 May 2006 21:57

Post by Octopussy »

Truck (drive-through) station will stay enabled, ttdpatch didn't disable it and perhaps someone will make a grf with trams capable of transporting other cargo than passangers (mail, for example).
I think this kind of transportation don't exist in real life
Trams are only for passengers, like bus.

8)
Last edited by Octopussy on 25 Feb 2007 15:51, edited 1 time in total.
broodje
Director
Director
Posts: 617
Joined: 13 Jul 2003 12:47
Location: Alphen aan den Rijn
Contact:

Post by broodje »

not true, in Germany there is even a special cargo tram for car-parts (isn't it in Dresden for the VW factory?) and Amsterdam (in the Netherlands) is currently experimenting with cargo trams.

Not to mention that during the 1900 till 1950(?) there was a coal tram in Groningen that transported Coal to the 'coal gas' plant.

I'm sure there are more examples.
User avatar
OczeQ
Engineer
Engineer
Posts: 29
Joined: 16 Nov 2005 21:41
Location: Gliwice, Poland
Contact:

Post by OczeQ »

see here, if You don't believe :)
http://en.wikipedia.org/wiki/CarGoTram
Image
Locked

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 17 guests