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

Starbud
Traffic Manager
Traffic Manager
Posts: 211
Joined: 05 Mar 2007 00:48
Location: Sweden
Contact:

Re: Build Templates (Copy&Paste) (r11474 + 0.5.3 + 0.6.0-beta1)

Post by Starbud »

I know there is people who review c&p as a cheat but from my point of view it's a tool that allow me to make more advanced and timeconsuming constructions.
I also put more thought into my constructions to work in many places.
Not all of us are good artists that might like to build similar but unique constructions.
Seems to me that there is two ways of looking at this patch that atleast i like very much and that i put to good use :)
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

Re: Build Templates (Copy&Paste) (r11474 + 0.5.3 + 0.6.0-beta1)

Post by Bilbo »

ammler wrote:It's a nice patch, so don't take me wrong, but you have some big bugs in your bins. Modified binaries needs at least a M or something else (not official release number). With your binaries, its possible to join a server...
That's the point. Since copy & paste introduces no incompatibilities (being only a GUI enhancement, although a complex one), it should have same version as unmodified (proper way would be to allow versions with or without M to play on one server, at risk of "M" versions desyncing)

Basically, you'll never know how much modified the "M" is - it could be copy & paste patch, it could be just installled smal-map-zoom-patch or other minor GUI enhancement, thus bringing no incompatibilities, or it can be version with 20 patches like PBS, large-maps, etc ... something like ChrisIN, completely incompatible with coresponding trunk version...
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)
init
Engineer
Engineer
Posts: 93
Joined: 07 Apr 2005 10:01

Re: Build Templates (Copy&Paste) (r11474 + 0.5.3 + 0.6.0-beta1)

Post by init »

ammler wrote:where not all have this cheat running.
Yeah, because decreasing the amount of mindless drudgery is clearly cheating.../sarcasm
Frostregen
Transport Coordinator
Transport Coordinator
Posts: 340
Joined: 06 Feb 2006 23:58

Re: Build Templates (Copy&Paste) (r11482 + 0.5.3 + 0.6.0-beta1)

Post by Frostregen »

Problem solved:

There is a serverside patch setting: construction->pastespeed.
Initially this setting was meant to limit the Paste-Speed according to the available server bandwidth.

The highest value 255 now equals: "No Paste allowed"


There is a small patch for servers only, which enables them to use this setting.
(patches->construction->pastespeed)
This patch is without the whole copy&paste code.


Please PM me if you are a serveradmin and need this patch.
LordAzamath
Tycoon
Tycoon
Posts: 1656
Joined: 08 Jun 2007 08:00

Re: Build Templates (Copy&Paste) (r11482 + 0.5.3 + 0.6.0-beta1)

Post by LordAzamath »

I guess you should recolor the yellow warning text in first post. Maybe blue of red (don't hit me in the face :D ). In subsilver, prosilver the yellow is absolutely not seen.
Last edited by LordAzamath on 14 Dec 2007 16:03, edited 1 time in total.
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.
Frostregen
Transport Coordinator
Transport Coordinator
Posts: 340
Joined: 06 Feb 2006 23:58

Re: Build Templates (Copy&Paste) (r11482 + 0.5.3 + 0.6.0-beta1)

Post by Frostregen »

red?
it is yellow.
Because the red is hard to read on gray background.

I'll test blue ;)


edit: blue seems ok.
Klaatu
Engineer
Engineer
Posts: 43
Joined: 04 Aug 2003 14:58

Re: Build Templates (Copy&Paste) (r11482 + 0.5.3 + 0.6.0-beta1)

Post by Klaatu »

There seems to be a maximum area that can be copied, which is fairly small. Something like 63 tiles on a side. I suppose there must be a good reason the limit is what it is. Do you mind elucidating us?
Frostregen
Transport Coordinator
Transport Coordinator
Posts: 340
Joined: 06 Feb 2006 23:58

Re: Build Templates (Copy&Paste) (r11482 + 0.5.3 + 0.6.0-beta1)

Post by Frostregen »

To avoid ram fragmentation, the copy-arrays are pre-allocated.
This means:
64 * 64 * 10Bytes = 40kb

additionally a buffer is needed for multiplayer functionality,
which is currently 4*copy-tile amount:
64 * 64 * 4 * 20Bytes = 320kb

If you would rise the limits,
you would "waste" more ram.

Ok...today we have gigs of ram, so this should not be a problem.
But 64*64 is already the whole smallest map.
How large do you need it?

If you can code you can change the limits easily.
variables.h line 353-> "#define COPY_MAX 4096"
copypaste_gui.cpp line 56-> "VpSetPlaceSizingLimit(63);" //needs to be 1 smaller than sqrt(COPY_MAX)
Klaatu
Engineer
Engineer
Posts: 43
Joined: 04 Aug 2003 14:58

Re: Build Templates (Copy&Paste) (r11482 + 0.5.3 + 0.6.0-beta1)

Post by Klaatu »

Well, size is relative, I guess. :)

I was copying a production complex consisting of 2 8x7 stations and the accompanying track around them. In this case it happened to be 63x32 so would just fit, but was a bit surprised when I couldn't drag the selection box anymore in the one direction. I always play on large or extra large maps, so the area didn't seem all that big.

But no, I don't code, at least not in C and derivatives. I guess everyone's ideal limit would be different; mine would be 128 squared I would imagine, at least to keep it relatively non-ram intensive, but I can live with the 63x63 limits of today.

Thanks for clarifying the issue, however.
Starbud
Traffic Manager
Traffic Manager
Posts: 211
Joined: 05 Mar 2007 00:48
Location: Sweden
Contact:

Re: Build Templates (Copy&Paste) (r11482 + 0.5.3 + 0.6.0-beta1)

Post by Starbud »

Then i can help i think, i made a version based on Frostregens directions that have a copybuffer of 255*255 tiles.
I needed it for my large designs and now i have a design that i think will need and even bigger copybuffer so i guess i will have to increase the limits even further :)
According to me bigger is better in this case, more trains, more tiles in the maps and more copybuffers

I remember Frostregen giving me promission to make this modified version public as a binary and now that i know there is an intrest i guess i will do it in the morning when i get back home :)

And a question for Frostregen too: is it possible to add an abortbutton?
Sometimes in multiplayer you realize some error of placement and need to redo it, when there is A LOT of tiles it takes along time to wait for pasting to complete so it can be redone at the right location.
http://openttd.org - i love building stuff :)
Someones play with pics http://dimalimsliv.blogg.se
init
Engineer
Engineer
Posts: 93
Joined: 07 Apr 2005 10:01

Re: Build Templates (Copy&Paste) (r11482 + 0.5.3 + 0.6.0-beta1)

Post by init »

Starbud wrote:I remember Frostregen giving me promission
Permission? You don't need permission to publish patches to software licensed under the GPL. On the other hand, it is always nice to ask, even if you don't really have to. :)
BigBB
Engineer
Engineer
Posts: 106
Joined: 07 Aug 2007 20:39

Re: Build Templates (Copy&Paste) (r11482 + 0.5.3 + 0.6.0-beta1)

Post by BigBB »

Starbud wrote:[...] i made a version based on Frostregens directions that have a copybuffer of 255*255 tiles. [...] According to me bigger is better in this case [...]
In the most cases: dynamic is better. So write it that it dynamic allocate memory. Then allways allocate memory for 4048 tiles is to much and I think this is one reason why this patch doesn't get into trunk.

-BigBB
OpenTTD-patch(es) in development: missing shores (new version of: completely shore), road lamps for each position
Starbud
Traffic Manager
Traffic Manager
Posts: 211
Joined: 05 Mar 2007 00:48
Location: Sweden
Contact:

Re: Build Templates (Copy&Paste) (r11482 + 0.5.3 + 0.6.0-beta1)

Post by Starbud »

Frostregen mentioned that to me that it would be a good idea to someday have c&p to use the ottd dynamic internal memorypool.
Or something like that, it's not an exact quote but he is aware of the issue. :)
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

Re: Build Templates (Copy&Paste) (r11482 + 0.5.3 + 0.6.0-beta1)

Post by Bilbo »

Frostregen wrote:Problem solved:

There is a serverside patch setting: construction->pastespeed.
Initially this setting was meant to limit the Paste-Speed according to the available server bandwidth.
Hmm .. I remember not being able to set the paste speed in middle of the game since some revisions ago, so is it because it became a server settings (which no server set anyway ....)?

Still, anybody can override the speed with modified patch anyway ... yes, if set too high, some commands are left out and you paste broken layouts ...
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
DJ Nekkid
Tycoon
Tycoon
Posts: 2141
Joined: 30 Nov 2006 20:33

Re: Build Templates (Copy&Paste) (r11600 + 0.5.3 + 0.6.0-beta2)

Post by DJ Nekkid »

minor bug:

ctrl-c/v and the ctrl/shift-insert shotcuts only open the GUI, it's not shortcuts to copy and/or paste anymore...
Member of the
ImageImage
Frostregen
Transport Coordinator
Transport Coordinator
Posts: 340
Joined: 06 Feb 2006 23:58

Re: Build Templates (Copy&Paste) (r11600 + 0.5.3 + 0.6.0-beta2)

Post by Frostregen »

7of9 wrote:minor bug:

ctrl-c/v and the ctrl/shift-insert shotcuts only open the GUI, it's not shortcuts to copy and/or paste anymore...
Whoops,
forgot to update the indices for the shortcuts after enumifying/reordering the widgets...

Thx for reporting :)

Updated files are available now.
User avatar
DJ Nekkid
Tycoon
Tycoon
Posts: 2141
Joined: 30 Nov 2006 20:33

Re: Build Templates (Copy&Paste) (r11625 + 0.5.3 + 0.6.0-beta2)

Post by DJ Nekkid »

np, thats what i do best :)

*vote for trunk*
Member of the
ImageImage
User avatar
Bilbo
Tycoon
Tycoon
Posts: 1710
Joined: 06 Jun 2007 21:07
Location: Czech Republic

Re: Build Templates (Copy&Paste) (r11625 + 0.5.3 + 0.6.0-beta2)

Post by Bilbo »

I have one question - are there older version of the copy & paste patch for older openttd versions available somewhere? I see only the current versions (0.5.3, 0.6.0-beta2, trunk) in the first post of this topic, but the older ones seem to be kinda overwritten ....
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

Re: Build Templates (Copy&Paste) (r11625 + 0.5.3 + 0.6.0-beta2)

Post by Frostregen »

There is a small "Enter Downloads Archive here" link at the bottom of the first post.

I think you will find what you need :)
Grolsch
Transport Coordinator
Transport Coordinator
Posts: 283
Joined: 08 May 2004 07:48
Location: Alkmaar, The Netherlands

Re: Build Templates (Copy&Paste) (r11874 + 0.5.3 + 0.6.0-beta2)

Post by Grolsch »

Is it possible that somebody creates a compiled 0.6.0 beta3 version for Windows, like the one for beta2 in the startpost? Thanks in advance!
Beer equals power
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 6 guests