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 »

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 628 times
random_road_construction_v1_r12436.diff
random road construction v1 for r12436
(3.22 KiB) Downloaded 590 times
random_road_construction_v1_r12320.diff
random road construction v1 for r12320
(3.22 KiB) Downloaded 557 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: 6553
Joined: 21 May 2007 11:47
Location: The Netherlands
Contact:

Re: [Patch]Random road construction

Post by FooBar »

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: 1728
Joined: 30 Mar 2005 09:43

Re: [Patch]Random road construction

Post by peter1138 »

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: 6553
Joined: 21 May 2007 11:47
Location: The Netherlands
Contact:

Re: [Patch]Random road construction

Post by FooBar »

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 »

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 »

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 »

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 »

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

Update to r13417.
Attachments
random_road_construction.diff
random road construction #39 for r13417
(4.19 KiB) Downloaded 513 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я™ »

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 »

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я™ »

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 »

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 »

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 »

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

Re: Random road construction (r14494)

Post by 2007Alain2007 »

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
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 »

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 »

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 »

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 »

Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 3 guests