I make custom syntax highlight definitions for text editors.
When you write your .lpr addon, you need to add begin/end points, like php. At the very very top of your document, put "#LPR", at the very very end, put "##LPR". This will not alter your program in any way because # is just a comment in Lapper. When you do that, you should be greeted with lovely formatted colors.
To install:
Gedit
Linux: put "lapper.lang" in /usr/share/gtksourceview-3.0/language-specs
Windows: Put "lapper.lang" in C:\Program Files\gedit\share\gtksourceview-3.0\language-specs\
EditPlus
Windows: Put "lapper.acp" and "lapper.stx" in the directory you installed EditPlus
Open your settings and go to syntax
Click "add" and navigate to the correct files for auto complete & highlighting
Click apply & ok
Notepad++
Save the file anywhere you like.
Start NotePad
Goto 'Language' Tab
Click on 'Define your language'
Click on the 'import' button
And goto the folder you saved the file and load it into NotePad++
PSPad
Copy the lapper.ini in (Path where you installed PSPad)...\PSPad editor\Syntax . ( default is C:\Program Files\PSPad editor\Syntax )
Open PSPad and under Settings - Highlighters setting click on <not assigned> and select on the right side lapper and Apply
Changelog
Gedit
v1.2
Added "Event" and "EndEvent" definitions
v1.1
Added "Lang" and "EndLang" definitions
v1.0
Initial version.
EditPlus
v1.0
Initial version. Auto completion doesn't work right now
Notepad++
v1.0
Initial version. Credit to Bass-Driver for this syntax
I'm not the best driver myself, I'm just going by what I've seen new players race for lap times.
If a demo racer doesn't race for 2 hours, that doesn't bother me. I'm trying to welcome all the users to test their skills. I could make it S1, but then again I've only got 3 signups right now, and the community is not getting any bigger.
I'm sure there are places that state all of this, but I am feeling lazy
Is LFSLapper actually php? Can I use php functions like file_get_contents()?
Ive looked through some of the addons, am I able to use (for example) foreach($array as $item){ #do something with $item } or does it have to be: FOREACH () ENDFOREACH or whatever it was
how is timing inside of addons handled? are listeners always running? Example: if i want something to run at 10:30, will it keep checking until it's 10:30?
is there more documentation other than just methods and functions available?
I want to start writing addons for myself personally, but I am clueless on these things. It's obviously not "normal" PHP.
It'll be more interesting if I can actually get people to sign up haha. I mean, one lap takes MAX 1:30, my personal time is ~1:15 (if I'm remembering correctly). So 100 laps is 150 minutes = 2hr 30min. Not that much considering some of the other racing leagues here are very long.
I've been working on starting a server that will be used as a regular user playable server and a league server. I ran across Yisc[NL]'s scheduling addon for LFSLapper, and although it was great in concept, I wonder if a few things could be added/changed.
Save the current server settings (laps, cars, etc) and revert to them a configurable amount of time (5 minutes for example) after the third place winner crosses
Instead of checking at 00:00 to see if its the day of a race, check every hour to see if its the hour before a race
once it detects a race, put it into practice (0 lap race) mode until the race start, then start the race with the amount of laps specified by the user
With these additions I think it would help lots of people running league servers. Just an idea.. I am skilled in PHP but have no knowledge of LFSLapper at all and I don't plan on using time for that yet.
I'm going to say one thing and leave it out there: Please don't forget about the low-end users!
Sure you can add fancy shaders/graphic updates and make it the best looking game ever, but currently you can play LFS on a potato, and that was the selling point for me!
Oh man thank you so much! This is just what I needed.
I'm setting up a racing rig for a few events and discovered an android-phone-VR solution (TrinusVR). This will make it even better, because people can watch!