Announcement

Collapse
No announcement yet.

Leadership & Unit Training Mod

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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 Files
    Last edited by Maquiladora; May 10, 2009, 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
    So this is all done through SLIC? nice.
    "

    Comment


    • #3


      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.

      Comment


      • #4
        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.

        Comment


        • #5
          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.
          "

          Comment


          • #6
            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.

            Comment


            • #7
              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?
              "

              Comment


              • #8
                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.

                Comment


                • #9
                  I was just about to recommend that.
                  "

                  Comment

                  Working...
                  X