- Joined
- Jul 10, 2007
- Messages
- 6,306
With the stuff I've been working on Lua, I'm starting to see how the layout of scripts may drastically change as new things become possible and as new methods become tried.
Currently, lua scripts are something of a pain to use as they are mostly snippets and have to be imported into each individual script via a runtextmacro. A snippet may only be 1 function, so 1 lua resource might use 10-20 snippets, meaning 10-20 cnps and 10-20 textmacros to run. Sounds like a pain doesn't it?
This is the thing I am seeing with lua now (and what I'll probably do). One of the lua snippets is something called JASS Write, which writes JASS files on to the user's hard drive so that they can be imported into the map. This is useful for dynamic script generation. What I am thinking is that lua can use this same methodology to install a script on to a computer so that it is auto usable in all maps. This will also allow scripts to automatically use the resources they require via an lua function called dofile.
What this means is that mass textmacros will no longer need to be run and once you have installed a script, you never need to install it again.
So firstly, I must point out that the usage of lua scripts will change. The past has always been textmacros. The future is now writing to harddrive and dofile : ).
The next point is object generation. The past has always been a single line externalblock. The future appears to be dynamic JASS scripts that store dynamically generated unit object ids into a global variable for use.
What more will the future bring? New systems that partially run on lua (template generation and etc)? New ways to install systems so that they can be configured for a map?
Perhaps, in projects, all objects will be made via lua now so that the object editors don't need access to the map. Perhaps, terrain editors will not need access to the map either as they can place doodads and etc and then look into the JASS script within the map and rip out the code (thus having a terrain dummy map that contains the terrain code for them to edit).
I see so many possibilities in JASS now, things that currently aren't possible in sc2.
As we march to the future, what new resources and maps await us? : )
So my current question regarding the future of lua scripts (since I'm the primary lua coder, lol) is what would people prefer for lua script usage?
Would people prefer mass textmacro usage or would people prefer installation for all maps + dofile?
textmacro usage means script has to be pasted into map
installation means script doesn't need to be pasted into map
textmacro usage means that to even use a resource, a textmacro must be used (if you use it for 4 scripts, all 4 scripts have to run the macro)
dofile is nearly the same, but it can be nested, meaning that there will be much less dofiles than there will be textmacros.
There will be possible future questions.
Let us together define what we expect in lua resources from now on =).
Currently, lua scripts are something of a pain to use as they are mostly snippets and have to be imported into each individual script via a runtextmacro. A snippet may only be 1 function, so 1 lua resource might use 10-20 snippets, meaning 10-20 cnps and 10-20 textmacros to run. Sounds like a pain doesn't it?
This is the thing I am seeing with lua now (and what I'll probably do). One of the lua snippets is something called JASS Write, which writes JASS files on to the user's hard drive so that they can be imported into the map. This is useful for dynamic script generation. What I am thinking is that lua can use this same methodology to install a script on to a computer so that it is auto usable in all maps. This will also allow scripts to automatically use the resources they require via an lua function called dofile.
What this means is that mass textmacros will no longer need to be run and once you have installed a script, you never need to install it again.
So firstly, I must point out that the usage of lua scripts will change. The past has always been textmacros. The future is now writing to harddrive and dofile : ).
The next point is object generation. The past has always been a single line externalblock. The future appears to be dynamic JASS scripts that store dynamically generated unit object ids into a global variable for use.
What more will the future bring? New systems that partially run on lua (template generation and etc)? New ways to install systems so that they can be configured for a map?
Perhaps, in projects, all objects will be made via lua now so that the object editors don't need access to the map. Perhaps, terrain editors will not need access to the map either as they can place doodads and etc and then look into the JASS script within the map and rip out the code (thus having a terrain dummy map that contains the terrain code for them to edit).
I see so many possibilities in JASS now, things that currently aren't possible in sc2.
As we march to the future, what new resources and maps await us? : )
So my current question regarding the future of lua scripts (since I'm the primary lua coder, lol) is what would people prefer for lua script usage?
Would people prefer mass textmacro usage or would people prefer installation for all maps + dofile?
textmacro usage means script has to be pasted into map
installation means script doesn't need to be pasted into map
textmacro usage means that to even use a resource, a textmacro must be used (if you use it for 4 scripts, all 4 scripts have to run the macro)
dofile is nearly the same, but it can be nested, meaning that there will be much less dofiles than there will be textmacros.
There will be possible future questions.
Let us together define what we expect in lua resources from now on =).