Talk:ReferencePythonAPI

From The Battle for Wesnoth Wiki
Revision as of 23:15, 6 December 2005 by Allefant (talk | contribs) (erm, list formatting)

Feature Requests

  • Path finder, something like: wesnoth.find_path(loc1, loc2), and it would return a list of all locations in between, or just the first step.. whatever the C++ API has
  • Persistent variables. Right now, the script state isn't reset, so all variables are already persistent. But for the final version, there should be real persistent variables, which can also be stored to WML, and reloaded. An AI would use it to e.g. store a path, or some other state.
  • Something like wesnoth.get_possible_moves(loc) - it would return all possible moves for the unit at the given location. It seems, right now, I make a lot of mistakes because the info of wesnoth.get_src_dst or wesnoth.get_units gets outdated after I move a unit. (Not really sure about this one, better planning out of the algorithm might make this function un-necessary.)