Weapons Editing? SOLVED (+Tutorial- Newbie Friendly)

Started by Rhynder, October 02, 2011, 06:04:45 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

TheFishlord

Oh yeah, I only started modding on...what, Friday? And I can't get away from it.  ;)

If anyone has tips on what the issue here with the sound is, I'm all ears (no pun intended). I'm totally stumped here, I see no reference to sounds at all that could be causing this.

Judging by the way the problem arose, sounds are inherently labeled as full auto or otherwise, and changing the weapon characteristics removes the sound, since there is no sound for the new characteristic. But that doesn't help much when the only spot left to look at is just a list of hash values, that I have no idea how to use...Here's the set for the FAL, if anyone can decipher them.

Spoiler
            <object type="Sounds">
              <value hash="65E69E99" type="BinHex">3078303034343933413300</value>
              <value hash="0167AEA7" type="BinHex">09000000</value>
              <value hash="E6F9A43D" type="BinHex">3078464646464646464600</value>
              <value hash="9DFA1E94" type="BinHex">9A99193E</value>
              <value hash="D8E14E8F" type="BinHex">3078303034433635463300</value>
              <value hash="893A492E" type="BinHex">08000000</value>
              <value hash="3F97D03F" type="BinHex">3078303034433636303600</value>
              <value hash="4398672F" type="BinHex">08000000</value>
              <value hash="CDD0C853" type="BinHex">FFFFFFFF</value>
              <value hash="876895B3" type="BinHex">3078464646464646464600</value>
              <value hash="9DD1F34F" type="BinHex">3078464646464646464600</value>
              <value hash="51953DD2" type="BinHex">FFFFFFFF</value>
              <value hash="BE3FDC7D" type="BinHex">3078303034343845363100</value>
              <value hash="7412DAC6" type="BinHex">3078303034423239314600</value>
              <value hash="DEF79FAE" type="BinHex">3078464646464646464600</value>
              <value hash="4B925BC6" type="BinHex">3078464646464646464600</value>
              <value hash="AADD0D3E" type="BinHex">08000000</value>
              <value hash="EF644C6F" type="BinHex">0000C03F</value>
              <value hash="FF3F6042" type="BinHex">EC51B83D</value>
              <object hash="822EE7C9">
                <value hash="876895B3" type="BinHex">3078464646464646464600</value>
                <value hash="51953DD2" type="BinHex">FFFFFFFF</value>
                <value hash="BE3FDC7D" type="BinHex">3078303034353533334300</value>
                <value hash="7412DAC6" type="BinHex">3078303034353533334400</value>
                <value hash="AADD0D3E" type="BinHex">09000000</value>
              </object>
            </object>

I've tried switching this section out for the M16 equivalent section (a few numbers are different), thinking because the M16 is labeled as full auto it might fit in, and there's no change, still no firing sound... :(

nexor

Quote from: TheFishlord on February 20, 2012, 06:28:41 PM

This may solve the problem I pointed out in another thread about the "burst" of sounds. I'll go fix my FAL up with this and see what happens.

EDIT: This silences the weapon entirely (no firing sound at all now). I'll see if I can find any way around that...

Brilliant w@&k mate, you might have stumbled onto something, did you test it to find out if any of the mercs can hear the firing sound, if they can't hear it either then it's exactly what we want, imagine spreading death and destruction amoungst the mercs and they don't know where it comes from.......................  :-X :-D


TheFishlord

Quote from: nexor on February 21, 2012, 03:38:47 AM
Brilliant w@&k mate, you might have stumbled onto something, did you test it to find out if any of the mercs can hear the firing sound, if they can't hear it either then it's exactly what we want, imagine spreading death and destruction amoungst the mercs and they don't know where it comes from.......................  :-X :-D

No unfortunately they still do. The weapon behaves exactly like it does normally (semi auto of course, so at least that works), just no firing sound. Reloading sounds are still there as well.

nexor


TheFishlord

Well, I haven't exactly made progress on the issue, but I've learned something new from it that we should probably keep in mind.

When you look in the WeaponsProperties files, the "21" file will have only the weapon, with .Multi after it. This, according to the gamemodesconfig file, refers to the multiplayer version (which differs significantly from the single player version many times).

So, DO NOT MESS WITH THIS. At best, it won't be modifying your single player weapons so you won't get the effect you want; at worst, when you go online Punkbuster might ban you for it.

Now this next part I don't know for sure, but I think it's reasonable: The ONLY weapons codes we need to look at are in the 41weaponsproperties file. Inside there you have weapons with the .Multi suffix (same multiplayer version, don't know why there are two...), a .Persistent version, which I have no idea what it does (perhaps the AI's weapons), and the plain, no suffix version.

We don't need to look in 21_WeaponsProperties because only the .Multi version is in there anyway. Hence why when chiconspiracy is modifying weapon accuracy he only needs to mod the 41, and leaves 21 alone.

The no suffix version is probably the one that needs to be changed to affect single player. So we can save a lot of time by only modifying that one, no need to go through and do all of them now. I suspect this is what first happened when the OP tried to mod his M16 - he modded a .Persistent or .Multi by accident, and saw no effect, so his instructions say to change all of their burst values. I believe that you only need to change the suffix-less version.

I've just come to this conclusion after a hard few attempts at fixing my sound issue, but I have a mountain of homework to do, so I'm not going to try what I did with the .Multi's on the regular code for now, too busy  :( When I get back to this tomorrow afternoon I'll report again.

PZ

This is good information - helps others avoid the problems you encountered.  :-X

TheFishlord

Well, progress!  :lamp:

I was correct on my previous post - if you want to mod single player weapons, you only need to do the suffix-less section.

I have...sort of...corrected the sound problem. Not really. But anyway, it seems that both sounds and weapons are labeled as "SingleShot" "FullAuto" or "PrepareShot". When the weapon and the sound don't match, you won't hear any firing sound. (Although I've only tried changing weapons from FullAuto to SingleShot, I should try the other way around to confirm this)

Well, I got around this on the FAL by copying the whole chunk of code under "Sounds" for the Dragunov (being a SingleShot) and putting it in place of the FAL's sounds. It is strange that this worked since the sections do not seem to match up - the FAL has five or six extra lines, what for I don't know.

But anyway now the FAL uses the Dragunov firing sound, which I think I will stick with, it's a 7.62mm, I'll use it in my mod. The strange thing is though that the FAL's reload sound is still used, so reloading is not covered under the "sounds" section. Perhaps the jamming and failure sounds now belong to the Dragunov but I'll have to do some playing to get my FAL that rusty.

So anyway, not exactly a fix, but a workaround. Game is fully playable with the new semi auto fix, just a little funky here on the sound. I'll keep trying but I think this is a problem that we would have to decode the hashes for, and Gibbed says that you need to do each one individually, which I don't have the expertise for.

PZ

Good w@&k TheFishLord - looking forward to your investigations!

TheStranger

Yeah good job. I also looked in the sound files a while ago, but didn't find anything useful :( Ahrgh and they could have made modding so easy.

PZ

Quote from: TheStranger on February 23, 2012, 10:43:44 AM
... Ahrgh and they could have made modding so easy.

They sure could have, but I seriously doubt that they wanted any modding done.  It is only because of guys like gibbed, who can reverse engineer things that we can do modding of any kind in FC2.

I wish gibbed had become interested in the AC series

OWGKID

LEGACY

PZ


OWGKID

I took a look through your modded file and I saw you had renamed the "41_WeaponProperties" to "23_WeaponProperties". Om my first attempt on FC2 weapons modding, I crashed the game since I added both the "42_Weapons" in my "mymod" folder together with "41_WeaponProperties"  :D Should I rename "41_WeaponProperties" to "23_WeaponProperties"?
LEGACY

wobatt

As far as I can tell, the number at the start doesn't matter.

If you have more than one file called XX_WeaponProperties.xml (XX=any number) then it could cause problems, as some of the weapons will be defined twice.

OWGKID

The game worked great  :-() :-D I can now be a WALKING ARMOURY  >:D >:D >:D :-() :-() :laugh:
LEGACY

Art Blade

[titlebar]Vision without action is a daydream. Action without vision is a nightmare.[/titlebar]What doesn't kill us, makes us weirder.

OWGKID

If you'd like to reduce recoil for the weapons (without the manuals) , the following parameter (in bold) should be changed:
Spoiler
<object type="Recoil">
              <value name="iRecoilRecoveryLevel" type="Int32">1</value>
              <value name="fRecoilAchieveTime" type="Float">0.15</value>
              <value name="fRecoilAnimationWeight" type="Float">1</value>
              <value name="fRecoilMax" type="Float">30</value>
This is the default values for the MP5 and I used Wobatt's hash converter tool to decode them.

If you don't have Wobatt's tool, look for the hash "3B75D90F" and edit the hash "0788D065"
Spoiler
<object hash="3B75D90F">
              <value hash="158EFFD8" type="BinHex">01000000</value>
              <value hash="C0671E89" type="BinHex">EC51383E</value>
              <value hash="641C31C5" type="BinHex">0000803F</value>
              <value hash="0788D065" type="Float">1.21</value>
My modded value for the golden AK47. I changed the "BinHex" -> "Float". Gibbed's tool can re-pack the file with no problem.
LEGACY

PZ


OWGKID

LEGACY

Tags:
🡱 🡳

Similar topics (5)