I have been writing a lot of lua code recently, especially with a lot of designing on screens and I have noticed two many things that could improve the script writing by a lot.
- First of all there is an big issue with large scripts which can be by themselves already quite complicated and hard to understand if you don't remember what the code did. This becomes even more complicated when the script is starting to reach the maximum ammount of characters that can be used within one single lua part. I don't won't deny that a limit for the characters is necesarry to help with the game stability and performance but due to the game counting every single character, including stuff like spaces or adding a new empty line it can be quite hard to keep the scrip easily understandable. Due to this I would think of making the programm not count sentences or words that were added with the comment markings "--" i believe that this would be easy to implement since the game already automatically greys out those sentences in the script already. This wouldn't touch the maximum length of a script but it would make it much easier to keep track of what a script is doing.
- The second issue that i have noticed, is the fact of having to spawn in the screen/vehicle every time I only even want to test the program or the alingment of the stuff displayed on the screen. Due to that i would prefer if some kind of in-workbench compiler gets added with which the player can test the programm just as if it would be running in a vehicle. Additionally there could be an option to check what screen output would be given aswell as the option to define the inputs for channels by hand inside the compiler. This does seem like a bigger project to include into the game but it would help out a lot of players that otherwise constantly have to load in a vehicle just to check if they should move the alignment of a rectangle by one or 2 more pixels.