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
Dmitry Kovalenko
437b619397
added a wesnoth.modify_ai Lua function,
...
...continued work on the patrolling system, made more mess in lua_ai
arena
2011-06-20 17:05:59 +00:00
Dmitry Kovalenko
184105148a
The patrol unit now cycles through the multiple waypoints given to him
2011-06-17 11:20:29 +00:00
Dmitry Kovalenko
93cfadb5bc
Fast & easy fix of the move problem.
...
Now the unit rests on the waypoint until the next turn
2011-06-17 10:19:03 +00:00
Dmitry Kovalenko
bf8300c064
This is a first draft of the patrolling system.
...
At the moment everything manually, the system lacks normal evaluation
of the move and the patrolling unit will not stop until its moves run
out. Also, at the moment, it is possible to patrol between two
waypoints only.
Further work will be carried out to transform the creation of
patrolling units to one line syntax.
2011-06-17 10:07:41 +00:00
Dmitry Kovalenko
1670520d79
The rest of the move maps exposed // Might need refactoring
2011-06-16 14:06:41 +00:00
Dmitry Kovalenko
f87b14b9dc
First draft on movement map exposure to Lua
2011-06-14 19:35:28 +00:00
Dmitry Kovalenko
c1a2084259
More aspect exposure.
...
@Crab_, please, leave feedback on this, I am unsure about several
parts of this patch
2011-06-10 15:17:17 +00:00
Dmitry Kovalenko
c1ea8ac520
Exposed recruitment pattern aspect to Lua
2011-06-08 10:09:29 +00:00
Anonymissimus
87d505241e
transformed wesnoth.get_time_of_day into a more useful implementation
...
(will extend with more parameters and return values)
2011-06-07 15:26:57 +00:00
Dmitry Kovalenko
a1600a1a63
Added wesnoth.get_time_of_day() Lua function
2011-06-07 12:02:03 +00:00
Dmitry Kovalenko
5c7d4d64e5
More(village related) aspects exposed to lua( http://wiki.wesnoth.org/LuaAI )
2011-06-07 10:38:44 +00:00
Dmitry Kovalenko
65db78e77d
More aspects exposed to Lua( http://wiki.wesnoth.org/LuaAI )
2011-06-07 09:29:03 +00:00