Home » MODDING HQ 1.13 » Flugente's Magika Workshop » New feature: militia resources
New feature: militia resources[message #346251] Fri, 15 July 2016 22:09 Go to previous message
Flugente

 
Messages:3507
Registered:April 2009
Location: Germany
As explained elsewhere, while I am happy with the way equippable militia works, this feature can require quite a bit of item micromanagement. If you use hundreds of militia offensively, the gear you would like to use will be on some battlefield, while you still train your militia in towns. This then requires you to either move unequipped militia around (which can result in a bloodbath if the enemy breaks through) or to move potentially thousands of items, over an over again.

In my current increased team size game, that is simply too much. Nevertheless, I play with Drop All, and I want all that gear to be used for my militia. I could simply sell it via SELL_ITEMS_WITH_ALT_LMB, but then most of my income would be from those sales. Financing a war by slaughtering armies and then selling their weapons to random peasants strikes me as a bit... unwise.

This feature aims to be a viable alternative to this: militia training and promotions now require resources. We can get these resources by converting items:

  • Guns: obtained from weapons, ammo
  • Armour: obtained from helmets, vests, pants, LBE and face items
  • Miscellaneous: obtained from melee weapons, launchers, grenades and bombs
Whenever we train or promote militia, we spend these resources:
  • A green militia requires 1 Gun.
  • A promotion from green to regular militia requires 1 Gun + 1 Armour.
  • A promotion from regular to elite militia requires 1 Gun + 1 Armour + 1 Misc..
If we don't have enough resources, the training/promotion won't happen. Unless we play with individual militia, promotions not happening will effectively be lost (with that feature on, the promotions will happen later on if we have the required resources again and unload a sector with the to-be-promoted militia).

Resources will be spent when we obtain militia by interrogation (we need to equip them after all, they had no guns in prison aww), but not if we recruit them from a PMC (those guys bring their gear along).
The equipment the militia will use will simply be defined, like that of the enemy, in the TableData/Inventory xmls.
http://i.imgur.com/5C03Vym.png
Items can be converted into resources in the sector inventory by pressing [Alt] + [RMB], similar to how SELL_ITEMS_WITH_ALT_LMB works. If you also press [Shift], an entire item stack will be converted. If you also press [y] (germans might want to press [z] instead), all items of that item number will be sold, so you can rapidly convert gear. While you press [Alt], you will see the resources you would gain by conversion on each item. This takes into account loaded ammo and attachments.
http://i.imgur.com/XWLPSFl.png
Resources will be shown in the strategic map while the Militia view is active. The colours here correspond to the colours in the inventory.

The resource value of an item is determined by its status, coolness, class specific modifiers, and the highest game progress reached so far.
Every time the highest game progress is increased, our resources are devalued (to represent gear being outdated). Due to the way it is coded, it doesn't make a difference (resource-wise) if you convert a gun at progress 10 and then wait until progress 50, or if you only convert it at progress 50 - in both cases, the value at progress 50 will be the same. This is to stop weird player behaviour, like stocking tons of guns intended for conversion simply to get a better rate. It has to be noted, though, that you train more militia from the same gear early on, but that is more of a personnel bottleneck than a resource one.

For more details, see JA2_Options.ini:
Toggle Spoiler


These ini values are just defaults, I haven't tested them extensively. Let me know how they work.

This feature is off by default, and it requires equippable militia to be off to work, as those two cannot be used at the same time, because I say so. As we have to convert items to be able to train militia, activating this in an existing campaign might be easier or harder than intended, depends on how much gear you have stored.

This feature is fully savegame compatible.

This feature has been added to the trunk in r8271 & GameDir r2330. Using the new exe without the new GameDir will do... nothing. Or... does it?.

Edit: silversurfer improved this feature in r8275.

[Updated on: Fri, 22 July 2016 22:46]




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
Read Message
Previous Topic: New feature: Arulco Special Division
Next Topic: In-development feature: Individual militia
Goto Forum:
  


Current Time: Sun Dec 01 02:50:55 GMT+2 2024

Total time taken to generate the page: 0.01106 seconds