Page 1 of 28

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

Posted: 09 May 2006 14:39
by Frostregen
News:

0.6.3
-files added

0.6.2
-files added

13911 + 0.6.2-RC2
-files added
-just an update

0.6.2-RC1
-files added

13691
-just an update

13531
-just an update

13416
-conflicts resolved (fios stuff)

0.6.1
-files added

13346
-conflicts resolved

13265
-conflicts resolved

0.6.1-RC2
-files added

13214
-conflicts resolved

13173
-conflicts resolved
-made a class out of CopyPasteWindow
-crashing on exit was resolved in trunk

0.6.1-RC1
-files added

13085
-conflicts resolved
-Note: This version crashes on game quit.
This happens with plain trunk too...
maybe some problem with my compiler.

12983
-conflicts resolved

12968
-conflicts resolved

12932
-conflicts resolved

12846
-conflicts resolved

12647
-just an update

12548 + 0.6.0
-feature add: convert bridges to fastest available bridgetype, if "convert railtype" is enabled.
-behavior change: reset "Toggle Signal Direction" when copying and loading.

0.6.0
-files added

12452 + 0.6.0-RC1
-files added/update

12347 + 0.6.0-beta5
-files added
-just an update
And thanks to all who use this patch!
1111 Downloads just for beta4 :)

12261
-just an update

0.6.0-beta4
-files added

12185
-moved code into c++ classes (CommandQueue & CopyPaste)
-use a CommandContainer struct for CommandQueue, instead of multiple arrays.

12167
-conflicts resolved
-Max copy area is now 255 x 255.

12097
-conflicts resolved

12072
-removed DC_FORCETEST. thx to Gonozal_VIII for spotting

12042
-just an update again

12002
-just an update

11946
-conflicts resolved

0.6.0-beta3
-files added

11874
-conflicts resolved

11804
-conflicts resolved

11781
-conflicts resolved

News Archive

GUI:
Image

Usage:
Menu Shortcuts:
Copy: CTRL + C or CTRL+INSERT
Paste: CTRL + V or SHIFT+INSERT
Abort Paste in Multiplayer: CTRL + X

Buttons(from left to right):
(Copy/Paste)
-CopyArea: Select the button, then select an area on the map to be copied.
-PasteArea: Click on map to rebuild previously copied. Note: The topmost tile will be the reference tile for height. Be sure to remember this when copying an area.
(Load/Save)
-Load Template: Loads a template from file.
-Save Template: Saves a template to file.
(Content manipulation)
-Rotate Left(CCW): Rotates the currently copied content CCW.
-Rotate Right(CW): Rotates the currently copied content CW.
-Mirror(H/V): Mirror the currently copied content. The mirror axis is shown on the buttons. Note: Signal direction will be automatically reversed, to maintain your "drive right"/"drive left" situation.
(Copy/Paste options)
-Copy Vacant Terrain: Paste Option - If NEUTRAL(default), empty squares of terrain won't be recreated. Should be only be set to PLUS if you want to "copy a hill". MINUS just ignores copied terrain. May be useful to copy a station entrance on a slope. Don't use tunnels... ;)
-Bulldoze before build: Paste Option - Tiles which will be used are bulldozed before rebuild. This is on by default and should only be disabled if you want to paste onto/over existing rails/roads.
-Copy With Rail: Copy Option - if disabled rails won't be copied.
-Copy With Road: Copy Option - if disabled roads won't be copied.
Reverse Signal Direction: Paste Option - reverses original signal direction if enabled.
-Convert Railtype: Paste Option - Converts all tracks to current railtype if enabled. Should only be disabled for special multitracktype layouts, like in priority merge layouts. NEW: Also converts bridges to fastest available bridges. This is for both, road and rail bridges.
-Copy Only Own: Copy Option - Copy stuff from other companies if enabled. Should only be enabled if you want to steal a layout ;)

Copy Option means: The copied content will be modified / different.
Paste Option means: The copied content will stay the same, the change is only applied when pasting to map.
This is important to remember when saving templates, as they will be saved without those options applied.
For example:
If you currently have "reverse signal direction" enabled, it is best to paste the layout, copy it again, then save.


NOTE:
Please do not use this patch on servers which do not allow it. (currently #COOP)
The alternative would be to make it incompatible to any unpatched server.
You do not want this.

Also do not use this patch on servers which are dedicated to bugtesting.
NEVER report bugs from this build to ottd developers.
Test it again with an unpatched original build before reporting.



Downloads:

Latest SVN (trunk)
You need:
- copypaste.grf v7 (no entry in the cfg file needed, just extract to \data)
This grf is released under GPL. Just keep my name "Frostregen" somewhere near it, if you use it.

and one of those:
- .patch for svn rev 13531
OR
- The latest nightly together with win32 binaries + langfiles


NOTE: For precompiled binaries: You need a nightly somewhere NEAR the given revision. It is not necessary to have the exact same revision. The nightly is just needed for some datafiles, which do not change very often.
The same applies to the patchfile: Just use HEAD Revision. I'm trying to keep it patchable all the time.

If you still don't know how to install: read this

7-Zip
Here is all you need: https://www.7-zip.org

0.6.3
If you are using this version, you just need to extract this archive into your openttd directory:
- Win32 0.6.3 Package v1

Here is the patchfile, if you need to compile for another OS:
- 0.6.3 Patchfile v1


0.6.2
If you are using this version, you just need to extract this archive into your openttd directory:
- Win32 0.6.2 Package v1

Here is the patchfile, if you need to compile for another OS:
- 0.6.2 Patchfile v1


All versions are fully compatible with non-patched clients/servers.

Enter Downloads Archive here
Please download primarily from this forum, because my bandwidth is limited ;)

Posted: 09 May 2006 15:15
by Brianetta
If your crossings are always the same, you're never going to improve. Personally, I doubt that I'd use the feature after testing.

Posted: 09 May 2006 15:22
by misnomer
There have been a few threads about this. I don't think the "not going to improve" thing is the point - part of the idea was to be able to use other people's templates, so you could well improve directly (well, vicariously) from it. I think it'd be particularly nice for use with large maps, as people have said. Decreasing tedious drudgery is always a good thing.

Posted: 09 May 2006 15:25
by bobingabout
there are times when i want to copy my junctions, but there are times when i need to do something original, in most cases i can just build the same junction over and over again anyway, because i've built it so many times i've got it memorised.

Posted: 09 May 2006 18:38
by XeryusTC
Brianetta wrote:If your crossings are always the same, you're never going to improve. Personally, I doubt that I'd use the feature after testing.
I agree with that, I mostly build a junction that where the most used lanes are optimized (low tunnels/bridges etc). And they also are different on the kind of place they are in the network, if it is a mainline junction it will have a lot of different routes, if it is a sideline to mainline junction it will just need the basics for choosing all tracks to all directions, if it is a sideline junction it will be very KISS. It all just depends on the situation, and there aren't 2 situations that are the same.

Posted: 10 May 2006 11:41
by Frostregen
Ok, this feature should be a server option, maybe disabled by default.

From linked topic:
just simple copy & paste tool would be the ultimate solution. no gui, no templates, just plain and simple select area & ctrl-c / ctrl-v...

this would significantly reduce the annoyedandboredtodeathplayer-phenomenon, wich is caused by repeating same thing over and over again.
This looks like a good solution, which should be enabled always. You would have to build your setups at least once per game.

I'm going to start to work on this now.

(Don't expect anything ;)

-------------------------------------------------------
EDIT: needing attachment space

Posted: 11 May 2006 01:02
by Frostregen
Copy&Paste for Land-Height works now.

The next step will be to include station/track/road/signal information.


-----
EDIT: Needing attachment space

Posted: 11 May 2006 01:14
by gigajum
LOL, cool thing.

Not really needed but if someone codes it, it can be a usefull patch :)

Posted: 11 May 2006 10:51
by Haukinger
Great feature !!!

Does it copy the absolute height of the terrain ?

Posted: 11 May 2006 16:51
by Frostregen
No, currently it is relative to a reference Tile.
But it would be no problem to make it absolute (as an option).

From your screenshot it looks like you mean relative anyway ;)

I will attach it as a Button to the terraform menu,
which will show a GUI like this:

Posted: 11 May 2006 18:00
by Haukinger
Of course relative is better... I meant 'does it use absolute height or can it do relative, too' - might have been put clearer ;)
Absolute height copying might have uses, too...

Posted: 12 May 2006 00:07
by Frostregen
Rails and Tunnels work now.

--------
But Iam experiencing some problems.
Sometimes the terraforming is to slow, so the tracks cant be layed correctly.

Is there a way to delay the Commands?
--------
^^Edit: Solved, was something else ;)

Signals and Bridges left...

Posted: 12 May 2006 00:36
by gigajum
can you put all the cost text output together to one cost text?

Posted: 12 May 2006 05:30
by Graphite
After seeing your latest screenshot, I'm a bit curious about a few things:

- What happens if the to be copied area contains pieces of rail from one of the competitor companies?
- What happens if the target area can't be raised, lowered or built on? This could happen when there are industry, towns, transmitters, lighthouses and tracks of your own or others in that area.
- Does it respect the non-building rules if the local authorities hates you?

That's all for now. I'll be sure to post if I think of more...

Posted: 12 May 2006 10:25
by Frostregen
@gigajum:
At the moment: No.
I would need a way to prevent the DoCommandP from Displaying the costs.
What happens if the to be copied area contains pieces of rail from one of the competitor companies?
The competitors rail is copied too. So you are able to copy anything you like.
When you paste it, it will be your rail of course ;)
What happens if the target area can't be raised, lowered or built on? This could happen when there are industry, towns, transmitters, lighthouses and tracks of your own or others in that area.
Currently it just Continues to build, regardless of errors

Maybe there will be 2 options:
-Continue on Error (This tries to build as much as possible)
-Stop on Error (This will stop if any change can not be made)
Does it respect the non-building rules if the local authorities hates you?
Yes it does. (It can not build a station, if the LA hates you)

Imagine the whole thing as a "replay".
It just scans the copied area for differences to a plain area.
If you paste it, it tries to do the steps necessary to recreate the copied area. This is done by using the same commands a normal player uses.
(This is why I can't prevent the money display for each piece atm.)

Thx for the comments.

I have a question too:
Should the railtype be stored for every piece of track?
The answer would be yes, if you want to build mixed track layouts.
(I have seen it in use at some priority junctions)
You could use the convert Rail tool afterwards. (But this would have a little more costs)

Or should the railtype be selectable? So you could build the same layout
with different railtypes. (Makes more sense for templates than for copy&paste alone)

Posted: 12 May 2006 12:08
by Red.xiii
Genius!! Many thanks on working on this patch

Posted: 12 May 2006 12:51
by gkirilov
Cool. I like that. It was on my wish list since I started building huge high speed junctions. I'll use it as soon as it's finished.
Thanks for the effort.

I think it is ok if you copy the tracks the way they are. THen they can be converted with the tool already provided.
Relative height(to the starting tile) is better. This way you can build the same thing at different altitude.

And one question. Will this work on roads?(very important for building square roads for neat town expansion)

Posted: 12 May 2006 12:53
by DeletedUser21
This looks like a magnificent tool, and I think this has future, but it looks like you can only drag to select like the demolition tool, (thus selecting/copying rectangles) but there is in a big junction a lot of things you might not want to select, the rectangle way of selecting is nice and quick but I think the way how you can select files in the windows explorer is more precise (Windows does it with files but the games uses tiles :wink: ):

Option 1 = 'Select and drag in a rectangular way to select tiles.'
Option 2 = 'Shift+Drag for additional tile selection when other tiles are already selected.'
Option 3 = 'CTRL+Click for selecting one tile at a time.'

I think your patch only covers option 1. Is it possible to add the other 2 options to make the tile selection more precise? It's a hell lot of work but I think it would make it more complete. But it's sure a very handy patch! Keep it up! :D :wink:

Posted: 12 May 2006 13:56
by gigajum
Frostregen wrote:@gigajum:
At the moment: No.
I would need a way to prevent the DoCommandP from Displaying the costs.
I don't know how you code that whole thing. But the return value of DoCommandP is a error code or a cost value (iirc). If you run DoCommandP for every tile you change you only need to add the return values togehter and print them out. But without diff file it is hard to help in any way.

Posted: 12 May 2006 15:21
by White Rabbit
About copying other companies' rails/roads: have an option that only allows your own infrastructure to be copied, because other players will frequently build around your own layouts.