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 22 Apr 2013 01:48:50 PM UTC  
 
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 07 Jun 2013 07:13:36 PM UTC, comment #2:

Committed here: https://github.com/wesnoth/wesnoth-old/commit/29e85847389f1dd0482cd6e6f35b072a6444390c

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

Felix Bauer <flixx>
Project MemberIn charge of this item.
Mon 22 Apr 2013 02:19:23 PM UTC, 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 22 Apr 2013 01:48:50 PM UTC, 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):
   
   
Comment:
   

Attached Files
file #17807:  advancements_test_scenario.cfg added by flixx (2kB - application/octet-stream)
file #17808:  test.map 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.

     

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

     

     

    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 07 Jun 2013 07:13:36 PM UTCflixxStatusNone=>Done
      Assigned tocrab=>flixx
      Open/ClosedOpen=>Closed
    Sat 04 May 2013 05:15:57 PM UTCmattscAssigned toNone=>crab
    Mon 22 Apr 2013 01:48:50 PM UTCflixxAttached File-=>Added advancements_test_scenario.cfg, #17807
      Attached File-=>Added test.map, #17808
      Attached File-=>Added 0001-Added-new-aspect-advancements.patch, #17809
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup