Commit graph

774 commits

Author SHA1 Message Date
Simon Forsyth
5f2295f570 Fix problem with changing recruit lists...
...when new list is not a subset of the old list
2012-12-07 20:41:58 +00:00
Simon Forsyth
a82d9e1920 Push updates to Experimental AI from AI-demos.
Improves isolation of recruiting from rest of AI.
2012-12-07 19:11:21 +00:00
Simon Forsyth
c7c91fde55 Recache unit information for recruiting when era/scenario adds units...
...to the recruit list after the first unit is recruited
2012-12-03 22:42:01 +00:00
Simon Forsyth
4d67102e7a Add a dev_multiplayer AI alias for the new AI.
Since that AI does not allow any customization of recruiting, it seems
undesirable for it to replace the singleplayer AI in its current
state.
2012-12-03 18:59:04 +00:00
Simon Forsyth
21a6dbb14c Mark AI description as translatable 2012-12-02 03:48:18 +00:00
Alexander van Gessel
2bba01fbc1 Delete an unneeded file that should have been removed in 2012-11-26T22:50:17Z!ai0867@gmail.com 2012-11-27 00:30:34 +01:00
Alexander van Gessel
f4ab3722dc Apply patch #3570 by mattsc 2012-11-26 23:50:17 +01:00
Steven Panek
268338c660 Ran umcpropfix. 2012-11-24 21:17:31 +00:00
Simon Forsyth
9d23bd133e Turn off remaining comments by new AI 2012-11-24 21:00:55 +00:00
Simon Forsyth
024906af4a Turn off some comments by new AI on console 2012-11-24 20:46:07 +00:00
Simon Forsyth
6830fc1719 Add new AI 2012-11-24 19:57:11 +00:00
Dmitry Kovalenko
51e818b43b LuaAI: wesnoth.debug_ai() slightly refactored,
...now provides access to the ai.* table, the Lua engine table and the
component tree
2012-08-14 07:26:58 +00:00
Dmitry Kovalenko
83d0e06ee8 AI: exposure of the component tree to the AI developers in debug mode 2012-08-06 17:22:47 +00:00
Riss Aline
104a28654d Adding new files concerning new AI...
...(ai/akihara/recruitment.?pp) and new scenario for the ai_arena_small.
2012-07-13 08:38:01 +00:00
Dmitry Kovalenko
b207a1b1ca LuaAI: the need to define an engine is now deprecated.
All CAs can be store in external .lua files. If the scenario config
lacks an [engine] tag for the Lua AI engine, but still tries to use CA
with engine=lua, a dummy engine will be automatically generated,
providing the needed functionality
2012-06-12 12:36:06 +00:00
Dmitry Kovalenko
a72febe0e4 LuaAI: first draft of the external candidate action system,
...with on-the-fly file reloading, if you use the --debug-lua launch argument
2012-06-07 09:53:19 +00:00
Dmitry Kovalenko
57aa197583 LuaAI:
(1) Lua CA_wrapper slightly refactored, in preparation for adding CA
definitons using external files

(2) --debug_lua command line argument added. Unused at the moment, but
will be used for Lua debug mechanisms
2012-06-01 12:57:14 +00:00
Dmitry Kovalenko
d7f6b2c26e LuaAI: fixed bug that always cause ai.attack() to use -1 as the weapon 2012-05-30 13:15:47 +00:00
Dmitry Kovalenko
e810953bea Removed an unneeded function introduced in 2012-04-16T20:49:02Z!nephro.wes@gmail.com 2012-04-17 19:30:15 +00:00
Dmitry Kovalenko
f54f2b0e75 LuaAI:
(1) added wesnoth.is_debug_mode();

(2) disabled the LuaAI debug library usage for non-debug launch modes
2012-04-16 20:49:02 +00:00
Dmitry Kovalenko
ca9f107ee1 LuaAI: added a new file 2012-04-15 20:27:27 +00:00
Dmitry Kovalenko
8f99e3f995 LuaAI: created some debug methods
ai.debug will be registered by stdlib on demand
2012-04-15 16:33:36 +00:00
Dmitry Kovalenko
a7604b5bf0 LuaAI: exposed action checker functions 2012-04-15 09:43:23 +00:00
Dmitry Kovalenko
ace211df28 LuaAI:
(1) even more naming inconsistencies fixed; 

(2) even more methods hidden
2012-04-12 18:56:08 +00:00
Dmitry Kovalenko
b9f9e29a0b LuaAI:
(1) fixed some naming inconsistencies;

(2) hidden some methods to the cache table, so that they don't lie
around unused in the ai table
2012-04-12 17:48:34 +00:00
Dmitry Kovalenko
175d0a84f5 LuaAI: rewired caching functions to ai.get_*() instead of ai.get_cached_*() 2012-04-11 17:05:09 +00:00
Dmitry Kovalenko
0c238ef35c LuaAI: added missing field from the attacks vector 2012-04-10 15:19:39 +00:00
Dmitry Kovalenko
65a50eb638 LuaAI: attacks in the attacks vector now have a rating() function 2012-04-09 22:25:53 +00:00
Dmitry Kovalenko
51fd066a51 LuaAI: exposed the attacks() vector values 2012-04-09 15:34:03 +00:00
Dmitry Kovalenko
2adbf5ae5f Refactored the move map structuring when exposed to LuaAI 2012-04-08 23:54:34 +00:00
Dmitry Kovalenko
9ddd3d4408 [[lua AI fixes]]
(1) First draft of the caching system for LuaAI. (2) Added validation
variables and setters/getters in the ai contexts, to allow LuaAI cache
check the movemaps for validity
2012-04-08 00:00:14 +00:00
Dmitry Kovalenko
bdc8138c3b [[lua AI fixes]]
(1) LuaAI ai.get_avoid() now provides the correct coordinates (not
offset by -1), this reduced some code duplication and code
inconsistency (2) Tweaked ai.attack() of LuaAI to consider weapons are
numbered from 1 and so forth, so that this function is more consistent
to the Lua indexing style
2012-04-03 02:13:15 +00:00
Dmitry Kovalenko
ecf23e8055 Fixed an infinite loop bug
Fixed methods, that provided wrong objects to Lua
2012-04-02 20:51:38 +00:00
Steven Panek
29c4d4269b Fixed some spelling and spacing errors;...
...made the messages in question somewhat more authentic.
2012-02-07 19:29:04 +00:00
Anonymissimus
91ae18b6d3 required compatibility changes for Lua 5.2 in extension Lua code
Searched all *.lua and *.cfg (embedded lua) files in data/ for occurences
of the deprecated stuff mentioned in

http://www.lua.org/manual/5.2/manual.html#8.2

The currently compiled-in define LUA_COMPAT_ALL appears to work

like so that both the old and the new syntax work at the same time
(without errors or warnings), while the old one will be an error after
removing it.
2012-02-07 18:05:22 +00:00
Ignacio R. Morelle
fbd8f6ae59 Ran wmlindent 2012-01-11 21:49:32 +00:00
Alexander van Gessel
91b915edf4 Apply patch for bug #19032 from coffee 2011-12-21 03:18:19 +01:00
Steven Panek
a3168f89f9 Converted the remaining uses of Ggf. 2011-11-28 20:00:43 +00:00
Dmitry Kovalenko
2a9a663980 Lua backed goals now available(docs to be updated tomorrow)
//some minor fixes
2011-08-06 16:06:24 +00:00
Dmitry Kovalenko
8dc1551d30 Exposed the target list to Lua // minor fixes 2011-08-05 13:25:35 +00:00
Ignacio R. Morelle
53e260ca6b Ran wmlindent in mainline except for data/gui 2011-08-02 00:01:08 +00:00
Dmitry Kovalenko
de07362204 Persistant data storage now is local to the lua_ai_context 2011-07-31 00:45:49 +00:00
Dmitry Kovalenko
a3acad0d70 It is possible now to store data in the Lua AI engine...
...and the data persists between save/load routines // Needs slight
refactoring, use at your own risk
2011-07-21 10:31:01 +00:00
Dmitry Kovalenko
3e5bdcf448 Fixed a bug that leads to a crash(Lua aspects weren't saved between games) 2011-07-20 10:13:05 +00:00
Dmitry Kovalenko
de73faad91 Tweaked the patrol_gen function to return a pair of function: execution and evaluation 2011-07-12 08:39:18 +00:00
Dmitry Kovalenko
a293e91db3 Completed cleanup functionality(kind of hacky, might need refactoring). Also done some minor fixes 2011-07-08 09:40:08 +00:00
Dmitry Kovalenko
cd0450f950 Removed debug outputs 2011-06-30 14:54:08 +00:00
Dmitry Kovalenko
8d65c3b7f7 Added functionality to the [add_ai_behavior] tag.
Not fully working at the moment, but is usable. The usage syntax will
most probably remain, but the internals will be modified.
2011-06-30 14:14:46 +00:00
Dmitry Kovalenko
74cf9b5ae3 Added a counter for sticky candidate actions and a comment for Crab 2011-06-26 18:51:43 +00:00
Dmitry Kovalenko
ba69be6682 Minor cosmetic fixes 2011-06-21 14:10:12 +00:00