URL:
  <http://gna.org/patch/?3875>

                 Summary: Added new aspect 'advancements'
                 Project: Battle for Wesnoth
            Submitted by: flixx
            Submitted on: Mon 22 Apr 2013 01:48:50 PM GMT
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

As part of a GSoC proposal I added a new aspect so a scenario editor can
control advancements in two ways:
1. Define a aspect with a string-value like "Swordsman, Knight", so all units
of interests will always advance to this.
2. Use the LUA-Engine and return a function of the form advance(x, y) which
will itself return a string-value like "Swordsman, Knight". Everytime a
ai-unit advances advance(x, y) will be called.

I added a Test Scenario with 5 Units about to advance. Before reviewing the
C++ code you should take a look at it so you can see how the new aspect can be
defined.

Things that are missing / not tested yet:
- support for the formula engine
- support for the (old) default ai
- a function cfun_ai_get_advancements() in lua/core.cpp so that lua itself
have access to the aspect
- a wiki entry

Please note that this is my first bigger patch, and i'm new to C++ (actually I
just wrote here my first C++ class)
So it would be nice to have feedback if I made any mistakes :)



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Mon 22 Apr 2013 01:48:50 PM GMT  Name: advancements_test_scenario.cfg 
Size: 2kB   By: flixx

<http://gna.org/patch/download.php?file_id=17807>
-------------------------------------------------------
Date: Mon 22 Apr 2013 01:48:50 PM GMT  Name: test.map  Size: 1kB   By: flixx

<http://gna.org/patch/download.php?file_id=17808>
-------------------------------------------------------
Date: Mon 22 Apr 2013 01:48:50 PM GMT  Name:
0001-Added-new-aspect-advancements.patch  Size: 26kB   By: flixx

<http://gna.org/patch/download.php?file_id=17809>

    _______________________________________________________

Reply to this item at:

  <http://gna.org/patch/?3875>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs

Reply via email to