kiwitt
Road to War Modder
How easy or hard will that be ?
Any recommended resources to learn Lua?
- Inequality is checked with ~= not !=
- Functions are objects, objects are theoretically callable but will throw an error if the call is undefined.
- Numeric arrays are implemented as tables, too. Numbering starts at 1, in contrast to Python. They have a length function invoked by writing #a which returns the index of the lowest non-empty integer - 1. That is, if a = {[1] = 1, [2] = 2, [4] = 3} then #a = 2. Very weird but that's why I'm mentioning it.
[...]
- Lua doesn't have a built-in class mechanism. You can find nice implementations of one in the internet, but I'm not sure if the Firaxis devs add one of their own.
- There are no different numeric types, just 64-bit float in the standard implementation and no custom object types. Everything you create will be a table so you have to write your own functions for testing types if you create classes.
Is learning Lua any good outside of Civ V (and apparently WoW)? While I understand python was slow at least it is a language in widespread use.
Thanks for the tutorial and wiki pointers.
That all sounds completly strange. Partially like inventing the wheel new (...which is sure not needed), and partially just like...nonsense.
Is learning Lua any good outside of Civ V (and apparently WoW)? While I understand python was slow at least it is a language in widespread use.
it is a reinventation of the wheel however if python is limited to 120KPH Lua goes to 2000KPHThat all sounds completly strange. Partially like inventing the wheel new (...which is sure not needed), and partially just like...nonsense.
That all sounds completly strange. Partially like inventing the wheel new (...which is sure not needed), and partially just like...nonsense.
it is a reinventation of the wheel however if python is limited to 120KPH Lua goes to 2000KPH
Reinventing the wheel is justified if the existing wheel is square-shaped...
Well, thank you for the heads-up, but based on that, I think I won't be learning Lua after all or at least not anytime soon. Sounds too ... strange.
Well, thank you for the heads-up, but based on that, I think I won't be learning Lua after all or at least not anytime soon. Sounds too ... strange.
I think most of the weirdness is a result of Lua not being implemented with an emphasis on programmer-friendliness but rather on speed and light weight.