Anarchid wrote:From what i've read in the docu, yep, adding a "meta program" is a permanent thing that you then use in GUI as a new extension.
Correct, it's just that "scope" of the meta program can differ.
knorke wrote:Interessting timelapse.
At times you go back to editing code instead of using GUI, it seems to implent new functionalities?
What I'm doing there is
Meta programming (sparely explained there), and yes, it's one of the main ways I want to allow for extendability. Basically if the provided set of functions and action types isn't enough, users can add new ones. For really specific code-stuff I'll allow custom widgets and gadgets.
knorke wrote:
Now that these things are done/fixed: would it be possible to create the mission again but this time only with the GUI?
You could, but it depends entirely on the
scope of the meta program, there being 3 different levels, from highest to lowest:
1)
Scenario Editor Core, which includes most of the common operations. The files there, which will be included in all scenarios,
core.lua and
extra.lua should contain most common actions and functions (incl. conditions). The end users usually shouldn't touch this - unless they want to contribute upstream. In the video I edited
core.lua:593-612 because the resource functions were missing.
2) Game level, e.g.
Scenario Editor BA. This should contain game-specific meta programming, and will be included in all scenarios for a given game. I actually have no idea what extra would be needed for BA, so the
meta model is pretty lame, but the option to use it is there and probably really useful for Lua-heavy games.
3) Scenario level. I don't have a link here (will see to upload the project later), but this is where you will put your scenario-specific meta programming. In my example video this was the "change heightmap in area" and "count amount of a certain unit type in unit_array", although the first one could arguably be put in the core.lua. Each scenario can have its own meta programming files that are loaded and can be reloaded* by pressing the "Reload meta model button", third button in the second row here:
When/if I do campaigns I guess it would make sense to have campaign-level meta files that all scenarios of a given campaign would use, but that's future stuff.
*
Pressing the reload meta model actually reloads all meta programs, including the core and game ones - which can be useful for development.