The online racing simulator
LYTe - layout editor
(189 posts, started )
I've just started to make a real life AutoX track on BL3 and I wanted to make small changes IN LFS and save them and then edit also in Lyte. Unfortunately, the BL3 layout is created in a non valid format when I save in LFS and get the error.

---------------------------
Sorry
---------------------------
Unexpected error!?

Header error: BL3_test.lyt

If it doesn't exist, LYTe.log has been created with this error message appended to it. Please report this to Stuff via the LFS forum.

The log contains only...

[1/25/2010 12:56:44 PM] Header error: BL3_test.lyt

Any chance you know what the error in the header is? If so, can way it can be fixed in Lyte? I'll try some more testing and doing a diff between an AU and BL layout, see if I can manually edit the BL3 one to work, but it's going to be a painful process. Nice if Lyte could be fixed...
Hrm.. about the only reason it complains about a header error is because of the versions. They are kinda sneaky. I thought I put in a robust enough check to get them all but I guess not. I will poke at it tonight to see what the differences are and get it to work..

Sorry about the lack of development for this version but don't worry, I'm developing a whole new editor instead. No ETA for that yet but will share if anyone is working on something similar.

And yep, my old lfsnal.org site is definitely out of date. Best place is here.. for now. Meh, another item on my to-do list.
Quote from Stuff :Hrm.. about the only reason it complains about a header error is because of the versions. They are kinda sneaky. I thought I put in a robust enough check to get them all but I guess not. I will poke at it tonight to see what the differences are and get it to work..

Sorry about the lack of development for this version but don't worry, I'm developing a whole new editor instead. No ETA for that yet but will share if anyone is working on something similar.

And yep, my old lfsnal.org site is definitely out of date. Best place is here.. for now. Meh, another item on my to-do list.

Cheers. I also ran into another bug.

1. Create a new layout, selecting BL3
2. From the toolbar select the "object line" button
3. Click anywhere on the map, Lyte exits without error and nothing in the log.
OK, I did some poking around last night and solved a couple bugs. The major one is the header error and the fix was removing that check. The latest BL3 layouts seem to place the objects correctly but I have not tested it completely. The other one I fixed was the latest bug yaeger reported (thanks). It was a basic, uninitialized object. Doh!

Anyway, I uploaded the exe for version 0.5.0.7 to the first post. Just close LYTe, overwrite the exe from 0.5.0.6 and that's all..

Lemme know how it goes. Thanks!
Wow now thats responsive, good man. I'll have a play over the weekend.
By any chance do you have a list, or know all the object Index values per track? I understand they change depending on the track but when it comes to making my AI 'map' I will be using "blue cone" to place the driving line, "red cone" for left track edge, and other specific objects; which mean they will change from track to track. On the wiki-page it has some of the values but not all, and certainly not all for all tracks; the most complete listing was the autocross area which is what I am currently using to get basic functionality in my AI.

If you have this available it would be a great resource, I don't know how your editor would work without it really. Thanks either way it goes.
Here is the list LYTe uses.. I would update the wiki/manual myself but there are a few differences that should be tested first..


[SIZE=1]AU, BL, name

//chalk
50, 46, chalk ahead
53, 47, chalk ahead2
52, 49, chalk left
51, 48, chalk right
54, 51, chalk left2
55, 50, chalk right2
57, 53, chalk left3
56, 52, chalk right3
59, 54, chalk line

//cones
29, 22, cone red
34, 23, cone red2
30, 24, cone red3
33, 33, cone red pointer //AU = cone pointer
31, 25, cone blue
61, 30, cone blue2
64, 35, cone blue pointer
32, 27, cone yellow
62, 32, cone yellow2
63, 34, cone yellow pointer
39, 26, cone green
60, 31, cone green2
65, 36, cone green pointer
40, 28, cone orange
41, 29, cone white
NA, 0, cone1 //BL only
NA, 1, cone2 //BL only

//tyres
0, 12, tyres white //BL = tyre white new1
3, 17, tyres2 white //BL = tyre white new2
1, NA, tyres red //AU only
4, NA, tyres2 red //AU only
NA, 13, tyres blue //BL only
NA, 18, tyres2 blue //BL only
19, NA, tyres small //AU only

//objects
NA, 19, banner rsc //BL only
NA, 20, banner cromo //BL only
24, NA, banner ad1 //AU only
25, NA, banner ad2 //AU only
27, NA, banner ad3 //AU only
23, NA, bale //AU only
2, NA, post //AU only
42, 42, post green
43, 43, post red
44, 44, post white
45, NA, post orange //AU only
46, 41, barrier white
47, 40, barrier red
48, 39, barrier long
49, 38, keep left
58, 37, keep right
NA, 82, ramp //BL only[/SIZE]

Thanks much! That will be useful
Yes, I agree, I find this useful too, because I need it for my site. I will try to list all the objects later today in Z28 and eventually update the manual.
I know your working on a database for layouts but can I ask what use the object index values would be to that? Or are you working on more than just a database there FlameCZE?
I've mentioned that in the site thread. There will be used my PHP layout "viewer", a quick preview here
Oh right, I remember reading that. Nice nice. Well I think we can all work together to find the object IDs of the common objects and make a big table of them for future use. I am not to this point in my project yet though I will of course be willing to pitch in on finding IDs because that seems like it will be a bit of a pain since the only way I can think of doing it (accurately) would be placing one object in a layout, reading the layout and matching the ID.

EDIT: Sorry for derailing the LYTe - Layout Editor thread. Please let the ObjectID discussion happen elsewhere since it isn't the objective of the layout editor.
Yep, that's about the way I figured out the IDs. Place them on a layout and read it in. Except I guessed they would be added to the file sequentially, so that sped things up a lot. Not too much pain regardless.. I too will need all of them anyway as the new LYTe will support all tracks and objects.. including undo!

Also, if you guys (not just anyone) want the source code to LYTe, let me know as it's pretty much retired as is. And I will definitely make a new thread for the new version once ready..
Thanks for the very kind offer, but I have a feeling it won't help my AI too much :P The values are what I am after. That sounds great, adding undo support for an editor _really_ helps the editing process! (Are you using a chain of commands to support undo/redo? or just keeping track of the last state and undo'ing to that state?)
-
(Flame CZE) DELETED by Flame CZE
Autocross objects ID's
Totally OT but what the hell is the difference in the Kyoto tyres?
Quote from boothy :Totally OT but what the hell is the difference in the Kyoto tyres?

I was wondering too
Quote from Flame CZE :So, here are all the current object IDs: http://www.flame.hj.cx/lyt/

Sweeet! Thanks..

For undo about the only thing I could think of was to store a reverse/undo command in a stack of some sort. Not sure how to do state tracking.. sounds like a lot of memory and maybe less flexibility?

Kyoto tyres?
Yes the state tracking is a lot more memory and less flexible, which is why I was asking, that way if you were planning that route I'd have have given you a hint; of course assuming it was still early enough to do so. But looks like you have the more flexible way to do it already, and that is nice.

FlameCZE - NICE! Very nice. Thanks much.
No problem and I hope the devs will make it less complicated in the future
I had a go at making a layout with LYTe, and there's great potential. There are a couple of issues that had me constantly tearing hair off of my head, however.

- It's difficult to watch the measure tool's distance in the bottom left, while trying to drag a pixel-perfect straight line. It would be easier if the distance was displayed somewhere in the vicinity of the mouse cursor.

- The measure and line tools' keyboard shortcuts are very unresponsive, I have to press them several times almost every time, and was constantly drawing lines of objects instead of measuring distance. Also, I think there'd be minimal downsides to having most shortcuts bound to a single button, without the ctrl+ form.

- When a object line is drawn, and escape is pressed prior to releasing the LMB, the objects are placed despite it appearing that the action has been canceled.

- It's quite frustrating to use the measure tool in its current way, i.e., by holding down the mouse button throughout. I used a list of cone coordinates (in metres) to make a layout. I found that holding the mouse button, while looking at the bottom left corner, while lining up a perfectly horizontal line; releasing the cursor, doing the same for a vertical line, then repeatedly hammering CTRL-L while desperately praying my mousehand wouldn't twitch a millimetre before I manage to place a cone was.. a tad tedious.

I think it would be better to have the measure tool work a bit differently: place a virtual* reference object on the map by pressing a shortcut key (say, 'D'). Then show 2 things in a convenient location, a) xy-distances and b) the resultant straight line distance, in pixels/metres/feet. This would allow measuring and placing of objects to be much easier.

*virtual: not an actual lyt object, but still visible on the map image.
You could do what I did, and make the background into a grid - see post #130 - or see attached.

Doesn't answer all your problems, but helped me, especially with some straight lines.
Attached images
AU1_on side with grid.png
Well yes, but you'd still have to be looking at the bottom left corner and some other point on the map at the same time to draw a straight line of a specific length in metres. The core problem is that it's easy to do a horizontal/vertical line, and it's easy to do a line of a specific length, but not both at the same time.

What would be really cool is if worked like in the attached illustration. Green is a placeable reference point. As you move the cursor away, feint white lines are drawn, on the sides you can see the x & y distances and the direct path distance. You can now move the mouse freely, and easily drop an object (red) at an exact location every time.
Attached images
lfs-lyte_measure.jpg
Hello
I cant get it to work.. I dont have ramp or ramps in the Lyte program but in the objects folder i got it.. REPLY FAST

LYTe - layout editor
(189 posts, started )
FGED GREDG RDFGDR GSFDG