Home » PLAYER'S HQ 1.13 » JA2 Complete Mods & Sequels » All about modding JA2 » Enemy item choice tweaks
Enemy item choice tweaks[message #343349] Sat, 28 November 2015 04:22 Go to next message
delosombres

 
Messages:10
Registered:February 2009
Hi guys, I would like to ask if there is a way how to change WHEN and HOW OFTEN do enemies wear certain stuff. I did some tweaks to weapon damage and armor to make it more realistic. It works fine, the only problem is that now the best armor (Spectra - which is class IIIA) is almost useless against both FMJ and AP rifle rounds (just like in real) and that made the game much eaiser for me because enemies don't wear ceramic/titanium (class 3 & 4) plating much (which is now mandatory). I would like to change it so elite enemies would always wear titanium/ceramic plating at certain point (progress) of the game. Is it possible? I know that items have coolness level and enemies have speed of item choices setting (= coolness modifier similar to Bobby Ray's Quality?) but I don't know how it works exactly. There is also coolness bonus modifier in JA2_options.ini for specific enemy types. I have no clue how it works together. It seems that it's random anyway so even if it passes the coolness check there is only a % chance they will wear it.
Re: Enemy item choice tweaks[message #343350 is a reply to message #343349] Sat, 28 November 2015 10:24 Go to previous messageGo to next message
silversurfer

 
Messages:2164
Registered:May 2009
As far as I can tell there is no way to force certain items because item selection for soldiers is completely randomized.



Wildfire Maps Mod 6.07 on SVN: https://ja2svn.mooo.com/source/ja2/branches/Wanne/JA2%201.13%20Wildfire%206.06%20-%20Maps%20MOD

Re: Enemy item choice tweaks[message #343355 is a reply to message #343350] Sun, 29 November 2015 02:52 Go to previous messageGo to next message
delosombres

 
Messages:10
Registered:February 2009
Well, I've found a file called "EnemyItemChoices.xml" with item numbers which seem to represent a pool of items that can appear. This part is interesting:

<ENEMYITEMCHOICES>
<uiIndex>11</uiIndex>
<name>Armour Attachments</name>
<ubChoices>3</ubChoices>
<bItemNo1>183</bItemNo1>
<bItemNo2>837</bItemNo2>
<bItemNo3>838</bItemNo3>
<bItemNo4>0</bItemNo4>
<bItemNo5>0</bItemNo5>
<bItemNo6>0</bItemNo6>
etc...
183 are ceramic plates, 837 titanium plates and 838 leg protectors. ubChoices should be a total number of possibilities. So, how about if I would add another 183/837 to line No4, No5 and so on? Maybe that would increase the chance.

[Updated on: Sun, 29 November 2015 02:53]

Re: Enemy item choice tweaks[message #343358 is a reply to message #343355] Sun, 29 November 2015 11:33 Go to previous messageGo to next message
silversurfer

 
Messages:2164
Registered:May 2009
I don't think that this will help. The game has a 1/3 chance of ubChoices to get nothing from the list. So if you have ubChoices at 3 one out of 4 will be a miss. With ubChoices at 6 two out of 8 will be a miss and so on. You could try if ubChoices at 5 helps as 5/3 is 1 since it is an integer. ;)



Wildfire Maps Mod 6.07 on SVN: https://ja2svn.mooo.com/source/ja2/branches/Wanne/JA2%201.13%20Wildfire%206.06%20-%20Maps%20MOD

Re: Enemy item choice tweaks[message #343362 is a reply to message #343358] Sun, 29 November 2015 19:20 Go to previous messageGo to next message
delosombres

 
Messages:10
Registered:February 2009
How about ubChoices 1 with only one choice - 183? :]

Also, I can set for example ubChoices 15 and then 12x 183, 2x 837 and 1x 837. This gives more weight on ceramic plates since the ratio will be 12:2:1. At least the percentage for ceramic will be much higher. Anyway, I'll test it and see...

[Updated on: Mon, 30 November 2015 03:11]

Re: Enemy item choice tweaks[message #343367 is a reply to message #343362] Mon, 30 November 2015 18:42 Go to previous messageGo to next message
silversurfer

 
Messages:2164
Registered:May 2009
Yes, putting multiple instances of the same item in the list gives it more weight. This is the same as the IMP items that are randomly assigned.
Unlike the IMP items the soldier stuff is coolness based so items with higher coolness than game progression will never drop and may lower the drop chance for lower coolness items if the selection process stops at the first try. I don't have access to the code atm so I can't say for sure.

Please test it and you should see the results pretty soon.



Wildfire Maps Mod 6.07 on SVN: https://ja2svn.mooo.com/source/ja2/branches/Wanne/JA2%201.13%20Wildfire%206.06%20-%20Maps%20MOD

Re: Enemy item choice tweaks[message #343370 is a reply to message #343367] Tue, 01 December 2015 03:59 Go to previous messageGo to next message
delosombres

 
Messages:10
Registered:February 2009
Ok, just did some testing. I put ubChoices at 15, 10x ceramic plates, 4x titanium plates and 1x leg protectors. The file name is ItemChoices_Enemy_Elite.xml + ItemChoices_Enemy_Regular.xml. Of course I set SOLDIERCLASS_SPECIFIC_ITEM_TABLES = TRUE in Ja2_options.ini so I suppose these files overrides the settings in basic EnemyItemChoices.xml.

I have 65 progress, speed of enemy item choice = very slow and I set ceramic to coolness 9 (titanium is 8). However, I set bonus coolness for elites +3 and for regulars +2 in JA2_options.ini. I killed like 30 enemies and got 0 plates and 3 protectors (attachment drop rate = 100). Not sure what is going on because some guys (Grumm) dropped MP7A1 and that is coolness 9. :o/

I'm gonna try to reduce coolness on plates.

Btw, side question. Does it always give the best (coolness) available equipment or is it still random? I mean at progress 90+, do elites still get Kevlar and Jacket with the same chance as Spectra?

[Updated on: Tue, 01 December 2015 04:04]

Re: Enemy item choice tweaks[message #343386 is a reply to message #343370] Fri, 04 December 2015 03:09 Go to previous messageGo to next message
delosombres

 
Messages:10
Registered:February 2009
Ok guys, so I did some more testing and it seems that Vests/Leggings have much higher chance of "no attachment" than weapons. No matter how I set the chance ratio or coolness I always get like only +/- 3 plates from 20 enemies while I get +/- 15 weapons with attachments. That means it won't work anyway. :[ I have to go for plan B. Removing plates completely and increasing the protection values of armors. Spectra and Dyneema will be equivalent to class 4 and replace the ceramic plates. Just one thing. Is there a way how to remove plates from vest tooltip of possible attachments? Thx.
Re: Enemy item choice tweaks[message #343390 is a reply to message #343386] Fri, 04 December 2015 14:20 Go to previous messageGo to next message
silversurfer

 
Messages:2164
Registered:May 2009
You can't just remove the tooltip. You will have to remove the option to attach an attachment. For this you need to modify "TableData\Items\Attachments.xml".

It has attachment blocks which start with <ATTACHMENT> and end with </ATTACHMENT>. You need to remove the whole block that defines an attachment option.

Within the block you have <attachmentIndex> which holds the item ID of the attachment, for example 183 for the Ceramic Plates.
Below that you will find <itemIndex> which defines on what item ID this attachments fits, for example 164 for a Kevlar Vest.
The <APCost> tag should be self explanatory.




Wildfire Maps Mod 6.07 on SVN: https://ja2svn.mooo.com/source/ja2/branches/Wanne/JA2%201.13%20Wildfire%206.06%20-%20Maps%20MOD

Re: Enemy item choice tweaks[message #343395 is a reply to message #343390] Sat, 05 December 2015 03:24 Go to previous message
delosombres

 
Messages:10
Registered:February 2009
I've already figured it out myself but thanks anyway. :]
Previous Topic: exists a mod like this?
Next Topic: Modest Mike (english, hiring hostile Hero Mike)
Goto Forum:
  


Current Time: Tue Oct 17 00:56:32 EEST 2017

Total time taken to generate the page: 0.01184 seconds