The trouble with allowing both buttons to work is that when a new function is required at a later date, the 'spare' one is no longer available. Or you think it is then discover there are upset people who always used the one that you thought no-one used.
So that's why I'm aiming for least buttons and maximum similarity with other software.
This is often requested and I'm thinking about a really simple version of this as I know it can be tedious to click several buttons.
So I'm thinking of a rectangle select in screen space (X and Y aligned with the monitor) and you would just pull that rectangle and when you let go it would select the buttons visible within the box.
We are currently limited to 30 objects because that's how many can fit in one packet (and I won't be changing that in this version though I do have thoughts for the future about that). So I suppose it could select the 30 objects whose buttons are nearest to the centre of the rectangle when you let go of the mouse button.
Questions remaining in my mind...
I'm sure we need to use a CTRL or SHIFT key in conjunction with a mouse button to pull the rectangle. For some reason CTRL sounds better to me. I'm not certain whether the box select should use the left or right mouse button. What is it like in similar programs? I see in the Windows interface you can use left or right button to draw a box to select icons. No CTRL key makes a fresh selection, CTRL adds / subtracts from selection but that's not available to us as we can't allow 'no key' box select as all such possibilities are used for camera positioning.
It seems to me that "add to selection" would be a dangerous default and is more complicated. So I'm leaning towards the simplest system, with "fresh box selection" as the only function. If your selection isn't quite right after doing the box select, you can select or deselect individual buttons.
I like to keep it simple at this point because there really is a lot of other work to get back to and this editor stuff has been longer than expected. So, assuming CTRL key plus mouse drag is the way to go, we still have the one question: Left or Right mouse button?
The layout editor has changed. It is now more powerful and works more like other editors.
It now uses a CUT / COPY / PASTE system using the standard Windows keys CTRL+X/C/V
This is different from the old editor style which was based on a select / duplicate / move type of logic which had some limitations and caused some problems.
The problem in the old system was that when you selected some objects, they were selected in two ways simultaneously.
1) Visible 'in hand' where your mouse was pointing, ready to be placed in the world
2) The original objects you had selected were still selected
This caused some confusion. For example, if you had some blue tyres and you wanted to place some red ones, you might click the colour and that would change the object in your hand as well as the one on the ground, previously placed or selected.
There are various other examples such as modification of concrete object heights and rotation of objects that could be confusing or annoying because of the old selection method.
The updated editor moves to a different editor logic that should be more familiar because of its similarity with other editors. You can cut, copy and paste.
The real improvement now is that there is a complete separation between the world objects that have been selected, and a selection of objects 'in hand'. Only one of these types of selection is active at any time, so if you make any changes to their colour, dimensions, heading, altitude then it only affects the one active selection.
How to use it:
You create a real world selection, as before, by clicking on object selection buttons. There are two ways to select multiple objects.
1) Hold CTRL and click on object selection buttons
2) Hold CTRL and draw a selection rectangle using the left mouse button
After making your selection you can adjust it in various ways using the on screen buttons or keys.
Maybe you would like to duplicate the selected objects. Press COPY and you will see a live selection in hand. Point to where you would like to place the objects and press PASTE or O to put the new objects there.
Maybe you would like to move your selected objects. There are two ways to do this.
1) Press CUT. The original objects are deleted and you will see them as a live selection in hand located at the mouse cursor. You can now make modifications to the selection as required before pasting or placing it in a new location.
2) Press COPY. You will see a live selection in hand while the original objects remain in the world. Make any changes to the selection then press M to move the original objects to their new position.
You can paste a copied selection in two ways:
1) O key: Place objects and keep a selection in hand to be placed again
2) PASTE: Paste the objects and the new objects will be selected, not leaving a selection in hand
Note: you can switch between the two selection styles by pressing COPY.
1) Real world objects selected -> press COPY -> now you have a selection in hand
2) In hand selection -> press COPY to UN-COPY the selection, i.e. reverts to the world object selection
Note: new PGUP and PGDN keys to adjust height for concrete and other floating objects.
Test patch download: EDIT: This is now in the official version 0.6T
Here are some more fixes and updates for the layout editor.
You should find the O key seems similar to how it worked in the old version. In reality it's not the same at all. Because in the old version, you had BOTH the objects 'in hand' selected and the world objects were still selected at the same time, which caused various problems and limitations that users would learn to work around.
In today's version, after pressing O, only the objects 'in hand' are selected. If you want the newly placed world objects to be selected, as in yesterday's version, use PASTE which is CTRL+V.
You can also switch between the 'in hand' and 'world objects' selection styles by using COPY (CTRL+C).
World objects selected, press COPY -> objects now selected in hand
Clipboard objects selected, press COPY -> it's really UN-COPY - reselects the world objects
Changes from 0.6R13 to 0.6R14 :
Layout editor :
Place objects (O) key is now equivalent to PASTE then COPY
COPY key is now reversible so you can reselect the copied objects
FIX : Sometimes marshall type could not be selected before placing
FIX : Real world objects could still be selected after a full clear
Select object > O > rotate actual placed object > O > rotate actual placed object
But I do understand that there one thing missing - the object you are about to place with the O key isn't visible (unless you press CTRL+C first). So it's harder to place it with the precision you might want.
I was thinking of one more possibility.
Maybe the O key and CTRL+V could act differently?
I'm not sure if this is a good idea yet but what I'm thinking is:
O : place object and copy immediately. Now the 'in hand' object is visible (but new world object is not selected).
CTRL+V : place object(s) and leave the new world object(s) selected.
So O would be equivalent to CTRL+V then CTRL+C. I suppose that O would be recommended if you are placing single objects (because the single object is very easy to re-select if you made a mistake) but CTRL+V would be the safer method when you are placing multiple selected objects and are likely to make an adjustment after placing them.
Yes, because you can only have a world selection or a clipboard selection but not both, which is the solution to various problems. If it went straight to clipboard selection by default then you would have to re-select the newly placed world objects if you needed to adjust them for any reason.
You can do multiple pastes by pressing O or CTRL+V again, the only difference is that you can't see the selection in hand before you press O. You can make it visible by pressing CTRL+C but that is not required.
[EDIT: one quote and answer removed - better answer below]
I understand that but there is a good reason for it.
This is because the layout objects are squeezed into a tiny 8 bytes each to allow it to be quickly downloaded as you join a server. That is the reason for the restricted resolution. It's not new with this test patch.
Please can you attach a layout in which you can't select a marshall?
I've attached a layout file at SO1X with two visible marshalls and I can select them, mnve, delete as expected.
It's different from the old way. In the old editor, there were visible objects "in hand" and they were the same objects still visible in the world. This caused some problems, such as you could not change the colour of an object before you placed it, without also changing the colour of the object that you had selected to copy. And if you made adjustments to the object in hand, it would also be adjusting the object that had been placed.
Now there is a complete separation between these two types of selection. Either there are selected objects in the world, or there are selected objects in the "clipboard" which are visible where your mouse is pointing. Not both at the same time. You go from world selected objects to clipboard selection by pressing COPY (CTRL+C) or CUT (CTRL+X).
When you have selected objects in the world and you want to copy them, you can press CTRL+C to copy. Now, just like most editors, there is CTRL+C CTRL+V and CTRL+X available.
So now you need to think more like any other editor, and forget a bit how it used to be.
CTRL+V (paste) and O are really the same now. The M key still works and you can also press O to duplicate objects. So some of the old functions still work but it is definitely different now.
After a while you will get used to it and I'm sure you will find it is more powerful and useful than before.
The layout editor has been updated a lot so if you ever use the layout editor, please give it a go!
Changes from 0.6R12 to 0.6R13 :
Layout editor :
New cut / copy / paste system replaces old duplicate / move system
PGUP and PGDN can now be used to adjust Z value of selected objects
C key now clears selected object type as well as selected objects
It is now possible to set marshall circles to have zero diameter
Objects and marshall circles can now be selected at the same time
You can hold SHIFT to keep objects selected when exiting edit mode
Added two more translation strings to avoid misleading messages
Additional translation strings for new functions in layout editor
Clip mouse to screen is now CTRL+M as CTRL+C is now used for copy
More translations updated - Thank you translators!
New values TTC_SEL_START and TTC_SEL_STOP for IS_TTC
New value PMO_GET_Z for IS_AXM packet to report Z values
New value PMO_SELECTION_REAL for PMOFlags with PMO_SELECTION
Simplified SubMode values for free view in IS_CIM
New check for corrupted 3D models to avoid possible crash on load
I think I didn't like the way 255 would mean a maximum height of 63.75 and it seemed that 60m would be a better maximum height. And that allows 15 'reserved' values that could have a special meaning in future.
I am not coming up with an answer for that strange server issue. Has it only happened since you installed R12 on the server? If so, is it easy to revert to R and see if it makes a difference?
I'm guessing it has nothing to do with the new version, as I can't think of any related changes in the code. Does the same problem happen to all guests who join? Are there any other DCon instances on the same server computer? I wonder if it could be something to do with the computer time clock, running slow or fast. Can the server computer be restarted?
PMO_GET_Z, // 8 - request Z values / reply with Z values
And the documentation for how it works.
// PMO_GET_Z can be used to request the resulting Zbyte values for given X, Y, Zbyte
// positions listed in the IS_AXM. A similar reply (information only) will be sent
// with adjusted Zbyte values. Index and Heading are ignored and set to zero in the
// reply. Flags is set to 0x80 if Zbyte was successfully adjusted, zero if not.
// Suggested input values for Zbyte are either 240 to get the highest point at X, Y
// or you may use the approximate altitude (see layout file format).
I'm not sure it will be released today, probably not as I've got something else I'd like to have a go at. But then hopefully tomorrow.
OK, I am mentally tired from trying to get a layout editor improvement finished. You can now select marshalls / circles at the same time as other types of object but that was more complicated than it sounds.
So bear with me being a bit slow!
Can we get back to the basics, exactly what do you want to do? I understand you are trying to make layouts from a old track work on a new one. And this could be applied to moving a layout from one track to another I guess (e.g. BL car park to WE car park).
Are you trying to run through existing layouts and get all the objects of a certain type set to ground level? In particular concrete objects so you can't use the Zbyte 240?
And are you doing this by your code reading a layout file and passing it into LFS as AXM packets?
If the above is true I'm wondering if the simplest thing could be an InSim packet for local use only, that simply asks for the height for a given ObjectInfo (X,Y, Zbyte) and LFS replies with the Zbyte that would result from that. So you could run through a list of objects one by one and do what you want with the answer?
I don't know much about VOB mods, but some of them can have the correct physics mesh so they can be used online without harming any other players. From the crash address I was given, it looks like the crash was when reading an object, so that's why I'm asking if any of the people who got a crash, were using a modified VOB. But no-one has answered yet so I'm still worried about the possibility it could a be a problem in some standard installations.
Either way, I'd better add a thorough validity check when loading an object because a crash is not acceptable in any case. But it would be reassuring to know that it was caused by a modified VOB, otherwise there's a more serious bug here.