The online racing simulator
Searching in All forums
(393 results)
Australian Hosts Downtime 5th/6th February
Scawen
Developer
Hello Australian hosters,

We received notification that our provider is moving our instances to a different Hypervisor on 5th February, to improve the service. That will mean some downtime.

This should be taking place at some point between 13:00 UTC and 20:00 UTC on 5th February, so that means late in the night in Australia, 5th to 6th February. So I hope that means minimal disruption.

I'd prefer our instance not to be shut down while your hosts are running, so I plan to close them by 13:00 UTC and stop the hosting system on the server. I'll check in occasionally and when I see the server has been restarted, I'll restart the hosting system and restart any hosts that I closed down. That it hopefully before 20:00 UTC otherwise I'll be looking in the morning on 6th February.

If that is OK with you, you can just leave the hosts running and they will be offline for some time as described above. If you prefer to avoid the downtime then you can move your host temporarily (to Hong Kong or USA, I guess).
Scawen
Developer
OK, I think it's fixed now, you can use Korean and other non-Latin characters without starting with Latin or a colour code.
Scawen
Developer
Thanks for this bug report.

I've done some experimentation and while I don't yet know the answer (it's in Victor's web code and I will keep looking) but I found a workaround.

I found that you don't even have to start with a Latin character. You can start simply with a colour code and then it will work.

For example:
^1한글

This will start correctly, in red colour.

You can use colours:
^0:black
^1:red
^2:green
^3:yellow
^4:blue
^5:magenta
^6:cyan
^7:white
Scawen
Developer
Yes, I did that intentionally as it was pointless seeing the semi-inactive ones up at the top.

It is still possible to enforce an order if required, but now when they have no enforced priority, they will be sorted by latest post date.

The idea is to help make it easier to see where the action is taking place, where signups are happening etc.
Scawen
Developer
A quick bit of Sunday work, I've added the ability for admins to edit anyone's entry.

You can see the "edit" button on the left, below "remove" in the signup administration page.
Scawen
Developer
Finally I have included withdrawals on the notification thread.

I don't plan to work on this any more today but will do so if you have any problems.
Scawen
Developer
One more small change as I noticed the Race Green rally signup has included "Country" as a field.

I've now made "Include user's country in CSV export" an option. As you wanted that, you should switch on that option (in Edit season, just above the signup thread option).
Scawen
Developer
I thought of this in the night and had to add this feature to try to solve the remaining problem with not using forum signups.

In "Edit season" you can now add an optional sign-up thread.

So in your case you would add https://www.lfs.net/forum/thread/110364 (or just the thread id 110364) and then you will see a notification of new signups.

I could add a similar notification for withdrawn/deleted signups which would obviously be easy to add now that the system is in place.
Last edited by Scawen, . Reason : removed example notification thread
Scawen
Developer
I used to smoke roll-ups but restarted each time I tried to stop.

My fitness had declined due to a mainly sedentary lifestyle (and I guess smoking didn't help either).

Eventually when I took up running and cycling to get outside and become fit again, I wanted to be faster and it was embarrassing to smoke in the car park at mountain bike events (hiding behind my car) so then I finally stopped at the end of a packet. It is possible to just stop, best to plan it ahead, reduce the amount a bit and then stop on a target day. But you have to understand that you will never smoke again, not a single puff. If you can't honestly make that commitment then I guess there's no point even trying.

Physically for me it was a feeling like being thirsty for a couple of days, then for the following year or so I could think of a cigarette at any time when I would have had one in the past. But that connection gradually disappears as you do those things and don't smoke.

Now, approaching 13 years later it is very rare for me to have a thought of a cigarette and it's very easily dismissed, just seems a bit odd that it still pops into my head on rare occasions.
Scawen
Developer
Duplicate numbers are now shown in red:
https://www.lfs.net/leagues/22/season/1219/signup/view

Note - this is if the field name is Number


EDIT: So apparently the only remaining thing at the moment is for admins to be able to edit entries directly. I think I can do that but not today and maybe better not do that one for a few days, and maybe you'll come up with something else more urgent.
Last edited by Scawen, .
Scawen
Developer
There is now a manual temporary signup closure.

You can see how it looks on one of my test seasons: https://www.lfs.net/leagues/22/season/1218

(it says "Signup temporarily closed" and you can still click to see the signed up racers)

The option is activated on "Edit season" page as seen in the screenshot.

I've realised duplicate number detection is a bit complicated as it needs to retrieve quite a bit of info and search through it and present error messages to the user, preventing them submitting their updates. It's more complicated than you might expect because of the fully customisable entry fields. I might try something simpler like highlighting duplicate numbers in red, just when the page is displayed. Something to make it easier for admins without doing the full job. It might even be better that way, in case a new user selected a number that is really reserved for someone else like last year's winner, etc.
Scawen
Developer
Current status, referring to Jonathon's original requests.
CONSIDER means I intend to look today.


1. CSV agree Nationality would be nice there.
DONE

2. CSV also headers for columns would be a nice to have.
DONE

3. Ability for admins to edit a entry manually.
CONSIDER

4. & 5. Notification to admins of any changes a drivers makes to their entry after it has been approved. Plus the ability to approve a change would be awesome!
DONE for leagues that require approval of entries
(notification sent to admins if there is a new entry or an already approved entry is edited - requires approval again)

6. Ability to temporarily close signups a certain time before a round and x time after a round completion. This may need to be a time stamp after event maybe?
[edit: DONE option to manually close and open again]

7. Ability for car number to be tracked and not used more than once
[edit: DONE duplicate numbers are shown in red, if field name is "Number"]

8. Ability to reject a signup with a reason, giving the driver a chance to correct the details rather than going through the whole signup again.
SUGGEST use signup PM system
(the signup PM works for signed up drivers even if they don't allow forum PM)
Last edited by Scawen, .
Scawen
Developer
OK CSV improved as requested.

If you click Get CSV on my test page you will see:

1) First row is column titles (as specified by admin)
2) The column after user name is Country

Admin should not add "Country" when setting up the signup required fields. It automatically appears in the CSV after the user name.
Scawen
Developer
Right, first thing I had to do this morning was some essential maintenance (gutter clearing). The rain and hail brought more moss down.

I've had a bit of a fight with some php code but now the season signups are updated so admins of a league that is set to require approval of entries get a new email if:

1) There is a new entry
2) An entry that has been approved, is now edited

In case (2) the entry is no longer marked as 'approved'.

I've made it clearer to see on the admin pages if an entry requires approval.

I'll continue to look at more things now.


I know Viperakecske and some others will be frustrated that I'm not working on Tyre physics this afternoon but I'd really appreciate if they can keep out while I do a few more things this afternoon to make the league entry system good enough to be used for a high quality league. The idea will be to get on with the tyres in the morning. So please leave me in peace.
Scawen
Developer
Well thank you very much and I hope I haven't been too annoying pressurising you to do it. I will look at some this morning and will keep supporting it as you go. For anyone concerned, this will not stop me working on the tyre physics this afternoon.

I understand it's an experiment and I thank you for making that experiment real.

EDIT: I'll do the country export of CSV as one of the first things and look at user-editing removing approved status, and sending an email to all admins when a change is made. Maybe, to avoid email spam, an email like that is only made, when an "approved" entry is edited and becomes no longer approved?
Last edited by Scawen, .
Scawen
Developer
Sorry, I wrote previous post without knowing you had posted! Big grin

I'll have a look this morning. I think they mostly look like quite small things and could be quickly done.
Scawen
Developer
To be clear, I could look at some today and get them sorted, if it would actually go into use for the E-challenge.

I've heard a couple of times that people say the forum thread itself can make the event seem alive. It seems like you could get the same effect with a sort of news thread and do a daily post each time more people have signed up, linking to the signup page. Or maybe there are better ideas.

It does seem like just falling back to the forum-based signup at this point would be quite sad, rejecting the new system without even giving it a try, when I am quite willing to add a few features, on the same day you request them.
Scawen
Developer
1) You can set country as a field for people to enter (of course, you can add any named field). But if you don't want people to type in their country, I guess I could add a separate CSV export option that includes country as listed on the forum.

2) How would that be done? is there a special format for that or is it like the first line of the CSV is just column headers?

3) Makes sense, though you could use the PM system to tell the person.

4) Do you mean simply an email to admins if someone edits their entry?

5) Starting to get too complicated now, the need to store in database the version before and after the change? Or do you mean more simply the entry loses its "APPROVED" status if they edit it?

6) I was thinking a manual close and open might be a better option.

7) You can use the PM system (although a number check on a a specifically named field could be possible).

8) You can use the PM system.


I find it a bit extreme that some of these are preventing you from using the system. 1, 2, 3, 5, 7, 8, don't really seem like reasons not to use the system as forum signups don't do that either.

To my mind that only leaves 4 and 6 as remaining advantages of the forum system that you have listed.

I could probably add some of these and would do so before the E-challenge if you would use it. But I did a big push recently as you know and it seems like you've left it a bit late to respond. Also it seems like something else might be preventing you from wanting to use it, because you haven't really listed much that should prevent you using it (if I added 4 and 6, for instance). EDIT: And maybe (5) if you just mean that editing an entry means it loses its "approved" status. I'd also look at some of the other ones.
Last edited by Scawen, .
Scawen
Developer
These quick weekend updates are all I can really do at this time. Improvements that are harder to implement will have to wait for the future.

I'll be doing another push on the Retro tyre model at the start of the working week, moving towards the big release.

Of course, this test patch can be easily updated at any time if simple updates / bug fixes / documentation corrections are needed.
Scawen
Developer
OK, I've added the repeating AII option, it's a special Input value CS_REPEAT_AI_INFO.
The special input values now have defines instead of 253, 254 etc.
You can also use CS_SEND_AI_INFO to send a single AII (like SMALL_AII).


Updated section in docs/InSim.txt

// AI CONTROL
// ==========

struct AIInputVal // There is an array of these in the AIC packet below
{
byte Input; // Select input value to set
byte Time; // Time to hold (optional, hundredths of a second)
word Value; // Value to set
};

const int AIC_MAX_INPUTS = 20; // NOTE: Increase if CS_NUM is increased

struct IS_AIC // AI Control - variable size
{
byte Size; // 4 + 4 * (number of inputs)
byte Type; // ISP_AIC
byte ReqI; // Optional - returned in any immediate response e.g. reply to CS_SEND_AI_INFO
byte PLID; // Unique ID of AI driver to control

AIInputVal Inputs [AIC_MAX_INPUTS];
};

// If the Time value of AIInputVal is set, that input will return to default after that time.
// This is probably most useful for CS_CHUP / CS_CHDN / CS_FLASH / CS_HORN inputs.
// If you don't set Time you will need to send another packet to zero the input.

// Values for Input

// CS_MSX 0 - steer: 1 hard left / 32768 centre / 65535 hard right
// CS_THROTTLE 1 - 0 to 65535
// CS_BRAKE 2 - 0 to 65535
// CS_CHUP 3 - hold shift up lever
// CS_CHDN 4 - hold shift down lever
// CS_IGNITION 5 - toggle
// CS_EXTRALIGHT 6 - toggle
// CS_HEADLIGHTS 7 - 1:off / 2:side / 3:low / 4:high
// CS_SIREN 8 - hold siren - 1:fast / 2:slow
// CS_HORN 9 - hold horn - 1 to 5
// CS_FLASH 10 - hold flash - 1:on
// CS_CLUTCH 11 - 0 to 65535
// CS_HANDBRAKE 12 - 0 to 65535
// CS_INDICATORS 13 - 1: cancel / 2: left / 3: right / 4: hazard
// CS_GEAR 14 - for shifter (leave at 255 for sequential control)
// CS_LOOK 15 - 0: none / 4: left / 5: left+ / 6: right / 7: right+
// CS_PITSPEED 16 - toggle
// CS_TCDISABLE 17 - toggle
// CS_FOGREAR 18 - toggle
// CS_FOGFRONT 19 - toggle

// Inputs marked 'hold' must be set back to zero after some time.
// This can be done either by use of the Time field or by sending a later packet with Value = 0.
// E.g. Set Time to 10 when issuing a CS_CHUP - hold shift up lever for 0.1 sec.
// E.g. Set Time to 50 when issuing a CS_HORN - sound horn for 0.5 sec.

// Inputs marked 'toggle' accept the following Values:
// 1 toggle
// 2 switch off
// 3 switch on

// Special values for Input

#define CS_SEND_AI_INFO 240
#define CS_REPEAT_AI_INFO 241

#define CS_SET_HELP_FLAGS 253
#define CS_RESET_INPUTS 254
#define CS_STOP_CONTROL 255

// CS_SEND_AI_INFO - Send an IS_AII (AI Info) packet

// CS_REPEAT_AI_INFO - Start or stop sending regular IS_AII packets
// Time = time interval in hundredths of a second (0 : stop)

// CS_SET_HELP_FLAGS - Value can be any combination of
// PIF_AUTOGEARS // 8 - auto shift
// PIF_HELP_B // 64 - brake help
// PIF_AUTOCLUTCH // 512 - auto clutch
// Default value for an AI driver is PIF_AUTOCLUTCH only
// If you set PIF_AUTOGEARS you don't need to set PIF_AUTOCLUTCH

// CS_RESET_INPUTS - reset all inputs
// Most inputs are zero / CS_MSX is 32768 / CS_GEAR is 255

// CS_STOP_CONTTROL
// The AI driver will stop the car

// AI car info
// -----------

// Send a SMALL_AII with UVal set to PLID to receive current information about a local car

struct OSMain // included in IS_AII - identical to OutSimMain (main data in OutSim packet)
{
Vector AngVel; // 3 floats, angular velocity vector
float Heading; // anticlockwise from above (Z)
float Pitch; // anticlockwise from right (X)
float Roll; // anticlockwise from front (Y)
Vector Accel; // 3 floats X, Y, Z
Vector Vel; // 3 floats X, Y, Z
Vec Pos; // 3 ints X, Y, Z (1m = 65536)
};

struct IS_AII // AI Info
{
byte Size; // 96
byte Type; // ISP_AII
byte ReqI; // ReqI from the SMALL_AII request packet
byte PLID;

OSMain OSData;

byte Flags; // AIFLAGS_x below
byte Gear; // Reverse:0, Neutral:1, First:2...
byte Sp2;
byte Sp3;

float RPM; // RPM
float SpF0;
float SpF1;

unsigned ShowLights; // Dash lights currently switched on (see DL_x in OutGauge section below)
unsigned SPU1;
unsigned SPU2;
unsigned SPU3;
};

#define AIFLAGS_IGNITION 1 // detect if engine running
//
#define AIFLAGS_CHUP 4 // upshift lever currently held
#define AIFLAGS_CHDN 8 // downshift lever currently held

Download:

https://www.lfs.net/file_lfs.php?name=LFS_PATCH_7F_TO_7F5.zip
Scawen
Developer
That's great to hear, thanks! Smile

Usually if a few lines are added for a new teat patch I send a notification from our admin system to all the translators.
Scawen
Developer
Quote from iamproplayer7 :- auto gear box sometimes gear up to high or too low, with message GEAR_DOWN avoided or similar

I'm not sure what this means. Auto shift doesn't work well?

Quote from iamproplayer7 :multiple PLIDs because local InSim gets a bit spammed when you want to control 30 or more AI vehicles.
30 vehicles every 50ms = 600 packets every second. 600 * 8 bytes = 4800 bytes every second.

Maybe a better solution would be if I would add a packet to request regular updates.

Maybe something like

struct IS_RAI // Regular AI
{
byte Size; // 8
byte Type; // ISP_RAI
byte ReqI; // 0
byte PLID;

word Interval; // time between updates, 0 to stop
byte Sp2;
byte Sp3;
};

I think it should be easy enough though I haven't checked thoroughly yet.
Last edited by Scawen, .
Scawen
Developer
Quote from iamproplayer7 :First of all, yes - there is problem in my own script/framework and i'm very sorry that i made you waste so much valuable time...

No problem at all, I only wrote a few sentences and briefly looked at the output in my InSim test program.

Good to hear you identified the issue.

Quote from iamproplayer7 :
- add direction to IS_AII like CompCar struct has.

At least this one should be easy if you have an atan2 function. Smile

Direction = atan2f(-Vel.x, Vel.y); // in radians
Scawen
Developer
Thanks for the thanks but you don't need to buy an account just to thank me. Big grin
Scawen
Developer
Quote from iamproplayer7 :Now i have this issue, using 7F4 (also tried 7F3) as client and InSim Version 9 in my InSim, i rechecked my framework and it works very well and intended as it should. I'm not getting ISP_PLL packet consistely (player spectates), only first time after insim connects and sometime after randomly.

From my point of view it's most likely there could be a bug in your packet reader. For example two packets arriving at once but you only read the first one.

This is a quite fundamental packet so I doubt that it is broken, though I could check tomorrow.

EDIT: I've checked now and I'm getting IS_PLL as expected. I think you should check how many bytes arrived in your TCP read and compare that with the packets you processed. In case a packet is going missing. Packets may arrive more than one in a single read or even be split across multiple reads, which really does happen!

Quote from Bokujishin :I just noticed an issue, it seems like CS_CHUP, CS_CHDN and CS_FLASH get "stuck", they only work once and never go back to zero, so I can't change gears anymore, and the high beam flash stays on indefinitely.

That behaviour, for these inputs that you can hold indefinitely, is documented above but maybe it's not clear enough.

Mentions in the InSim.txt:

// If the Time value is set, that input will return to default after that time.
// This is probably most useful for CS_CHUP / CS_CHDN / CS_FLASH / CS_HORN inputs.
// If you don't use Time then you should send another packet to zero the input.

// CS_CHUP 3 - shift up (set to 1 for a short time then set back to 0)
// CS_CHDN 4 - shift down

I suggest you could use a time like 10 (which is 0.1s). Otherwise (if you use 0 for the Time value) you are just telling it to hold the lever on full time.

EDIT: Tested again and it's still working as expected. Maybe I'll add a bit clearer description in InSim.txt about the need to zero or use the Time value, for those specific controls.
Last edited by Scawen, .
FGED GREDG RDFGDR GSFDG