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

Frostregen
Transport Coordinator
Transport Coordinator
Posts: 340
Joined: 06 Feb 2006 23:58

Post by Frostregen »

Some revisions ago some grf's changed, maybe your version is out of date.
Try to get the latest .grf's from SVN, or one of the nightlies.

(You definitely can not use the grf's from 0.4.8)
DannyA
Engineer
Engineer
Posts: 108
Joined: 14 Sep 2006 03:51
Location: Australia

Post by DannyA »

Thanks Frostregen,
I found the grfs in the SVN, and using them fixed the problem.
User avatar
mart3p
Tycoon
Tycoon
Posts: 1030
Joined: 31 Oct 2005 21:00
Location: UK

Post by mart3p »

A very minor problem that I noticed in the MiniIN: the copy/paste button, on the landscaping toolbar, is showing the wrong tool-tip.
Attachments
Copy_Paste_Tip.png
Copy_Paste_Tip.png (23.94 KiB) Viewed 6059 times
Image
DannyA
Engineer
Engineer
Posts: 108
Joined: 14 Sep 2006 03:51
Location: Australia

Post by DannyA »

Would it be possible to save the information to the windows clipboard so that we can copy and paste between multiple instances of OpenTTD?

Or alternatively, some sort of quick save / load (Ctrl?), or perhaps or autosave & autoload mode using a file with a predetermined filename.
Frostregen
Transport Coordinator
Transport Coordinator
Posts: 340
Joined: 06 Feb 2006 23:58

Post by Frostregen »

@mart3p:
Thx, I'll fix it with the next update.

@DannyA:
I don't really see a use for this. Could you explain?
DannyA
Engineer
Engineer
Posts: 108
Joined: 14 Sep 2006 03:51
Location: Australia

Post by DannyA »

Often when I'm playing a game, I want to use a junction or something from a game I did previously, so need to copy it from an old save.

Method 1:
Save the current game, then load the old game with the thing I want, copy it, load the game I was just playing, then paste.

But sometimes what I want to transfer is larger than the copy region and will take several goes to get across - where method 2 is better.

Method 2:
Pause the current game, start another instance of OpenTTD and load the old game in that, copy the first bit, save it to 'unnammed.tmpl', alt-tab back to the game I'm playing, load 'unnammed.tmpl', paste the first bit, alt-tab to the old game, copy the second bit, save over 'unnammed.tmpl'.... and so on.

If the copy data was saved to the windows clipboard this could be acheived with no file operations and would be faster and easier. I dunno if other platforms have some sort of clipboard equivelent, so if not, perhaps a temp file could be used instead to acheive similar functionallity.
Frostregen
Transport Coordinator
Transport Coordinator
Posts: 340
Joined: 06 Feb 2006 23:58

Post by Frostregen »

Ah, ok.

I would suggest you give meaningful names to the templates you export.
(...part1, ...part2...)

You need to do this only once per template.
Plus you are building some kind of template-database.

How large are the area's you copy?
I thought 64x64 is way enough.
(You can take a full copy the smallest mapsize.)
DannyA
Engineer
Engineer
Posts: 108
Joined: 14 Sep 2006 03:51
Location: Australia

Post by DannyA »

I thougt about using more meaningful names, and realised that in most situations I don't want to save at all, just trasfer from one game to another.
I find I'm continually changing and improving the stations, and junction designs etc, and tend to always have the latest version of something in a map, rather than a file.

It's only a minor thing, but it would be nice to be able to copy something from one game to another with ctrl-c alt-tab ctrl-v.

99% of the stuff I copy is only 10 or so tiles, and the only time I had to do things twice was when I was testing a big station at the maximum station spread - 64 (which just happens to be 1 more than the copy region :) ). I think I had the wrong impression before, that the size limit was causing me to save to 'unammed' a lot, when I'm really just transfering small things.

Thannks for your interest though, and at the end of the day I'm happy with how it is now, but any improvement is always welcome.
User avatar
RiTi
Transport Coordinator
Transport Coordinator
Posts: 374
Joined: 23 Jun 2006 10:24

Post by RiTi »

Frostregen wrote:The tile struct uses 8Byte,
At the moment the 6 arrays I use also take 8Byte per tile.

10000 * 8Byte is around 80kb, which is not that great memory waste.
Some of my junctions are larger than 32x32, so I decided to raise the
maximum from 1000 to 10000.
But maybe 50*50 is enough, which would be 20kb of RAM.

The tileheight(difference) needs to be stored for every tile.

I did not directly copy the tile-struct, to be somewhat independent from the map array. Which I noticed later, is futile anyway.
I downloaded and installed the files of the first message. It works great. :) except that my computer memory is loading up. My mouse and sound get choppy and if I go on the computer stops. I have to make a hard reset (soft reset doens't free up the memory). Is it possible to make an option to give the used memory back? I use it under Windows XP-SP2

New info.

I disabled sound (music was already off). The memory problem seems to be solved (no more computer lock-ups). That could mean that the sound is the bad guy and not the copy-paste option itself. The r6994 opentdd.exe file of this version has more bytes then a regular Nightly version. So maybe this file gives the memory problem because I have no sound problems when I play with a regular Nightly version?
Keep life simple...
User avatar
ma5owat
Engineer
Engineer
Posts: 47
Joined: 24 Oct 2006 17:01
Location: Warren, MI, USA
Contact:

Post by ma5owat »

In the scenerio editor I often use rocks spaced every so often to help determine where things should go and line up. Would it be possible to have option of selecting certain landscaping objects while copying.

I know this was mentioned earlier about being able to select the height instead of using the height of the north corner.

I ran into a problem with pasting a grid road layout, but the north corner of the selection was over water and it lowered the road level which eventually flooded.
Frostregen
Transport Coordinator
Transport Coordinator
Posts: 340
Joined: 06 Feb 2006 23:58

Post by Frostregen »

@RiTi: no idea... maybe this is gone in the new release. (7130)

@ma5owat:
You set the height by adjusting the height of the reference tile, = the north-corner tile. I don't think there is a special GUI needed.
User avatar
RiTi
Transport Coordinator
Transport Coordinator
Posts: 374
Joined: 23 Jun 2006 10:24

Post by RiTi »

Frostregen wrote:@RiTi: no idea... maybe this is gone in the new release. (7130)
Thanks for the reply. I'll try the new version.
Keep life simple...
DannyA
Engineer
Engineer
Posts: 108
Joined: 14 Sep 2006 03:51
Location: Australia

Post by DannyA »

I'm having some trouble with an assert error (the one when using negative YAPF look-ahead penalties which I thought was fixed), using the r7130 build. It doesn't seem to happen with the nightlies, or MiniN (don't know why).

Would it be possible to make the Build Templates behave a bit more like the other two ;)?

There's a save game and some more info in a post here.
Frostregen
Transport Coordinator
Transport Coordinator
Posts: 340
Joined: 06 Feb 2006 23:58

Post by Frostregen »

I looked into the linked topic.
Looks like the assertion was just added lately.
(so it should happen with the next plain nightly too)

Maybe you have to convinve KUDr for the need of negative penalties ;)
DannyA
Engineer
Engineer
Posts: 108
Joined: 14 Sep 2006 03:51
Location: Australia

Post by DannyA »

Aw crap. Not exactly what I was hoping for.
Thanks for looking into that Frostregen, and letting me know what's going on.

Not sure if you're aware of this or not, but it seems the save template got broken (or I've done something to break it too) in the last version. The save dialog pops up, but clicking the save button has no effect.

Not really having much luck with that one am I? :)

Edit: just saw the version has changed - I'll try that one...
Frostregen
Transport Coordinator
Transport Coordinator
Posts: 340
Joined: 06 Feb 2006 23:58

Post by Frostregen »

no, you are right, does nothing... =)

*fixing*

->fixed, new version available

thx for spotting,
Frostregen
libik
Engineer
Engineer
Posts: 43
Joined: 18 Nov 2006 11:39

U wrote this

Post by libik »

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.
Maybe someone dont improve. But I think, that I now get the most effectively thing. Nothing is more effective.
Attachments
Just look on this
Just look on this
super koleje 4.2.JPG (280.38 KiB) Viewed 1480 times
Hi all
DannyA
Engineer
Engineer
Posts: 108
Joined: 14 Sep 2006 03:51
Location: Australia

Post by DannyA »

I would like to run openttd in debug mode with the copy & paste patch, but I'm having trouble compiling it.
After applying copy_paste_rev7203_109.patch to r7203 & copying command_queue.c & .h files from MiniN, I get unresolved external symbol compile errors (att).
Is there an easy way to fix these and get it up and running?
Attachments
BuildLog.txt
was .htm but extension not allowed.
(18.61 KiB) Downloaded 280 times
Frostregen
Transport Coordinator
Transport Coordinator
Posts: 340
Joined: 06 Feb 2006 23:58

Post by Frostregen »

Duh, forgot to add those files to the patchfile again.
The mini-in files will not work on trunk, this is correct.

Sorry for any trouble and thx for noticing.

-Frostregen

(patchfiles updated)
Cadde
Transport Coordinator
Transport Coordinator
Posts: 290
Joined: 07 Oct 2004 12:51

Post by Cadde »

The search function doesn't work that well and all i want to know is:

Is there any speed keys for copy and paste?

Like there is the key "A" for drawing tracks in all directions and "S" for signals and so on...

If there is no shortcuts i would strongly suggest adding them to any of the unused keys.


THANK YOU!

//Cadde
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Bing [Bot] and 15 guests