URL:
  <http://gna.org/bugs/?20052>

                 Summary: Initiialization for Lua AI new Syntax
                 Project: Battle for Wesnoth
            Submitted by: None
            Submitted on: Sat 11 Aug 2012 07:18:27 AM UTC
                Category: Feature Request
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Artificial Intelligence
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: [email protected]
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 1.11
        Operating System: OS X 10.7

    _______________________________________________________

Details:

I'd really like to see an optional third function on the table returned by the
Lua AI new new syntax (http://wiki.wesnoth.org/Luaai_new_syntax).   Currently
it supports two functions returned in the table returned by the file defined
by "location":  eval and exec.  I propose that there be an optional third
function called "init" which does initialization work.  See, for instance, my
patch, https://gna.org/patch/?3479.  The ML Recruiter has to load a .json file
from disk in the initialization phase and after that it just calls eval and
exec.   

One other issue:  I need some way to pass parameters into the init routine. 
For instance, my ML Recruiter has to be parameterized with the path to the
.json file and various other parameters specifying, for instance, the degree
of randomness.  I could use default values, but I'd like to be able to
override the defaults with options passed in from the command line.  




    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?20052>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs

Reply via email to