Patch: Found a town

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

Post Reply
TheJosh
Engineer
Engineer
Posts: 75
Joined: 17 Apr 2007 12:19
Contact:

Patch: Found a town

Post by TheJosh »

This patch allows you you to found a town.

This patch is now complete. If there are any issues, tell me. If you want features, ask

The fund a town option is available in the 'town directory' menu
The price is about $14.5 million dollars at the start of the game

Checked against nightly 10587.
This patch will bump your savegame. (v72)

Version History:
v13 - brought to r10587
v12 - brought to r10198
v11 - brought to 9961
v10 - brought to 9899
v9.1 - rooted from / not src/ (will now work in BuildOTTD)
v9 - brought to latest revision
v8 - Changed price, brought to latest revision
v7 - Updated to latest revision
v6 - Changed the way prices are handled
v5 - Code cleanup
v4 - Fixed inflation bug, added config option
v3 - Networking should work now. Changed menu option to be 'Found a town'
v2 - FundTown now has a price that inflates, etc.
v1 - Original

Known Issues:
None
Attachments
Screenshot of the patch in action
Screenshot of the patch in action
Screenshot.png (191.89 KiB) Viewed 27885 times
create_town.13.patch
Version 13 of FoundTown (r10587)
(12.02 KiB) Downloaded 2290 times
Last edited by TheJosh on 16 Jul 2007 12:31, edited 19 times in total.
xmart2k
Engineer
Engineer
Posts: 91
Joined: 04 May 2006 07:36
Contact:

Post by xmart2k »

cool,you rock
User avatar
Digitalfox
Chief Executive
Chief Executive
Posts: 708
Joined: 28 Oct 2004 04:42
Location: Catch the Fox if you can... Almost 20 years and counting!

Post by Digitalfox »

Nice one :D

But one i miss A LOT also is funding banks :cry:
User avatar
Born Acorn
Tycoon
Tycoon
Posts: 7595
Joined: 10 Dec 2002 20:36
Skype: bornacorn
Location: Wrexham, Wales
Contact:

Post by Born Acorn »

Wouldn't it be "Found" a town? Several towns in the US have been founded by the railways, as the workers had to sleep somewhere. :p
Image
Dopefish_lives
Traffic Manager
Traffic Manager
Posts: 191
Joined: 24 Mar 2007 18:18

Post by Dopefish_lives »

heh thanks for making my idea into practice!!
User avatar
SuperVGA
Engineer
Engineer
Posts: 66
Joined: 17 Apr 2007 09:09
Location: Denmark

Found

Post by SuperVGA »

Yup, i agree with Born Acorn.
Thejosh could the option go like "Found new town"
That'd be a little more realistic than a city,
based on a project donation alone. :)
Dopefish_lives
Traffic Manager
Traffic Manager
Posts: 191
Joined: 24 Mar 2007 18:18

Post by Dopefish_lives »

sorry i dont mean to be rude, but how do install that patch? i google searched, i searched in the openntd readme, i even looked in the forum, but i still dont get it.

this line:

Code: Select all

patch -p0 -i new_patch.diff
what do i have to do with it?
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

You type at a console (command prompt).
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
TheJosh
Engineer
Engineer
Posts: 75
Joined: 17 Apr 2007 12:19
Contact:

Post by TheJosh »

Install Instructions:

Linux/Unix:
- Use SVN to get the latest source from svn://svn.openttd.com/trunk i think
- Go into the directory svn just created (cd trunk)
- I usually compile first to see its all alright (make)
- Look at the patch you are going to apply. If the first line contains src/ then your patch is src rooted. In that case, you need to be in the src directory (cd src)
- Apply the patch (patch -p0 -i <filename>)
- If it fails, use svn revert to clean up the mess and inform the developers
- if you are in the src directory, get out of it (cd ..)
- build again (make)
- test (bin/openttd)
- play for hours/days

Windows:
I do not use windows so I cant help much here, although you will need:
- a windows compiler (gcc? try this link http://sourceforge.net/projects/gcw/)
- windows make (Try this one http://www.steve.org.uk/Software/make/)
- windows svn (http://subversion.tigris.org/project_packages.html near the bottom)
- windows patch (http://gnuwin32.sourceforge.net/packages/patch.htm)
I dont know of the availability of these things, Sorry. The other alternative is to just install linux. You could put, say 10gig aside, buy another hard drive, or just go all out and wipe the whole thing. I recommend Ubuntu for beginners, I hear it is very easy to use.
User avatar
athanasios
Tycoon
Tycoon
Posts: 3138
Joined: 23 Jun 2005 00:09
Contact:

Post by athanasios »

Cool patch, but a small objection: OTTD already creates so many towns, so why the need for funding more? OK. In such a setting it might be useless but when playing with non random scenarios with a few towns it will be great. Thanks man, I always needed that, hope it goes into the trunk.

Request: Since you are good on patching, could you create a patch for adding companies in scenario editor when creating a new scenario, a capability that is missing in OTTD but existed somehow in TTD?
http://members.fortunecity.com/gamesart
"If no one is a fool I am also a fool." -The TTD maniac.


I prefer to be contacted through PMs. Thanks.
peter1138
OpenTTD Developer
OpenTTD Developer
Posts: 1729
Joined: 30 Mar 2005 09:43

Post by peter1138 »

athanasios wrote:Cool patch, but a small objection:
Well there's nothing forcing you to use it...

But unfortunately CmdBuildTown() is not multiplayer safe :o
He's like, some kind of OpenTTD developer.
User avatar
JamieLei
Tycoon
Tycoon
Posts: 7432
Joined: 10 Jan 2007 18:42
Location: Stratford, London

Post by JamieLei »

if amount of towns is set to low it can be difficult to set up a passenger network. also i suggest that it be expensive to found a town, eg: say £20 millon / 40million euros
matrixs
Engineer
Engineer
Posts: 55
Joined: 17 Mar 2007 20:18
Location: LV
Contact:

Post by matrixs »

maybe just make found_town.exe and undo_found_town.exe it would be more easier to other people (newbies) to test your beautiful work???
User avatar
Ailure
Route Supervisor
Route Supervisor
Posts: 435
Joined: 26 Apr 2005 19:06
Location: Sweden

Post by Ailure »

Expect you can as well post the compiled binaries if you are meddling with... binaries patches. Besides a binary patch would require a specific build and even minor changes can compile a binary file so different it wouldn't be patchable. ;)
User avatar
RainierWatcher
Traffic Manager
Traffic Manager
Posts: 244
Joined: 14 Jan 2007 15:10
Location: West Norfolk, England

Post by RainierWatcher »

athanasios wrote:Request: Since you are good on patching, could you create a patch for adding companies in scenario editor when creating a new scenario, a capability that is missing in OTTD but existed somehow in TTD?
if you mean like the scotland 1956 and Megarail scenarios, then I think they were savegames modified to come up as scenarios. I'm not sure though.
User avatar
CMircea
Chairman
Chairman
Posts: 887
Joined: 29 Dec 2006 14:05

Post by CMircea »

Savegames use the same format as scenarios, just the extension is changed.
User avatar
JamieLei
Tycoon
Tycoon
Posts: 7432
Joined: 10 Jan 2007 18:42
Location: Stratford, London

Post by JamieLei »

i tried the same trick in OpenTTD, it refuses to open in Scenario Editor. the bug must have been fixed
User avatar
athanasios
Tycoon
Tycoon
Posts: 3138
Joined: 23 Jun 2005 00:09
Contact:

Post by athanasios »

Really? I tried a long time ago and I got the land without the companies.
peter1138 wrote:
athanasios wrote:Cool patch, but a small objection:
Well there's nothing forcing you to use it...
Did you get into the trouble to read the following sentences of my post, or did you just started typing?
http://members.fortunecity.com/gamesart
"If no one is a fool I am also a fool." -The TTD maniac.


I prefer to be contacted through PMs. Thanks.
peter1138
OpenTTD Developer
OpenTTD Developer
Posts: 1729
Joined: 30 Mar 2005 09:43

Post by peter1138 »

Yes, obviously. You contradicted yourself and then went off-topic.
He's like, some kind of OpenTTD developer.
TheJosh
Engineer
Engineer
Posts: 75
Joined: 17 Apr 2007 12:19
Contact:

Post by TheJosh »

Can everyone please note that this patch is still in development.

And don't whatever you do use it it multiplayer. It kills your game (that will be fixed)

I would like to make a special binary, but I could only make a Linux one because I use Linux, not windows. (i might be able to cross-compile a windows one, so ill check it out)

I will probably release another version soon, once I work out how networking works, and cleanup my save game code.

God Bless,
Josh
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 13 guests