Talk:ReferencePythonAPI
Contents
Feature Requests
chance to kill
Can I get a chance_to_kill(wesnoth.location)? And it would tell me the chance to kill the unit at the given location, using terrain modifiers and everything.. I assume, the C++ AI has something like it available. Allefant 22:39, 10 January 2006 (CET)
- I'll check what the C++ has, and export it. Ryo 09:24, 11 January 2006 (CET)
- Ok, there is a structure/function associated,
attack_analysis
. Gonna try to export it, but may be a mess :) - Ryo 11:29, 15 January 2006 (CET)
usage pattern
I'm not sure it would be really useful, since a good AI would probably derive the usage of a unit out of its properties - but maybe there could be a way to query the usage pattern of a unit? Like "scout" or "fighter".. --Allefant 22:35, 13 January 2006 (CET)
How would you pit two different Python AIs against each other?
Like the subject line says. Or is this limited to one Python AI at a time? :( --Irrevenant 09:54, 15 May 2006 (CEST)
No, you can assign AIs at will, for example:
wesnoth --multiplayer --scenario=multiplayer_Blitz --controller1=ai --algorithm1=python_ai --parm1=python_script:py/ai1.py --side1=Rebels --controller2=ai --algorithm2=python_ai --parm2=python_script:py/ai2.py --side2=Northerners
This should play Blitz, with first player using py/ai1.py, and second py/ai2.py. --Allefant 21:37, 16 May 2006 (CEST)