Home » MODDING HQ 1.13 » v1.13 Modding, Customising, Editing » v1.13 Weapon & Item Refinement » MG3 to MG42 Conversion
MG3 to MG42 Conversion[message #361080] Tue, 01 September 2020 16:34 Go to next message
rattus is currently offline rattus

 
Messages:33
Registered:March 2003
I thought I would convert the in-game MG3 to the MG42. So I edited the items XML and the Weapons XML to rename it and use 7.92x57. I set it to 250 round belt (or a 50 round saddle mag would also be nice).Great the only defined magazines are the 5 round clip, 50 round box (the box you buy from BRs)and ??000 round crate. I can load up with 5 round clips tobut the game thinks the gun has a crate attached (14kgs worth with only 100 rounds. The crate can be ejected but if you try to reinsert it there is an assertion error. I think what I need to do is define a new magazine for the gun with a "belt" image for HP and AP/FMJ. That is where I am stuck. I don't know how the gun links to the particular magazine and I'm not sure if I insert lines into the XML that it won't just bugger up item numbers for all the subsequent magazines. And for a later trick I would like to add the old style rifle grenade launcher to an FG42 but hay - baby steps!.
Regards
R

Report message to a moderator

Private 1st Class
Re: MG3 to MG42 Conversion[message #361134 is a reply to message #361080] Sun, 06 September 2020 13:20 Go to previous messageGo to next message
rattus is currently offline rattus

 
Messages:33
Registered:March 2003
Success. I need to tweak the weight of the magazine and the ROF slightly. Hmm I wonder if I could add tracer and match/boat tail ammo.

Report message to a moderator

Private 1st Class
Re: MG3 to MG42 Conversion[message #361152 is a reply to message #361134] Mon, 07 September 2020 15:25 Go to previous messageGo to next message
SinMachina is currently offline SinMachina

 
Messages:48
Registered:August 2020
As long as you flag it correctly as that type of ammo, you can do whatever you like.

Report message to a moderator

Corporal
Re: MG3 to MG42 Conversion[message #361218 is a reply to message #361152] Thu, 10 September 2020 16:08 Go to previous messageGo to next message
rattus is currently offline rattus

 
Messages:33
Registered:March 2003
Excellent - also done. weight is now right for the 250 round belt/tin and the tracer and match ammo added - just need to do the 50 round saddle mag.

Report message to a moderator

Private 1st Class
Re: MG3 to MG42 Conversion[message #361226 is a reply to message #361218] Fri, 11 September 2020 02:34 Go to previous messageGo to next message
SinMachina is currently offline SinMachina

 
Messages:48
Registered:August 2020
When you are done, could you upload your changes here? I'm sure someone else would love to play with a new gun and associated kit.

Report message to a moderator

Corporal
Re: MG3 to MG42 Conversion[message #361344 is a reply to message #361226] Sun, 20 September 2020 15:27 Go to previous messageGo to next message
rattus is currently offline rattus

 
Messages:33
Registered:March 2003
I think all done - added the saddle mags and spare barrel. will upload shortly - but would like to add slot for optical sight on gun - any idea how?

Report message to a moderator

Private 1st Class
Re: MG3 to MG42 Conversion[message #361348 is a reply to message #361344] Mon, 21 September 2020 15:42 Go to previous messageGo to next message
rattus is currently offline rattus

 
Messages:33
Registered:March 2003
Hmm I don't think the saddle mags will work because they will just convert into belt for the gun. I think I would need to either permanently change the mag size via an C-Mag adaptor - but with a negative modifier to reduce it down to 50, which is probably not possible, and even then it should actually be interchangeable with the 250 round belt feed (since it is really a 50 round belt in the saddle mag). Alternatively, I could start with the sadlle mag and use the c-mag adaptor process to permanently make it a 250 round belt. Not at all sure my technical skills go that far. Also, pending being able to add scope slots to the MG3, I may have to use the HK21 instead, which I understand already has the slots - but I would maybe like to limit the sight options - but I don't know how that bit works yet.

Report message to a moderator

Private 1st Class
Re: MG3 to MG42 Conversion[message #361361 is a reply to message #361348] Wed, 23 September 2020 14:04 Go to previous messageGo to next message
rattus is currently offline rattus

 
Messages:33
Registered:March 2003
Okay, added the ZF42 sight to the MG42 (not quite the right scope but close enough). I think the best way forward from here is either to leave it as 250 round belt only, or start with 50 round saddle mag, then use something like a C-mag adapter to increase it to 250 rounds - at which point it should be permanently set to belt. So you have to make a choice whether to leave it in assault configuration or not. If someone can point me to a thread on how to use (edit) the C-mag adapter system to change the mag type/size that would really help.

Report message to a moderator

Private 1st Class
Re: MG3 to MG42 Conversion[message #361379 is a reply to message #361361] Sat, 26 September 2020 14:19 Go to previous messageGo to next message
rattus is currently offline rattus

 
Messages:33
Registered:March 2003
#@$$@#$@!!!!! Sight shows as attachable in BRs and slot is now their on weapon (and says can attach ZF42 to it but get a can't attach to slot message when I try to do it..... angry Help!

Report message to a moderator

Private 1st Class
Re: MG3 to MG42 Conversion[message #364992 is a reply to message #361080] Fri, 25 November 2022 13:19 Go to previous messageGo to next message
rattus is currently offline rattus

 
Messages:33
Registered:March 2003
Getting back into JA2UC - would like to solve the sight issue for the MG42 conversion if anyone has any ideas?
Regards
Ratty.

Report message to a moderator

Private 1st Class
Re: MG3 to MG42 Conversion[message #365021 is a reply to message #364992] Tue, 06 December 2022 02:17 Go to previous messageGo to next message
MadMechanic is currently offline MadMechanic

 
Messages:20
Registered:November 2022
Hello Rattus.

What you are doing is is pretty well exactly what I'm trying to do in my game but I'm having issues. I'm trying to change the Browning M1919 A6 from it's current in-game caliber (7.62x51mm NATO) to the correct .30-06. Here is what I've done so far and I cannot figure out why this isn't working.

The first thing I did was to copy the index entry for the M1919A6 within items.xml from it's existing index position of 627 to an unused index position, in my case I used position 942. Item Index 942 from 1.13 is set as a 'Nada' item. From there I started making my changes as follows:

<ITEM>
<uiIndex>942</uiIndex>
<szItemName>M1919</szItemName>
<szLongItemName>Browning M1919</szLongItemName>
<szItemDesc>US Military general purpose machine gun, chambered for .30-06.</szItemDesc>
<szBRName>Browning M1919</szBRName>
<szBRDesc>US Military general purpose machine gun, chambered for .30-06.</szBRDesc>
<usItemClass>2</usItemClass> <!-- weapon -->
<nasLayoutClass>1</nasLayoutClass>
<ubClassIndex>942</ubClassIndex> <!-- points to index #942 in weapons xml -->
<ItemFlag>128</ItemFlag> <!-- Belt Fed -->
<ubCursor>3</ubCursor>
<ubGraphicNum>205</ubGraphicNum>
<ubWeight>147</ubWeight>
<ItemSize>9</ItemSize>
<usPrice>7182</usPrice>
<ubCoolness>6</ubCoolness>
<bRepairEase>1</bRepairEase>
<Damageable>1</Damageable>
<Repairable>1</Repairable>
<WaterDamages>1</WaterDamages>
<Metal>1</Metal>
<Sinks>1</Sinks>
<ShowStatus>1</ShowStatus>
<TwoHanded>1</TwoHanded>
<BigGunList>1</BigGunList>
<Unaerodynamic>1</Unaerodynamic>
<BR_NewInventory>3</BR_NewInventory>
<BR_UsedInventory>1</BR_UsedInventory>
<BR_ROF>500</BR_ROF>
<DefaultAttachment>209</DefaultAttachment>
<usOverheatingCooldownFactor>100.0</usOverheatingCooldownFactor>
<DamageChance>10</DamageChance>
<DirtIncreaseFactor>20.0</DirtIncreaseFactor>
<STAND_MODIFIERS />
<CROUCH_MODIFIERS />
<PRONE_MODIFIERS />
</ITEM>

Next I went into the Weapons.xml file and created a new entry at Index position 942 as follows. I accomplished this by copying the information for the existing M1919A6 and editing:

<WEAPON>
<uiIndex>942</uiIndex>
<szWeaponName>Browning M1919</szWeaponName>
<ubWeaponClass>4</ubWeaponClass>
<ubWeaponType>7</ubWeaponType>
<ubCalibre>46</ubCalibre> <!-- .30-06 caliber -->
<ubReadyTime>26</ubReadyTime>
<ubShotsPer4Turns>13.18</ubShotsPer4Turns>
<ubBurstPenalty>6</ubBurstPenalty>
<ubBulletSpeed>22</ubBulletSpeed>
<ubImpact>38</ubImpact>
<ubDeadliness>56</ubDeadliness>
<bAccuracy>5</bAccuracy>
<ubMagSize>100</ubMagSize> <!-- Corresponds to accepted magazine/belt size -->
<usRange>670</usRange>
<usReloadDelay>200</usReloadDelay>
<BurstAniDelay>60</BurstAniDelay>
<ubAttackVolume>77</ubAttackVolume>
<ubHitVolume>7</ubHitVolume>
<sSound>351</sSound>
<sBurstSound>43</sBurstSound>
<sSilencedBurstSound>127</sSilencedBurstSound>
<sReloadSound>104</sReloadSound>
<sLocknLoadSound>110</sLocknLoadSound>
<SilencedSound>157</SilencedSound>
<bBurstAP>14</bBurstAP>
<bAutofireShotsPerFiveAP>2</bAutofireShotsPerFiveAP>
<APsToReload>32</APsToReload>
<SwapClips>1</SwapClips>
<MaxDistForMessyDeath>13</MaxDistForMessyDeath>
<AutoPenalty>7</AutoPenalty>
<NoSemiAuto>1</NoSemiAuto>
<ManualReloadSound>476</ManualReloadSound>
<nAccuracy>82</nAccuracy>
<bRecoilX>2</bRecoilX>
<bRecoilY>10</bRecoilY>
<ubAimLevels>7</ubAimLevels>
<Handling>26</Handling>
<usOverheatingJamThreshold>40000</usOverheatingJamThreshold>
<usOverheatingDamageThreshold>21000</usOverheatingDamageThreshold>
<usOverheatingSingleShotTemperature>140</usOverheatingSingleShotTemperature>
</WEAPON>

Next I need the actual ammo belt 'magazine' item, so back over on Items.xml I used index position 944 (also an unused 'Nada' position by default) and copied the information for the 7.62x51mm AP Belt from position 125 to speed things up. Here is the Items.xml entry:

<ITEM>
<uiIndex>944</uiIndex>
<szItemName>.30-06 Belt AP</szItemName>
<szLongItemName>.30-06 Belt, AP</szLongItemName>
<szItemDesc>This belt contains 100 rounds of standard .30-06 AP ammo.</szItemDesc>
<szBRName>.30-06 Belt AP</szBRName>
<szBRDesc>This belt contains 100 rounds of standard .30-06 AP ammo.</szBRDesc>
<usItemClass>1024</usItemClass> <!-- Item Class, Ammo -->
<nasLayoutClass>1</nasLayoutClass>
<ubClassIndex>604</ubClassIndex> <!-- Points to index #604 in magazines xml -->
<ItemFlag>256</ItemFlag> <!-- Item Flag, Ammo Belt -->
<ubGraphicType>1</ubGraphicType>
<ubGraphicNum>164</ubGraphicNum> <!-- icon graphic -->
<ubWeight>33</ubWeight>
<ItemSize>27</ItemSize>
<usPrice>750</usPrice>
<ubCoolness>6</ubCoolness>
<Metal>1</Metal>
<Sinks>1</Sinks>
<usOverheatingCooldownFactor>100.0</usOverheatingCooldownFactor>
<STAND_MODIFIERS />
<CROUCH_MODIFIERS />
<PRONE_MODIFIERS />
</ITEM>

Next I went into Magazines.xml and created magazine index position 604 as follows:

<MAGAZINE>
<uiIndex>604</uiIndex> <!-- .30-06 AP, 100 round belt -->
<ubCalibre>46</ubCalibre> <!-- Caliber .30-06 -->
<ubMagSize>100</ubMagSize> <!-- 100 rounds -->
<ubAmmoType>2</ubAmmoType> <!-- AP/FMJ -->
<ubMagType>0</ubMagType> <!-- Magazine -->
</MAGAZINE>

Now, as far as I can tell, this is all I should need to do to get this to work. At this point I have the weapon entry in both Items.xml and Weapons.xml starting with the 1.13 version of the M1919A6 as a base so that all I'm really doing is changing things like the name, the description and the caliber. Magazine size is staying the same at 100 round with the fed type set as belt. The magazine item entry in items.xml is also correspondingly set as an ammo belt and the magazines.xml entry is set at the corresponding 100 rounds size.

Based on my understanding of how all these xml files interact with each other, this should all work. However, when I then go to the IMPItemChoices.xml file and set the default items to include the new weapon item 942 and then launch the game to test by creating an IMP merc, the weapon fails to show up in their inventory. Here is my code for the IMPItemChoices.xml:

<IMPITEMCHOICES>
<uiIndex>0</uiIndex>
<name>Default Items</name>
<ubChoices>5</ubChoices>
<ubNumItems>5</ubNumItems>
<bItemNo1>176</bItemNo1> <!-- Steel Helmet -->
<bItemNo2>1090</bItemNo2> <!-- LBE Gear -->
<bItemNo3>1097</bItemNo3> <!-- TIMS Pack -->
<bItemNo4>1091</bItemNo4> <!-- Holster, lbeIndex 16 -->
<bItemNo5>942</bItemNo5> <!-- M1919 machine gun -->
<bItemNo6>0</bItemNo6>
<bItemNo7>0</bItemNo7>
<bItemNo8>0</bItemNo8>
<bItemNo9>0</bItemNo9>

I have the number of possible choices set to 5 as well as the number of items set to 5 with 5 items in the list.

So I feel like there is something I don't know that I'm supposed to do in addition to the changes I've already made. Any ideas?

Thank you for any help you can provide.

-MadMechanic

Report message to a moderator

Private 1st Class
Re: MG3 to MG42 Conversion[message #365027 is a reply to message #365021] Fri, 09 December 2022 08:04 Go to previous messageGo to next message
rattus is currently offline rattus

 
Messages:33
Registered:March 2003
I've solved the sight issue (attachments definition missing) and now also added the conversion to JA2/UC Hybrid. I also converted the Wildey Survivor into a Webley & Scott 455 Mk IV with 6" barrel, created a new .455 ammo calibre and a new ammo type - "Manstopper" just for the 455 (with a nice distinctive purple colour to distinquish it from Red AP, Blue hollow point etc). Dumb question you are editing the xml files in the Ja2\Data-1.13\TableData folder? except for the impitemchoice file in \Inventory.
I had terrible trouble isolating its non-appearance which I solved only by reverting one of the series of entries I can't remember which) back to vanilla JA2 1.13 and then reediting it. I would have it selectable in the IMP generation scheme but not appear in game.
I would add an extra item choice for you to select (a belt of AP/FMJ) for your IMP and if you "buy" a box of that and it appears but the gun does not then we had the same issue. FWIW BRs will not stock new weapons or ammo until you start a new game. Also the primary index number in each list must be in order or it won't work reliably. I use XML notepad and Notepad++ interchangeably to do my editing. I would use the next free index (rather than an NADA item) in case something in-game calls that NADA item.

I'm going to assume that ammo type 46 comes in single, 50 box, 100 belt [your new magazine size] and 2500 crate. By default there is also a mag type [0] of 8 rounds (presumably for the Garand). I do not know if that is the issue. The Mauser 98K uses a 5 round mag type 1 so there is no conflict for 7.92x57. See if you can at least get a belt (of AP/FMJ) to appear as purchasable in IMP generation and let me know. Vague chance that commonality in starting string in naming "Browning 1919" is an issue - I don't know if the game reads the whole string or just stops at a certain number of characters.
Let me know how you go.
Regards
Rattus
Regards

Report message to a moderator

Private 1st Class
Re: MG3 to MG42 Conversion[message #365031 is a reply to message #365027] Sun, 11 December 2022 02:04 Go to previous messageGo to next message
MadMechanic is currently offline MadMechanic

 
Messages:20
Registered:November 2022
Hi Rattus, thank you for responding to my question(s).

rattus wrote on Fri, 09 December 2022 08:04
Dumb question you are editing the xml files in the Ja2\Data-1.13\TableData folder? except for the impitemchoice file in \Inventory.
Fair question, and yes I am editing the xml files found in data-1.13\TableData and it's sub-folders.

I am using Notepad++ exclusively, mostly because I've used it before and it's what I know.


rattus wrote on Fri, 09 December 2022 08:04
Also the primary index number in each list must be in order or it won't work reliably.
No issues there, I have been keeping index numbers in order across all XML files I have edited mostly because of my own 'OCD'.


rattus wrote on Fri, 09 December 2022 08:04
I would use the next free index (rather than an NADA item) in case something in-game calls that NADA item.
Understandable, but my ultimate goal is to actually cut down the weapons, items and equipment offered in-game significantly down to WW2 era stuff, so in order to stop the game (militia, enemies, Bobby Ray's) from using the massive selection of weapons and equipment that 1.13 adds, I have been setting a lot of items.xml index positions to NADA. There are some items I have left alone because I know from experience playing 1.13 through the entire arulco campaign that there are some scripted things that rely on items (like tank cannons).


rattus wrote on Fri, 09 December 2022 08:04
I'm going to assume that ammo type 46 comes in single, 50 box, 100 belt [your new magazine size] and 2500 crate. By default there is also a mag type [0] of 8 rounds (presumably for the Garand). I do not know if that is the issue. The Mauser 98K uses a 5 round mag type 1 so there is no conflict for 7.92x57. See if you can at least get a belt (of AP/FMJ) to appear as purchasable in IMP generation and let me know. Vague chance that commonality in starting string in naming "Browning 1919" is an issue - I don't know if the game reads the whole string or just stops at a certain number of characters.
Let me know how you go.
I have been able to get the game to issue specific magazines I have 'coded' of specific calibers and ammo types, but still have not been able to get the game to issue a gun during IMP creation using the IMPGearChoices default items section.

I've been posting up code sections on another post found here specific to what I'm trying to do.
http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=25097&start=0&

Thank you for any help, this is really frustrating me that I can't get the game to issue weapons even though the correct ammo/magazine items exist. I keep feeling like there is some other file buried somewhere that stipulates what the default ammo type is for a given weapon. I'm pretty confident that the game can't require ever caliber to have magazines for ever ammo type because if you look at the M1 Carbine which uses the 30 Car round, there is only AP and HP ammo for this. No cold loads or ball ammo.

[Updated on: Sun, 11 December 2022 02:04]

Report message to a moderator

Private 1st Class
Re: MG3 to MG42 Conversion[message #365032 is a reply to message #365031] Sun, 11 December 2022 10:48 Go to previous messageGo to next message
rattus is currently offline rattus

 
Messages:33
Registered:March 2003
I looks like you have the same issue I had. The issue was in the Weapons file (the new/converted weapon) or the Items file for that weapon. I use XML notepad as it is a good way of checking the structure at a glance. Other things I noted was the occasional missing "/<Item>" or "<Item>" due to copy/paste errors or (although it should not make a difference) on the same line... but then the using notepad++ you can sometimes get them under the wrong cascade. I take it you are getting everything you want in the IMP item choices to appear but not the MG itself? It really is useful to know if you can get a 100 round belt of 3006 to appear in your selection. If you are let me know and I will see if I can either replicate the issue or make it work.
Regards
Ratty
Oh, one more thing, the editors keep a temp version of the last file edited and its important to close all but the one you actually want to edit or you can end up overwriting amended files. Usually it will give you a warning about reloading the changed file but YAMMV.

[Updated on: Sun, 11 December 2022 11:03]

Report message to a moderator

Private 1st Class
Re: MG3 to MG42 Conversion[message #365037 is a reply to message #365032] Sun, 11 December 2022 21:03 Go to previous messageGo to next message
MadMechanic is currently offline MadMechanic

 
Messages:20
Registered:November 2022
rattus wrote on Sun, 11 December 2022 10:48
I looks like you have the same issue I had. The issue was in the Weapons file (the new/converted weapon) or the Items file for that weapon. I use XML notepad as it is a good way of checking the structure at a glance. Other things I noted was the occasional missing "/<Item>" or "<Item>" due to copy/paste errors or (although it should not make a difference) on the same line... but then the using notepad++ you can sometimes get them under the wrong cascade. I take it you are getting everything you want in the IMP item choices to appear but not the MG itself? It really is useful to know if you can get a 100 round belt of 3006 to appear in your selection. If you are let me know and I will see if I can either replicate the issue or make it work.
Regards
Ratty
Oh, one more thing, the editors keep a temp version of the last file edited and its important to close all but the one you actually want to edit or you can end up overwriting amended files. Usually it will give you a warning about reloading the changed file but YAMMV.
Yes, I can force the .30-06 AP ammo belt item to be issued during IMP merc creation, still cannot get the weapon (or any of the weapons I have been messing with) to be issued.

I am not using an existing save for my item testing. Instead I'm making XML file changes, saving the files, launching the game and then selecting start new game to then create a new IMP merc to see if I can get items to be issued via the IMPGearChoice xml file. So far I can consistently force issue any magazine of any caliber and ammo type I want, but I can't get any weapons to be issued.

This morning I installed XML Notepad to see if I could spot an issue with my files and I don't think there are any issues with missing lines like a closing </item>.

Report message to a moderator

Private 1st Class
Re: MG3 to MG42 Conversion[message #365039 is a reply to message #365037] Mon, 12 December 2022 09:09 Go to previous messageGo to next message
MadMechanic is currently offline MadMechanic

 
Messages:20
Registered:November 2022
Here is my code for the Browning MG:

From Items.xml
<ITEM>
<uiIndex>7</uiIndex>
<szItemName>M1919 A6</szItemName>
<szLongItemName>Browning M1919 A6</szLongItemName>
<szItemDesc>Simple and reliable (if heavy) the A6's firepower was favored by American paratroopers during WW2.</szItemDesc>
<szBRName>Browning M1919 A6</szBRName>
<szBRDesc>An oldie but goodie with a high rate of fire, this classic belt-fed LMG will answer all your offensive and defensive needs.</szBRDesc>
<usItemClass>2</usItemClass>
<nasLayoutClass>1</nasLayoutClass>
<ubClassIndex>7</ubClassIndex>
<ItemFlag>128</ItemFlag>
<ubCursor>3</ubCursor>
<ubGraphicNum>205</ubGraphicNum>
<ubWeight>147</ubWeight>
<ItemSize>9</ItemSize>
<usPrice>7182</usPrice>
<ubCoolness>6</ubCoolness>
<bRepairEase>1</bRepairEase>
<Damageable>1</Damageable>
<Repairable>1</Repairable>
<WaterDamages>1</WaterDamages>
<Metal>1</Metal>
<Sinks>1</Sinks>
<ShowStatus>1</ShowStatus>
<TwoHanded>1</TwoHanded>
<BigGunList>1</BigGunList>
<Unaerodynamic>1</Unaerodynamic>
<BR_NewInventory>3</BR_NewInventory>
<BR_UsedInventory>1</BR_UsedInventory>
<BR_ROF>500</BR_ROF>
<DefaultAttachment>209</DefaultAttachment>
<usOverheatingCooldownFactor>100.0</usOverheatingCooldownFactor>
<DamageChance>10</DamageChance>
<DirtIncreaseFactor>20.0</DirtIncreaseFactor>
<STAND_MODIFIERS />
<CROUCH_MODIFIERS />
<PRONE_MODIFIERS />
</ITEM>
This is a straight cut and relocate of the 1.13 Browning M1919A6 from it's standard position at 627 to it's new position at 7. The only other thing to change here is <ubClassIndex> being changed to 7 to correspond to Weapons.xml

Here is the Weapons.xml code
<WEAPON>
<uiIndex>7</uiIndex>
<szWeaponName>Browning M1919 A6</szWeaponName>
<ubWeaponClass>4</ubWeaponClass>
<ubWeaponType>7</ubWeaponType>
<ubCalibre>46</ubCalibre>
<ubReadyTime>26</ubReadyTime>
<ubShotsPer4Turns>13.18</ubShotsPer4Turns>
<ubBurstPenalty>6</ubBurstPenalty>
<ubBulletSpeed>22</ubBulletSpeed>
<ubImpact>38</ubImpact>
<ubDeadliness>56</ubDeadliness>
<bAccuracy>5</bAccuracy>
<ubMagSize>100</ubMagSize>
<usRange>670</usRange>
<usReloadDelay>200</usReloadDelay>
<BurstAniDelay>60</BurstAniDelay>
<ubAttackVolume>77</ubAttackVolume>
<ubHitVolume>7</ubHitVolume>
<sSound>351</sSound>
<sBurstSound>43</sBurstSound>
<sSilencedBurstSound>127</sSilencedBurstSound>
<sReloadSound>104</sReloadSound>
<sLocknLoadSound>110</sLocknLoadSound>
<SilencedSound>157</SilencedSound>
<bBurstAP>14</bBurstAP>
<bAutofireShotsPerFiveAP>2</bAutofireShotsPerFiveAP>
<APsToReload>32</APsToReload>
<SwapClips>1</SwapClips>
<MaxDistForMessyDeath>13</MaxDistForMessyDeath>
<AutoPenalty>7</AutoPenalty>
<NoSemiAuto>1</NoSemiAuto>
<ManualReloadSound>476</ManualReloadSound>
<nAccuracy>82</nAccuracy>
<bRecoilX>2</bRecoilX>
<bRecoilY>10</bRecoilY>
<ubAimLevels>7</ubAimLevels>
<Handling>26</Handling>
<usOverheatingJamThreshold>40000</usOverheatingJamThreshold>
<usOverheatingDamageThreshold>21000</usOverheatingDamageThreshold>
<usOverheatingSingleShotTemperature>140</usOverheatingSingleShotTemperature>
</WEAPON>

Index position 7 (same as in items.xml) <ubCalibre> set to 46 (.30-06), magsize is 100. Otherwise, no changes.

For the ammo belt 'magazine', starting with Items.xml
<ITEM>
<uiIndex>11</uiIndex>
<szItemName>.30-06 Belt AP</szItemName>
<szLongItemName>.30-06 Belt, AP</szLongItemName>
<szItemDesc>This belt contains 100 rounds of standard .30-06 AP ammo.</szItemDesc>
<szBRName>.30-06 Belt AP</szBRName>
<szBRDesc>This belt contains 100 rounds of standard .30-06 AP ammo.</szBRDesc>
<usItemClass>1024</usItemClass> <!-- Item Class, Ammo -->
<nasLayoutClass>1</nasLayoutClass>
<ubClassIndex>9</ubClassIndex> <!-- Points to index #9 in magazines xml -->
<ItemFlag>256</ItemFlag> <!-- Item Flag, Ammo Belt -->
<ubGraphicType>1</ubGraphicType>
<ubGraphicNum>164</ubGraphicNum> <!-- icon graphic -->
<ubWeight>33</ubWeight>
<ItemSize>27</ItemSize>
<usPrice>750</usPrice>
<ubCoolness>6</ubCoolness>
<Metal>1</Metal>
<Sinks>1</Sinks>
<usOverheatingCooldownFactor>100.0</usOverheatingCooldownFactor>
<STAND_MODIFIERS />
<CROUCH_MODIFIERS />
<PRONE_MODIFIERS />
</ITEM>

This is a cut/paste/modify of the 7.62x51mm AP ammo belt in standard 1.13 (found at items.xml index position 125). Changes made are to the flavor text as well as the <ubClassIndex> now being set to position 9.

And here is Magazines.xml
<MAGAZINE>
<uiIndex>9</uiIndex>
<ubCalibre>46</ubCalibre> <!-- Caliber -->
<ubMagSize>100</ubMagSize> <!-- Magazine Capacity -->
<ubAmmoType>1</ubAmmoType> <!-- Ammo Type, FMJ, AP, etc -->
<ubMagType>0</ubMagType> <!-- Magazine Type -->
</MAGAZINE>

In my AmmoTypes.xml I moved the AP ammo to position 1, eliminating the HP ammo type.

With all of this done, I can get the game to issue the ammo belt during IMP merc creation using IMPItemChoices.xml Default Items list. But the game will not issue the weapon.

Report message to a moderator

Private 1st Class
Re: MG3 to MG42 Conversion[message #365040 is a reply to message #365039] Mon, 12 December 2022 11:19 Go to previous messageGo to next message
rattus is currently offline rattus

 
Messages:33
Registered:March 2003
I'll test something, just a hunch and let you know.

Report message to a moderator

Private 1st Class
Re: MG3 to MG42 Conversion[message #365041 is a reply to message #365040] Tue, 13 December 2022 03:43 Go to previous messageGo to next message
MadMechanic is currently offline MadMechanic

 
Messages:20
Registered:November 2022
rattus wrote on Mon, 12 December 2022 11:19
I'll test something, just a hunch and let you know.
Thank you, I appreciate it.

In the meantime I decided to try another test to see if I could issue the browning MG to an AIM merc as part of their hiring kit. The answer was yes.

I happened to use Hitman and as part of his default kit I set the weapon option to the Browning MG and it showed up in his kit preview on the hiring screen.

So, this leads me to believe there is an issue with issuing custom and/or modified weapons to IMP mercs for some strange reason.

Thoughts?

-MadMechanic

Report message to a moderator

Private 1st Class
Re: MG3 to MG42 Conversion[message #365042 is a reply to message #361080] Tue, 13 December 2022 11:46 Go to previous messageGo to next message
rattus is currently offline rattus

 
Messages:33
Registered:March 2003
I was going to rule out NADA substitution, minor syntax/formatting errors and then either impermissible values or excess string lengths in descriptions.
But since it appears in game that isnt the issue. Excellent news.

IIRC JA21.13 has certain for your special IMP, some default Items some options available through the select gear screen. i don't recall if they had gear packages like AIM mercs though. instead you get to hand pick from the individual items appearing in the screen (and obviously defined in impitemchoices.)
AIM mercs however have 0 to 6 gear packages which you can pick from defined in the ?Mercitems file. I can't remember the exact names and I'm interstate with work for few days so can't check. I'm guessing you altered the one of the gear kits for hitman.

On top of this some items are available based your IMPs traits and skills, eg auto weapons and auto weapons expert (IIRC called machine gunner in JA2 1.13).
I assume that what appears in the selection screen for an IMP is a combo of both satandardd options plus and skill based ones. This was certinly what I saw.

The LMG is a big item and needs to go in the main hand or an equivqalent slot. IIRC whilst the gear packages have a format that allows item number then numbers of that item, (eg Luger pistol, 1, ammo clips, two etc.) the imp itemchoices did not appear to have a number line.

For the MG42 I made it an option only for an IMP with auto weapons expert.
For the 455 Webley & Scott I made it a default item choice for every IMP Merc. Let me just post this then look at your impitemchoices file.

Report message to a moderator

Private 1st Class
Re: MG3 to MG42 Conversion[message #365043 is a reply to message #365042] Tue, 13 December 2022 12:11 Go to previous messageGo to next message
rattus is currently offline rattus

 
Messages:33
Registered:March 2003
until Thusday when I get back to check my impitemchoices files my thoughts would be:
1) impitemchoices are out of order possibly, move 942 to the correct (second) place in the list after the helmet.
2) place your belt buy option as the next one. curse loudly if it is out of sequence.4) check the RH column of options in game case it is not showing by default and you need to click on the drop down to bring it up.
5) choose NO skills/attributes. nothing should conflict - probably doesnt anyway.
6) let the imp choices exceed the actual items....something about guns and ammo inherent to any weapon you get and probably unnecessary.

I really hope it works 'cos I know just how maddening it is.
BTW I could not get it MG42 to appear with an AIM until it appeared with me. then we both had it. Prior to that it would appaer as selectable in game but not appear with the imp when game lunched.

Report message to a moderator

Private 1st Class
Re: MG3 to MG42 Conversion[message #365044 is a reply to message #365043] Tue, 13 December 2022 18:25 Go to previous messageGo to next message
MadMechanic is currently offline MadMechanic

 
Messages:20
Registered:November 2022
rattus wrote on Tue, 13 December 2022 12:11
until Thusday when I get back to check my impitemchoices files my thoughts would be:
1) impitemchoices are out of order possibly, move 942 to the correct (second) place in the list after the helmet.
2) place your belt buy option as the next one. curse loudly if it is out of sequence.4) check the RH column of options in game case it is not showing by default and you need to click on the drop down to bring it up.
5) choose NO skills/attributes. nothing should conflict - probably doesnt anyway.
6) let the imp choices exceed the actual items....something about guns and ammo inherent to any weapon you get and probably unnecessary.

I really hope it works 'cos I know just how maddening it is.
BTW I could not get it MG42 to appear with an AIM until it appeared with me. then we both had it. Prior to that it would appear as selectable in game but not appear with the imp when game lunched.
I think you and I are also using two different versions of 1.13 as I don't have an IMP item selection screen, the last screen during IMP creation for me is the attribute stat sliders. From there gear is distributed based on the major/minor trait lists, attribute stat lists and the backgrounds.

I'm using the "stable release version 7435" back from 2014 with the update patch for it also from 2014. I had heard that the devs were working on a screen where players could individually pick and choose equipment for IMP mercs during creation but I didn't think that had been deployed as stable at this time? Or perhaps it is available and I just don't know where to get the new version and how to apply it.

-MadMechanic

Report message to a moderator

Private 1st Class
Re: MG3 to MG42 Conversion[message #365045 is a reply to message #365044] Wed, 14 December 2022 00:44 Go to previous messageGo to next message
Asdow is currently offline Asdow

 
Messages:126
Registered:August 2010
There won't be a "stable" version any time soon methinks. The newest development happens in github and we haven't had save game breaking changes for a good while now.

The IMP item selection feature has actually gone through another change and looks like this now.

Report message to a moderator

Sergeant
Re: MG3 to MG42 Conversion[message #365046 is a reply to message #361080] Fri, 16 December 2022 04:47 Go to previous messageGo to next message
rattus is currently offline rattus

 
Messages:33
Registered:March 2003
Given you aren't using the a version that has optional gear choices for the IMP I'm not sure if my results will help. I'm using 8796. I've checked my IMPITEMSchoice files and I can see nothing wrong with yours. Nor from making the 455 available at start have I done anything essentially different. The fact that you can give to an AIM Merc at start and get your ammo to show up but not the gun with your IMP points to an error in the IMPItems choice file but I cann't see one.
@Asdow - any chance this latest version will work with JA2UCHybrid?
Regards
Rattus
Edit: Try something - give it to a starting merc you will recuruit for day 1. generate an imp and when they both chopper in. give the weapon to your imp merc and see if it looks/works fine and has ammo etc.(GABBI kill all enemnies if they interfere).

[Updated on: Fri, 16 December 2022 05:46]

Report message to a moderator

Private 1st Class
Re: MG3 to MG42 Conversion[message #365048 is a reply to message #365046] Sat, 17 December 2022 12:09 Go to previous messageGo to next message
Asdow is currently offline Asdow

 
Messages:126
Registered:August 2010
The underlying code for reading possible item choices, selecting and distributing items to the imp inventory are still essentially the same as with the dropdown menus that Flugente made. If it works with that, I don't see a particular reason why it wouldn't with this either.

For what it's worth, I have started a game in UC1.13 that was included in seven's unstable modpack, using the newest development version and haven't encountered anything game breaking yet

Report message to a moderator

Sergeant
Re: MG3 to MG42 Conversion[message #365049 is a reply to message #365048] Sun, 18 December 2022 01:00 Go to previous messageGo to next message
MadMechanic is currently offline MadMechanic

 
Messages:20
Registered:November 2022
I have updated to a newer version of 1.13 using Kitty's download link. I don't know how to properly give the version information as it would seem the project is no longer using the 4-digit release codes since the move to Github hosting.

The file I downloaded is SCI_JA2v1.13_20221122_sc 7a0a567 + gc 4648659. I'm pretty sure the "20221122" is November 22, 2022, so it's a very new version. It does have the new IMP gear selection screen along with a newer Items.xml file.

What I found out pretty quickly is that my tactic of setting items to 'Nada' in the items.xml file to make them unavailable in-game immediately caused this version of the mod to crash during new game start. Some error about armsdealer list.

So I'm having to completely rethink my strategy on how to restrict item choices in-game and I'm thinking that will involve A LOT of changes to files like GunChoices_Enemy_Regular.xml to add/remove equipment I either want available or remove equipment I don't want in-game. So this will now require a lot more work, but perhaps won't be so game-breaking than my last approach.

That said, I've had much better luck in my latest attempts to modify the game by just adding new items (mainly magazines) to the bottom of the items.xml list. So far I've managed to change the magazine capacity of the Hi-Power HP-35 to the WW2 correct capacity of 13 rounds (also required the creation of a new magazine item, I just copied the 15 round 9mm pistol mag item to the bottom of items.xml, renamed it and created a new entry at the bottom of magazines.xml to correspond, then changed the capacity of the HP-35 in weapons.xml to 13 and all is working fine). I have done the same with the M1 Carbine, changing it's magazine capacity to the WW2 correct 15-round magazine from the 1.13 normal 30-round capacity.

Over the weekend I plan to try and tackle the M1919 Machine Gun to see if I have better luck getting it to work in this newer version of 1.13, I just wanted to try some simpler things first to get a feel for how the newer code behaves.

I will update here with my results. Fingers crossed.

-MadMechanic

Report message to a moderator

Private 1st Class
Re: MG3 to MG42 Conversion[message #365050 is a reply to message #365049] Sun, 18 December 2022 01:25 Go to previous messageGo to next message
MadMechanic is currently offline MadMechanic

 
Messages:20
Registered:November 2022
Ok, well that took about all of 5-10 minutes of copy/paste/edit coding and 5-10 minutes of testing. The M1919 A6 chambered for .30-06 with 100-round belts is working no problems.

First thing I did was to rename the normal M1919 A6 (found at index position 627) to 'M1919 A6 NATO' to denote it's chambering for the 7.62x51 NATO cartridge. Next I copied all of it's items.xml code to the bottom of the items.xml list and gave it the next index number in sequence (1764), changed it's name back to just M1919 A6 and then did the same thing over in weapons.xml changing the caliber to '46' for the .30-06 cartridge.

Next I copied the 7.62x51mm Belt from items index position 125 to the end of items.xml and gave it the next index position number of 1765. I then created a new magazine entry in magazines.xml (class index 615) and gave it the properties I wanted (caliber 46 (.30-06), mag size 100, ammo type 0 (ball), mag type 0). Back over in items.xml I made sure to change the ubclassindex flag for the new magazine to 615. I updated the flavor text.

Lastly I went over to IMPItemChoices and added item 1764 (the machinegun) to the list of choices for Auto Weapons major trait and launched the game.

Started a new game, created a new IMP merc, making sure to give him only 1 rank in the Auto Weapons major trait and then used the new inventory system for gear selection and sure enough the gun was there. The one 'broken' thing from a gameplay standpoint is that the game is setup to issue 5 reloads to any weapon selected using the new inventory selection screen, so the game automatically gave the merc 5 extra belts of ammo for the gun. Quite excessive but at least it all worked.

I deployed to the starting sector, killed the 3 enemies using far too much ammo but it all worked.

So I still have no clue at all why I couldn't get any of this to work using the far older "stable" release of 1.13 from back in 2014, but it's all working in this new version of the mod so I'm happy for that.

I have A LOT of work ahead of me now though to remove a lot of weapon and gear choices from the enemy selection tables as well as the vendor tables and militia gear tables but baby steps.

I will also have to learn how to 'properly' add new weapons at some point by learning how to create new STI format images for weapons I hope to add like the M3 grease gun and DP-27 Russian machine gun.

Report message to a moderator

Private 1st Class
Re: MG3 to MG42 Conversion[message #365051 is a reply to message #365050] Sun, 18 December 2022 06:35 Go to previous message
rattus is currently offline rattus

 
Messages:33
Registered:March 2003
Great news! It might have been the NADA Weapon all along. I Wasn't brave enough to add new weapons (just conversions) but I did find adding new mags at the end of the list to work reliably. It sure can be frustrating but it's worth it when it finally does work.

Report message to a moderator

Private 1st Class
Previous Topic: Disposable tube launchers
Next Topic: Help with modding/ adding items
Goto Forum:
  


Current Time: Fri Mar 29 07:52:51 GMT+2 2024

Total time taken to generate the page: 0.01981 seconds