OpenWorldGames Server ONE

Video games => Far Cry 2 => Far Cry series => Single player modding => Topic started by: TheStranger on April 21, 2014, 02:34:35 PM

Title: Weapon jam
Post by: TheStranger on April 21, 2014, 02:34:35 PM
So I tried to figure out which values determine when a weapon jams. Is it the reliability in the gamodesconfig.xml? Or is there something in the weaponproperties file like these lines:

<value name="fUnjamTime" type="Float">2.83</value>
            <value name="selJamType" type="UInt32">0</value>
            <value name="iClipsForSelfDestruct" type="UInt32">200</value>
            <value name="bIsIndestructible" type="Bool">False</value>
            <value name="bIsBreakable" type="Bool">True</value>
            <value name="fLookSensitivityFactor" type="Float">1</value>
            <value name="fMoveSpeedFactor" type="Float">1</value>
            <value name="fForcedReliability" type="Float">0</value>
            <value name="fInitialJamCounter" type="Float">0</value>

When I set the clips for self destruct to a lower value (like 5) the weapon degrades but doesn't jam and then self destructs. Does anyone know this? Haven't found it in the forum. Btw. I use fishlords mod.
Title: Re: Weapon jam
Post by: PZ on April 21, 2014, 08:13:09 PM
hmmm... I don't exactly recall, but I seem to remember that it needed to be changed in a couple of files, or perhaps in a few places within the same file.  I must have changed it at some time because my weapons don't age
Title: Re: Weapon jam
Post by: TheStranger on April 22, 2014, 03:01:31 AM
The aging or degredation is determined by the clips for self destruct value. But I don't know if the jamming is just a random occurence determined by the reliability value and this value. Hmm I need to test it.
Title: Re: Weapon jam
Post by: Vaatho on August 22, 2014, 02:43:45 AM
Found this in 42_weapons.xml .

          <object type="ReliabilityLevelsData">
            <object type="Failure">
              <value name="fHorizontalRecoilPerShot" type="Float">2.6</value>
              <value name="fVerticalRecoilPerShot" type="Float">2.6</value>
              <value name="fBulletDeviationMax" type="Float">0</value>
              <value name="fJamProbabilityPerReload" type="Float">0.12</value>
            </object>
            <object type="Low">
              <value name="fHorizontalRecoilPerShot" type="Float">2.4</value>
              <value name="fVerticalRecoilPerShot" type="Float">2.4</value>
              <value name="fBulletDeviationMax" type="Float">0</value>
              <value name="fJamProbabilityPerReload" type="Float">0.06</value>
            </object>
            <object type="Medium">
              <value name="fHorizontalRecoilPerShot" type="Float">2.2</value>
              <value name="fVerticalRecoilPerShot" type="Float">2.2</value>
              <value name="fBulletDeviationMax" type="Float">0</value>
              <value name="fJamProbabilityPerReload" type="Float">0.03</value>
            </object>
            <object type="High">
              <value name="fHorizontalRecoilPerShot" type="Float">2</value>
              <value name="fVerticalRecoilPerShot" type="Float">2</value>
              <value name="fBulletDeviationMax" type="Float">0</value>
              <value name="fJamProbabilityPerReload" type="Float">0</value>
            </object>


This is from the M1903 bit. Notice you can also modify the recoil and bullet deviation per damage threshold, which is nice.

My hypothesis is that, in the "Failure" one, the 0.16 probability is when the weapon'll blow up in your face. So maybe reducing that to 0 will stop making your weapon go boom. Haven't tested it though.

As for the aging/degradation... Not sure. Might be a curve in 05_Curves.xml , called "StimEffectCurves.OldDamageReliability". Again, haven't tested it.
Title: Re: Weapon jam
Post by: Art Blade on August 22, 2014, 06:14:10 AM
Hello and welcome to OWG, Vaatho :)

I have always admired people who manage to decrypt that type of game code and make it accessible for others to improve their gaming experience with regards to modding. +1 :-X For your first contribution, thanks for sharing  :)
Title: Re: Weapon jam
Post by: PZ on August 22, 2014, 07:20:48 AM
Quote from: Art Blade on August 22, 2014, 06:14:10 AM
Hello and welcome to OWG, Vaatho :)

I have always admired people who manage to decrypt that type of game code and make it accessible for others to improve their gaming experience with regards to modding. +1 :-X For your first contribution, thanks for sharing  :)

Indeed; I feel much the same.  Welcome,  Vaatho! +1
Title: Re: Weapon jam
Post by: fragger on August 22, 2014, 06:33:18 PM
+1 from me too. Welcone to OWG Vaatho, excellent opening contribution :-X :)
Title: Re: Weapon jam
Post by: Vaatho on February 23, 2016, 08:09:01 AM
A bit late, but thank you for the welcome!

Been digging about in the files (but not for an entire year and a half, I'm not THAT mad) and I found a variable that might be related to degradation in gamemodesconfig.xml.

<CounterReliabilityRatingsTable>
<Act> <!-- Act 1 -->
<Item rating="high" value="240" />
<Item rating="medium" value="120" />
<Item rating="low" value="80" />
<Item rating="failure" value="20" />
</Act>
<Act> <!-- Act 2 -->
<Item rating="high" value="180" />
<Item rating="medium" value="130" />
<Item rating="low" value="100" />
<Item rating="failure" value="20" />
</Act>
<Act> <!-- Act 3 -->
<Item rating="high" value="220" />
<Item rating="medium" value="160" />
<Item rating="low" value="120" />
<Item rating="failure" value="20" />
</Act>
</CounterReliabilityRatingsTable>


...though I have no idea what to do with it. If you refer to the bit of code I posted before, you can see that there are the same ratings. So I'm thinking the weapon has different states the more you fire, going from high to medium, low and failure, jamming more and more and finally exploding.

For some reason, these ratings seem to be linked to the different acts. I also don't know what those numbers represent. I'm guessing upping the numbers will make the weapons degrade slower, but don't quote me on that.
Title: Re: Weapon jam
Post by: PZ on February 23, 2016, 08:20:58 AM
I think you're right about changing parameters in gamemodesconfig.  I dug in one of the articles, and found a snippet where Art Blade posted instrux regarding jamming and weapon reliability

http://www.openworldgames.org/owg/forums/index.php?action=kb;area=article;cont=43 (http://www.openworldgames.org/owg/forums/index.php?action=kb;area=article;cont=43)
Title: Re: Weapon jam
Post by: Vaatho on February 23, 2016, 08:41:11 AM
Quote from: PZ on February 23, 2016, 08:20:58 AM
I think you're right about changing parameters in gamemodesconfig.  I dug in one of the articles, and found a snippet where Art Blade posted instrux regarding jamming and weapon reliability

http://www.openworldgames.org/owg/forums/index.php?action=kb;area=article;cont=43 (http://www.openworldgames.org/owg/forums/index.php?action=kb;area=article;cont=43)

Unfortunately, I don't think those bits change anything about the weapon itself; if I recall correctly, they just change the value shown when you go into the menu, but do not modify the actual power/accuracy/firerate/degradation of the weapon itself. You need to go into weaponproperties.xml or weapons.xml for those (which are a bit more of a pain to change).
Title: Re: Weapon jam
Post by: PZ on February 23, 2016, 10:32:24 AM
You may be right - I just don't recall what I did.  However, my weapons will last an entire play through with no jamming or rusting.  ????
Title: Re: Weapon jam
Post by: OWGKID on March 02, 2016, 12:25:19 AM
I guess you probably changed "<value name="bIsIndestructible" type="Bool">False</value>" and
"<value name="bIsBreakable" type="Bool">True</value>"

to "<value name="bIsIndestructible" type="Bool">True</value>" and
"<value name="bIsBreakable" type="Bool">False</value>"  ;)
Title: Re: Weapon jam
Post by: PZ on March 02, 2016, 08:13:09 AM
Might be - too bad I do not keep better records  :-()

In any case, I have the game exactly how I like it  ^-^

Too bad they do not build these options into the menu system so gamers could choose how they want to play the game rather than forcing us to mod the game.
Title: Re: Weapon jam
Post by: OWGKID on March 02, 2016, 11:27:17 AM
 :-X
Title: Re: Weapon jam
Post by: Vaatho on March 06, 2016, 12:02:38 PM
The other way to do it easily is to change the reliability bonus in the operations manuals, and put their cost at like 1 diamond. You just have to use gamesmodesconfig.xml and don't even need to go into the world files.
Title: Re: Weapon jam
Post by: OWGKID on March 06, 2016, 12:17:53 PM
Setting the bonus over -100% makes weapons indestructible, but they will still rust :laugh: You could also set the unjam time to -99% to instantly clear the jam  :-()

Changing the fReloadTime make the reloading sounds go out of sync with the sped up animations.  ????

PZ, I downloaded your mod, the silenced AS50 is fun  :-D
Title: Re: Weapon jam
Post by: Art Blade on March 06, 2016, 01:04:09 PM
I remember modding my weapons so the value responsible for degrading was doing the opposite: every shot fired healed my weapon. :-D
Title: Re: Weapon jam
Post by: OWGKID on March 07, 2016, 12:54:46 AM
 :o :-D
Title: Re: Weapon jam
Post by: PZ on March 07, 2016, 08:44:24 AM
 :laugh: :-X

Glad you enjoyed the modded AS50, GKID

I also dislike the outrageous prices, so had changed the price of everything to 1 diamond each.  I could easily outfit my character with a complete kit after the first mission.
Title: Re: Weapon jam
Post by: OWGKID on March 07, 2016, 11:12:44 AM
Yeah, I saw that  ;) I decided to do some tweaks, the weapon now fires at 1200 rpm  >:D (Magazine is emptied in 1.5 seconds)  :-D
Title: Re: Weapon jam
Post by: PZ on March 07, 2016, 01:58:49 PM
 :o
Title: Re: Weapon jam
Post by: fragger on March 08, 2016, 03:54:41 PM
I actually liked the weapons degradation in FC2. It added another tactical level to the game. I think the idea was a crude way of modelling weapon maintenance, but since it would be boring to watch your guy actually strip down and clean a weapon in the field, they did it the way they did.

The dart gun wore out a bit too quickly though.
Title: Re: Weapon jam
Post by: OWGKID on March 09, 2016, 07:57:21 AM
Yeah I increaased the magazines a weapon can fire before it breaks and decreased the unjam times to less than 1 second  :-D
Title: Re: Weapon jam
Post by: PZ on March 09, 2016, 10:05:52 AM
I carry a weapon any time I go hiking - a person was murdered on one of our favorite walks some years ago, and the perpetrator was never caught (I do have a concealed carry permit), and even around the house when outdoors cooking or having some kind of outdoor fun. I don't carry when I'm sawing down trees or firewood, but then again, I have a different kind of weapon in my hands under those circumstances  >:D. In all the years of owning and using weapons, I have yet to have one rust, jam, or otherwise fail, let alone every other trip to the store.

In FC2, I'd actually rather strip down the weapon in the field than be forced to go to the weapons dealer for a new one every other mission.
Title: Re: Weapon jam
Post by: OWGKID on March 09, 2016, 10:30:37 AM
Rev up the CHAIN SAW (https://youtu.be/N9eibp_EOII?t=278)! :-D