Results 1 to 9 of 9

Thread: Leadership & Unit Training Mod

  1. #1
    Maquiladora
    Emperor
    Join Date
    17 Jun 2001
    Posts
    7,714
    Country
    This is Maquiladora's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    June 20, 2013
    Local Time
    03:51

    Post Leadership & Unit Training Mod

    Leadership & Unit Training Mod. v0.5a
    ====================================


    Requirements
    ------------
    Call to Power 2
    + Apolyton Edition patch (see http://apolyton.net/forums/forumdisplay.php?f=213)
    OR
    + Activision 1.11 patch


    Installation
    ------------
    Extract the "UnitTrainingMod" folder to your \Scenarios folder.


    How does it work?
    =================


    Leadership Points
    -----------------
    - Leadership will increase or decrease depending on your actions on the battlefield.

    - Winning a battle will give you leadership points, losing a battle will take them away. The bigger the battle the greater the effect.

    - You can also win (and lose) leadership points by capturing (or losing) cities. The bigger the city, the bigger the effect.


    Training
    --------
    - You can choose to spend gold per turn on 3 different levels of training for your units.

    - The greater the level of training, the more gold it will cost each turn.


    In Battle
    ---------
    - In each round of a battle there is a chance your leadership effect will be used, when this happens, each of your units will receive a boost to their primary stat. The size of the boost will depend on your current level of unit training.

    - For example: if your leadership is weak, but your training level is high, you will rarely see a boost in your unit's abilities. But when your leadership IS used, it will have a large effect, due to the high level of training for your units on this turn.

    - Another: if your leadership is strong, but your training level is low, you will only see a very small boost in unit abilities, but it will happen in many rounds of a battle.


    How to use
    ----------
    - When you open the Unit Manager from the panel at the bottom (not using the keyboard shortcut) another pop-up will appear. This should be fairly obvious how to use.


    Details
    -------
    - Each level of training increases your units primary abilities by +5 when the leadership effect is used. Low training: +5, Medium: +10, and High: +15.

    - A unit's "primary stat" is the one bigger than the rest. e.g. Archer: ranged. When stats are tied, attack is boosted.

    - Each level of leadership increases the chance of training being used in a round of battle. Weak: 10% chance, Average: 20%, Good: 33%, Strong: 50%.

    - In one battle there can be many rounds, sometimes 10 or 15, so even weak leadership will have some effect on a battle if combined with some training.

    - Unit training costs are: (support costs of all military units / 3) * training level. Each training level value is 1, 2, and 3.


    Bugs
    ----
    - The leader name in the pop-up window doesn't show when using the Activision 1.11 patch.


    Contact, comments or suggestions
    --------------------------------
    See this forum: http://apolyton.net/forums/forumdisp...s=&forumid=118

    To add to that the AI uses it too, although it's quite simple doing it.

    Any suggestions how to improve this are welcome. Let me know of any bugs you might find too obviously.

    Also I didn't do much testing with the 1.11 patch. Particularly I didn't check whether the mod_Unit* functions actually worked. I did play a game for 200 turns with no problems, but the functions will need testing. And I didn't notice player[0].leader_name didn't work with the 1.11 patch, I will probably get around fixing that.

    Everything was tested working with the latest AE though, including the mod_Unit* functions.

    EDIT: I've since tested the mod_unit functions with 1.11 and they work. I also removed some code for testing I left in. Attached file is now v0.5a.
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by Maquiladora; May 10, 2009 at 23:15.
    Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
    CtP2 AE Wiki & Modding Reference
    One way to compile the CtP2 Source Code.

  2. #2
    EPW
    Emperor EPW's Avatar
    Join Date
    10 Jan 2004
    Location
    ??
    Posts
    3,887
    Country
    This is EPW's Country Flag
    Thanks
    1
    Thanked 1 Time in 1 Post
    Local Date
    June 19, 2013
    Local Time
    19:51
    So this is all done through SLIC? nice.

  3. #3
    Maquiladora
    Emperor
    Join Date
    17 Jun 2001
    Posts
    7,714
    Country
    This is Maquiladora's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    June 20, 2013
    Local Time
    03:51


    The mod_Unit functions are very useful, the possibilities are endless* really.

    *not entirely endless
    Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
    CtP2 AE Wiki & Modding Reference
    One way to compile the CtP2 Source Code.

  4. #4
    Maquiladora
    Emperor
    Join Date
    17 Jun 2001
    Posts
    7,714
    Country
    This is Maquiladora's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    June 20, 2013
    Local Time
    03:51
    Updated first post with new version, which is now v0.5a.
    Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
    CtP2 AE Wiki & Modding Reference
    One way to compile the CtP2 Source Code.

  5. #5
    EPW
    Emperor EPW's Avatar
    Join Date
    10 Jan 2004
    Location
    ??
    Posts
    3,887
    Country
    This is EPW's Country Flag
    Thanks
    1
    Thanked 1 Time in 1 Post
    Local Date
    June 19, 2013
    Local Time
    19:51
    Can you make it check and see if "New Combat" is being used?

    If so, maybe you should make it boost only defense/range when a stack is defending and attack/range when attacking.

  6. #6
    Maquiladora
    Emperor
    Join Date
    17 Jun 2001
    Posts
    7,714
    Country
    This is Maquiladora's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    June 20, 2013
    Local Time
    03:51
    Quote Originally Posted by EPW View Post
    Can you make it check and see if "New Combat" is being used?

    If so, maybe you should make it boost only defense/range when a stack is defending and attack/range when attacking.
    It just boosts the dominant stat of a unit, it makes sense that a defensive unit would only be training at defending. If a specialist defender is attacking then that's bad leadership and shouldn't be rewarded with an attack boost.
    Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
    CtP2 AE Wiki & Modding Reference
    One way to compile the CtP2 Source Code.

  7. #7
    EPW
    Emperor EPW's Avatar
    Join Date
    10 Jan 2004
    Location
    ??
    Posts
    3,887
    Country
    This is EPW's Country Flag
    Thanks
    1
    Thanked 1 Time in 1 Post
    Local Date
    June 19, 2013
    Local Time
    19:51
    Quote Originally Posted by Maquiladora View Post
    It just boosts the dominant stat of a unit, it makes sense that a defensive unit would only be training at defending. If a specialist defender is attacking then that's bad leadership and shouldn't be rewarded with an attack boost.
    Hmm, that actually makes sense.

    Another question, can I just turn on training just before I expect to battle, then turn it off again afterwords?

  8. #8
    Maquiladora
    Emperor
    Join Date
    17 Jun 2001
    Posts
    7,714
    Country
    This is Maquiladora's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    June 20, 2013
    Local Time
    03:51
    Quote Originally Posted by EPW View Post
    Hmm, that actually makes sense.

    Another question, can I just turn on training just before I expect to battle, then turn it off again afterwords?
    No, you can (hopefully) only change it once a turn.

    Edit: Then I realised I didn't get your question. Yes, you can do that, perhaps there should be some longer limit, kinda like changing readiness.
    Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
    CtP2 AE Wiki & Modding Reference
    One way to compile the CtP2 Source Code.

  9. #9
    EPW
    Emperor EPW's Avatar
    Join Date
    10 Jan 2004
    Location
    ??
    Posts
    3,887
    Country
    This is EPW's Country Flag
    Thanks
    1
    Thanked 1 Time in 1 Post
    Local Date
    June 19, 2013
    Local Time
    19:51
    I was just about to recommend that.

Similar Threads

  1. Leadership
    By Akoyeh in forum Civilization IV General
    Replies: 2
    Last Post: October 2, 2007, 12:01
  2. Leadership Names
    By xboxstrwrs55 in forum Civilization IV Creation
    Replies: 3
    Last Post: November 20, 2005, 13:06
  3. Leadership Positions
    By Archaic in forum ACDG Planet University of Technology
    Replies: 45
    Last Post: November 16, 2003, 04:42

Visitors found this page by searching for:

Nobody landed on this page from a search engine, yet!

Bookmarks

Posting Permissions