Build Templates (Copy&Paste) (r13911 + 0.6.3 + 0.6.2)

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
Doctor ZXXI
Engineer
Engineer
Posts: 60
Joined: 29 May 2007 09:27
Location: Almada, Portugal

Post by Doctor ZXXI »

Thanks for your answer.
Orgulhosamente português e trasmontano.
I'm sorry, but my english is not very well ;-)
De_Ghost
Engineer
Engineer
Posts: 7
Joined: 19 Mar 2007 22:50

Post by De_Ghost »

cmon add this to nightly so i don't have to compile it :D
Ethical
Engineer
Engineer
Posts: 32
Joined: 28 Aug 2005 08:26

Post by Ethical »

Sorry to be a nuisance.. I don't understand how I can use the r10263 patch because in the nightlies I can only see r10261 and r10269. So I guess I must still be missing some part of understanding of the revision number system, or there is a larger source repository.

Anyway, sorry to bother, Nice looking patch by the way, I was thinking of starting my own, but looks like it's already been done. I guess it being a controversial feature and everything it will probably never make it to trunk. Shame, seeings as it could be potentially used by AI's to build better networks. Plus I think anyone who wants to constantly invent new networks is free to do so, I know people who wont play *TTD* plainly because there is too much going into building decent networks. To be able to use some default templates would atleast fast track them into understanding how to make their own.
kaan
Route Supervisor
Route Supervisor
Posts: 399
Joined: 02 Apr 2007 20:13
Location: Nørup, Denmark

Post by kaan »

Ethical wrote:Sorry to be a nuisance.. I don't understand how I can use the r10263 patch because in the nightlies I can only see r10261 and r10269. So I guess I must still be missing some part of understanding of the revision number system, or there is a larger source repository.

Anyway, sorry to bother, Nice looking patch by the way, I was thinking of starting my own, but looks like it's already been done. I guess it being a controversial feature and everything it will probably never make it to trunk. Shame, seeings as it could be potentially used by AI's to build better networks. Plus I think anyone who wants to constantly invent new networks is free to do so, I know people who wont play *TTD* plainly because there is too much going into building decent networks. To be able to use some default templates would atleast fast track them into understanding how to make their own.
There are usually several code updates between each nightly and this patch update is made against one of those.
The nightly builds isn't of much use when you want to try out a patch because you will have to compile from source with the patch added.

If you use MS Windows then the easy way to do this is using BuildOTTD http://wiki.openttd.org/index.php/BuildOTTD

Or you can use any of the many other ways:
http://wiki.openttd.org/index.php/Coding_Tools

Code: Select all

if (YouAreHappyAndYouKnowIt) {
    ClapYourHands();
}
Frostregen
Transport Coordinator
Transport Coordinator
Posts: 340
Joined: 06 Feb 2006 23:58

Post by Frostregen »

It is not necessary to have the exact nightly revision, if you use the compiled win32 binary.
The nightly is just the source for current datafiles, as those get updated sometimes. (not very often)
If the datafiles would stay the same, you could copy it over 0.5.2 too ;)

Both of your mentioned nightlies should be fine as a datafile source.
Ethical
Engineer
Engineer
Posts: 32
Joined: 28 Aug 2005 08:26

Post by Ethical »

Yay, patched up r10295 and it compiled off the bat :D

Really love the patch, makes adding 4 line networks fun, I was actually contemplating 6 or 8 line networks and fractal type TTD which I would never have gotten a chance to experiment with otherwise.

One thing I would like to see would be some kind of custom menu buttons, where say your top 4 templates could be stored, then you don't need to go through load/save. or locate/cut/paste/locate routines constantly.

Now did anyone ever get around to starting a template thread?
User avatar
rav
Traffic Manager
Traffic Manager
Posts: 253
Joined: 17 May 2007 13:36
Location: Netherlands
Contact:

Post by rav »

there was an old thread with a template scenario where users posted examples of junctions on... you'll have to search it down.

PS: as far as I know this is a (very) old topic, so the savegame *may* not work..
User avatar
mamuf
Engineer
Engineer
Posts: 33
Joined: 30 Mar 2007 21:31
Location: Prague, CZ

Post by mamuf »

rav wrote:there was an old thread with a template scenario where users posted examples of junctions on... you'll have to search it down.

PS: as far as I know this is a (very) old topic, so the savegame *may* not work..
This is it: http://www.tt-forums.net/viewtopic.php?t=25512

You have to go through the thread to find updated savegames but it should work in the last OTTD stable or in some nightly, too.

(Btw: Is there a possibillity to list my watched topics? I hate it I can't find such list.)
jobo
Engineer
Engineer
Posts: 1
Joined: 29 Jun 2007 19:52

Post by jobo »

sry for posting if not appropriate but can someone point me in the right place to get detailed instruction on how to install any patches like this one as im not a computer teckie...iv tried yet failed.hense the post....iv downloaded the files yet i dont knw how to extract the .7z files...cheers jobo
Frostregen
Transport Coordinator
Transport Coordinator
Posts: 340
Joined: 06 Feb 2006 23:58

Post by Frostregen »

Hi,
I've sent you a pm with details,
and updated the first post.
Starbud
Traffic Manager
Traffic Manager
Posts: 211
Joined: 05 Mar 2007 00:48
Location: Sweden
Contact:

Post by Starbud »

I made a discovery.
C&P templates from the MiniIN version works even with bridges in the 0.5.2 release.
But bridges copied from within 0.5.2 removes the track underneath the bridges, i suppose there is a diffrence in how the copy is made between MiniIN and 0.5.2, just if the developer of C&P havent already noticed and if someone would like to use bridges before it can be fixed :)
http://openttd.org - i love building stuff :)
Someones play with pics http://dimalimsliv.blogg.se
Frostregen
Transport Coordinator
Transport Coordinator
Posts: 340
Joined: 06 Feb 2006 23:58

Post by Frostregen »

Thx for reporting :)

I forgot to re-insert a piece of code when the "bridge-branch" moved out of trunk back then.

0.5.2 win32.exe and patchfile updated.
Starbud
Traffic Manager
Traffic Manager
Posts: 211
Joined: 05 Mar 2007 00:48
Location: Sweden
Contact:

Post by Starbud »

I'm happy i could help :)

The worst thing is that i come with more work for you if you would choose to accept it.
Do you think there is a good way to let C&P check that the copy is properly done a few after seconds or whatever is apropriate.
Sort of reading the map twice to compare with what should have been placed and then redo that tile when a mismatch is found.
Mostly this error occurs when there are many players online and A LOT of trains and construction on the map.

Even without the failcheck it's a wonderful tool that i have had A LOT of joy using :)

And another personal request if it's not too much trouble, can the array be increased to handle my 180x180 tile intersection? :)
http://openttd.org - i love building stuff :)
Someones play with pics http://dimalimsliv.blogg.se
User avatar
Bilbo
Tycoon
Tycoon
Posts: 1710
Joined: 06 Jun 2007 21:07
Location: Czech Republic

Post by Bilbo »

I thought of two improvements for the patch.

First will be some option not to terraform land at all (try pasting whatever was here without raising or lowering land first)

In attached picture, the thing on left is part of station entrance. The entrance is partly up-hill and I want to copy it elsewhere. But the copy tries to place the land heights too and I want the copied entrance to be on flat land, since the target station does not have two steps up at its entrance.

(same thing will happend when copying flat land entrance to a hill)

Mostly I want the land levels too, but there are few situations where I don't want any land leveling to be pasted (i will terraform the place manually in advance in those cases), only the tracks/signals ...

Seciond idea is related to multiplayer. As in multiplayer the pasting is not instant, I think it may be worthy trying to coalesce commands. Since bulldozing can be done in squares by player (drag the dynamite and blow up large area ...), any adjacent to-be-bulldozed squares in a line could be bulldozed by one strike, sending only one command to server and not as many, as there are tiles.

Some optimizations could be also done if the line happen to include some straight rail or road segment, as these can be also placed "in one blow"
(alhought there is risk that if something comes in the way, the layed track can be more incomplete that when pasting one-by-one, as first barrier will stop laying it)

This can enable a bit faster pasting in multiplayer.

Also, as signal GUI adds ability to paste the correct signals directly (by adding appropriate command), signals could be placed with one comand if copy & paste is used with signal GUI (now it takes 5 or 6 clicks to place the one way combo presignals, depending on direction, bit less for other types)

This will lessen the occasional bugs when pasting (sometimes some commands are missed out, which leaves parts of the tracks unplaced or some signals wrong (if one of the necessary clicks is missed). If this would be implemented, there shouldn't be any incorrectly places signal, possibly only missing ones, which is much less evil .... (I once haven't noticed one reversed signal in station entry ... till 60 trains have clogged up the surrouding area, bringing the network to stop ... )
Attachments
Copy the thing on left to right and back ....
Copy the thing on left to right and back ....
copypaste.png (52.34 KiB) Viewed 2419 times
If you need something, do it yourself or it will be never done.

My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility

Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)
Frostregen
Transport Coordinator
Transport Coordinator
Posts: 340
Joined: 06 Feb 2006 23:58

Post by Frostregen »

Bilbo wrote:I thought of two improvements for the patch.

First will be some option not to terraform land at all (try pasting whatever was here without raising or lowering land first)

In attached picture, the thing on left is part of station entrance. The entrance is partly up-hill and I want to copy it elsewhere. But the copy tries to place the land heights too and I want the copied entrance to be on flat land, since the target station does not have two steps up at its entrance.

(same thing will happend when copying flat land entrance to a hill)

Mostly I want the land levels too, but there are few situations where I don't want any land leveling to be pasted (i will terraform the place manually in advance in those cases), only the tracks/signals ...
Seems reasonable. (and easy to implement)
I will make the existing "paste vacant terrain"-button a 3-way toggle button.
- = Terraform nothing
N = Terraform only needed terrain
+ = Terraform all terrain

Bilbo wrote:Seciond idea is related to multiplayer. As in multiplayer the pasting is not instant, I think it may be worthy trying to coalesce commands. Since bulldozing can be done in squares by player (drag the dynamite and blow up large area ...), any adjacent to-be-bulldozed squares in a line could be bulldozed by one strike, sending only one command to server and not as many, as there are tiles.

Some optimizations could be also done if the line happen to include some straight rail or road segment, as these can be also placed "in one blow"
(alhought there is risk that if something comes in the way, the layed track can be more incomplete that when pasting one-by-one, as first barrier will stop laying it)

This can enable a bit faster pasting in multiplayer.
I thought of this too, but this will make the code even more complex, which is currently something I do not want.
In the meantime just imagine the paste-delay as some kind of fairness-factor in multiplayer ;)
(You may reduce the delay in patch-settings btw...)
Also you may continue building elsewhere while waiting for the paste to finish.
Bilbo wrote:Also, as signal GUI adds ability to paste the correct signals directly (by adding appropriate command), signals could be placed with one comand if copy & paste is used with signal GUI (now it takes 5 or 6 clicks to place the one way combo presignals, depending on direction, bit less for other types)

This will lessen the occasional bugs when pasting (sometimes some commands are missed out, which leaves parts of the tracks unplaced or some signals wrong (if one of the necessary clicks is missed). If this would be implemented, there shouldn't be any incorrectly places signal, possibly only missing ones, which is much less evil .... (I once haven't noticed one reversed signal in station entry ... till 60 trains have clogged up the surrouding area, bringing the network to stop ... )
Sounds reasonable, will be done.
User avatar
Bilbo
Tycoon
Tycoon
Posts: 1710
Joined: 06 Jun 2007 21:07
Location: Czech Republic

Post by Bilbo »

Frostregen wrote: I thought of this too, but this will make the code even more complex, which is currently something I do not want.
In the meantime just imagine the paste-delay as some kind of fairness-factor in multiplayer ;)
(You may reduce the delay in patch-settings btw...)
Also you may continue building elsewhere while waiting for the paste to finish.
I know, I already decreased that from 5 to 1 :)

BTW if you build somewhere else in the meantime, I think this will make greater chance that some part will not build or be build badly (Since I remember most build errors occured when building something elsewhere in the meantime).
If you need something, do it yourself or it will be never done.

My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility

Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)
Starbud
Traffic Manager
Traffic Manager
Posts: 211
Joined: 05 Mar 2007 00:48
Location: Sweden
Contact:

Post by Starbud »

I think that might come from how busy the server is at the moment, there is always construction going on.
Maybe the problem is that the server throw away orders when it's too busy doing something else, i have noticed that there is more errors on busy servers and almost none when the map is brand new and almost no players conneccted.
Either way i'm thankful for any improvement :)
http://openttd.org - i love building stuff :)
Someones play with pics http://dimalimsliv.blogg.se
User avatar
Bilbo
Tycoon
Tycoon
Posts: 1710
Joined: 06 Jun 2007 21:07
Location: Czech Republic

Post by Bilbo »

Starbud wrote:I think that might come from how busy the server is at the moment, there is always construction going on.
Maybe the problem is that the server throw away orders when it's too busy doing something else, i have noticed that there is more errors on busy servers and almost none when the map is brand new and almost no players conneccted.
Either way i'm thankful for any improvement :)
I think it sometimes happen even when placing signals manually ... I click three times ... and the server only accept two clicks. And since the pasting uses the same commands as human ...
If you need something, do it yourself or it will be never done.

My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility

Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)
User avatar
Bilbo
Tycoon
Tycoon
Posts: 1710
Joined: 06 Jun 2007 21:07
Location: Czech Republic

Post by Bilbo »

I thought of another idea. Since I often paste my layouts rotated (like if I copied piece of track running nort-south and want to paste it east-west), I think it may be useful to have shortcut keys also for rotating the pasted layout (I suggest using "[" and "]" for left/right rotation)

Also relatively often I toggle the "dynamite" button, so I think it deserves a shortcut too.
If you need something, do it yourself or it will be never done.

My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility

Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)
User avatar
Wolf01
Tycoon
Tycoon
Posts: 2016
Joined: 24 Apr 2004 10:43
Location: Venezia - Italia
Contact:

Re:

Post by Wolf01 »

Bilbo wrote:I thought of another idea. Since I often paste my layouts rotated (like if I copied piece of track running nort-south and want to paste it east-west), I think it may be useful to have shortcut keys also for rotating the pasted layout (I suggest using "[" and "]" for left/right rotation)

Also relatively often I toggle the "dynamite" button, so I think it deserves a shortcut too.
or maybe comma and period, i know that offten the old games used these keys, maybe because they have < and > writings on them :roll:
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 18 guests