Patch: Grass growth on unused tracks

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
cirdan
Director
Director
Posts: 539
Joined: 07 Apr 2007 18:08

Re: Patch: Grass growth on unused tracks

Post by cirdan »

DaleStan wrote:In fact, baring the corner cases where C code uses one of C++'s new reserved words, all valid C code is valid C++ code.
...for certain values of "all"

Code: Select all

int n = 0;
switch (n)
{
    int x = 3;
default:
    return 0;
}
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: Patch: Grass growth on unused tracks

Post by DaleStan »

That's valid C? I was not aware of that. (Learn something every day.)
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
drew22299
Engineer
Engineer
Posts: 58
Joined: 05 Jun 2006 15:30

Re: Patch: Grass growth on unused tracks

Post by drew22299 »

I don't see why that is funny, but yes, there are a lot of classes and support functions.
You don't need to understand everything before you can make changes, so just study the part that you are interested in.
I didn't mean it's funny how many classes there are, just suprised there are that many. Very interesting tho - how long do you think it took to actually design and program the first version of tt?
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Patch: Grass growth on unused tracks

Post by planetmaker »

drew22299 wrote:how long do you think it took to actually design and program the first version of tt?
If you meant OpenTTD: about one year: http://en.wikipedia.org/wiki/OpenTTD#History
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: Patch: Grass growth on unused tracks

Post by DaleStan »

If you feel that OpenTTD has an excessively large number of classes, then you should consider getting into TTDPatch development instead.

:twisted:
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
boekabart
Transport Coordinator
Transport Coordinator
Posts: 333
Joined: 25 Aug 2005 09:44
Location: Eindhoven, Netherlands

Re: Patch: Grass growth on unused tracks

Post by boekabart »

DaleStan wrote:If you feel that OpenTTD has an excessively large number of classes, then you should consider getting into TTDPatch development instead.
Hee hee, unless you don't like 'an excessively amount of lines of x86 assembler' :lol:
drew22299
Engineer
Engineer
Posts: 58
Joined: 05 Jun 2006 15:30

Re: Patch: Grass growth on unused tracks

Post by drew22299 »

Hi,

Can someone provide me with a step by step guide on how to add this mod? I'm guessing you have to download the source code for OTTD, change some code and then compile it?

Thanks in advance I will appreciate any information on how to add this mod :)
User avatar
adf88
Chief Executive
Chief Executive
Posts: 644
Joined: 14 Jan 2008 15:51
Location: PL

Re: Patch: Grass growth on unused tracks

Post by adf88 »

:] don't worry, be happy and checkout my patches
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: Patch: Grass growth on unused tracks

Post by petert »

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

Re: Patch: Grass growth on unused tracks

Post by petert »

drew22299 wrote:Hi,

Can someone provide me with a step by step guide on how to add this mod? I'm guessing you have to download the source code for OTTD, change some code and then compile it?

Thanks in advance I will appreciate any information on how to add this mod :)
I felt generous today. ;)

Download binaries here
Attachments
Finnley Transport, 23rd Apr 1965.png
Finnley Transport, 23rd Apr 1965.png (13.76 KiB) Viewed 9847 times
Finnley Transport, 7th Sep 1965.png
Finnley Transport, 7th Sep 1965.png (15.59 KiB) Viewed 9847 times
boekabart
Transport Coordinator
Transport Coordinator
Posts: 333
Joined: 25 Aug 2005 09:44
Location: Eindhoven, Netherlands

Re: Patch: Grass growth on unused tracks

Post by boekabart »

How cool that this patch is still up-to-date, haven't touched it in so long...
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: Patch: Grass growth on unused tracks

Post by petert »

Not really, this patch is back about 1000 revisions.
drew22299
Engineer
Engineer
Posts: 58
Joined: 05 Jun 2006 15:30

Re: Patch: Grass growth on unused tracks

Post by drew22299 »

I felt generous today. ;)

Download binaries here
Thanks :D
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: Patch: Grass growth on unused tracks

Post by petert »

Sorry, it failed to update to trunk (something to do with rail.cpp)
boekabart
Transport Coordinator
Transport Coordinator
Posts: 333
Joined: 25 Aug 2005 09:44
Location: Eindhoven, Netherlands

Re: Patch: Grass growth on unused tracks

Post by boekabart »

petert wrote:Sorry, it failed to update to trunk (something to do with rail.cpp)
Fixed.
Attachments
boekabart_grassOnTracks_r17778.diff
Updated to trunk r17778
(10.51 KiB) Downloaded 143 times
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: Patch: Grass growth on unused tracks

Post by petert »

I finished all my schoolwork so I had time to make this:

Here

and:
GRF Here
User avatar
bigos
Traffic Manager
Traffic Manager
Posts: 181
Joined: 13 Sep 2009 21:15
Location: Poland
Contact:

Re: Patch: Grass growth on unused tracks

Post by bigos »

Grate patch boekabart! Added it to my server pack :)
I have an idea about improving it a bit... Maybe make small speed reduction when tracks are with grass? like 1-5% speed reduction for each phase of growth? I'm not sure if its possible in easy way...
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: Patch: Grass growth on unused tracks

Post by petert »

bigos wrote:Grate patch boekabart! Added it to my server pack :)
I have an idea about improving it a bit... Maybe make small speed reduction when tracks are with grass? like 1-5% speed reduction for each phase of growth? I'm not sure if its possible in easy way...
I've been looking for your patchpack for a while, wanted to join your servers :).
User avatar
bigos
Traffic Manager
Traffic Manager
Posts: 181
Joined: 13 Sep 2009 21:15
Location: Poland
Contact:

Re: Patch: Grass growth on unused tracks

Post by bigos »

So what do you think about adding small speed reduction caused by grass? And second thing.. If there is grass i think would be nice to have snow in arctic scenarios :) could be hard to make it depend on actual line of snow but it should be doable. Of course snow should reduce speed same or even more then grass. If someone don't like speed reduction there can be option to turn it off in advanced settings.
User avatar
Gremnon
Tycoon
Tycoon
Posts: 1517
Joined: 16 Sep 2005 12:23
Skype: the_gremnon
Location: /home
Contact:

Re: Patch: Grass growth on unused tracks

Post by Gremnon »

If there is to be a speed reduction, I for one would want it toggle-able.
And snow for arctic is good, how about also sand for the desert parts of tropic though?
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 5 guests