How do you start learning Lua?

Slowpoke

The Mad Modder
Joined
Sep 30, 2010
Messages
1,321
I've literally just started modding a month ago, and figuring out what to do for xml and sql is pretty easy. All the stuff you want to change for a given type of change is all there in an accurately named file.

But where do you find out the lua functions and how to use them? There isn't like a "Lua A.I. diplomacy" folder or something. All I can find of use is UI and map generation stuff, and people keep talking about all the interesting things you can do with Lua beyond just that.
 
i started first off with lua. after browsing through the first tutorials i saw how the xml was all sql so i moved right into the lua part. i started with the most basic of things, "hello world".

from there i moved on, delved into released lua UI changes and meshed it all together.

function lists:
from the released SDK: sdk path / ModBuddy / Help / Civ5LuaAPI.html

from Bhruic's post: http://forums.civfanatics.com/showthread.php?t=385612&page=2
not all work, and most you have to recapitalize the first letter of the words to get to work

civ4 pyton ref, (last i checked was reported by rezaf), from my experience every lua function in civ5 uses the same args as in civ4: http://civilization4.net/files/modding/PythonAPI/index.html
sadly not all civ4 python functions listed there are available, so you have to go through the ones listed in the SDK help and Bhruic's post

and then there is the CFC Civ5 - SDK / LUA subforum that should eventually get real busy with a lot of lua people, and maybe one day C++ interested people as well if they ever release the source

the live tuner util in my sig has a lot of easy to change code, i think its a good place for anyone aspiring to tackle civ5's lua api to start with. sure beats starting from scratch ;)
 
Back
Top Bottom