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 29 Apr 2013 11:05:11 AM UTC  
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 07 Jun 2013 07:09:15 PM UTC, comment #2:

Committed here:

Tested by mattsc

Felix Bauer <flixx>
Project MemberIn charge of this item.
Mon 29 Apr 2013 10:04:16 PM UTC, 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 29 Apr 2013 11:05:11 AM UTC, 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.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 07 Jun 2013 07:09:15 PM UTCflixxStatusNone=>Done
      Assigned tocrab=>flixx
    Sat 04 May 2013 05:16:18 PM UTCmattscAssigned toNone=>crab
    Mon 29 Apr 2013 10:04:16 PM UTCflixxAttached File-=>Added debug_ai_2.patch, #17864
    Mon 29 Apr 2013 11:05:11 AM UTCNoneAttached File-=>Added debug_ai.patch, #17857
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup