Home » MODDING HQ 1.13 » Flugente's Magika Workshop » New Feature: militia volunteer pool
New Feature: militia volunteer pool[message #339595] Sun, 22 February 2015 20:47 Go to previous message
Flugente

 
Messages:3507
Registered:April 2009
Location: Germany
While relatively small for a feature, I feel this is still worth a thread of its own...

Anyway, one problem with militia is that, once you have enough money and trainers, you can train infinite numbers of them. Of course, you might want to equip them, but I feel there is still room for improvement. Moa introduced ini-based upper thresholds for the maximum numbers of mobile militia one can have though.

In this feature, I add a different way to restrict the number of militia one can have. The goal is to force the player to not throw away his militia, but care for them - in this case because volunteers are limited. Hopefully, this is simple enough and easy enough to understand - my features have a habit of becoming confusingly detailed, which can be somewhat confusing.

Anyway, to train militia you now need volunteers - a new troop 'uses up' a volunteer. City sectors have an estimated number of civilians living there (since the introduction of disease, see SectorNames.xml ). If you control city sectors, and people are loyal there, you get more volunteers. More town sectors -> more loyal people -> more volunteers. Higher loyalty -> more loyal people -> more volunteers.
To add a strategic component ( and to reward the player if he doesn't turtle in in towns), any farm you control gives you a small percentage boni on estimated total loyal citizens. Thus in order to maximize your recruitment pool, you need to control both towns and farms.
Each time you liberate a town sector for the first time, you get a huge initial influx of volunteers. After that, the volunteer numbers are updated every hour.
http://i.imgur.com/vTFMmu6.png?1
In the lower left of the strategic map, you can see your current volunteer pool, and how many volunteers you get every hour.
The growth of volunteers can be set in JA2Options.ini:
[Militia Volunteer Pool Settings]

; If MILITIA_VOLUNTEER_POOL is TRUE, we have a limited volunteer pool. If we train militia, the pool is lowered, if we run out 
; of volunteers we cannot train militia anymore.
; Each town sector has an assumed civilian population (see SectorNames.xml) and a loyalty value (the percentage displayed next
; to a town's name in the strategic map). population times loyalty equals loyal population.

; toggles this feature on and off
MILITIA_VOLUNTEER_POOL = FALSE

; Every hour we get loyal population times this factor volunteers for each town sector we control.
MILITIA_VOLUNTEER_POOL_GAINFACTOR_HOURLY = 0.001

; If we liberate a sector for the first time, we get loyal population times this factor volunteers instantly.
MILITIA_VOLUNTEER_POOL_GAINFACTOR_LIBERATION = 0.2

; Global loyal population size is increased by this factor for every farm sector we control.
; The reasoning is that controlling food supplies shows our commitment to the common people, and eases the food situation tremendously.
MILITIA_VOLUNTEER_POOL_MULTIPLIER_FARM = 0.05

So if, say, a city has a population of 500, and is 50% loyal, you receive 500 * 0.5 * 0.001 = 0.25 volunteers for it every hour. As I just coded this, I haven't tested whether these values are reasonable in a campaign - this needs testing by, say, you.

Note that militia hired from a PMC or recruited from prisoners does not use up volunteers. These might be valid options if, well, the population lacks the proper revolutionary spirits.

It would be possible to add extra volunteers for certain quests/sector liberations (rebels fully join your forces, prison liberated etc.), but I would like this non-hardcoded, so that any modder can use this for his altered campaign. Currently unsure about the best way to achieve that. Coded in r7880. You get extra volunteers for liberating Tixa and Alma, and for recruiting Miguel.

This feature is off by default.

This is fully savegame compatible. However, when switching to an exe with this, your volunteer will start at 0. Depending on your campaign, this might be an issue at first :-)

This has been added in r7746 and GameDir r2210.

Edit: As of r7886 & GameDir r2250, there is another way to get volunteers.

[Updated on: Sun, 15 May 2016 18:15]




I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.

Report message to a moderator

Captain

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: New feature: new drug system
Next Topic: New feature: combat jeeps
Goto Forum:
  


Current Time: Fri Nov 29 16:45:39 GMT+2 2024

Total time taken to generate the page: 0.01011 seconds