The online racing simulator
Searching in All forums
(217 results)
hackerx
No longer welcome
I guess you can do whatever you want with this little demo. If all goes well this show names thing will be one of functions of InSim helper program I'm currently working on.
hackerx
No longer welcome
I noticed that ViewPLID in STA packet shows some (random?) other player's ID when you go to pits (shift + P). Shouldn't it be in this case zero = none?

Also, how do I detect if LFS is in autox mode?
Last edited by hackerx, .
hackerx
No longer welcome
Hmm after some thinking, this automatic system isn't perhaps that good, or so to say future compatible. Suppose one day you want to make LFS UI fully configurable. Which is quite likely I guess. Or just rearrange screens. In this case "recommended area" has no meaning any more.

Anyway, simplest solution is perhaps clear screen completely on shift+B/I, if InSim program requests that (with BFN?). Plus possibility to make "always on" buttons, which would be then treated as part of LFS interface. Simple, but quite flexible.
Last edited by hackerx, .
hackerx
No longer welcome
Quote from Scawen :- Always visible buttons (possibly those outside the recommended area)
- Space clearing optional (possibly if any buttons are in the recommended area)

That would be nice. For space clearing maybe BFN packet could be used, with commands like "clear space", "unclear space", "make this ClickID always visible/not affecting space clearing", etc.

And few questions...

I noticed that buttons don't work at all in MPR replay. Is that intentional or not done yet?

Is it somehow possible to use on buttons those seven-segment numbers LFS uses to display times?
hackerx
No longer welcome
Here's a little toy to test the new button interface.

Put this exe into main LFS directory, then type into LFS commands:
/insim 29999
/exec names
or
/exec names localhost 29999 <password>
if you have admin password set.

Now when switching view to other cars with TAB key, player name is shown on top of screen.
hackerx
No longer welcome
Can PLID be zero? According for example to this in STA packet...
byte ViewPLID; // Unique ID of viewed player (0 = none)

...seems it should not be. But sometimes in single player it's 0 (seems only when starting LFS, if you are already in grid - bug?).

Also something I haven't figured out yet, when using InSim locally in multiplayer mode, how do I know which is "my own car"?
hackerx
No longer welcome
Hmm... New Order - Blue Monday?
hackerx
No longer welcome
Actually is quite easy to build with current buttons something that looks like multi-line text box. Unless you want it to be automatically scrolling?
hackerx
No longer welcome
LFS crash on receiving some (probably invalid) BTN packets: 0040FFE7.

Edit: seems that packets that cause crash are not invalid after all, but with no text. I understand that this should be legal (BTN packet size 12)?
Last edited by hackerx, .
hackerx
No longer welcome
Quote from MonkOnHotTinRoof :Another request that would be very useful for multi-purpose sim . I would like to force guests to remove all default text while on track (thing that already happens when clicking shift+f), so they only see custom buttons. I don't see any way now to do it, unless asking very nicely in welcome screen players to press shift+f when joining track

Haven't tried it myself yet, but take a look at IS_SFP packet, ISS_SHOW_2D there could be what you looking for.

Edit: hmm no that's local only.
Last edited by hackerx, .
hackerx
No longer welcome
Quote from Scawen :I don't really know how this system could work at all if I don't make some buttons disappear. But, ok, I'll leave the join race button there, I'll just not draw the connection list and the start grid.

Say I want to just add one small button to race setup screen... then disappearing LFS buttons seems kinda weird. Why not make disappearing LFS buttons optional, controlled by InSim in some way? Could be special TINY packet. BStyle in BTN is already all used... Maybe Instance could be removed and BStyle made a word?
hackerx
No longer welcome
What version is your LFS server? If you use W test patches, then those have new InSim version which doesn't work with relay yet.
hackerx
No longer welcome
Quote from Scawen :Here's a preview of what's to come.

Beautiful!

And to make this post more useful, little suggestion not related to buttons: CNL packet could have reason for disconnect, normal/connection lost/kick/ban(/something else possible?).
hackerx
No longer welcome
OK did some quick testing, few thoughts:

I create 60 buttons (as on picture - players list), and it takes somewhere between 1.2 - 1.5 sec. That's quite slow.

Also I think 79 (if I'm not mistaken) local buttons is not enough, for example for creating some bigger tables with many columns. Why there has to be two separate ClickID ranges anyway?
hackerx
No longer welcome
Aha. There's few more of those "PlyNum" thingies I think, in camera control packets. And as for colour codes, I guess better is to put them back. For example, one of possibilities with buttons is full message history, but that wouldn't look right without colours.

OK, I go to test the buttons now.
hackerx
No longer welcome
Hi, me again...

Tried to make use of ViewPlayer in STA packet, but to my surprise it's not player's unique id. That "Player index of viewed car" is kinda useless, as seems like it doesn't relate directly to any other data received from LFS. Also this number can change, while viewed car itself doesn't. Quite confusing.

So, any particular reason why this isn't PLID?
hackerx
No longer welcome
Messages in MSO have colour codes stripped. If this is intentional, then why?
hackerx
No longer welcome
Had same problem: http://www.lfsforum.net/showthread.php?p=427928#post427928

It seems losing focus is impossible to prevent ATM, unless program that is run creates its window in some sort of "silent" way (dunno I'm not familiar with winzozz programming). It is possible to exec programs in a way that window is created somehow on background, seen it done in other programs (AutoGK for example).
hackerx
No longer welcome
If arrows not working, try Shift + arrows.
hackerx
No longer welcome
Quote from GeForz :That's a good question. I hope nobody has the idea to fill the whole screen wih buttons if someone crashs to "force him to shift+s"...

It is already possible to /spec, /kick & /ban with InSim so I don't see problem here. If function is powerful enough to be useful it can also be abused. If somebody decides to spam buttons, then just leave that server...

And few more ideas:

How about possibility to position button also relative to existing HUD elements? For example, so that Y position is given with normal 0-200 coordinate, but in X direction button is placed as much right or left as possible, without covering HUD (X = some magic number > 200). In this case also makes sense to have button size defined as I proposed above (coordinate + size instead of pair of coordinates), as one coordinate is not known to InSim program.

Another idea is adding button to Escape menu, for easy access to InSim program without cluttering the screen. Could be enabled with IBtn.ClickID = some number > 159 in IS_BTN.

Also I don't see way to show same button on all connections? Maybe a flag in IBtn.BStyle to make button show on all connections, including those made after defining a button. So to say, a persistent button.

OK that's all I can think of right now, hope that some of my ideas are helpful.
Last edited by hackerx, .
hackerx
No longer welcome
I guess it would be useful if InSim programs could create screen with multi-line text field, like one that pops up when hires skins are enabled in Options/misc. Also with OK/(optional?)cancel buttons. Could display there for example help text for InSim program.

Only problem I can think of is if you have limit on packet size, then text could be split to multiple packets.

Edit: doh, of course there's packet size limit, as byte is used for it.
Last edited by hackerx, .
hackerx
No longer welcome
Quote from Scawen :I'll consider the width and height request. Would that make it easier to create buttons?

Just I thought that this way it would be little bit more elegant. Not important really.
Quote from Scawen :There is already a way to clear all buttons - an IS_BTN with no buttons is a special case meaning delete all.

Oops, somehow I missed that, sry.
hackerx
No longer welcome
I didn't mention any pixels...
hackerx
No longer welcome
Few more thoughts... maybe slightly better would be to define button with top left coordinates X, Y and size X, Y. Also way to delete all buttons at once could be useful, perhaps with MaxType = 0; ClickID = 255.
hackerx
No longer welcome
So I understand if ISB_CLICKABLE is not set, button would be just text with no background at all?

Can text on button use colour codes? Also, how about text align on button? (left, center, possibly right).
FGED GREDG RDFGDR GSFDG