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 previous message
Flugente

 
Messages:3507
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

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
Previous Topic: New feature: Easily applicable clothes
Next Topic: New feature: apply items to/take items from other persons
Goto Forum:
  


Current Time: Tue Jan 28 14:38:16 GMT+2 2025

Total time taken to generate the page: 0.01167 seconds