New feature: Class specific gun/item choices[message #313737]
||Mon, 31 December 2012 15:27 |
|| Class specific gun/item choices
As I felt like doing boring, tedious work, we now have the possibility to use different gun and item choice tables for soldier classes. Specifically,
and the old EnemyGunChoices.xml and EnemyItemChoices.xml are used as a backup, should we ever look for a gun/item for someone not of these classes (should never happen, but safety first).
- administrators use GunChoices_Enemy_Admin.xml and ItemChoices_Enemy_Admin.xml
- redshirts use GunChoices_Enemy_Regular.xml and ItemChoices_Enemy_Regular.xml
- blackshirts use GunChoices_Enemy_Elite.xml and ItemChoices_Enemy_Elite.xml
- green militia use GunChoices_Militia_Green.xml and ItemChoices_Militia_Green.xml
- regular militia use GunChoices_Militia_Regular.xml and ItemChoices_Militia_Regular.xml
- elite militia use GunChoices_Militia_Elite.xml and ItemChoices_Militia_Elite.xml
This allows modders to finetune gun selections. For example, one could use old WW1 stuff for admins, AKs for redshirts and funky NATO guns for the blackshirts. Or equip the enemy with WP and your militia with NATO calibers. Or reserve NVGs to the elite only. Or whatever you like. Usage is just like the normal gun/item choices work.
This is set in the ini via
; should separate tables be used for each soldier class (admin, regular, elite, green/regular/elite militia)?
SOLDIERCLASS_SPECIFIC_ITEM_TABLES = TRUE
If set to FALSE, EnemyGunChoices.xml and EnemyItemChoices.xml are used for everybody like you are used to. The xmls mentioned above have to exist in order for this to work. Should your mod not yet have these, simply copy EnemyGunChoices.xml and EnemyItemChoices.xml 6 times and rename them accordingly.
Once again, I happily report that this will NOT break savegame compatibility.
However, while I'm at it, i would like to bring a bit of order into the Tabledata folder. It is chaos in there, a few more subfolders would be good. My suggestion is to create 2 new subfolders:
Inventory - all xmls concerning inventory of soldiers:
Items - all xmls concerning type and properties of items:
- EnemyGunChoices.xml and the new class specific xmls
- EnemyItemChoices.xml and the new class specific xmls
This would simply be a reordering - I would move the xmls to the new folders, and set up the paths in the code. What would be necessary, of course, is that all mods who use exes from this point on move their xmls as well. The xml editor would also have to be fitted.
The question, especially to modders, is: is the reordering of xml worth it, or not?
Until this question has been answered, I will not commit this
I have decided to reorder the xmls, as nobody was against it. Changes are:
- EnemyAmmoDrops.xml to Inventory/EnemyAmmoDrops.xml
- EnemyArmourDrops.xml to Inventory/EnemyArmourDrops.xml
- EnemyExplosiveDrops.xml to Inventory/EnemyExplosiveDrops.xml
- EnemyGunChoices.xml to Inventory/EnemyGunChoices.xml
- EnemyItemChoices.xml to Inventory/EnemyItemChoices.xml
- EnemyMiscDrops.xml to Inventory/EnemyMiscDrops.xml
- EnemyWeaponDrops.xml to Inventory/EnemyWeaponDrops.xml
- IMPItemChoices.xml to Inventory/IMPItemChoices.xml
- MercStartingGear.xml to Inventory/MercStartingGear.xml
- PocketPopups.xml to Inventory/PocketPopups.xml
- Pockets.xml to Inventory/Pockets.xml
- AmmoStrings.xml to Items/AmmoStrings.xml
- AmmoTypes.xml to Items/AmmoTypes.xml
- Armours.xml to Items/Armours.xml
- AttachmentComboMerges.xml to Items/AttachmentComboMerges.xml
- AttachmentInfo.xml to Items/AttachmentInfo.xml
- Attachments.xml to Items/Attachments.xml
- AttachmentSlots.xml to Items/AttachmentSlots.xml
- Clothes.xml to Items/Clothes.xml
- CompatibleFaceItems.xml to Items/CompatibleFaceItems.xml
- Drugs.xml to Items/Drugs.xml
- ExplosionData.xml to Items/ExplosionData.xml
- Eplosives.xml to Items/Eplosives.xml
- Food.xml to Items/Food.xml
- IncompatibleAttachments.xml to Items/IncompatibleAttachments.xml
- Item_Transformations.xml to Items/Item_Transformations.xml
- Items.xml to Items/Items.xml
- Launchables.xml to Items/Launchables.xml
- LoadBearingEquipment.xml to Items/LoadBearingEquipment.xml
- Magazines.xml to Items/Magazines.xml
- Merges.xml to Items/Merges.xml
- RandomItem.xml to Items/RandomItem.xml
- Weapons.xml to Items/Weapons.xml
- AttachmentPoint.xml to Lookup/AttachmentPoint.xml
- NasAttachmentClass.xml to Lookup/NasAttachmentClass.xml
- Silhouette.xml to Lookup/Silhouette.xml
- SoundsProfiles.xml to Sounds/SoundsProfiles.xml
The following xmls were added:
:grimreaper: WARNING!!! Due to this reordering, an exe of revision >= 5764 will need a GameDir of revision >= 1584, otherwise it cannot find the xmls!!111elf!!!! :grimreaper:
[Updated on: Sat, 05 January 2013 00:24] by Moderator
Re: New feature: Class specific gun/item choices[message #313996]
||Tue, 08 January 2013 05:26 |
Location: East Texas, USA
|Here's my first attempt to split the gun choice XMLs using the original enemygunchoices.xml as a gun pool for each tier. The general theme is Colt, Beretta, Ruger and FN for Regular, Calico, HK, Galil and Steyr for Elites and everything else for Admin.
There are a few exceptions early on and it definitely will need some tweaking.
Also I'm assuming that "admins" are officers and that Green Militia come after "regular" So Hopefully I placed them in the correct order. (Thank you DB for pointing out the correct order for these.)
Hold on, needs major fixin
Okay, took another crack at it. Works for me but may not be to everyone's taste. Admins have police issue (but no overlap with Elite), Regular have a truncated default enemygunchoices (minimal overlap with with elite and admin) and elites have the most expensive two from each category for each coolness level (at least I tried to anyway.
This is setup for Tons of Guns, not sure how it will fair with lower settings.
Anyway, I'ma play a while and see what needs fixing
My Revised Enemy Gun Choice XMLs
Re: New feature: Class specific gun/item choices[message #314846]
||Sun, 27 January 2013 20:18 |
||Flugente, would it be possible with a similar xml to have enemies drop e.g. LBE gear according to the weapons they carry?
So that e.g. enemies with a machine pistol, IF they carry LBE for it, that they don't drop a normal pistol holder? (If they don't wear any LBE, then they still don't drop anything, of course).
Or that machine gunners, if they carry extra ammo, that they carry appropriate LBE (which CAN carry that kind of ammo)?
Think you know what I mean, right? Adds to realism and you can really live from the gear you gain, carry it along...
In drop-all mode, you would probably get a bit more gear, but it only adds to realism as you can at least take along the gear you find in the early part of the game if you opt to start without any gear. LBE is not THAT expensive and it won't change a lot to the profits of the loot that you are selling. And after all, you also get the armor and ammo that the enemies carry, so...
[Updated on: Sun, 27 January 2013 20:35] by Moderator
Re: New feature: Class specific gun/item choices[message #314881]
||Tue, 29 January 2013 04:19 |
||Well, backpacks not necessarily as there is the sling... Enemies rarely have more than one large gun, right? But I understand it is way too complex, probably. Thanks.