Home » MODDING HQ 1.13 » v1.13 Modding, Customising, Editing » v1.13 Modding, Customising, Editing » WW2 Restricted Weapons (Cutting down the weapons list to WW2 only weapons)
|
|
|
Re: WW2 Restricted Weapons[message #365007 is a reply to message #365005]
|
Sat, 03 December 2022 23:58 ![Go to previous message Go to previous message](/theme/Bear_Classic_Brown/images/up.png)
|
|
MadMechanic |
![](/images/custom_avatars/14813.png) ![](/images/ranks/private_1stclass.png) |
Messages:20
Registered:November 2022 |
|
|
Hello everyone, I'm back with an update and a question.
In the interest of learning how to mod the files and assets of 1.13, I decided to go ahead with my own "WW2 Weapons Only" mod. Over the last couple days I have gone through the various tabledata xml files and deleted out every weapon I don't want to appear (deleted from both weapons.xml and items.xml) as well as ammo types and calibers that I don't want (like modern NATO calibers and ammo types like Glaser and AET).
The last thing I did was to modify the IMPItemChoices.xml file based on the new selection of weapons and equipment. For instance I changed the Default Items to the following:
<uiIndex>0</uiIndex>
<name>Default Items</name>
<ubChoices>8</ubChoices>
<ubNumItems>8</ubNumItems>
<bItemNo1>176</bItemNo1> <!-- Steel Helmet -->
<bItemNo2>1090</bItemNo2> <!-- LBE Gear -->
<bItemNo3>1094</bItemNo3> <!-- TIMS Backpack -->
<bItemNo4>1097</bItemNo4> <!-- TIMS Pack -->
<bItemNo5>1641</bItemNo5> <!-- Large Pistol Holster -->
<bItemNo6>8</bItemNo6> <!-- M1911A1 Pistol -->
<bItemNo7>80</bItemNo7> <!-- .45 ACP Pistol Magazine, 7-rounds -->
<bItemNo8>80</bItemNo8> <!-- .45 ACP Pistol Magazine, 7-rounds -->
The comments are for my own tracking/sanity as I go through this process.
My next step was to start the game, start a new game and create an IMP character. From there I deployed and checked their inventory. What I found was that they received 7 out of those 8 "Default Items", everything except ItemNo6, which is the M1911A1 handgun.
They had all the LBE gear, steel helmet, the pistol holster as well as the 2 spare pistol magazines. Everything was placed in their inventory correctly but the pistol was missing.
Any ideas what happened here? I made no changes to the M1911A1 weapon in items.xml or weapons.xml, it was left exactly as it is implemented in the latest 1.13 file package. I feel like I missed something somewhere like in another xml file but I am hoping someone here can chime in and tell me what I either don't know about or overlooked.
Thank you all for any help you can provide.
-MadMechanic
Report message to a moderator
|
Private 1st Class
|
|
|
|
|
|
|
|
|
Re: WW2 Restricted Weapons[message #365016 is a reply to message #365013]
|
Sun, 04 December 2022 21:45 ![Go to previous message Go to previous message](/theme/Bear_Classic_Brown/images/up.png)
|
|
MadMechanic |
![](/images/custom_avatars/14813.png) ![](/images/ranks/private_1stclass.png) |
Messages:20
Registered:November 2022 |
|
|
I have now started over with fresh files. A fresh installation of JA2 Gold from STEAM, fresh 1.13 official release + the patch.
I have gone back through the items.xml file and set all items I do not want to appear to "Nada" (I copied an existing "Nada" placeholder item to get the correct index parameters). I think I may have caused issues previously by straight deleting index items.
From there I have been tweaking the IMP Starting Gear and I also roughly changed the Regular Enemy Weapons table to only use weapons that are currently available.
So far so good overall. I still can't figure out why in my previous attempts at XML file edits I couldn't get weapons to properly populate in IMP mercenary inventories on creation, but for the time being right now it is working.
I haven't touched the weapons.xml file, I might be wrong about this but I figure that if a weapon is not listed in the items.xml file, then it just won't be available in-game, so there was really no reason at all for me to have edited the weapons xml file originally, I can just leave it alone.
My next task will be trying to figure out how to set enemy weapon/ammo access progression. When I ran my last test game (start new game, make an IMP merc, deploy) the enemies in the deployment sector were already using a mixture of normal 'ball' ammo as well as AP ammo, so that isn't right.
[Updated on: Sun, 04 December 2022 21:46] Report message to a moderator
|
Private 1st Class
|
|
|
|
|
|
|
Re: WW2 Restricted Weapons[message #365028 is a reply to message #365025]
|
Fri, 09 December 2022 18:52
|
|
MadMechanic |
![](/images/custom_avatars/14813.png) ![](/images/ranks/private_1stclass.png) |
Messages:20
Registered:November 2022 |
|
|
I'm still struggling with the issue of getting weapons to be issued when it seems like the game thinks there is no 'standard' ammo/magazine for the weapon. Here is my current example.
I'm moving weapons around in the items.xml for my own organizational purposes, and I'm also moving magazines around for the same reason. So here is my item index #1:
<ITEM>
<uiIndex>1</uiIndex>
<szItemName>Colt M1911A1</szItemName>
<szLongItemName>Colt M1911A1</szLongItemName>
<szItemDesc>The US Military standard issue sidearm. Chambered for .45 ACP.</szItemDesc>
<szBRName>Colt M1911A1</szBRName> <!-- Name in Bobby Ray's Website Catalog -->
<szBRDesc>The US Military standard issue sidearm. Chambered for .45 ACP.</szBRDesc>
<usItemClass>2</usItemClass> <!-- Item Lookup Class, 2 = Gun -->
<nasLayoutClass>1</nasLayoutClass> <!-- Weapons -->
<ubClassIndex>1</ubClassIndex> <!-- Index position in Weapons.xml -->
<ubCursor>3</ubCursor>
<ubGraphicNum>8</ubGraphicNum> <!-- Item Graphic -->
<ubWeight>11</ubWeight> <!-- Item weight in kg, 11 = 1.1 kg -->
<ubPerPocket>1</ubPerPocket> <!-- Allowable number of item per compatible pocket -->
<ItemSize>1</ItemSize>
<usPrice>700</usPrice>
<ubCoolness>2</ubCoolness>
<Damageable>1</Damageable>
<Repairable>1</Repairable>
<WaterDamages>1</WaterDamages>
<Metal>1</Metal>
<Sinks>1</Sinks>
<ShowStatus>1</ShowStatus>
<BR_NewInventory>5</BR_NewInventory>
<BR_UsedInventory>1</BR_UsedInventory>
<BR_ROF>30</BR_ROF>
<usOverheatingCooldownFactor>100.0</usOverheatingCooldownFactor>
<DamageChance>12</DamageChance>
<DirtIncreaseFactor>24.0</DirtIncreaseFactor>
<STAND_MODIFIERS />
<CROUCH_MODIFIERS />
<PRONE_MODIFIERS />
</ITEM>
Now this is really just the M1911 that is normally in index position 8 moved to position 1. I have also updated weapons.xml to correspond to the new index position:
<WEAPON>
<uiIndex>1</uiIndex>
<szWeaponName>Colt M1911A1</szWeaponName>
<ubWeaponClass>1</ubWeaponClass> <!-- 1 = Handgun -->
<ubWeaponType>1</ubWeaponType> <!-- 1 = Pistol -->
<ubCalibre>1</ubCalibre> <!-- Caliber, 45 ACP -->
<ubReadyTime>1</ubReadyTime>
<ubShotsPer4Turns>16.35</ubShotsPer4Turns>
<ubBulletSpeed>21</ubBulletSpeed>
<ubImpact>26</ubImpact>
<ubDeadliness>16</ubDeadliness>
<ubMagSize>7</ubMagSize> <!-- Magazine capacity -->
<usRange>100</usRange>
<usReloadDelay>200</usReloadDelay>
<BurstAniDelay>100</BurstAniDelay>
<ubAttackVolume>55</ubAttackVolume>
<ubHitVolume>3</ubHitVolume>
<sSound>413</sSound>
<sReloadSound>100</sReloadSound>
<sLocknLoadSound>106</sLocknLoadSound>
<SilencedSound>157</SilencedSound>
<bBurstAP>20</bBurstAP>
<APsToReload>12</APsToReload>
<SwapClips>1</SwapClips>
<MaxDistForMessyDeath>7</MaxDistForMessyDeath>
<ManualReloadSound>476</ManualReloadSound>
<nAccuracy>7</nAccuracy>
<ubAimLevels>2</ubAimLevels>
<Handling>1</Handling>
<usOverheatingJamThreshold>20000</usOverheatingJamThreshold>
<usOverheatingDamageThreshold>18000</usOverheatingDamageThreshold>
<usOverheatingSingleShotTemperature>60</usOverheatingSingleShotTemperature>
</WEAPON>
The uiIndex numbers match (which as I've read must be true for weapons, items.xml index number and weapons.xml index number must be the same).
I have restructured the calibers table (AmmoStrings.xml) so that .45 ACP is ammo string 1.
<AMMO>
<uiIndex>1</uiIndex>
<AmmoCaliber>.45 ACP</AmmoCaliber>
<BRCaliber>.45 ACP</BRCaliber>
</AMMO>
I also modified AmmoTypes.xml so that type 0 (previously just called 'Ball') is now 'FMJ'. Ammo Type 1 (previously 'HP') is now 'AP' (copied the AP ammo type data from position 2 to position 1.
I moved the normal .45 acp pistol mag from it's normal items index position to position 11 as follows:
<ITEM>
<uiIndex>11</uiIndex>
<szItemName>.45 Mag</szItemName>
<szLongItemName>.45 ACP FMJ Pistol Mag, 7 rds</szLongItemName>
<szItemDesc>US Military standard issue 230 grain .45 ACP FMJ loaded in a 7-round magazine for the Colt M1911A1 sidearm.</szItemDesc>
<szBRName>.45 FMJ Mag</szBRName>
<szBRDesc>US Military standard issue 230 grain .45 ACP FMJ Loaded in a 7-round magazine for the Colt M1911A1 sidearm.</szBRDesc>
<usItemClass>1024</usItemClass> <!-- 1024 = Ammo -->
<nasLayoutClass>1</nasLayoutClass> <!-- 1 = Weapons -->
<ubClassIndex>1</ubClassIndex> <!-- Magazines.xml Index Position -->
<ubGraphicType>1</ubGraphicType>
<ubGraphicNum>14</ubGraphicNum>
<ubWeight>2</ubWeight> <!-- Item weight in kg, 2 = 0.2 kg -->
<ubPerPocket>8</ubPerPocket>
<ItemSize>12</ItemSize>
<usPrice>10</usPrice>
<ubCoolness>2</ubCoolness>
<Metal>1</Metal>
<Sinks>1</Sinks>
<usOverheatingCooldownFactor>100.0</usOverheatingCooldownFactor>
<STAND_MODIFIERS />
<CROUCH_MODIFIERS />
<PRONE_MODIFIERS />
</ITEM>
I also stripped the magazines.xml file WAY down and started creating magazine positions. The new .45 acp pistol mag, 7 rounds is now magazine index 1 as follows:
<MAGAZINE>
<uiIndex>1</uiIndex> <!-- .45 ACP FMJ, 7 rounds, for use with Colt M1911A1 -->
<ubCalibre>1</ubCalibre> <!-- .45 ACP -->
<ubMagSize>7</ubMagSize> <!-- Magazine Capacity -->
<ubAmmoType>0</ubAmmoType> <!-- FMJ -->
<ubMagType>0</ubMagType> <!-- Magazine -->
</MAGAZINE>
You can see that I changed the ubClassIndex for the magazine item to 1.
At this point I can successfully force the magazine item to be issued during IMP creation using the IMPItemChoices default gear section as follows:
<IMPITEMCHOICES>
<uiIndex>0</uiIndex>
<name>Default Items</name>
<ubChoices>6</ubChoices>
<ubNumItems>6</ubNumItems>
<bItemNo1>176</bItemNo1> <!-- Steel Helmet -->
<bItemNo2>1090</bItemNo2> <!-- LBE Gear -->
<bItemNo3>1097</bItemNo3> <!-- TIMS Pack -->
<bItemNo4>1091</bItemNo4> <!-- Holster, lbeIndex 16 -->
<bItemNo5>1</bItemNo5> <!-- Colt M1911A1 -->
<bItemNo6>11</bItemNo6> <!-- .45 ACP FMJ Mag, 7-rounds -->
<bItemNo7>0</bItemNo7>
<bItemNo8>0</bItemNo8>
<bItemNo9>0</bItemNo9>
But the game stubbornly refuses to issue the actual gun itself. The only thing I can think of, or that I keep coming back to is that the game now thinks (for some reason) that there is no compatible 'default' ammo/magazine for the weapon and therefore won't issue it. From that I have to assume that there is another look-up or association table or setting somewhere in another xml file (or maybe even an ini file) that specifies the default ammo/magazine for a given weapon, but for the life of me I cannot figure out where that would be.
All of my xml code lines up, it should all work, but the game just refuses to issue the weapon. This is the same issue I have been having when trying to create the M1919 machine gun chambered for .30-06. I could create the magazine (ammo belt) item and get the game to issue it, but it would never issue the weapon itself.
Does anyone have any ideas at this point?
Thank you.
-MadMechanic
Report message to a moderator
|
Private 1st Class
|
|
|
Goto Forum:
Current Time: Wed Feb 05 08:56:57 GMT+2 2025
Total time taken to generate the page: 0.01118 seconds
|