Home » MODDING HQ 1.13 » Flugente's Magika Workshop » New feature: Class specific gun/item choices
New feature: Class specific gun/item choices[message #313737] Mon, 31 December 2012 15:27 Go to next message
Flugente

 
Messages:3476
Registered:April 2009
Location: Germany
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,
  • 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
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).
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:
  • EnemyGunChoices.xml and the new class specific xmls
  • EnemyItemChoices.xml and the new class specific xmls
  • Enemy_xxx_Drops.xml
  • MercStartingGear.xml
Items - all xmls concerning type and properties of items:
  • Items.xml
  • Weapons.xml
  • LoadBearingEquipment.xml
  • Armours.xml
  • Drugs.xml
  • Food.xml
  • RandomItem.xml
  • Launchables.xml
  • Explosives.xml
  • etc.
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 Smile

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:
  • Inventory/GunChoices_Enemy_Admin.xml
  • Inventory/GunChoices_Enemy_Elite.xml
  • Inventory/GunChoices_Enemy_Regular.xml
  • Inventory/GunChoices_Militia_Elite.xml
  • Inventory/GunChoices_Militia_Green.xml
  • Inventory/GunChoices_Militia_Regular.xml
  • Inventory/ItemChoices_Enemy_Admin.xml
  • Inventory/ItemChoices_Enemy_Elite.xml
  • Inventory/ItemChoices_Enemy_Regular.xml
  • Inventory/ItemChoices_Militia_Elite.xml
  • Inventory/ItemChoices_Militia_Green.xml
  • Inventory/ItemChoices_Militia_Regular.xml

: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 #313739] Mon, 31 December 2012 15:57 Go to previous messageGo to next message
Uriens

 
Messages:332
Registered:July 2006
Thank you. I love this change.
Btw. although I'm not really a modder I do mess with files in tabledata folder a lot and I'd love to have it a bit more organized so it's yes from me (if it's worth anything).
I guess it will be just moving files from tabledata folder to few subfolders, I guess it's not really that much work.
Re: New feature: Class specific gun/item choices[message #313740] Mon, 31 December 2012 17:08 Go to previous messageGo to next message
Slax

 
Messages:1445
Registered:July 2006
Location: People riding polar bears...
:bow:

Yet another "Finally!" moment sponsored by Flugente.
Now we just need more classes/shirt colors. :naughty:

Re: New feature: Class specific gun/item choices[message #313750] Mon, 31 December 2012 19:46 Go to previous messageGo to next message
Wil473

 
Messages:2842
Registered:September 2004
Location: Canada
Good timing, with AFS slowly emerging from the quagmire of adding items (not just the random one's I'm too scared to touch them right now with the XML Editor) I should be able to implement this with v4.xx.


Re: New feature: Class specific gun/item choices[message #313763] Tue, 01 January 2013 15:18 Go to previous messageGo to next message
Shanga

 
Messages:3529
Registered:January 2000
Location: Danubia
Excelent, Flug, another gem! No self-respecting mod should now ignore this if you really want to define your groups properly.


Re: New feature: Class specific gun/item choices[message #313765] Tue, 01 January 2013 16:09 Go to previous messageGo to next message
Flugente

 
Messages:3476
Registered:April 2009
Location: Germany
Glad to help Wink

Any thoughts on the xml reordering?


Re: New feature: Class specific gun/item choices[message #313782] Wed, 02 January 2013 11:23 Go to previous messageGo to next message
smeagol

 
Messages:2733
Registered:June 2008
Location: Bremen, Germany
sounds reasonable... i'm still on vacation, but will be back home by the end of the week... i'll be able to give a bit more feedback on xml reordering then.


Re: New feature: Class specific gun/item choices[message #313900] Sat, 05 January 2013 00:21 Go to previous messageGo to next message
Flugente

 
Messages:3476
Registered:April 2009
Location: Germany
Just Committed this. Exe revision is r5764, GameDir r1584.

I also reordered the xmls a bit. The following xmls were moved:
  • 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:
  • Inventory/GunChoices_Enemy_Admin.xml
  • Inventory/GunChoices_Enemy_Elite.xml
  • Inventory/GunChoices_Enemy_Regular.xml
  • Inventory/GunChoices_Militia_Elite.xml
  • Inventory/GunChoices_Militia_Green.xml
  • Inventory/GunChoices_Militia_Regular.xml
  • Inventory/ItemChoices_Enemy_Admin.xml
  • Inventory/ItemChoices_Enemy_Elite.xml
  • Inventory/ItemChoices_Enemy_Regular.xml
  • Inventory/ItemChoices_Militia_Elite.xml
  • Inventory/ItemChoices_Militia_Green.xml
  • Inventory/ItemChoices_Militia_Regular.xml

: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:22] by Moderator



Re: New feature: Class specific gun/item choices[message #313903] Sat, 05 January 2013 01:22 Go to previous messageGo to next message
Uriens

 
Messages:332
Registered:July 2006
A quick question, is xml editor going to allow us to edit new item and gun choices for each enemy/militia class or do we have to do it manually without editor?
Re: New feature: Class specific gun/item choices[message #313904] Sat, 05 January 2013 01:28 Go to previous messageGo to next message
Flugente

 
Messages:3476
Registered:April 2009
Location: Germany
It will be possible once the editor is fitted to the new and reordered xmls. Currently it isn't, I've written to JMich and MaddMugsy about it.


Re: New feature: Class specific gun/item choices[message #313905] Sat, 05 January 2013 01:32 Go to previous messageGo to next message
Uriens

 
Messages:332
Registered:July 2006
Ok.

Thanks for implementing this. Smile
Re: New feature: Class specific gun/item choices[message #313970] Mon, 07 January 2013 02:03 Go to previous messageGo to next message
Clarkew

 
Messages:78
Registered:May 2011
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

[Updated on: Mon, 07 January 2013 03:41] by Moderator

Re: New feature: Class specific gun/item choices[message #313971] Mon, 07 January 2013 02:09 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3745
Registered:July 2009
Admin < Regular (red shirts) < Elite for Deidrannas forces and Green < Regular (light blue) < Elite (dark blue) for your militia.
Admins are usually considered to be on the level of cops.


Re: New feature: Class specific gun/item choices[message #313972] Mon, 07 January 2013 02:39 Go to previous messageGo to next message
Clarkew

 
Messages:78
Registered:May 2011
Location: East Texas, USA
Thanks. fixing now

[Updated on: Mon, 07 January 2013 03:41] by Moderator

Re: New feature: Class specific gun/item choices[message #313996] Tue, 08 January 2013 05:26 Go to previous messageGo to next message
Clarkew

 
Messages:78
Registered:May 2011
Location: East Texas, USA
ClarkeW
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 #314190] Sat, 12 January 2013 23:17 Go to previous messageGo to next message
Flugente

 
Messages:3476
Registered:April 2009
Location: Germany
Whoa, someone volunteers to do xml work? Thank you sir, I will steal gladly use your work and put it in the trunk.

[Updated on: Sat, 12 January 2013 23:18] by Moderator



Re: New feature: Class specific gun/item choices[message #314204] Sun, 13 January 2013 00:51 Go to previous messageGo to next message
Clarkew

 
Messages:78
Registered:May 2011
Location: East Texas, USA
Thanks. you're welcome to it. heads up though. I've since revised it (at least in my gam. Admin has older weapons andcrevolvers, Elites have most expensive from each category, and regular has what's leftover in te stockv1.13 file. I'll post it here when i get home. works a little better imho.
Re: New feature: Class specific gun/item choices[message #314208] Sun, 13 January 2013 04:26 Go to previous messageGo to next message
Clarkew

 
Messages:78
Registered:May 2011
Location: East Texas, USA
These ones work a lot better, they use the stock 1.13 enemygunchoices.xml as a gun pool so you can use normal/tons of guns (hopefully)

Admin: Old stuff (WWII etc) and revolvers. I filled in holes (when I ended up with under ten guns on a level) from stock enemygunchoices two levels under current level (70% would fill gaps with guns from 50% in other words so there's no overlap)

Elite: New stuff, mostly HK's, some Steyr and the better sniper rifle from that level

Regular: Everything left over with holes filled from Elite one level under current level (So 90% would take weapons from the elite list at 80% if it was short)

Yet another set of XML's
Re: New feature: Class specific gun/item choices[message #314217] Sun, 13 January 2013 17:17 Go to previous messageGo to next message
Flugente

 
Messages:3476
Registered:April 2009
Location: Germany
Your xmls are now in GameDir 1591.


Re: New feature: Class specific gun/item choices[message #314846] Sun, 27 January 2013 20:18 Go to previous messageGo to next message
Thor

 
Messages:432
Registered:February 2007
Location: Belgium
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 #314876] Tue, 29 January 2013 01:16 Go to previous messageGo to next message
Flugente

 
Messages:3476
Registered:April 2009
Location: Germany
That would require some sort of xml-relation between guns and LBE, which does not exist. If one wants to bypass that, one would have to check wether a gun fits into LBE gear, and spawn only fitting gear... which would result in way too much backpacks spawning. Thus I see no easy way to do it, and thus I see no reason to at all.


Re: New feature: Class specific gun/item choices[message #314881] Tue, 29 January 2013 04:19 Go to previous messageGo to next message
Thor

 
Messages:432
Registered:February 2007
Location: Belgium
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.
Re: New feature: Class specific gun/item choices[message #315296] Sun, 10 February 2013 14:18 Go to previous message
DepressivesBrot

 
Messages:3745
Registered:July 2009
Hmm, I was just reordering some files according to that list and noticed that Pockets.xml makes absolutely no sense under Inventory. It's a part of the Item definitions. Looks like nobody actually read your list before agreeing Razz


Previous Topic: New feature: Easily applicable clothes
Next Topic: New feature: enemy assassins
Goto Forum:
  


Current Time: Wed Nov 20 16:21:55 EET 2019

Total time taken to generate the page: 0.01140 seconds