"Lua Scripting for Train Simulator: An Overview"

General discussion about Train Simulator, your thoughts, questions, news and views!

Moderator: Moderators

scefhwil
Well Established Forum Member
Posts: 907
Joined: Tue Dec 04, 2001 12:00 am
Location: Bristol, England

"Lua Scripting for Train Simulator: An Overview"

Post by scefhwil »

http://www.engine-driver.com/article/sh ... n-overview

New article on Engine Driver. Sadly, another "technical article" that doesn't actually tell you how to do anything, but, the final line says "If there is enough demand, we will look at making our Engine and Scenario scripting documents available so that developers have access to all calls needed to start scripting in Lua for Train Simulator".

So, please, add a comment to demonstrate that there is demand for this information.
RudolfJan
Well Established Forum Member
Posts: 523
Joined: Thu Oct 18, 2007 6:40 pm

Re: "Lua Scripting for Train Simulator: An Overview"

Post by RudolfJan »

Just posted my support.
Rudolf

http://www.hollandhiking.nl/trainsimulator
Here you will find the latest version of the Senario Authors Guide, TSW starters Guide, LuaCreator and TSWTools and more ...
37114
Well Established Forum Member
Posts: 851
Joined: Fri Aug 20, 2010 12:14 pm
Contact:

Re: "Lua Scripting for Train Simulator: An Overview"

Post by 37114 »

scefhwil wrote:http://www.engine-driver.com/article/sh ... n-overview

New article on Engine Driver. Sadly, another "technical article" that doesn't actually tell you how to do anything, but, the final line says "If there is enough demand, we will look at making our Engine and Scenario scripting documents available so that developers have access to all calls needed to start scripting in Lua for Train Simulator".

So, please, add a comment to demonstrate that there is demand for this information.
Finally. Better than nothing. They promised documentation on LUA scripting in the run up to the launch of TS2014 and we're just about to get TS2015.
Regards,

Rich
MaikG
Well Established Forum Member
Posts: 545
Joined: Sat Oct 08, 2011 5:04 pm

Re: "Lua Scripting for Train Simulator: An Overview"

Post by MaikG »

There is not much you can learn from the docs. A few calls that can be counted on two hands. The rest can't be documented. Scripting comes from the brain and not from a documentation.
User avatar
BeeKay
Getting the hang of things now
Posts: 33
Joined: Wed Dec 24, 2003 8:23 pm

Re: "Lua Scripting for Train Simulator: An Overview"

Post by BeeKay »

MaikG wrote:The rest can't be documented. Scripting comes from the brain and not from a documentation.
I agree, there is not much to learn from the docs. They only scratch the surface.
The rest should be in the docs.
Scripting is easy, nothing for the brain, like BASIC in old days, but a list or table of system calls should be known.
Therfore I replied to the poll of DTG in their actual Engine Driver lua article.
Best regards
Bernd
37114
Well Established Forum Member
Posts: 851
Joined: Fri Aug 20, 2010 12:14 pm
Contact:

Re: "Lua Scripting for Train Simulator: An Overview"

Post by 37114 »

MaikG wrote:There is not much you can learn from the docs. A few calls that can be counted on two hands. The rest can't be documented. Scripting comes from the brain and not from a documentation.
There is plenty to be learned from the documentation. That's why documentation is so important in IT and why it's done as standard across the industry. Well versed coders still need documentation to understand different functions and methods (or something they've forgotten as it's been a while since they last did it!)
Regards,

Rich
MaikG
Well Established Forum Member
Posts: 545
Joined: Sat Oct 08, 2011 5:04 pm

Re: "Lua Scripting for Train Simulator: An Overview"

Post by MaikG »

I didn't mean a documentation in generally from the IT perspective. I mean the specific LUA call documentation from TS. And yes, i know the few lines from it. All functions that can be necessary are documented in a short but useful way. But no examples how you can do things you want. And thats ok, because no one can know what you want to implement. So you need your brain for 99% of the scripting work for TS. Believe me, i do it for about 3 years now. I don't really need that documentation. Maybe in the first days and for new implemented Calls (what is a very rare thing), but as a bit skilled coder you can use other ways to gather these information out of TS. Industial standards will not help you to script locos with complexity for TS. Every loco is a new loco, especially from the scripts perpective.
37114
Well Established Forum Member
Posts: 851
Joined: Fri Aug 20, 2010 12:14 pm
Contact:

Re: "Lua Scripting for Train Simulator: An Overview"

Post by 37114 »

MaikG wrote:I didn't mean a documentation in generally from the IT perspective. I mean the specific LUA call documentation from TS. And yes, i know the few lines from it. All functions that can be necessary are documented in a short but useful way. But no examples how you can do things you want. And thats ok, because no one can know what you want to implement. So you need your brain for 99% of the scripting work for TS. Believe me, i do it for about 3 years now. I don't really need that documentation. Maybe in the first days and for new implemented Calls (what is a very rare thing), but as a bit skilled coder you can use other ways to gather these information out of TS. Industial standards will not help you to script locos with complexity for TS. Every loco is a new loco, especially from the scripts perpective.
We'll agree to disagree! I work in IT. Documentation is very, very important especially for something new to an individual.
Regards,

Rich
MaikG
Well Established Forum Member
Posts: 545
Joined: Sat Oct 08, 2011 5:04 pm

Re: "Lua Scripting for Train Simulator: An Overview"

Post by MaikG »

I'm not talking about IT, i'm talking about TS. I work in IT (hardware, network infratructures and webdeveloping) since 20 years. TS is a different world. Yes, we now can stop doing the work and wait for a full documentation. Meanwhile we put our feets into the warm water at the beach on the Maldives .... oh no, wait, we do not work anymore so we do not earn money anymore...we are waiting for a documentation .... Bye bye Maldives :-?

Sorry @ 37114, but we have to deal with what we have at now, not with things in the predicted future. I know the documents and i tell you that you not learn any new from it. TS has no big API. It's a very small one. An because it is that small we need more brain to implement functions that are not there.
gptech
Very Active Forum Member
Posts: 19585
Joined: Fri Oct 10, 2008 5:48 pm
Location: Wakefield, West Yorkshire

Re: "Lua Scripting for Train Simulator: An Overview"

Post by gptech »

I know nothing about lua scripting so any documentation, even just a list of valid functions, would teach me something. IT workers generally have the mind set that allows them to fill in the missing pieces, but not everybody works in IT. Stating or implying that you need to know everything intuitively is not going to encourage mere mortals to investigate scripting, and will only intensify the mystery that seems to surround the more technical aspects of the game.

The sooner the documents are released, the better in my book.
User avatar
Juanillo99
Well Established Forum Member
Posts: 879
Joined: Sat Oct 13, 2012 5:12 pm
Location: Teruel - Spain
Contact:

Re: "Lua Scripting for Train Simulator: An Overview"

Post by Juanillo99 »

gptech wrote:I know nothing about lua scripting so any documentation, even just a list of valid functions, would teach me something. IT workers generally have the mind set that allows them to fill in the missing pieces, but not everybody works in IT. Stating or implying that you need to know everything intuitively is not going to encourage mere mortals to investigate scripting, and will only intensify the mystery that seems to surround the more technical aspects of the game.

The sooner the documents are released, the better in my book.
+1
My Spanish website dedicated to Train Simulator 2019: https://ferrosim.es
Image
User avatar
Irishrailguy
Very Active Forum Member
Posts: 1338
Joined: Sun Mar 21, 2010 8:58 pm
Location: Dublin, Ireland

Re: "Lua Scripting for Train Simulator: An Overview"

Post by Irishrailguy »

Eh, I'm not totally on board with the opinion that documentation is vital for the development of programs (for all intensive purposes, scripting is programming). It will provide you with the vocabulary to express what you want done for the computer, but it's having the correct grammar that determines how effective the vocab you have will be when applying that language. A lot of the time when this subject comes up, there are a few people who express the opinion that a fully fledged documentation of Lua for TS is essential to create scripts properly. This can't be the case if we already have developers who have provided the advanced features that can be expressed through Lua. It's the ability of devs to create effective programs/scripts that can perform these features, not their vast array of calls and functions that they know more than anyone else.

To me it seems that people who think that the vocab is the main focus of a programming language, are similar to those who think that they need Adobe Creative Suite to make textures, or need Visual Studio to write a program. The focus for some seems to be on functionality as opposed to practicality. Now I'm not against seeing DTG's documentation, I'd be glad to see what hasn't been uncovered yet. But I don't see what can be done with a few new calls that we can already do with the methods developed by the community already...

Kev
MaikG
Well Established Forum Member
Posts: 545
Joined: Sat Oct 08, 2011 5:04 pm

Re: "Lua Scripting for Train Simulator: An Overview"

Post by MaikG »

Thanks @Irishrailguy, that is what i want to say. With the docs you only get the function calls, and there are not really new ones. You don't get an idea what you have to do with it. That's on yours to find out. That's what i'm doing near every day to provide our EL products.
User avatar
Juanillo99
Well Established Forum Member
Posts: 879
Joined: Sat Oct 13, 2012 5:12 pm
Location: Teruel - Spain
Contact:

Re: "Lua Scripting for Train Simulator: An Overview"

Post by Juanillo99 »

Irishrailguy wrote:Eh, I'm not totally on board with the opinion that documentation is vital for the development of programs (for all intensive purposes, scripting is programming). It will provide you with the vocabulary to express what you want done for the computer, but it's having the correct grammar that determines how effective the vocab you have will be when applying that language. A lot of the time when this subject comes up, there are a few people who express the opinion that a fully fledged documentation of Lua for TS is essential to create scripts properly. This can't be the case if we already have developers who have provided the advanced features that can be expressed through Lua. It's the ability of devs to create effective programs/scripts that can perform these features, not their vast array of calls and functions that they know more than anyone else.

To me it seems that people who think that the vocab is the main focus of a programming language, are similar to those who think that they need Adobe Creative Suite to make textures, or need Visual Studio to write a program. The focus for some seems to be on functionality as opposed to practicality. Now I'm not against seeing DTG's documentation, I'd be glad to see what hasn't been uncovered yet. But I don't see what can be done with a few new calls that we can already do with the methods developed by the community already...

Kev
Yes, but many users know nothing about programming in LUA, and if DTG unveil us the functions in TS and what is achieved with them, maybe we would encourage to learn how to program scripts, and it would not start learning completely from scratch.
Last edited by Juanillo99 on Sat Jul 26, 2014 5:27 pm, edited 2 times in total.
My Spanish website dedicated to Train Simulator 2019: https://ferrosim.es
Image
User avatar
Irishrailguy
Very Active Forum Member
Posts: 1338
Joined: Sun Mar 21, 2010 8:58 pm
Location: Dublin, Ireland

Re: "Lua Scripting for Train Simulator: An Overview"

Post by Irishrailguy »

Juanillo99 wrote:Yes, but many users know nothing about programming in LUA, and if DTG unveil us the functions in TS and what is achieved with them, maybe we would encourage to learn how to program scripts, and it would not start learning completely from scratch.
Which brings me back to my point on functionality as opposed to practicality. Those who don't know how to program shouldn't be looking for advanced system calls, they should be looking at how to actually program first... I never went looking for all the calls when I first started, I just messed around with changing control values and adding simple features that got me familiar with how the game works with scripts.

Basically you have to learn to walk before you run...

Kev
Locked

Return to “[TS] General Discussion”