patchBattle for Wesnoth - Patches: patch #3875, Added new aspect 'advancements'

Show feedback again

patch #3875: Added new aspect 'advancements'

Submitted by:  Felix Bauer <flixx>
Submitted on:  Mon Apr 22 13:48:50 2013  
Priority: 5 - NormalStatus: Done
Privacy: PublicAssigned to: Felix Bauer <flixx>
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:13:36 2013, comment #2:

Committed here:

Tested by mattsc.
projectfiles/VC9/wesnoth.vcpro and Wiki is updated.

Felix Bauer <flixx>
Project MemberIn charge of this item.
Mon Apr 22 14:19:23 2013, comment #1:

...Things that are missing:
- projectfiles/VC9/wesnoth.vcproj is not updated yet

(I had problems with git, probably because of the Windows file encoding)

Felix Bauer <flixx>
Project MemberIn charge of this item.
Mon Apr 22 13:48:50 2013, original submission:

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 :)

Felix Bauer <flixx>
Project MemberIn charge of this item.


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

Attach File(s):

Attached Files
file #17807:  advancements_test_scenario.cfg added by flixx (2kB - application/octet-stream)
file #17808: added by flixx (1kB - application/octet-stream)


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 (Submitted 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 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri Jun 7 19:13:36 2013flixxStatusNone=>Done
      Assigned tocrab=>flixx
    Sat May 4 17:15:57 2013mattscAssigned toNone=>crab
    Mon Apr 22 13:48:50 2013flixxAttached File-=>Added advancements_test_scenario.cfg, #17807
      Attached File-=>Added, #17808
      Attached File-=>Added 0001-Added-new-aspect-advancements.patch, #17809
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup