1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Militia Defense

Discussion in 'Civ5 - Mod Components' started by FramedArchitect, May 3, 2013.

  1. FramedArchitect

    FramedArchitect Reluctant Modder

    Joined:
    Mar 25, 2012
    Messages:
    798
    Location:
    Missouri

    Militia Defense


    Militia automatically rise up to defend the empire against invasions.

    Download v.14



    Mod Mechanics
    • When an enemy unit first enters hostile territory, the defender raises at least one Militia near their capital.
    • The number of Militia raised increases by one per era past the Ancient.
    • Militia are much weaker when fighting outside friendly territory.
    • Militia are disbanded after 20 turns (varies with Game Speed)
    • Militia units that reach Level 2 may enter permanent duty for a small Gold fee.
    • Minors and Barbarians cannot raise Militia, nor will they cause Militia to be raised.
    • Occupied and Puppeted cities cannot raise Militia.
    • Unhappy Civilizations cannot raise Militia.
    Compatible with Vanilla, GnK, BNW
    • Should be compatible with most mods, as long as they use the default Eras.
     

    Attached Files:

  2. FramedArchitect

    FramedArchitect Reluctant Modder

    Joined:
    Mar 25, 2012
    Messages:
    798
    Location:
    Missouri
    Added a few new mechanics: Militia will only be raised if the Empire is happy; militia spawn rate from improvements varies with difficulty setting.

    Added an editable Militia_UserSettings.lua, located the Militia Mod folder. Changeable options include the ability to disable: Human militia, Empire Happiness requirement, Non-capital spawns, and Difficulty spawn rates.
     
  3. Riker13

    Riker13 King

    Joined:
    Nov 9, 2001
    Messages:
    802
    Location:
    UK
    Good stuff I will give this a go, many thanks. :)
     
  4. xxhe

    xxhe Prince

    Joined:
    Mar 10, 2008
    Messages:
    361
    Location:
    IN.
    Interesting idea. Will militia cost maintenance?
     
  5. FramedArchitect

    FramedArchitect Reluctant Modder

    Joined:
    Mar 25, 2012
    Messages:
    798
    Location:
    Missouri
    Hi xxhe! Nope, no maintenance for militia as they are rather short-lived. If the militia unit reaches level 2 and you upgrade to a normal unit, that will have maintenance.
     
  6. FramedArchitect

    FramedArchitect Reluctant Modder

    Joined:
    Mar 25, 2012
    Messages:
    798
    Location:
    Missouri
    Small update that fixes some errors and adds balance for units.
     
  7. FramedArchitect

    FramedArchitect Reluctant Modder

    Joined:
    Mar 25, 2012
    Messages:
    798
    Location:
    Missouri
    This is a response to following question:

    Militia Defense has no impact on techs, the tech tree, or the UI files associated with techs. No impact AT ALL. The only reference to base game data in this mod is Eras, and Era is the reference for handing out militia and their upgrades, not techs.

    Next, I don't know what you mean by increasing the "value" of techs (maybe Cost?). But again, Militia Defense has no impact AT ALL on changes you make to tech tree. My guess is that the changes you are attempting to make are not actually being made with the proper updates to the database.

    Finally, if IGE is unable to assemble a tech tree from the technologies table, it will simply list techs. I've modded the tech tree many many times and IGE has never had trouble detecting and displaying the changes.
     
  8. cleaner

    cleaner Warlord

    Joined:
    Jul 28, 2011
    Messages:
    104
    A great mod, adding a new dimension to the :c5war::c5strength: aspect of the game. :)
    How long is the cooldown from when the Militia disbanded until new ones spawn?
     
  9. FramedArchitect

    FramedArchitect Reluctant Modder

    Joined:
    Mar 25, 2012
    Messages:
    798
    Location:
    Missouri
    There's no cooldown between disband and the ability to raise new militia, there's just a consistent 20 turn timer. New militia may be instantly raised when the timer resets, which does add some pressure for attacking civs.
     
  10. cleaner

    cleaner Warlord

    Joined:
    Jul 28, 2011
    Messages:
    104
    I see. Thanks for the quick answer. :)
     
  11. FramedArchitect

    FramedArchitect Reluctant Modder

    Joined:
    Mar 25, 2012
    Messages:
    798
    Location:
    Missouri
    Changes for v.9
    • Puppeted and Occupied cities cannot raise Militia
    • Militia units: -50% Attack versus cities
    • Militia may spawn up through the Future Era
     
  12. wolverine2112

    wolverine2112 Warlord

    Joined:
    Jun 25, 2011
    Messages:
    218
    Cool mod, im using it all the time now. Make wars more interesting.
     
  13. Killtech

    Killtech Discutator

    Joined:
    Apr 16, 2009
    Messages:
    1,022
    Location:
    Bonn, Germany
    you might also consider spawning militia each turn during city razing.
     
  14. Dunkah

    Dunkah Emperor

    Joined:
    Feb 7, 2007
    Messages:
    1,189
    Location:
    Just north of Boston
    This seems like a great mod.

    Here are some questions for you:

    Lets say I have 10 Cities 5 are :c5citizen:5, 3 are :c5citizen:3, and 2 are :c5citizen:1. And an enemy declares war on me...

    1. If they enter my territory, I assume I would get 5 militia immediately? Greater than :c5citizen:3.

    2. If they never eneter my territory, would I ever spawn militia?

    3.What if I was prepared for them and popped a Citadel on them before they entered my territory, and the new hexes contained an enemy. Would that pop my Militia?

    4. What happens if I declare war on an enemy and they send troops into my land, does that pop the Militia?

    5. When you say new militia can be popped near my capital via improvements what does that mean? What are the chances that happens? Does this happen even if they do not enter my land ever?

    6. IS there a maximum number of militia?

    7. If I have more than 1 improvement near my capital can I spawn more than 1 militia per turn?

    8. If my capital is under siege, would the militia spawn right next to the attackers?

    9. What if my capital is destroyed, does my new capital spawn militia?

    10. Can you think of anything I missed?

    Thanks for the answers in advance. Again this looks like a great mod!
     
  15. FramedArchitect

    FramedArchitect Reluctant Modder

    Joined:
    Mar 25, 2012
    Messages:
    798
    Location:
    Missouri
    With default settings, you are guaranteed only 1 militia spawn for every non-occupied, non-puppeted city with at least 3 pop. Assuming your empire is happy with that many owned cities, you would receive 8 militia, each spawning next to its city. The capital has a chance to spawn additional militia depending on how developed its territory is. Using this mod defensively, it's in your best interest to improve as many tiles as possible near the capital.
    No.
    Yes, on the next turn if their units move in or into your territory.
    Yes. This mod is blind to the aggressor/defender relationship.
    See the pedia entry under Militia Unit for more details. The chances of militia spawning from a capital improvement range from 10% for camps up to 90% for citadels. Your militia do not spawn unless an enemy unit enters your territory.
    No.
    Militia do not spawn on a per turn basis, but rather all at once on the turn an enemy enters hostile territory. At that point you have all the militia you are ever going to get from that spawn cycle (which is 20 turns on a normal speed game), and this includes any additional militia that may spawn from capital improvements. And yes, you can get many additional militia near the capital... or none.
    Guaranteed militia spawn adjacent to their city. Any additional capital improvement militia spawn adjacent to the improvement from which they were raised. The spawn locations are not dependent on where an enemy first enters hostile territory. For this reason, as an attacker, it's often best to first target outlying cities rather than capitals.
    Yes, again dependent on the number and kind of improvements near the new capital.
    ^^
     
  16. FramedArchitect

    FramedArchitect Reluctant Modder

    Joined:
    Mar 25, 2012
    Messages:
    798
    Location:
    Missouri
    An interesting idea! I think there is already a mod that developed the idea of partisans very well with a system related to happiness. Sorry I cannot think of the name off hand...

    EDIT:
    Partisan mechanic included in Hulfgar's Mod
     
  17. FramedArchitect

    FramedArchitect Reluctant Modder

    Joined:
    Mar 25, 2012
    Messages:
    798
    Location:
    Missouri
    A small update that fixes a bug associated with upgrading to veteran units. Also now compatible with Vanilla, as well as GnK and BNW.
     
  18. FramedArchitect

    FramedArchitect Reluctant Modder

    Joined:
    Mar 25, 2012
    Messages:
    798
    Location:
    Missouri
    It looks like the civ5mod file for the last update may have been corrupt or a dupe of version 10. v.11 link in top post now functions as described in above and initial post.
     
  19. Belzhorash

    Belzhorash Warlord

    Joined:
    Oct 24, 2008
    Messages:
    222
    Location:
    Germany
    Sorry to necro this thread, FA, but do you think you could change this mod to only allow militia for one specific civilization as a Unique Ability?
     
  20. FramedArchitect

    FramedArchitect Reluctant Modder

    Joined:
    Mar 25, 2012
    Messages:
    798
    Location:
    Missouri
    Well it would certainly be possible to adapt this as a UA, but I don't plan on doing that. I think users prefer to have a mod that affects every game. That said, you are free to use this mod in any way you like!
     

Share This Page