• Our Forum Hosts will be doing maintenance sometime in the next 72 hours and you may experience an outage lasting up to 5 minutes.

Python Modder's Guide to Learning Lua


Mar 2, 2007
Mountain View, California
I had hoped to put a lot more work into this before Civ5 was released, but work has been chewing into my free time lately. As I read Programming in Lua, I made notes on how it compares to Python. My goal was to make a shorter introduction to Lua for those that already know Python.

I think some modders may still find it useful, so here is my Python to Lua guide. Please post any comments or suggestions here or email them to me if you prefer.

BTW, for anyone considering buying the Programming to Lua book in print form, only do so if you really, really want it in print or want to support the developers of Lua. It is exactly like the online version except it covers stuff that's new in 5.1. However, the free online Lua Reference covers 5.1 so it's unnecessary.


Chat room op
Dec 17, 2001
Portland, OR, US
Fantastic read, thank you.

I am most interested in what you discover with environments. That section of the lua book is very confusing to me. I've observed with firetuner that CiV has a lot of different environments that change depending on the game state. I think this is probably the key to the require/import issue some of us have been having
Top Bottom