Jump to content

Basic LUA tutorial


SimonVolcanov

Recommended Posts

Howdy hi ho, fellow architects of this fine world! Since scripting will be a big part of the game and not everyone grew up indulging themselves in various programming languages, I thought I'd link this little LUA tutorial here that I stumbled upon while improving my own LUA skills. 

 

 

Link to comment
Share on other sites

Also for those interested, there is a very highly acclaimed book written by the same people that made the language itself, called "Programming in Lua". The latest edition is the 4th edition. You can also find the last versions for much cheaper.

 

WARNING: Do not search for a pdf version of the book. There is a pdf version available for free, but of course it is illegal. Again, do NOT search for the pdf version of the 4th edition, or you will find the free illegal version.

Link to comment
Share on other sites

What is the version of Lua that the game will use? I have the 5.1 programming in Lua paper book, I would like to know if I need to buy the new one since the current version is 5.3.4.

Link to comment
Share on other sites

4 hours ago, Helik said:

What is the version of Lua that the game will use? I have the 5.1 programming in Lua paper book, I would like to know if I need to buy the new one since the current version is 5.3.4.

 

The version will be 5.3, as per this tweet:

 

https://twitter.com/dualuniverse/status/817074404169515008

Link to comment
Share on other sites

  • 2 weeks later...

I assume that the Devs will reduce the amount of available LUA standard functions, which is quite easy to do. Expect a very customized LUA

Link to comment
Share on other sites

This is where I learned Lua years ago: https://www.lua.org/pil/contents.html

(for Garry's Mod and later Multi Theft Auto: San Andreas)

 

It's the online version of the 1st edition of the book mentioned earlier in this thread.

 

On 8/16/2017 at 10:51 AM, Helik said:

I have the 5.1 programming in Lua paper book, I would like to know if I need to buy the new one since the current version is 5.3.4.

The Fourth Edition is for 5.3: https://www.amazon.com/exec/obidos/ASIN/8590379868/lua-pilindex-20

I don't think enough will have changed that you would have to buy a whole new book for it -- just google what has changed.

 

On 8/11/2017 at 0:56 AM, ATMLVE said:

WARNING: Do not search for a pdf version of the book. There is a pdf version available for free, but of course it is illegal. Again, do NOT search for the pdf version of the 4th edition, or you will find the free illegal version.

This is the e-book version (pdf as well): https://feistyduck.myshopify.com/products/programming-in-lua-fourth-edition-ebook

This is not pirated or illegal, it is linked on the authors' website.

 

Personally, I don't plan on getting either of these, as the free online book is for version 5 and the information on what's changed between versions is public knowledge.

Link to comment
Share on other sites

From what I've seen, Lua in DU will be a lot easier than what Space Engineers uses for their in game scripting, I never bothered trying to learn it. I don't have any higher level coding experience, just basic stuff in VBA and SQL, so I think I might be able to do some things in DU.

Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...