patchBattle for Wesnoth - Patches: patch #3888, Command 'lua...

Show feedback again

patch #3888: Command 'lua wesnoth.debug_ai([side]).ai' gives now access to lua's ai-table

Submitted by:  None
Submitted on:  Mon Apr 29 11:05:11 2013  
Priority: 5 - NormalStatus: Done
Privacy: PublicAssigned to: Felix Bauer <flixx>
Originator Email: -unavailable-Open/Closed: Closed

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


Fri Jun 7 19:09:15 2013, comment #2:

Committed here:

Tested by mattsc

Felix Bauer <flixx>
Project MemberIn charge of this item.
Mon Apr 29 22:04:16 2013, comment #1:

Like suggested by Crab_ I modified the patch slightly so that the dummy-engine will not be deleted but instead added as a component to the AI.
See debug_ai_2.patch

(file #17864)

Felix Bauer <flixx>
Project MemberIn charge of this item.
Mon Apr 29 11:05:11 2013, original submission:

I added something to this command:

The functionality for get_ai() was not implemented yet. I implemented it not by using a function (like the wikipage describes) but by injecting the ai table directly.

So "lua wesnoth.debug_ai([side]).ai" will now give access to the ai-table (this is the same table a lua developers use by writing "local ai = ..." at the top of a lua-ai)

- The ai-table doesn't need to be defined global for this.
- The command will also work before a ai had it's first turn.
- When the ai is not a lua ai, a dummy-engine will be set up.

When this patch is accepted I will edit the wiki page above.



(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):

Attached Files
file #17864:  debug_ai_2.patch added by flixx (12kB - text/x-patch)
file #17857:  debug_ai.patch added by None (11kB - text/x-patch)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by mattsc (Updated the item)
  • -unavailable- added by flixx (Updated the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Error: not logged in



    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri Jun 7 19:09:15 2013flixxStatusNone=>Done
      Assigned tocrab=>flixx
    Sat May 4 17:16:18 2013mattscAssigned toNone=>crab
    Mon Apr 29 22:04:16 2013flixxAttached File-=>Added debug_ai_2.patch, #17864
    Mon Apr 29 11:05:11 2013NoneAttached File-=>Added debug_ai.patch, #17857
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup