Home » MODDING HQ 1.13 » Flugente's Magika Workshop » New feature: Equip militia with guns/armour/etc.
New feature: Equip militia with guns/armour/etc.[message #315664] Sat, 23 February 2013 19:20 Go to previous message
Flugente

 
Messages:3507
Registered:April 2009
Location: Germany
Equip militia with guns/armour/etc.

Hi,

while answering why Feature Request: Equiping Militia through salvaged weapons/armor/etc is not doable, I realised it might be doable after all. So I did.

This feature allows you to equip militia. To be precise, militia will simply take its items from the sector inventory instead of generating it according to the xmls.
This allows you to give them gear that is way above what they would normally get - but this also means that if you don't provide any gear, then the militia wont have any. Plus any gear they use, you cannot use at the same time(duh...).

Simply activate this feature, drop gear in a sector, and spawn militia there. If you enter this sector (tactical), you will see that the militia uses your stuff. But in the strategic map, the gear isn't there any more, as the militia took it. If you leave the sector, they will put it back.
You can also 'inspect' militia in tactical, this will cause them to drop all gear they took from the sector.

As people will propably demand it anyway (because they cannot handle 'real' logistics Smile ), one can finetune which parts of militia gear should still be generated randomly, and which ones are taken from the sector.

Note that this feature requires you to support your militia. If you do not restock their ammo, they will eventually run dry. The amount of ammo militia takes can be determined by the ini settings (MILITIA_USE_SECTOR_EQUIPMENT_AMMO_MIN ff). This is used to determine the optimal amount of ammo a gun 'requires', if there is less ammo, we can still take it, but its less likely. As a result, the militia will likely prefer a 1911 with 100 bullets over an M16 with 10 bullets.

As you might be afraid that the militia will take your best ammo and use it uselessly, you can forbid it from using certain items. Open the sector inventory and leftclick on an item while holding 'TAB'. This toggles it, if the colour is green, the militia will not take this item from the sector (it can still steal it in tactical though). This even works in sectors where you currently have no mercs. With MILITIA_USE_SECTOR_EQUIPMENT_CLASS_SPECIFIC_TABOOS set to TRUE, this can be finetuned even more to forbid items for specific militia classes.

Ini settings:
Toggle Spoiler


A few demo pics:
http://i49.tinypic.com/2je4dh4.jpg
We drop a few M4's, spectra vests, steel helmets and M79's in drassen mine and train militia...

http://i48.tinypic.com/23kx9v5.jpg
... and the militia takes those items when we are in tatical...

http://i47.tinypic.com/2mbs7n.jpg
Of course, those items are gone in strategic.

http://i47.tinypic.com/30vby83.jpg
With such an improvement, the green militia is rather helpful, even in autoresolve.

http://i49.tinypic.com/14kejwk.jpg
Drop militia gear with this. No, I dont care about the box being to short, as our dialogue system is a pain.

http://i47.tinypic.com/ml01v6.jpg
We train mobiles in a neighbouring sector, they take this along.

http://i49.tinypic.com/20h95i0.jpg
And pretty much own a patrol twice their size with it.

http://i50.tinypic.com/rj1jet.jpg
Items with a turquoise overlay will not be selected by green militia.

http://i40.tinypic.com/20jl5cx.jpgNew (6026): Any militia can pick up the PMM. The commando has a turqoise layer and can not be equipped by green militia. The purple HK53 can only be equipped by Elite militia, while the MP5 is taboo for all of them. This state is even retained after they drop it again (so an Elite-only sniper rifle stays elite-only).

This is in the trunk since r5869/GameDir r1606.

wARNING: THIS WILL BREAK SAVEGAME COMPATIBILITY!

[Updated on: Sat, 27 April 2013 03:03] by Moderator

Report message to a moderator

Captain

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message icon10.gif
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
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
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
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
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
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
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: Expanded Feature: Move militia in strategic map, part 2
Next Topic: New feature: factories
Goto Forum:
  


Current Time: Tue Dec 03 04:08:58 GMT+2 2024

Total time taken to generate the page: 0.03823 seconds