Build Templates (Copy&Paste) (r13911 + 0.6.3 + 0.6.2)
Moderator: OpenTTD Developers
- bobingabout
- Tycoon
- Posts: 1850
- Joined: 21 May 2005 15:10
- Location: Hull, England
there was once a patch to do things diagonally if you held CTRL when dragging, but it's been left to rot somewhere...
JPG SUX!!! USE PNG!!!
There are times when JPG is useful, TTD screenshots is not one of them. Please use PNG instead.
[/url]
There are times when JPG is useful, TTD screenshots is not one of them. Please use PNG instead.
[/url]
-
- Transport Coordinator
- Posts: 340
- Joined: 06 Feb 2006 23:58
-
- Transport Coordinator
- Posts: 340
- Joined: 06 Feb 2006 23:58
When I've figured out how to add new images, the text-buttons will be replaced by smaller image buttons.
The Layout would change to this:
EDIT: See image
Hm, I just worked on 1 tiny bugfix before, which was commited (1 line of code moved 3 lines down )
But thx =)
I don't think it will be committed at this state.
Mainly because I don't like the code myself
Also some points are really dissatisfying:
-Rotation won't work on everything (Airports, stations etc.)
-non-conform stations, newstations
This would even require pathfinding, to connect every station piece.
+additional terraforming to create possible path's.
At the moment i think this is to complex(newstations, track length limits), with too little gain, so I will leave it out. Maybe this can be added later.
-For multiplayer it may be to traffic intensive (i still did not test it)
There are 2 ideas how to do it, but none really satisfying.
(1. Make it a single Command - 2. Delay the building process)
News:
-Rail/Road Depots added
-"do not paste vacant terrain" added.
The Layout would change to this:
Code: Select all
[img: Copy] [img: rotate CCW] [img: rotate CW] [img: Paste]
[ text: include vacant terrain ]
Hm, I just worked on 1 tiny bugfix before, which was commited (1 line of code moved 3 lines down )
But thx =)
I don't think it will be committed at this state.
Mainly because I don't like the code myself
Also some points are really dissatisfying:
-Rotation won't work on everything (Airports, stations etc.)
-non-conform stations, newstations
This would even require pathfinding, to connect every station piece.
+additional terraforming to create possible path's.
At the moment i think this is to complex(newstations, track length limits), with too little gain, so I will leave it out. Maybe this can be added later.
-For multiplayer it may be to traffic intensive (i still did not test it)
There are 2 ideas how to do it, but none really satisfying.
(1. Make it a single Command - 2. Delay the building process)
News:
-Rail/Road Depots added
-"do not paste vacant terrain" added.
- Attachments
-
- copy_paste2.png (21.29 KiB) Viewed 6107 times
-
- cp_3.png (209.02 KiB) Viewed 6092 times
If there is something that can not be rotated - just disable the rotate buttons.
It will increase the chanse of being added to the trunk .
Great patch. I am already using it in my build.
It will increase the chanse of being added to the trunk .
Great patch. I am already using it in my build.
OTTDCoop NewGRF Pack|Different sets of GRFs for TTDPatch (some of them work in OTTD) - 1|- 2|GRF sets for OTTD|OTTD nightly
I hooked up my accelerator to my brake lights. I hit the gas, people behind me stop, and I'm gone.
Understeer is when you hit the wall with the front of the car. Oversteer is when you hit the wall with the rear of the car. Horsepower is how fast you hit the wall. Torque is how far you take the wall with you. Spoilers and bodykits are how much of the wall you take with you. Rollcages and windownets are how much of a mess you leave on the wall.
I hooked up my accelerator to my brake lights. I hit the gas, people behind me stop, and I'm gone.
Understeer is when you hit the wall with the front of the car. Oversteer is when you hit the wall with the rear of the car. Horsepower is how fast you hit the wall. Torque is how far you take the wall with you. Spoilers and bodykits are how much of the wall you take with you. Rollcages and windownets are how much of a mess you leave on the wall.
I just found out that you can "copy" from one game then load another game and paste the layout. That's great
So now .. we can have a "template" save game with ALL the layout of stations, junctions and so on and just copy/paste from one savegame to another.
p.s. don't know if this is intentionally build feature, but please keep it that way.
So now .. we can have a "template" save game with ALL the layout of stations, junctions and so on and just copy/paste from one savegame to another.
p.s. don't know if this is intentionally build feature, but please keep it that way.
OTTDCoop NewGRF Pack|Different sets of GRFs for TTDPatch (some of them work in OTTD) - 1|- 2|GRF sets for OTTD|OTTD nightly
I hooked up my accelerator to my brake lights. I hit the gas, people behind me stop, and I'm gone.
Understeer is when you hit the wall with the front of the car. Oversteer is when you hit the wall with the rear of the car. Horsepower is how fast you hit the wall. Torque is how far you take the wall with you. Spoilers and bodykits are how much of the wall you take with you. Rollcages and windownets are how much of a mess you leave on the wall.
I hooked up my accelerator to my brake lights. I hit the gas, people behind me stop, and I'm gone.
Understeer is when you hit the wall with the front of the car. Oversteer is when you hit the wall with the rear of the car. Horsepower is how fast you hit the wall. Torque is how far you take the wall with you. Spoilers and bodykits are how much of the wall you take with you. Rollcages and windownets are how much of a mess you leave on the wall.
-
- Transport Coordinator
- Posts: 340
- Joined: 06 Feb 2006 23:58
New Version:
-rotation added
-fixed a bug when copying a 2-track-tile with 2 signals.
Bugs:
-tunnel exit is not checked, neither if terrain is properly restored.
(Just make sure both tunnel ends are within the selection, or it may be very expensive )
Status:
-implementing load & save of selection.
@gkirilov: No, this was not intentionally. I just forgot to clear the copy-buffer after map load
When load & save is implemented, this won't be a point anyway.
-rotation added
-fixed a bug when copying a 2-track-tile with 2 signals.
Bugs:
-tunnel exit is not checked, neither if terrain is properly restored.
(Just make sure both tunnel ends are within the selection, or it may be very expensive )
Status:
-implementing load & save of selection.
@gkirilov: No, this was not intentionally. I just forgot to clear the copy-buffer after map load
When load & save is implemented, this won't be a point anyway.
- Attachments
-
- Senington Transport, 25th Jul 2023.png (77.9 KiB) Viewed 5884 times
Last edited by Frostregen on 02 Jun 2006 00:11, edited 1 time in total.
-
- Transport Coordinator
- Posts: 340
- Joined: 06 Feb 2006 23:58
-Load & Save implemented.
-main code moved to copy_paste_gui.c
-Waypoints added
-disable rotate/Paste/Save buttons, if nothing is copied.
Do not use this to create a large template database, as the file format will definitely change in future, which would ruin your effort.
But try it to report bugs
Things left to do:
-"tunnel ends not in selection" glitch.
-replace some strings (load / save dialogs)
-create + add new sprites for GUI
-main code moved to copy_paste_gui.c
-Waypoints added
-disable rotate/Paste/Save buttons, if nothing is copied.
Do not use this to create a large template database, as the file format will definitely change in future, which would ruin your effort.
But try it to report bugs
Things left to do:
-"tunnel ends not in selection" glitch.
-replace some strings (load / save dialogs)
-create + add new sprites for GUI
Last edited by Frostregen on 28 May 2006 11:00, edited 2 times in total.
erase.
Last edited by gkirilov on 28 May 2006 16:27, edited 1 time in total.
OTTDCoop NewGRF Pack|Different sets of GRFs for TTDPatch (some of them work in OTTD) - 1|- 2|GRF sets for OTTD|OTTD nightly
I hooked up my accelerator to my brake lights. I hit the gas, people behind me stop, and I'm gone.
Understeer is when you hit the wall with the front of the car. Oversteer is when you hit the wall with the rear of the car. Horsepower is how fast you hit the wall. Torque is how far you take the wall with you. Spoilers and bodykits are how much of the wall you take with you. Rollcages and windownets are how much of a mess you leave on the wall.
I hooked up my accelerator to my brake lights. I hit the gas, people behind me stop, and I'm gone.
Understeer is when you hit the wall with the front of the car. Oversteer is when you hit the wall with the rear of the car. Horsepower is how fast you hit the wall. Torque is how far you take the wall with you. Spoilers and bodykits are how much of the wall you take with you. Rollcages and windownets are how much of a mess you leave on the wall.
I can't compile this on linux - it says 'fd' undeclared in unix.c at line 161... Windows works fine.
EDIT: done. should be
instead of
and
instead of
BTW: Great work, man ! I'm adding this patch to my server...
EDIT: done. should be
Code: Select all
fios->mtime = sb.st_mtime;
ttd_strlcpy(fios->name, dirent->d_name, lengthof(fios->name));
Code: Select all
fios->mtime = *(uint64*)&fd.ftLastWriteTime;
ttd_strlcpy(fios->name, fd.cFileName, lengthof(fios->name));
Code: Select all
ttd_strlcpy(fios->title, dirent->d_name, lengthof(fios->title));
Code: Select all
ttd_strlcpy(fios->title, FS2OTTD(fd.cFileName), lengthof(fios->title));
-
- Transport Coordinator
- Posts: 340
- Joined: 06 Feb 2006 23:58
-
- Transport Coordinator
- Posts: 340
- Joined: 06 Feb 2006 23:58
Bug alert
You can't load templates in multiplayer. The game continues, but you are dropped from the server the moment you click on 'load' - totally quiet. No notification, no error message, no nothing.
In debug-mode, it says 'missing frame for sync test' once the load-template dialog opens. If you are quick enough and cancel now, the you stay connected. If you click on a filename, the connection is closed.
You can't load templates in multiplayer. The game continues, but you are dropped from the server the moment you click on 'load' - totally quiet. No notification, no error message, no nothing.
In debug-mode, it says 'missing frame for sync test' once the load-template dialog opens. If you are quick enough and cancel now, the you stay connected. If you click on a filename, the connection is closed.
-
- Transport Coordinator
- Posts: 340
- Joined: 06 Feb 2006 23:58
@Haukinger: thx for the bugreport. fixed.
The "demolish before build" is hard to solve, because terraforming may affect tiles far away from the terraformed tile. (if you raise the top of a hill, you would need to clear all tiles around the hill-base)
@Sacro: That was not the problem.
It reset the networking state after a template load. Which caused the game to pause, if you open the load/save dialog again. This caused the drop.
But the Buffer thing is needed too. I could not paste a track with a signal in multiplayer.
The "demolish before build" is hard to solve, because terraforming may affect tiles far away from the terraformed tile. (if you raise the top of a hill, you would need to clear all tiles around the hill-base)
@Sacro: That was not the problem.
It reset the networking state after a template load. Which caused the game to pause, if you open the load/save dialog again. This caused the drop.
But the Buffer thing is needed too. I could not paste a track with a signal in multiplayer.
Who is online
Users browsing this forum: No registered users and 3 guests