minmay wrote:Man, I'm no fan of Lua either, but I think it's reasonable to expect programmers to know that a class name and a table key aren't the same thing. It's not the Grimrock scripting reference's job to teach compsci 101, or introduce you to Lua, it's just there to list what's available in Grimrock specifically.
I think it's the other way around: the scripting reference and asset pack could use some CompSci 101. The idea of subclasses, for example, requires Inheritance, which is nowhere to be found in the Asset definitions (instead, multiple classes are shoved in to a single component).
Furthermore, the scripting reference lists out Components and their functions/behaviors, and it explicitly states, "By default the name of a component is the class name in lower case." There is nowhere on the Scripting Reference that indicates which of their Component syntax items refers to a Table instead of a Class.
Pointing out that in some cases the Scripting Reference is referring to a table key is fine, but assuming that someone doesn't know the difference is a logical leap. Tables in LUA are nothing more than array containers for key/value pairs; and incredibly basic compared to other languages (
https://msdn.microsoft.com/en-us/librar ... 10%29.aspx).
I agree that it's not the scripting references job to teach anything, but it certainly should properly reference a Method that is called at the Class lvl vs a sub-type. Other script references work on their own just fine, such as:
https://dev.twitter.com/streaming/overv ... m_messages
https://developers.google.com/+/web/api/rest/latest/
In the example I gave about MonsterAttack, the scripting reference calls it a Component (which they describe as having its class name in lowercase), but it's not until you delve in to the asset pack that you find the proper item to implement the method call.
Anyway, I did agree that some fault lies on the reader (ie, I own which failures are my own). But, I also maintain an awareness that these failures are rarely present in scripting references that are more thorough and accurate.