The online racing simulator
PenaltyReset
(12 posts, started )
PenaltyReset
I have made a new InSim program that allows admins to give drivers long (>10 seconds) stop-go penalties for resetting their car.

Comments:

The purpose of this program is to limit the number of drivers dropping out of the race in endurance events. By keeping as many cars in the race for as long as possible then it should make the race more enjoyable for all. It also gives those drivers who have suffered an unlucky crash (buggy physics, someone else hitting them, etc...) another chance and not waste all the hours of practice that they put in for the event.

When a driver rolls/destroys their car on a server running this mod their race is not necessarily over. Instead, they may reset their car and receive a (long) stop-go penalty in the process. The length of the stop-go penalty is entirely up to the admins to choose, but in creating this mod I intended the stop-go penalty to simulate the time it would take for the marshalls to roll a car back onto its wheels and do whatever repairs need to be done. Alternatively, it could simulate the time required to jump into a spare car.

I won't suggest a duration for the stop-go, but admins should keep in mind the fact that they are trying to keep drivers from dropping out of the race, so it should not be too long. Drivers who receive a penalty for resetting shouldn't be able to beat someone who hasn't crashed their car, but they will at least be able to continue racing and challenge all the other drivers who have.

Aside: Some endurance events allow drivers to warp back to pits if they destroy their car. The disadvantage of such a system is that the driver's lap count is reset, so nobody knows how many laps that driver has completed. This is confusing for the drivers and causes a headache for admins after the event trying to work out how many laps everyone has done.

Before you start flaming the idea, remember, it's OPTIONAL; nobody is going to be forced to use it. Moreover, it's meant to make racing more fun, you're not against fun are you?

Usage (for drivers):
  • The program keeps track of the number of penalties drivers receive; multiple resets result in multiple penalties.
  • The program also keeps track of the number of normal stop-go penalties and drive-through penalties.
  • Penalties for resetting the car are referred to as "long" stop-go penalties.
  • The program will send you a message whenever the number of penalties you have changes.

  • The program tells you how long you need to stop when you enter the pits.

  • You can only complete one penalty each time you enter the pits. This is the default behaviour of LFS.
  • The program may optionally (up to admins) remind you of how many penalties you have every time you complete a lap.
Be careful when you are attempting to complete a stop-go penalty for resetting. LFS will still display "[FINISHED]" after 10 seconds. You should not leave the pits at that time, instead you should wait for X seconds (where X is set by the server admin) to complete your penalty. I pop some rather large buttons up on the screen to remind you of this ().


Installation (for admins):

Requirements:
  • .NET 2.0 must be installed on the machine running PenaltyReset. It is not required to be running on the server if the server is not running the PenaltyReset Program. (.NET 1.0 may work, but has not been tested).
  • IP address of server (doesn't need to actually run on the server machine, it can though).
  • InSim must be running on the server.
  • InSim port number.
  • Admin password.
  • Resetting should be allowed on the server.
To get the program running, start LFS first and then start PenaltyReset. Settings can be made in the PenaltyReset.xml file.

Example: Host IP address is 123.123.123.123 and InSim port is 29999 with password "racing":


<connectionOptions>
<HostAddress>123.123.123.123</HostAddress>
<Port>29999</Port>
<AdminPassword>racing</AdminPassword>
</connectionOptions>

You should use 127.0.0.1 as the IP address if you are running the program on a local host.

Other options in PenaltyReset.xml
  • PenaltyDurationInSeconds - Duration of long stop-go penalties received for resetting car (default is 5 minutes: 300).
  • MessageColour - LFS colour prefix to display PenaltyReset messages with (default is red: ^1).
  • AnnounceStopTimeToPlayer - If true the program tells the player how long they stopped whenever they complete a pit/penalty. Useful for debugging (default: false).
  • AnnouncePenaltiesEveryLap - If true the program reminds the player of how many outstanding penalties they have to complete (default: true).
  • LogToConsole - If true the program logs all the messages sent by it to players and some other status information to the console (default: true).
  • LogToFile - If true the program logs all the messages sent by it to players and some other status information to the console. Useful for admins to track events after the race (default: true).
  • LogFileName - Name of file to log messages to (default: log.txt).
This program has been tested quite a bit, but if you find any bugs then please let me know and I'll try to iron them out. Please test the behaviour of LFS with and without PenaltyReset running before submitting a bug report as a lot of the functionality is either intentional or the way LFS is supposed to work.

Version tracking:

Version 1: Initial release.

Version 1.01
FIX: Bug where drive-through penalty count was not decreased.
FIX: Drive-through penalty counts are now announced.

2/2/2008: Archive updated to include source code.

Attached files
PenaltyReset 1.01.zip - 308.9 KB - 168 views
Its good, i like it but 1 thing is the penaltys just keep counting....need to make some kinda max so they dont end up with like 20, 5min stops
i've tried this program recently to help new racers in our races finish instead of usually just dropping out. but there was a bad side effect from the program. if a person came into the pits just a little to fast, or left too fast, and got a DT, that's fine, as they go around again and serve the DT. however, as soon as they cross the line and the DT is lifted, your program slaps on another DT, and as such, they have to do that one too.

if you would like to have the replay of this happening, i'll post it. but please look through your code to fix this.
I am pretty sure Peptis fixed this after we helped him test it locally in AUS and found the same issue, along with others. I am guessing he never updated here this forum. I will let him know you have mentioned it and see if he can reply.
Quote from mcgas001 :Its good, i like it but 1 thing is the penaltys just keep counting....need to make some kinda max so they dont end up with like 20, 5min stops

IMHO, there's no reason to put a maximum on the number of penalties. If a driver destroys their car 20 times then they deserve 20 penalties.

I may be missing something of course. Is there a situation where a driver could receive 20 penalties through no fault of their own?
Quote from burnsy1882 :i've tried this program recently to help new racers in our races finish instead of usually just dropping out. but there was a bad side effect from the program. if a person came into the pits just a little to fast, or left too fast, and got a DT, that's fine, as they go around again and serve the DT. however, as soon as they cross the line and the DT is lifted, your program slaps on another DT, and as such, they have to do that one too.

if you would like to have the replay of this happening, i'll post it. but please look through your code to fix this.

As Flinty said, I thought we fixed this problem. Please send me the replay and I'll look into it.
do you offer the code for your app ?
Quote from haelje :do you offer the code for your app ?

Yes, I will. In fact, I am using sdether's lfsLib.NET so I think I may have to as his library is released under the GPL. I just need some time to sort it out as I'm not 100% what is required of me under the GPL at this stage.

If you have an urgent need for the sources then PM me and I'm sure we can work something out. If it's just an idea that you want to include in the app, PM me and I may be able to add it in for everyone's benefit.
We used this tonight on a 1 hour race at WE1 driving XRRs.

It worked very well and meant that a trip to the kitty litter wasn't the end of the race for the driver.

Excellent idea and it worked superbly. Thanks.
PenaltyReset is now re-released under the GPL.

I have updated the zip file; it now includes the source code required to build the application.

PenaltyReset
(12 posts, started )
FGED GREDG RDFGDR GSFDG