Page 10 of 14

Re: Patch: Grass growth on unused tracks

Posted: 29 May 2008 07:53
by Tautrimas
I've just played a bit with old 11226 revision and I must say it is pretty awesome feature. Maybe it is possible to update this patch?

Re: Patch: Grass growth on unused tracks

Posted: 21 Oct 2008 17:07
by Phazorx
Updated patch to r14450 (with hel of planetmaker)
(significant: moved data to m2 bits 8-15, to avoid overlapping wth YAPP)

Re: Patch: Grass growth on unused tracks

Posted: 21 Oct 2008 20:17
by planetmaker
actually... The source code tells that the old tracks info is moved to m7, the extended map array :)

Re: Patch: Grass growth on unused tracks

Posted: 26 Oct 2008 08:01
by boekabart
Phazorx wrote:Updated patch to r14450 (with hel of planetmaker)
(significant: moved data to m2 bits 8-15, to avoid overlapping wth YAPP)
Thanks for the update! For the record: since I don't have time to do it myself, I encourage other people to keep my patches alive!

Re: Patch: Grass growth on unused tracks

Posted: 18 Jan 2009 11:56
by MJS
This patch uses its own built-in graphics on top of any tracks set, doesn't it? Or does it need specially enhanced track grfs?

Re: Patch: Grass growth on unused tracks

Posted: 26 Apr 2009 21:33
by 2007Alain2007
heres is and update and also the GRF
grass on tracks.R16176.diff
oldtracks.grf

Re: Patch: Grass growth on unused tracks

Posted: 06 May 2009 14:14
by 2007Alain2007
This can be used for snow on tracks as well if some one draws the GRF for it the patch should work with both :)

Re: Patch: Grass growth on unused tracks

Posted: 27 Jun 2009 23:38
by dpaanlka
An additional idea - grass growth (or perhaps just general deterioration) on unused roads that have no local authority. In other words, any road that isn't too near a town (where it is more likely to be used by residents, etc) deteriorates over time with lack of use.

Re: Patch: Grass growth on unused tracks

Posted: 30 Jun 2009 23:57
by rsdworker
looks nice - useful for old abandoned lines

Re: Patch: Grass growth on unused tracks

Posted: 02 Jul 2009 22:17
by 2007Alain2007
Hi not knowing much about C++ but i would not think it be to hard to add road tiles to this

And also if some one made a new GRF file for this that had snow and sand you could use this in more then just the uk maps :)

Re: Patch: Grass growth on unused tracks

Posted: 25 Jul 2009 15:22
by drew22299
Sorry if this is a newbie question but how do you add this patch into the game? I have tried adding it to previous versions of OTTD but it didn't show up in the game or as new graphics.

Does this patch need to be compiled with source code for it to work?

Thanks,

Re: Patch: Grass growth on unused tracks

Posted: 25 Jul 2009 15:46
by DaleStan
Please read the sticky entitled "Howto apply a patch/diff file".

Re: Patch: Grass growth on unused tracks

Posted: 25 Jul 2009 20:44
by xZise
One note to the diff above (@ R16176):
You have to add "MP_" to the "RAILWAY" in the 3rd line of the function "IncreaseTrackUsage".

Sincerely
xZise

Re: Patch: Grass growth on unused tracks

Posted: 25 Jul 2009 20:47
by Yexo
xZise wrote:One note to the diff above (@ R16176):
You have to add "MP_" to the "RAILWAY" in the 3rd line of the function "IncreaseTrackUsage".

Sincerely
xZise
I have no idea what you did, but in the patch above there is MP_RAILWAY just as it should. Most likely you deleted the MP_ yourself by accident.

Re: Patch: Grass growth on unused tracks

Posted: 25 Jul 2009 22:50
by xZise
Yexo wrote:
xZise wrote:One note to the diff above (@ R16176):
You have to add "MP_" to the "RAILWAY" in the 3rd line of the function "IncreaseTrackUsage".

Sincerely
xZise
I have no idea what you did, but in the patch above there is MP_RAILWAY just as it should. Most likely you deleted the MP_ yourself by accident.
Oh.... This prefix also exists in the diff-file .... Hmmm I have no Idee, why it was missing, BUT :P there was a conflict. I fixed it semimanually by coping the code of this function. But I forgot some chars before "RAILWAY"! I saw it an fixed it by copy the rest. So there I forgot the "MP_" ^^ Okay :P The diff is okay an the patch great :) Unfortunately there is no influence on the train :(

Sincerely
xZise

Re: Patch: Grass growth on unused tracks

Posted: 26 Jul 2009 15:55
by drew22299
Thanks for the information! I'm working as web developer using C# ASP.net - is C++ much different from C#? I was thinking about looking at the source code and having a go at developing something for OTTD.

Re: Patch: Grass growth on unused tracks

Posted: 26 Jul 2009 21:42
by CommanderZ
drew22299 wrote:Thanks for the information! I'm working as web developer using C# ASP.net - is C++ much different from C#? I was thinking about looking at the source code and having a go at developing something for OTTD.
Syntax is basically the same, but that's where the similiarity ends ;)

Re: Patch: Grass growth on unused tracks

Posted: 27 Jul 2009 06:17
by DaleStan
Starting from a language-lawyery knowledge of C++, and rather limited knowledge of C#:
C++ has multiple inheritance instead of interfaces.
C++ has three operators (five, actually, but you'll never see or use two of them) in place of C#'s dot operator.
C++ doesn't enforce the Java-y everything-lives-in-a-class concept. (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.)
C++ lets you overload operators more freely. (In standard C++, for example, it is legal to shift cout "Hello World!" bits to the left. It is further legal to overload the function-call and comma operators. Also (though you should NEVER EVER DO THIS -- provide an implicit conversion to bool instead) && and ||.)
C++ permits programmer-defined implicit conversions. (eg implicit conversions from a file stream to a bool.)
C++ does not have properties. But you can simulate them with a class with overridden assignment and implicit conversion operators.
C++ does not have indexers. But you can simulate them by overloading operator []. (See also above. And you can use non-POD types as indices.)
C++ uses public, protected, and private differently.
C++ templates (Generics) can take parameters that are any combination of any number of types and values. (e.g. bitset<256>)
C++ has pointers in addition to value and reference types.

To some extent, C++ is C# with the safety off. If you want to be protected from shooting yourself in the foot, use C#. But if you need to shoot between your toes, C# won't let you, even if you do know enough to be able to do it safely. Use C++ for that.

Re: Patch: Grass growth on unused tracks

Posted: 27 Jul 2009 10:18
by drew22299
Thanks for the detailed answer, I didn't realise there were that many differences between the two languages. I looked at the source code and I can see what most of the code is doing but there are so many classes lol

Re: Patch: Grass growth on unused tracks

Posted: 27 Jul 2009 10:29
by Alberth
drew22299 wrote:I looked at the source code and I can see what most of the code is doing but there are so many classes lol
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.