Militia Defense

FramedArchitect

Reluctant Modder
Joined
Mar 25, 2012
Messages
802
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.
 

Attachments

  • MilitiaRaised02.jpg
    MilitiaRaised02.jpg
    125.2 KB · Views: 991
  • MilitiaTypes.jpg
    MilitiaTypes.jpg
    128 KB · Views: 1,063
  • MilitiaUpgrade.jpg
    MilitiaUpgrade.jpg
    116.5 KB · Views: 859
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.
 
This is a response to following question:

What about non-normal tech tree? I havent changed the shape or structure, just the values of each techs (increasing them), but the militia mod negates that.

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.
 
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?
 
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.

I see. Thanks for the quick answer. :)
 
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!
 
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.
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.
2. If they never eneter my territory, would I ever spawn militia?
No.
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?
Yes, on the next turn if their units move in or into your territory.
4. What happens if I declare war on an enemy and they send troops into my land, does that pop the Militia?
Yes. This mod is blind to the aggressor/defender relationship.
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?
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.
6. IS there a maximum number of militia?
No.
7. If I have more than 1 improvement near my capital can I spawn more than 1 militia per turn?
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.
8. If my capital is under siege, would the militia spawn right next to the attackers?
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.
9. What if my capital is destroyed, does my new capital spawn militia?
Yes, again dependent on the number and kind of improvements near the new capital.
10. Can you think of anything I missed?
^^
 
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?
 
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?

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!
 
Top Bottom