Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Mon Dec 17, 2018 1:56 am

All times are UTC




Post new topic  Reply to topic  [ 229 posts ]  Go to page 1 2 3 4 512 Next
Author Message
PostPosted: Tue Oct 13, 2009 9:44 pm 
Offline
Chief Executive
Chief Executive
User avatar

Joined: Mon Jan 14, 2008 3:51 pm
Posts: 644
Location: PL
I'm rewriting the "Copy & Paste patch, reworked" patch introduced by davidc, which is rework of the "Build Templates (Copy&Paste)" patch introduced by Frostregen. Original threads:

DESCRIPTION:
Allows to copy part of map into in-game clipboard and paste it later at a given location. Latest version is 1.1.0

INSTALLATION (Clipboard 1.1.0 binaries for OpenTTD r26400):
  1. Download and unpack OpenTTD nightly.
  2. Download the ZIP package:
    Attachment:
    File comment: Win32 binaries (XP SP3 or higher) for OpenTTD r26400.
    the_clipboard_1.1.0-ottd_r26400-win32.7z [5.89 MiB]
    Downloaded 1748 times

  3. Extract contents of the package to the root folder of your OpenTTD (replacing some existing files).
  4. Run openttd.exe.

USAGE:
  • Everything is available from a toolbar. You can open it by clicking "Clipboard" button on the landscaping toolbar.
  • There are also shortcuts - hit [Ctrl]+[C] / [Ctrl]+[V] to copy/paste.
  • Read tooltips to learn buttons
  • There is also a shortcut to adjust heights while pasting - rotate your mouse wheel while holding [Ctrl] key.
  • Construction->Clipboard capacity setting may be used to restrict clipboard capacity (e.g. in MP games).

COMPATIBILITY:
  • savegame compatibility: full¹
  • network compatibility: no²

¹ Clipboard content is not stored in a savegame.
² You can safely play MP on a patched server. While there should be no desyncs with a non-patched server, I do not guarantee anything. Command system has been slightly modified, especially command errors may slightly differ ("already built" is returned more often instead of "something in the way").


EXTRAS:

SOURCE CODE (Clipboard 1.1.0 for OpenTTD r26400 / hg 96539891bc1b):
Attachment:
File comment: Single unidiff. Apply with 'patch -p0' or some SVN utitlity. Put GRF file into './bin/baseset' or other suitable folder.
the_clipboard_1.1.0-ottd_r26400-svn.zip [126.81 KiB]
Downloaded 390 times
Attachment:
File comment: Mercurial patch queue. Extract into hg-cloned working copy and apply with 'hg push -a'.
the_clipboard_1.1.0-ottd_r26400-mq.zip [161.91 KiB]
Downloaded 156 times
Older versions: https://www.dropbox.com/sh/cwlrdqux4vqbv9x/yvVcQ2345o

ILLUSTRATED EXAMPLE:
Image
Image
Image

_________________
:] don't worry, be happy and checkout my patches


Last edited by adf88 on Sun Mar 16, 2014 9:10 am, edited 64 times in total.

Top
   
PostPosted: Tue Oct 13, 2009 11:38 pm 
Offline
Tycoon
Tycoon

Joined: Thu Apr 02, 2009 10:43 pm
Posts: 3008
Location: Massachusetts, USA
Can I compile windows builds for the site?


Top
   
PostPosted: Wed Oct 14, 2009 7:32 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Mon Apr 07, 2008 6:29 pm
Posts: 1872
Location: Czech Republic
Quote:
high quality, complete, bug-free code (basic condition of trunk inclusion)


Too bad devs repeatedly said they don't like the idea of clipboard in OTTD (I'm a big fan of it though).


Top
   
PostPosted: Wed Oct 14, 2009 8:24 am 
Offline
OpenTTD Developer
OpenTTD Developer

Joined: Thu Feb 09, 2006 7:15 pm
Posts: 3815
CommanderZ wrote:
Too bad devs repeatedly said ...
Too bad users do overgeneralise and remove/ignore all nuances the developers have added to their reasoning. I've explained these nuances plenty of times, so if you're really interested... see here.


Top
   
PostPosted: Wed Oct 14, 2009 10:37 am 
Offline
Tycoon
Tycoon

Joined: Thu Apr 02, 2009 10:43 pm
Posts: 3008
Location: Massachusetts, USA
adf88 wrote:
- high quality, complete, bug-free code (basic condition of trunk inclusion)


He never said he wanted it IN trunk. Just to keep it up to trunk and such.


Top
   
PostPosted: Wed Oct 14, 2009 11:35 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Wed Jun 06, 2007 9:07 pm
Posts: 1710
Location: Czech Republic
Rubidium wrote:
Too bad users do overgeneralise and remove/ignore all nuances the developers have added to their reasoning.
Well, the point is, some of the developers thinks this feature (copy & paste) will give players "unfair advantage" (though if all players will have this feature, this certainly won't be unfair) or make the game dull and boring (if you just copy stuff, you won't be creative, but for small repetitive things, like service station, that are to be placed along the tracks every X tiles, this feature removes need for tediously construction every service station manually) and so they don't want it in trunk no matter the code quality.

But maybe the part of copy&paste for scenario editor perhaps could get to trunk (if well written..) though it will be devs who will have last word on this.

_________________
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)


Top
   
PostPosted: Thu Oct 15, 2009 9:47 am 
Offline
Engineer
Engineer

Joined: Thu Oct 15, 2009 9:40 am
Posts: 1
Do you think you would be able to make a separate utility that converts losslessly compressed image files (for example, http://transporttycoon.net/images/4way_spaghetti.gif) into copy-and-paste template files? I understand it would be hard to make but it would be a quite useful addition.

I was thinking of trying to make it myself but really it is way out of my league.


Top
   
PostPosted: Fri Oct 16, 2009 9:16 am 
Offline
Chief Executive
Chief Executive
User avatar

Joined: Mon Jan 14, 2008 3:51 pm
Posts: 644
Location: PL
Neddy wrote:
Do you think you would be able to make a separate utility that converts losslessly compressed image files (for example, http://transporttycoon.net/images/4way_spaghetti.gif) into copy-and-paste template files? I understand it would be hard to make but it would be a quite useful addition.
It's too expansive to be worth of case.

BTW
I'm not saying that copy&paste will be include into trunk for sure. I just want to make the patch closer to eventual inclusion.

//EDIT
I decided to make most NewGRF support in the first stage.

_________________
:] don't worry, be happy and checkout my patches


Top
   
PostPosted: Fri Oct 16, 2009 4:47 pm 
Offline
Chief Executive
Chief Executive
User avatar

Joined: Sat Aug 16, 2008 5:51 pm
Posts: 674
Location: Long Eaton, Nottinghamshire. UK
adf88 wrote:
...
BTW
I'm not saying that copy&paste will be include into trunk for sure. I just want to make the patch closer to eventual inclusion.
....


From all the reasons for it not being included (unfair, etc) i have read on the forums would it be considered for trunk if it were possible to make it only applicable to Single Player?

That way it shouldn't interfere with MP advantages, on the other hand would it be worth creating an MP option to differentiate between patch enabled games and non-patch enabled games (basically the host sets whether the patch is used or not)

_________________
High-Functioning Autistic & Proud... National Autistic Society * Asperger Foundation
My (O)TTD Work...BIGGER DEPOTS (REL.) & SERVICING-STATIONS (WIP) * Advanced DEPOT DESIGNS * SCREENSHOTS
Image
I now work for DE PHOTO - CLICK TO BOOK US TO SHOOT YOUR EVENT! We Shoot Kids with Canons!


Top
   
PostPosted: Fri Oct 16, 2009 4:56 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Mon Jun 09, 2003 6:21 pm
Posts: 4538
Location: /home/sweden
If the paste action becomes a DoCommand then it shouldn't be to trival to hack a client around the protection mechanism if the server is configured to disallow paste. But nothing will be totally safe since as far as I understand todays c/p patches can be applied just on the client and then you can join a MP-server and use the c/p function there, with the risk of getting desyncs though.

Though, making the paste-action a single DoCommand might make it hard to make the paste action take some time.

_________________
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)


Top
   
PostPosted: Fri Oct 16, 2009 7:26 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Mar 06, 2004 11:51 pm
Posts: 1494
Location: The sunny side of Alps
Again - so what if it's possible in multi-player (MP) - it's a really great tool for building big. And if we start moaning about the situation being either unfair or dull playing with it in MP or otherwise (SP) - well then let's just go all the way - OpenTTD can be both unfair and dull. OK nay-sayers?

(Of course I really like OpenTTD - why I consider it to be the best game of all times because it can easily replace a large room full of expensive railway models - in fact all Tycoons with loose or otherwise connection to Chris Sawyer.)
Attachment:
File comment: :nod:
nod.gif
nod.gif [ 1.46 KiB | Viewed 28353 times ]

_________________
NewGRF: Oil Wells in Temperate terrain now can Increase production, Better vehicle names, Use-able default aircraft, Oil Rig for Snowland and Desert, Speed for Suspension bridges.
Patches (OpenTTD): Improved smooth_economy [in trunk], More (diesel) smoke [in trunk], Realistic_acceleration finetune.

Keep 'em rollin'!


Top
   
PostPosted: Sat Oct 17, 2009 10:29 am 
Offline
Chief Executive
Chief Executive
User avatar

Joined: Mon Jan 14, 2008 3:51 pm
Posts: 644
Location: PL
JacobD88 wrote:
...on the other hand would it be worth creating an MP option to differentiate between patch enabled games and non-patch enabled...
If the C&P would be included, of course there would be an option to enable it or disable, so admins of OTTD servers could decide. Also there can be limit to pasting intensity. These options will exists even without trunk inclusion.

Zuu wrote:
If the paste action becomes a DoCommand then it shouldn't be to trival to hack a client around the protection mechanism if the server is configured to disallow paste...
As Zuu said, someone can write the patch to hack this option as long as C&P is based on DoCommand chain. But this is already possible, you can use C&P in servers where this patch is unwelcome (there is not many of them, I always ask on the server forum about C&P before using it). So trunk inclusion has no negative impact on this issue. Even otherwise - it eliminates this problem!!! If the C&P would be included, there would be server side support and C&P would no longer use DoCommand chain. Old mechanism would be discontinued, thus not available as a patch.
I don't think that any programmer with enough skill to continue patch in old form (DoCommand chain) has interest in cheating in MP games. Besides, how many patches do you know that are made for cheating? They surely won't appear in this forum or flyspray.

Maybe I'll implement server side support when the patch is completed, but these are far away plans.

_________________
:] don't worry, be happy and checkout my patches


Top
   
PostPosted: Sat Oct 17, 2009 4:19 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Thu Nov 30, 2006 8:33 pm
Posts: 2141
adf88 wrote:
Current code: will be soon (I'll create project page at Google Code)


Why not use the openttdcoop.devzone ? :) There are a few ok coders there as well :)

_________________
Member of the
ImageImage


Top
   
PostPosted: Sat Oct 17, 2009 7:28 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Wed Jun 06, 2007 9:07 pm
Posts: 1710
Location: Czech Republic
adf88 wrote:
chain. Old mechanism would be discontinued, thus not available as a patch.
If it won't be possible to use C&P in multiplayer, I think someone will dig out the old C&P - which is buggy and messy, but it works in MP - and poke in the patch till he gets something that works.
adf88 wrote:
I don't think that any programmer with enough skill to continue patch in old form (DoCommand chain) has interest in cheating in MP games. Besides, how many patches do you know that are made for cheating? They surely won't appear in this forum or flyspray.
Technically, you can't cheat in OpenTTD. The way the game works (you send command to server, the server reject any commands you can't do) forbid any form of cheating (you can't make the server do thing you are not allowed to do and since in game you have all information about the game available to examine (every information about everything is public), you can't have advantage of type "seeing thing that others can't see", like wallhacks in FPS games, where allowing you to see through wall will probably give you quite an advantage).

Few times in past I think someone have found some exploits in the server that can give some advantage, but these get usually fixed pretty soon.

Though by patches you can modify the game to give you advantage in two ways:
  • Allowing you to see things in more legible/nicer way - those would be patches that enhance the GUI, like zoomable minimap, GUI to watch opponents, my console commands patch, colored town ratings, tracking viewport, ...
  • Allowing you to do same things more quickly - these would be copy & paste patch, my console commands patch, query land shortcut patch, ...
None of these patches will enable you to do something you won't be able to do without them. You just can make these things faster.

_________________
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)


Top
   
PostPosted: Sun Oct 18, 2009 4:24 am 
Offline
Tycoon
Tycoon

Joined: Sun Dec 09, 2007 9:28 pm
Posts: 1919
This patch is superb from a health+safety style aspect.

Less clicks = better, as far as I'm concerned.

Maybe have the option to disable it in multiplayer - but it takes some of the hassle out of building.

_________________
Jon


Top
   
PostPosted: Sun Oct 18, 2009 11:56 am 
Offline
Chief Executive
Chief Executive
User avatar

Joined: Mon Jan 14, 2008 3:51 pm
Posts: 644
Location: PL
Bilbo wrote:
adf88 wrote:
chain. Old mechanism would be discontinued, thus not available as a patch.
If it won't be possible to use C&P in multiplayer, I think someone will dig out the old C&P - which is buggy and messy, but it works in MP - and poke in the patch till he gets something that works.
Risk is small. And it'll become smaller and smaller with every OTTD version. Even if someone do this, his/her work won't be widely available. Trunk inclusion almost fully eliminates the problem (which is using C&P in MP servers where is not allowed).
Also have on mind that if you don't like the rules on one server you just go to another. This hypothetical person must want to play with C&P in MP and do this on a certain server where C&P is forbidden, other servers are not enough for him/her. Also he/she must have enough programming skills. Programmers usually are not interested in cheating (yes, that would be a cheating - braking server rules).

Now the risk is almost 100% (you can use C&P without any restrictions). After trunk inclusion it'll become almost 0%.

_________________
:] don't worry, be happy and checkout my patches


Top
   
PostPosted: Mon Oct 19, 2009 12:47 pm 
Offline
Traffic Manager
Traffic Manager
User avatar

Joined: Thu Aug 23, 2007 9:20 pm
Posts: 157
Location: Portugal
Hi! I just wanted to give you a great thanks for picking this "project" ;)

I really love this game but due to a lack of time to play it in the way I enjoy the most, copy and paste is one of the two patches I expect more (along with cargodist).


Later on (after I finish to do some thinks in my computer) I can compile stuff for mac if you want.


Top
   
PostPosted: Mon Oct 26, 2009 4:07 pm 
Offline
Chief Executive
Chief Executive
User avatar

Joined: Tue Aug 11, 2009 4:10 pm
Posts: 670
Location: The Nederlands
oooh man, cant w8 till its in trunk, than my dream can become true: huge map with huge train network with daylength and copy-paste patch :)

thanx for trying to rewrite it :bow:

_________________
-->DWE GRF set<--
DWE Screenshot Thread


Top
   
PostPosted: Mon Oct 26, 2009 7:40 pm 
Offline
Tycoon
Tycoon

Joined: Thu Apr 02, 2009 10:43 pm
Posts: 3008
Location: Massachusetts, USA
It won't ever be in trunk, but if it's updated to trunk, then you could merge trunk and daylength easily. Don't worry, it will come soon.


Top
   
PostPosted: Tue Oct 27, 2009 4:21 pm 
Offline
Engineer
Engineer

Joined: Thu Apr 01, 2004 1:53 pm
Posts: 18
I'm very happy that this patch has been resurrected and appreciate the time and effort that you are spending on this adf88. I also wanted to say that the patch's eligibility for trunk inclusion is a complex affair and is not simply black and white. The final few pages of the last thread contained a lot of discussion on that topic, which can be roughly summarised as follows:

  • As a whole, the devs are against including the "complete" copy+paste in trunk on gameplay grounds.
  • The poor coding style of the old patch was a much bigger hinderance to trunk inclusion than any gameplay objection.
  • Until the code was brought up to a good standard any discussion about inclusion was informal since the coding style was already too big a hurdle and that no formal discussion would take place until the patch was ready in every other way.
  • The part of the patch that the devs found hardest to justify was the template saving/loading system since it allowed users to directly copy the work of others. Without it, you would only be able to copy+paste your own creations. The patch would definitely have a higher chance of trunk inclusion were it possible to separate out or otherwise exclude the template saving/loading facility and present only the "bare bones" copy+paste for inclusion, with those desiring the complete version needing to patch it in themselves.
  • Making it into a cheat function, like build-while-paused, is something that could potentially increase the chance of trunk inclusion.

As you can see, it was not a flat-out no. Anybody interested in the opinions of the devs on this patch should definitely read page 7/8 of the last thread. There was a lot of confusion about it, including my own.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 229 posts ]  Go to page 1 2 3 4 512 Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000-2018 phpBB Limited

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2018.
Hosted by Zernebok Hosting.