Hello Programmers.
In the next test patch (U12) will be the first version of an LFS script system. These scripts are simple at the moment, just a list of /commands.
The idea right now is that anyone can build small scripts to reassign controller buttons, depending on the car selected. A common example : they may want the paddle shifters assigned to shift up and down when they drive a BF1, but their sequential shift stick ro be assigned to shift up and down when they get in a fox.
What I've done to make that possible :
- made the script system to run a sequence of commands in a text file
- added /axis, /btn and /key commands : e.g. /btn shift_up 5
- call a script called CAR.txt when you get in a CAR (CAR being XFG, XRG, etc...)
- allowed script files to call script files : e.g. FOX.txt contains a line /run sequential (which calls sequential.txt)
I think this system has potential to become quite powerful. There isn't anything in it specific to controllers. If in future there was a way to write small programs in LFS, this would be the basis of it (needing variables, conditional statements, jumps, pauses, etc). But I'm not doing that now. For now I just want to ask you if you can think of some "events" in the program that should call a script file. Just like the event of getting in a CAR calls the CAR.txt script.
To just make it clear what I mean, for example I could attach a script "entry.txt" which is called whenever LFS goes into the main entry screen. Another "start_race.txt" when the light goes green. Though I can't see any point in those, and probably won't implement them, they are just an example so you know what I'm talking about.
By the way, I've added a few extra commands for the scripts :
/echo X [ makes message X appear on local computer screen ]
/say Y [ makes message Y appear as if typed by the user ]
// this is a comment
I also plan to add a few more things like /fov and /g_shift_lateral - so people can use the CAR.txt files to automatically set up some other things for specific cars.
Another thought I had was perhaps I should give them an extension .lfs instead of .txt - although they are text files, and it wouldn't make any difference at the moment, these scripts might be useful in future with a file association, and they might become a cut down LFS programming language so it might then become annoying that we didn't call them .lfs in the first place.
Well, any comments are welcome. I plan to release the first version tomorrow, but could add any events or features to it that you might find useful.
In the next test patch (U12) will be the first version of an LFS script system. These scripts are simple at the moment, just a list of /commands.
The idea right now is that anyone can build small scripts to reassign controller buttons, depending on the car selected. A common example : they may want the paddle shifters assigned to shift up and down when they drive a BF1, but their sequential shift stick ro be assigned to shift up and down when they get in a fox.
What I've done to make that possible :
- made the script system to run a sequence of commands in a text file
- added /axis, /btn and /key commands : e.g. /btn shift_up 5
- call a script called CAR.txt when you get in a CAR (CAR being XFG, XRG, etc...)
- allowed script files to call script files : e.g. FOX.txt contains a line /run sequential (which calls sequential.txt)
I think this system has potential to become quite powerful. There isn't anything in it specific to controllers. If in future there was a way to write small programs in LFS, this would be the basis of it (needing variables, conditional statements, jumps, pauses, etc). But I'm not doing that now. For now I just want to ask you if you can think of some "events" in the program that should call a script file. Just like the event of getting in a CAR calls the CAR.txt script.
To just make it clear what I mean, for example I could attach a script "entry.txt" which is called whenever LFS goes into the main entry screen. Another "start_race.txt" when the light goes green. Though I can't see any point in those, and probably won't implement them, they are just an example so you know what I'm talking about.
By the way, I've added a few extra commands for the scripts :
/echo X [ makes message X appear on local computer screen ]
/say Y [ makes message Y appear as if typed by the user ]
// this is a comment
I also plan to add a few more things like /fov and /g_shift_lateral - so people can use the CAR.txt files to automatically set up some other things for specific cars.
Another thought I had was perhaps I should give them an extension .lfs instead of .txt - although they are text files, and it wouldn't make any difference at the moment, these scripts might be useful in future with a file association, and they might become a cut down LFS programming language so it might then become annoying that we didn't call them .lfs in the first place.
Well, any comments are welcome. I plan to release the first version tomorrow, but could add any events or features to it that you might find useful.