Random road construction (r17455)

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

Roujin
Tycoon
Tycoon
Posts: 1884
Joined: 08 Apr 2007 04:07

Random road construction (r17455)

Post by Roujin » 29 Feb 2008 18:30

I decided to split off the random road construction feature from my traffic lights patch.

You get a new advanced setting (under economy->towns) to enable random road construction to be started in towns. The number is basically a % value of the chance for road construction when it is funded. e.g. setting it to 1 means the chance for random road construction is one hundredth the chance of funded road construction.

The setting goes from 0 (off) to 20 (1/5 of the chance when roadworks were funded, which is already pretty annoying if you ask me.)

Here's the patch:
r17455


(old versions:)
r12320
r12436
r12628
r12733
r13417
r14494
random_road_construction_v1_r12628.diff
random road construction v1 for r12628
(3.22 KiB) Downloaded 395 times
random_road_construction_v1_r12436.diff
random road construction v1 for r12436
(3.22 KiB) Downloaded 306 times
random_road_construction_v1_r12320.diff
random road construction v1 for r12320
(3.22 KiB) Downloaded 346 times
Last edited by Roujin on 07 Sep 2009 14:03, edited 10 times in total.
* @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

User avatar
FooBar
Tycoon
Tycoon
Posts: 6559
Joined: 21 May 2007 11:47
Location: The Netherlands
Contact:

Re: [Patch]Random road construction

Post by FooBar » 29 Feb 2008 18:57

And yet another fine Roujin patch :D

I think your list of "patches in trunk" is far too short compared to the other list :wink:

peter1138
OpenTTD Developer
OpenTTD Developer
Posts: 1646
Joined: 30 Mar 2005 09:43

Re: [Patch]Random road construction

Post by peter1138 » 29 Feb 2008 19:29

FooBar wrote:I think your list of "patches in trunk" is far too short compared to the other list :wink:
Mainly because trunk is in feature freeze at the moment ;-)
He's like, some kind of OpenTTD developer.

User avatar
FooBar
Tycoon
Tycoon
Posts: 6559
Joined: 21 May 2007 11:47
Location: The Netherlands
Contact:

Re: [Patch]Random road construction

Post by FooBar » 29 Feb 2008 19:58

I'll take that as a "will get into trunk as soon as 0.6.0 is final" :wink:

User avatar
rbenevid
Traffic Manager
Traffic Manager
Posts: 192
Joined: 14 Oct 2004 20:08
Location: Brazil

Re: [Patch]Random road construction

Post by rbenevid » 29 Feb 2008 22:18

Most of Roujin's patches are small and incredibly useful. I think they're in as soon as the feature freeze is off.
And as soon as people decide what verb to use in "Supplied Cargo" patch. :lol:

LordAzamath
Tycoon
Tycoon
Posts: 1656
Joined: 08 Jun 2007 08:00

Re: [Patch]Random road construction

Post by LordAzamath » 04 Mar 2008 21:13

Supplied? I thought it should've been... ok. Not in this thread :P
But I think yes, that Roujins patches are almost always incredibly useful too :P
PS: And I stopped the propaganda to support Dave Worley since he got a nice new red hat now.[/color]
I know I have a BBCode error in my signature but I really cba to fix it.

wleader
Engineer
Engineer
Posts: 123
Joined: 18 May 2007 09:04

Re: Random road construction (v1; r12628)

Post by wleader » 14 Apr 2008 11:55

I just started up a build that included this patch and saw that the town in the title screen had road construction in progress. Kinda neat really.

Roujin
Tycoon
Tycoon
Posts: 1884
Joined: 08 Apr 2007 04:07

Re: Random road construction (v1; r12733)

Post by Roujin » 16 Apr 2008 16:48

updated to current trunk.
Attachments
random_road_construction_v1_r12733.diff
random road construction v1 for r12733
(3.66 KiB) Downloaded 312 times
* @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

Roujin
Tycoon
Tycoon
Posts: 1884
Joined: 08 Apr 2007 04:07

Re: Random road construction (r13417)

Post by Roujin » 08 Jun 2008 17:13

Update to r13417.
Attachments
random_road_construction.diff
random road construction #39 for r13417
(4.19 KiB) Downloaded 324 times
* @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

User avatar
Mooияakeя™
Engineer
Engineer
Posts: 9
Joined: 17 Oct 2008 10:47
Location: England

Re: Random road construction (r13417)

Post by Mooияakeя™ » 17 Oct 2008 12:34

OK, I've read the "how to apply a patch" and I'm still boxed.

So these .diff's can't be added to the normal releases like grf's?

I'm not completely incompetent and would understand easily any other times, I'm just not getting this at all.

a.locritani
Engineer
Engineer
Posts: 111
Joined: 08 Feb 2007 11:59
Skype: a.locritani
Location: Italy

Re: Random road construction (r13417)

Post by a.locritani » 17 Oct 2008 12:49

Mooияakeя™ wrote:OK, I've read the "how to apply a patch" and I'm still boxed.

So these .diff's can't be added to the normal releases like grf's?
No, they can't... you have to apply the patch then compile the patched source and, if everything goes well, you'll have an executable with your wanted features

User avatar
Mooияakeя™
Engineer
Engineer
Posts: 9
Joined: 17 Oct 2008 10:47
Location: England

Re: Random road construction (r13417)

Post by Mooияakeя™ » 17 Oct 2008 13:44

OK thanks.

Is it just the exe you need to make?

I'll go browsing for the src files then and more info.

Roujin
Tycoon
Tycoon
Posts: 1884
Joined: 08 Apr 2007 04:07

Re: Random road construction (r13417)

Post by Roujin » 17 Oct 2008 15:27

Here's a list of tutorials for compiling on various platforms and with various tools. Note that the "BuildOTTD" tool currently doesn't work.

http://wiki.openttd.org/wiki/index.php/ ... pile_it.3F
* @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

a.locritani
Engineer
Engineer
Posts: 111
Joined: 08 Feb 2007 11:59
Skype: a.locritani
Location: Italy

Re: Random road construction (r13417)

Post by a.locritani » 17 Oct 2008 19:42

Mooияakeя™, I suggest you to read this section of compiling on linux even if you will not compile on linux, because there are useful info on SVN and patching

Roujin
Tycoon
Tycoon
Posts: 1884
Joined: 08 Apr 2007 04:07

Re: Random road construction (r14494)

Post by Roujin » 19 Oct 2008 20:03

Here's an update after long time.
Attachments
random_road_construction_r14494.diff
random road construction for r14494.
(4.19 KiB) Downloaded 304 times
* @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

2007Alain2007
Chief Executive
Chief Executive
Posts: 658
Joined: 11 Nov 2007 12:06

Re: Random road construction (r14494)

Post by 2007Alain2007 » 03 Jul 2009 14:09

Hi i changed it so the settings for this patch are in the town settings

Code: Select all

Index: src/settings_gui.cpp
===================================================================
--- src/settings_gui.cpp	(revision 16727)
+++ src/settings_gui.cpp	(working copy)
@@ -1241,6 +1241,7 @@
 	SettingEntry("economy.town_growth_rate"),
 	SettingEntry("economy.larger_towns"),
 	SettingEntry("economy.initial_city_size"),
+	SettingEntry("economy.random_road_construction"),
 };
 /** Towns sub-page */
 static SettingsPage _settings_economy_towns_page = {_settings_economy_towns, lengthof(_settings_economy_towns)};
random_road_construction_r16176(16727).diff
(3.92 KiB) Downloaded 235 times
I have done this becuse it only works with in towns not any were esle on the map
For Community Integrated Version http://code.google.com/p/civopenttd/

Roujin
Tycoon
Tycoon
Posts: 1884
Joined: 08 Apr 2007 04:07

Re: Random road construction (r14494)

Post by Roujin » 07 Sep 2009 03:20

Update. No changes.

edit: removed, because it was flawed.
Last edited by Roujin on 07 Sep 2009 13:55, edited 1 time in total.
* @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: Random road construction (r17438)

Post by petert » 07 Sep 2009 03:31

Update to a revision that doesn't exist?

Roujin
Tycoon
Tycoon
Posts: 1884
Joined: 08 Apr 2007 04:07

Re: Random road construction (r17438)

Post by Roujin » 07 Sep 2009 04:26

petert wrote:Update to a revision that doesn't exist?
It does. Check your facts...
* @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: Random road construction (r17438)

Post by petert » 07 Sep 2009 04:29


Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Google [Bot] and 3 guests