Home » MODDING HQ 1.13 » Flugente's Magika Workshop » New feature: Equip militia with guns/armour/etc.
Re: New feature: Equip militia with guns/armour/etc.[message #323660] Mon, 05 August 2013 03:12 Go to previous messageGo to next message
SharkD

 
Messages:358
Registered:July 2003
Flugente
As it is really useful, I implemented the 'pick up gear' function as SharkD suggested above. The menu now looks like this:

...

I also fixed their drop function, they should no longer drop their gear in water if ordered too.

Both is in r6263.


I just installed 6263 over my 6201 campaign and the 'pick up gear' function is missing from the popup menu. Do I need to start over for it to take effect?
Re: New feature: Equip militia with guns/armour/etc.[message #323686] Mon, 05 August 2013 20:14 Go to previous messageGo to next message
Flugente

 
Messages:3407
Registered:April 2009
Location: Germany
No new game required. Make sure you are really using the correct exe.


Re: New feature: Equip militia with guns/armour/etc.[message #323691] Tue, 06 August 2013 07:13 Go to previous messageGo to next message
SharkD

 
Messages:358
Registered:July 2003
I overwrote the existing EXE when I unzipped the SCI, so I'm pretty sure I'm using the right one.
Re: New feature: Equip militia with guns/armour/etc.[message #323793] Thu, 08 August 2013 21:57 Go to previous messageGo to next message
Uriens

 
Messages:330
Registered:July 2006
I love this feature. Thanks flug!!!
Not only did you effectively allowed us to equip militia ourselves, you have also solved a problem with kleptomaniac militia that seemed to pick stuff all over the place whenever they weren't in direct combat. I was pulling my hair because they kept taking my stuff but now I don't have a care in the world. Very Happy
I just use militia inspect option after the combat and sort all the gear for me and them with no aggravation.

This reminds me. Keeping militia stocked, armed and armored can be a drag if you try to maximize their equipment. For example, if I have 32 militia in the sector and got 48 flak jackets in it, I'd like to pick 32 in best shape to keep it for militia and sell/delete the rest. Some interface change to speed it up would be very welcome. Very Happy

For example, a sell and delete functionality when viewing item stack would help a lot. I mean, in this window:

http://i46.photobucket.com/albums/f105/Daynarr/JA2-3-1.jpg

Again, thanks a lot for this feature.
Re: New feature: Equip militia with guns/armour/etc.[message #324064] Sat, 17 August 2013 12:49 Go to previous messageGo to next message
SharkD

 
Messages:358
Registered:July 2003
6263/1718, WildFire 6.06

Something is wrong with the feature. I am in Meduna airport sector. There are plenty of guns laying around. When the enemy attacks, all items in the sector disappear, and my militia are stuck carrying no equipment.
Re: New feature: Equip militia with guns/armour/etc.[message #324069] Sat, 17 August 2013 13:47 Go to previous messageGo to next message
Flugente

 
Messages:3407
Registered:April 2009
Location: Germany
Hmmhmm. That sounds bad. Please describe what happened in more detail - are you getting reinforcements from multiple directions, did you 'taboo' any items etc.... Did you, by any chance, do an inspection in that sector prior to the attack?
Did you change any of the ini settings for his feature?


Re: New feature: Equip militia with guns/armour/etc.[message #324078] Sat, 17 August 2013 15:33 Go to previous messageGo to next message
SharkD

 
Messages:358
Registered:July 2003
I upgraded to 6279/1722. I think that now that I have greater control I can work around the problem if it occurs again.
Re: New feature: Equip militia with guns/armour/etc.[message #327016] Wed, 23 October 2013 09:30 Go to previous messageGo to next message
cnagorneac

 
Messages:185
Registered:April 2012
Another question / request.
Is it possible to make different chances to drop items that you give to militia? At the moment chance for militia drop is the same as for enemy, but for me it is a little too much to restock them every time they die.
I understand that it is not possible to make in autobattles, but at least in normal battles.
Re: New feature: Equip militia with guns/armour/etc.[message #327035] Wed, 23 October 2013 20:18 Go to previous messageGo to next message
Flugente

 
Messages:3407
Registered:April 2009
Location: Germany
I don't think I understand your question.

Wether militia drops items or not depends on MILITIA_DROP_EQUIPMENT (and drop all).

However, when they pick up gear using this feature, it replaces randomly generated gear. The gear they pick up will always be dropped by them, wether they die in tactical or auto resolve, or if you unload their sector. Not doing so would effectively destroy hard-earned gear and should never ever happen. If you experience that picked up gear gets lost somehow, please post that and a savegame, and I will try to fix that.

I'm not sure if that answered your question though.


Re: New feature: Equip militia with guns/armour/etc.[message #327132] Fri, 25 October 2013 08:39 Go to previous messageGo to next message
cnagorneac

 
Messages:185
Registered:April 2012
Flugente
I don't think I understand your question.

Wether militia drops items or not depends on MILITIA_DROP_EQUIPMENT (and drop all).

However, when they pick up gear using this feature, it replaces randomly generated gear. The gear they pick up will always be dropped by them, wether they die in tactical or auto resolve, or if you unload their sector. Not doing so would effectively destroy hard-earned gear and should never ever happen. If you experience that picked up gear gets lost somehow, please post that and a savegame, and I will try to fix that.

I'm not sure if that answered your question though.

I understand now.
I just assumed that if they die your equipment will vanish. Now I understand that it is not the case. Thanks a lot.
Thank you[message #328197] Fri, 15 November 2013 07:02 Go to previous messageGo to next message
BruteForce

 
Messages:27
Registered:October 2013
Location: The Sprawl
I love being able to equip my militia and it works flawlessly. Brilliant feature. :super:

[Updated on: Fri, 15 November 2013 07:03] by Moderator

Re: New feature: Equip militia with guns/armour/etc.[message #328201] Fri, 15 November 2013 10:09 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3805
Registered:July 2009
Don't change thread titles.


Re: New feature: Equip militia with guns/armour/etc.[message #329081] Thu, 19 December 2013 13:25 Go to previous messageGo to next message
sylar951

 
Messages:54
Registered:December 2013
Hello Flugente... I have a problem...
I am using 1.13 rev 6690 dir 1891 and when I want to edit INI file - "militia use sector equipment", I can't change value from FALSE to TRUE...
There is no any options in "new value" section... The data type says "missing data type"...
Some of the other features have the same problem but luckily they've been set to TRUE by default so no changes are required...
But I really want to use "equip militia" feature but can't set it to TRUE... So can you help.?
Thanks in advance Smile
Re: New feature: Equip militia with guns/armour/etc.[message #329082] Thu, 19 December 2013 13:27 Go to previous messageGo to next message
Flugente

 
Messages:3407
Registered:April 2009
Location: Germany
This is most likely a result of there not being a description in thee INIEditor xml. Just edit Data-1.13/JA2_Options.ini manually for that option.


Re: New feature: Equip militia with guns/armour/etc.[message #329083] Thu, 19 December 2013 13:36 Go to previous messageGo to next message
sylar951

 
Messages:54
Registered:December 2013
Flugente
This is most likely a result of there not being a description in thee INIEditor xml. Just edit Data-1.13/JA2_Options.ini manually for that option.


Woohooo! Very Happy You're fast... Yeah, I've manually changed that section to TRUE in JA2_options.ini and now INI editor shows it is "TRUE"... I guess it will work when I start the game...
Thank you very much... You're really doing wonders with this already awesome game Smile
Re: New feature: Equip militia with guns/armour/etc.[message #329103] Fri, 20 December 2013 02:43 Go to previous messageGo to next message
sevenfm

 
Messages:1648
Registered:December 2012
Location: Soviet Russia
Flugente, one thing is still unclear for me.
If i set MILITIA_USE_SECTOR_EQUIPMENT=TRUE, and allow only one type of sector equipment, for example MILITIA_USE_SECTOR_EQUIPMENT_LAUNCHER=TRUE, then militia will have some other guns instead of launchers or some militiamen (which wanted to use launchers) will come to battlefield with empty hands?

What i mean, is it possible to strengthen some sectors by giving better types of equipment (launchers, grenades), while if there's no such good equipment, militia will 'create' regular guns and pistols.

I also suggest two things:
1) Is it a good idea to further distinguish gun types - for example add MILITIA_USE_SECTOR_EQUIPMENT_LMG or MILITIA_USE_SECTOR_EQUIPMENT_SNIPER ? So we could use heavy or sniper guns to strengthen key sectors, while other will use ARs, shotguns and SMGs.
2) I think there could be good option to use sector equipment only for mobile militia - to create small mobile squads with good carefully prepared equipment, while leaving hundreds of stationary militiamen with default guns.

Thank you! :smilingsoldier:


Re: New feature: Equip militia with guns/armour/etc.[message #329108] Fri, 20 December 2013 03:09 Go to previous messageGo to next message
Flugente

 
Messages:3407
Registered:April 2009
Location: Germany
Sevenfm
Flugente, one thing is still unclear for me.
If i set MILITIA_USE_SECTOR_EQUIPMENT=TRUE, and allow only one type of sector equipment, for example MILITIA_USE_SECTOR_EQUIPMENT_LAUNCHER=TRUE, then militia will have some other guns instead of launchers or some militiamen (which wanted to use launchers) will come to battlefield with empty hands?
The settings cause militia to delete all items of that category they got via itemchoices xmls and then equip any items of that category that might be in the sector. In this case, they will have guns according to xmls, but only those launchers that were in the sector.

Sevenfm
What i mean, is it possible to strengthen some sectors by giving better types of equipment (launchers, grenades), while if there's no such good equipment, militia will 'create' regular guns and pistols.
No. Having the xml items as 'fallback items' would erase the entire logistics aspect of this feature - they would be no need to steadily supply militia, as they'd always be equipped. But to clarify: Launchers and Guns are two different things. Having a specific gun has no influence on wether you get grenades or launchers (apart from UGLs having to fit a gun). So in your case from above, you could strengthen militia by equipping only chosen sectors with launchers and grenades (this is also a great way of keeping the militia from using gas grenades).

Sevenfm
I also suggest two things:
1) Is it a good idea to further distinguish gun types - for example add MILITIA_USE_SECTOR_EQUIPMENT_LMG or MILITIA_USE_SECTOR_EQUIPMENT_SNIPER ? So we could use heavy or sniper guns to strengthen key sectors, while other will use ARs, shotguns and SMGs.
No. Either the player equips all guns, or none. Nothing in between.
Sevenfm
2) I think there could be good option to use sector equipment only for mobile militia - to create small mobile squads with good carefully prepared equipment, while leaving hundreds of stationary militiamen with default guns.

Thank you! :smilingsoldier:
Same as 1. Also, there is no differentiation between mobile and immobile militia on the soldier - it's purely strategic cosmetic. I never liked that differentiation (which is why the radio operator makes away with it).
Yes, this causes the player to decide in which sector to place the good equipment, and which militia platoons receive the outdated crap. Which can lead to firepower shortage if having too many militia, and a serious ammo problem if militia fights a lot. This is fully intentional :diabolical:


Re: New feature: Equip militia with guns/armour/etc.[message #329394] Tue, 31 December 2013 01:04 Go to previous messageGo to next message
Swant

 
Messages:29
Registered:April 2011
Hi, Ive been using the Radio Operator to move militia around the map and it has been working perfectly until the last battle.
The militia have now stopped using most of the guns and will try to stab or hit instead. Ive checked and they have guns and ammunition. They will use some guns, my Radio Operators SMG for example.

Im using:
SCI_Unstable_Revision_6692_on_GameDir_1894
Arulco-Revisited--AR-v1.4-20130120-
SDO_GameDir_r1894
AR+SDO_Default_Maps_GameDir_r1893
AR+SDO_Rnd_Item_Maps_GameDir_r1893
Re: New feature: Equip militia with guns/armour/etc.[message #329444] Wed, 01 January 2014 16:44 Go to previous messageGo to next message
Flugente

 
Messages:3407
Registered:April 2009
Location: Germany
Hmm. So they do not fire some guns, even though they are not jammed and have enough ammunition? What kind of guns? Are they properly loaded (could be some issue about reloading a gun not working due to not fitting magazine size)?


Re: New feature: Equip militia with guns/armour/etc.[message #329446] Wed, 01 January 2014 17:26 Go to previous messageGo to next message
Swant

 
Messages:29
Registered:April 2011
They will fire the H&K UMP, M1 carbine, and the Ruger mini 14. They will not fire The swedish K, the Benelli m3 shotgun, Agram 2000, The BAR, or the TMP submachinegun.
The BAR seems to be in a backpack. The will throw grenades.

The guns are fully loaded, Ive checkt by moving the milita to a freindly zone and inspecting them. Also when they get killed and drops the guns they are loaded.

I think those guns worked before, but Im not 100% sure.

I also tried to clean the guns but it didnt help

[Updated on: Wed, 01 January 2014 17:27] by Moderator

Re: New feature: Equip militia with guns/armour/etc.[message #329507] Fri, 03 January 2014 18:53 Go to previous messageGo to next message
Flugente

 
Messages:3407
Registered:April 2009
Location: Germany
Hmm. This seems very odd - do they fire those guns if you turn this feature off and have those as random militia guns? I'm not sure how this feature could cause militia not to use guns if they get guns with ammo.


Re: New feature: Equip militia with guns/armour/etc.[message #329520] Fri, 03 January 2014 22:42 Go to previous messageGo to next message
Swant

 
Messages:29
Registered:April 2011
I dont know. I reinstalled everyting and Im gonig to try Arulco Folding Stock.
This featrue and the Radio Operator should work with that mod as well right?

Thanks for this it really makes for great gameplay
Re: New feature: Equip militia with guns/armour/etc.[message #329523] Fri, 03 January 2014 22:54 Go to previous messageGo to next message
Flugente

 
Messages:3407
Registered:April 2009
Location: Germany
They should (though the radio operator requires a few items, I don't know if AFS has those yet [radio set, radio set battery and mortar signal shell]).


Re: New feature: Equip militia with guns/armour/etc.[message #329527] Fri, 03 January 2014 23:20 Go to previous messageGo to next message
Swant

 
Messages:29
Registered:April 2011
Another thing, there is really no big differce between mobile milita and regular milita when you arm them yourself right? The Radio Operator can move both types around the map
Re: New feature: Equip militia with guns/armour/etc.[message #329546] Sat, 04 January 2014 14:51 Go to previous messageGo to next message
Flugente

 
Messages:3407
Registered:April 2009
Location: Germany
Yes.


Re: New feature: Equip militia with guns/armour/etc.[message #329618] Tue, 07 January 2014 02:08 Go to previous messageGo to next message
Swant

 
Messages:29
Registered:April 2011
I think Ive discovered what causing the problems. It seems to be the weapons I steal that doesn't work right. The militia will take them but not fire them or drop them at inspection. However if I recrate the same weapons with the GABBI cheat, everting works as it should.
Im using the Data Stock Overhaul.

Im going to do some more testing
Re: New feature: Equip militia with guns/armour/etc.[message #333525] Thu, 05 June 2014 13:06 Go to previous messageGo to next message
M16AMachinegun

 
Messages:307
Registered:September 2013
If i set it so Militia takes guns from the sector but not ammo, they'll have their own ammunition to work with, right? The game will generate enough ammunition for the militia to work with?

I'm not terribly interested in exploiting this, but does this also mean that if a militia dies, he'll drop his gear as well as the ammunition spawned this way?

It makes sense to me, i just want confirmation
Re: New feature: Equip militia with guns/armour/etc.[message #333527] Thu, 05 June 2014 13:48 Go to previous messageGo to next message
Flugente

 
Messages:3407
Registered:April 2009
Location: Germany
In this case, fitting ammo for the gun will be generated as usual. This means that militia will get 1-4 fitting magazines of a somewhat random ammotype (AP/HP/whatever).

When they drop their gear, they always drop the equipment they took from the sector. Gear that was generated randomly drops according to the usual drop rules - for militia its relativel rare to drop anything.

In this case, the gun will always be dropped, ammo not. Ammo can drop, but it's unlikely.

If I remember correctly, I even empty the guns before dropping them, as to not generate ammo for the player Smile


Re: New feature: Equip militia with guns/armour/etc.[message #333529] Thu, 05 June 2014 14:41 Go to previous messageGo to next message
M16AMachinegun

 
Messages:307
Registered:September 2013
Alright thanks. This'll help logistics; dealing with excess ammunition is annoying when i've barely got enough ammo for my mercs early game, much less militia.
Re: New feature: Equip militia with guns/armour/etc.[message #333552] Sat, 07 June 2014 11:59 Go to previous messageGo to next message
Swant

 
Messages:29
Registered:April 2011
When I move militia between city sectors from the map view, the drop their gear in the sector they moved from. Is there a way to avoid this, or is it possible to move them some other way. I dont have a radio operator so I cant use that.

Thx
Re: New feature: Equip militia with guns/armour/etc.[message #333555] Sat, 07 June 2014 18:42 Go to previous messageGo to next message
Flugente

 
Messages:3407
Registered:April 2009
Location: Germany
This not possible by intention and for code reasons too. You can, however, order militia to move to another sector in strategic.


Re: New feature: Equip militia with guns/armour/etc.[message #333557] Sat, 07 June 2014 21:08 Go to previous messageGo to next message
Swant

 
Messages:29
Registered:April 2011
Ok thx
Re: New feature: Equip militia with guns/armour/etc.[message #336463] Sat, 04 October 2014 22:53 Go to previous messageGo to next message
sylar951

 
Messages:54
Registered:December 2013
but if I want to attack a city with mobile militia how can I equip them?
or when mobile militia encounters the enemy in a sector with no equipment... how do the fight then?
Re: New feature: Equip militia with guns/armour/etc.[message #336466] Sat, 04 October 2014 23:33 Go to previous messageGo to next message
Flugente

 
Messages:3407
Registered:April 2009
Location: Germany
When mobiles are created, they take gear from the sector they were trained in (so you don't have to move gear to the wilderness). In all other cases, they take gear from the sector they are currently in.

If militia without gear encounter enemies, well, they will in all likelihood get slaughtered.


Re: New feature: Equip militia with guns/armour/etc.[message #336640] Mon, 13 October 2014 20:13 Go to previous messageGo to next message
Swant

 
Messages:29
Registered:April 2011
I have a problem with ammo magazines being dublicated everytime I click on the sector inventory. The ammo looks to be the same type my mobile milita drops, alot of magazines with 3 or 4 bullets. The militia are lokaded in the neighbour sector and have never been this sector.

This is what I have installed:
Ja 2
SCI_SDO_RequiredCoreMod_Unstable_Revision_7476_on_GameDir_2139
AR+SDO_Unstable_Revision_7476_on_GameDir_2139
Re: New feature: Equip militia with guns/armour/etc.[message #336648] Mon, 13 October 2014 23:30 Go to previous messageGo to next message
Flugente

 
Messages:3407
Registered:April 2009
Location: Germany
Hu? I've never observed militia to drop gear in the wrong sector... does that also happen in sectors they are in?


Re: New feature: Equip militia with guns/armour/etc.[message #336670] Tue, 14 October 2014 15:54 Go to previous messageGo to next message
Swant

 
Messages:29
Registered:April 2011
Yes the number of magazines increase everytime I click on the inventory on the sector the milita is in also.
The problem got fixed by turning militia use sector equipmet ammo to FALSE
When turning it back to TRUE it seems to work fine again

EDIT: I got the same problem again even with militia use sector equipmet ammo to FALSE. Also it might not have been the militia dropping ammo in the wrong sector but it just looked similar, not sure. The problem is some that stuff is being gererated

[Updated on: Tue, 14 October 2014 18:24] by Moderator

Re: New feature: Equip militia with guns/armour/etc.[message #337631] Sat, 08 November 2014 13:18 Go to previous messageGo to next message
navaroe

 
Messages:78
Registered:August 2012
I've possibly spotted one more problem with way items are dropped.

In this saved game for build 7623 mobile militia training is about to be finished in Drassen. It's going to be deployed in D14. All stuff there is currently on ground. When militia spawns there, some of the weapons they will take from C14 be would placed on water square in centre of map.

If you visit the sector then and leave again or do militia inspection, you will notice that those items are gone.

http://ulozto.net/xWcxZVdj/sinkingstuff-zip


I wondered where those early game M-16 with rifle LAMs went :bawling:
Re: New feature: Equip militia with guns/armour/etc.[message #342795 is a reply to message #337631] Mon, 12 October 2015 19:19 Go to previous messageGo to next message
navaroe

 
Messages:78
Registered:August 2012
I've made a little addition to this feature.

I've written code, which adds attachments to free positions on the gun militia chose to pick up. At the moment it respects militia taboo and is used only if militia equipment pickup is on. I plan to improve it and this should have been just a proof of concept for me, but it might take a while as I'll have less time in next few weeks at least, so I decided to offer you the code now. I've played my game with it for a while, seems to be working as expected and it took away big portion of micromanagement off me even in the state it is in now.

Those things to improve are:
-any attachment that fits first is going to be taken, which means ordinary lasers are used instead of rifle LAMs, because they come up first when iterating through items. Also small scopes come before 4x scopes which come before 7x battle scopes.
-code does not consider attachments condition
-code does not try to improve attachments already on weapon
-test with all attachments out there, for now bipods are ignored deliberately, because militia mostly run around and bipods would only take spot for grips. Perhaps underbarrel launchers might be taken into consideration against grips, but one needs to check for ammo first... Also ignored are magazine extenders and trigger groups. I'm not sure if they do any good for militia and those would only get damaged in the battle, no?
But most important attachments - scopes, lasers, reflex sights and silencers/muzzle flash supps. are attached. Also rifle slings happy

So, now it's up to people in charge here to decide, whether to commit this change or wait for better version.

I hope for yes, because I was to lazy to to do work on fixing a certain bug http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=22776&goto=342670&#msg_342670
in the same project and I apparently wasn't able to split the svn diff correctly, so it would be easier for me to commit both at once even tough they are independent changes angel
(and yes, in the other case I'll bother myself do the fix and other diff properly happy )


I'll PM RoWa21 as Silversurfer suggested. In the mean time, here is complete diff with this addition and bugfix if anyone wanted to give it a try.


Toggle Spoiler
Re: New feature: Equip militia with guns/armour/etc.[message #342827 is a reply to message #342795] Wed, 14 October 2015 20:50 Go to previous messageGo to previous message
RoWa21

 
Messages:2039
Registered:October 2005
Location: Austria
Please upload the patch file anywhere and then pm me. I can't apply the diff from here. It tells me wrong line break in line 5 or something similar.


Previous Topic: Not a feature: roleplay facts
Next Topic: New feature: creature raids
Goto Forum:
  


Current Time: Wed Sep 26 06:26:57 EEST 2018

Total time taken to generate the page: 0.02682 seconds