Jump to content

Weapon Weight


Symbiote

Recommended Posts

Small update in the first post.

 

Changes in v1.2.4

- Added readme.

- Fixed bug where sprinting while the sprint key wasn't pressed wouldn't drain Adrenaline properly.

- Fixed bug where the cell phone could be dropped like a weapon.

- Minor optimization and cleanup.

Edited by AngryAmoeba
Link to comment
Share on other sites

  • 7 months later...

 

Small update in the first post.

 

Changes in v1.2.4

- Added readme.

- Fixed bug where sprinting while the sprint key wasn't pressed wouldn't drain Adrenaline properly.

- Fixed bug where the cell phone could be dropped like a weapon.

- Minor optimization and cleanup.

Hey, this mod is badass, but for some reason it doesn't seem to be fully working.

 

IIRC the more guns/ammo/gear you have on you, the slower you move. I used to feel the subtle difference in speed, but now no matter how much i am carrying it seems like the same speed as normal.

 

I was tweaking with the values to hopefully make having a full loadout (roughly 10 mags for each weapon type + 25 projectiles) be overweight, and try to make something under the default max penalty of 30 that would amount to maybe a pistol + 3 mags, rifle + 10 mags, SMG + 6 mags, rocket launcher + 4 rockets, and armor would be just about under the max penalty.

 

But now, as I said the speed seems unchanged except for a slight second. I use a trainer to test the mods and I would give myself a full loadout: basically what you'd get with Weapons cheat 1 or 2, and for a second Niko moves slow as if he is affected by the weight, and then it goes back to normal. Are my weight penalties incompatible or what? It seems like speed is now unchanged with i revert to the default INI file as well...

 

Here is my INI as of right now:

 

 

[FEATURES]UseHurry = trueUseWeaponBag = trueUseWeaponRemoval = true[KEYS]HurryKey = 18DropWeaponKey = 106DeletePickupKey = 111ModifierKey = 34; Adrenaline values represent percentage of total adrenaline[HURRY]HurrySpeedBoost = 20AdrenDrainPerSec = 13AdrenRechargePerSec = 3AdrenRestingBonus = 6ShowAdrenalineBar = trueAdrenBarPositionX = 0.0AdrenBarPositionY = 0.0[sPEED PENALTIES]; Penalty values represent speed decrease in percentMaxTotalPenalty = 45.0; Weapon penaltiesRiflePenalty = 2.98SniperPenalty = 3.1ShotgunPenalty = 2.6RocketPenalty = 4.1SMGPenalty = 2.5PistolPenalty = 1.5GrenadePenalty = 0.9MolotovPenalty = 0.75KnifePenalty = 0.3BatPenalty = 0.4; Ammo penalties, per clipRifleClipPenalty = 0.6SniperClipPenalty = 0.46ShotgunClipPenalty = 0.44RocketClipPenalty = 1.3SMGClipPenalty = 0.43PistolClipPenalty = 0.31; Other penaltiesArmorPenalty = 2.9ThousandDollarPenalty = 0.008

 

 

By the way, I am using a lot of other mods but I removed some of the ones that I've installed since the speed hasn't been feeling different and it's not fixed.

 

Edit: Also, the RPG doesn't seem to have a bag when you have one equipped, is it supposed to be concealed in a pocket or the backpack or duffel bag?

Edit2: I think I narrowed the problem down, seems to be an issue with either BasicNeeds.cs and/or Trunk.cs and from HippieCommunist's Modpack. With these mods out of the picture the running speeds are penalized as they should be. It might be something with the way animations are used in these mods?

Edited by NudasPriest
Link to comment
Share on other sites

Thanks for the report! You're right, the code isn't checking for the RPG like it should. Easy fix!

 

The speed problem, though, sounds harder to figure out. Do the bags work correctly, aside from the RPG? And does hurrying work properly? If not, are there any errors listed in your ScriptHook.log or ScriptHookDotNet.log files (in your main GTA4 folder)?

 

I don't have a whole lot of time anymore to work on my mods, but I'll try to fix this issue as fast as I can.

 

EDIT: Just saw your 2nd edit — and now I understand. Weapon Weight slows you down by adjusting the speed of your movement animations. This works quite well, but unfortunately it means that any other mod that also adjusts the animation speed will break Weapon Weight. (I believe BasicNeeds.cs by HippieCommunist makes you move faster after you drink coffee?) This conflict seems unavoidable.

Edited by AngryAmoeba
Link to comment
Share on other sites

Thanks, I sent a PM to another mod author as I think it is an incompatibility (With BasicNeeds.cs perhaps) but the other things I noticed, it seemed like only a few of the 2-handed weapons actually give the player a dufflebag. RPG, Snipers, didn't give me a bag. Niko had a knife, PSG-1, RPG, and glock with loads of ammo for each and no bag lol. I may have stumbled upon the issue itself, which has to do with BasicNeeds.cs, from HippieCommunist's modpack.

 

I think BasicNeeds has a caffeine bonus for drinking coffee, and it looked like it was setting player speed here and there at different levels and making the player not get tired. Could be an interesting tie in, some of the usable items in BasicNeeds giving you a speed boost...

 

Edit: Wow, I was pretty spot on. I will comment out the coffee stuff then, see if it fixes. But I noticed it gives a boost when the Caffeine level is as "1.00f". Don't know what it initializes at but if it starts at a level and that level has an effect, then it's probably getting mixed it. Thanks for your fast response, though, and the effort in your mods.

Edited by NudasPriest
Link to comment
Share on other sites

You're right again... The code doesn't check for sniper rifles either. What the hell. At some point, I must have accidentally copied code from my personal version, where assault rifles, sniper rifles, and RPGs all use the assault rifle inventory slot. How long has the mod had this bug? confused.gif

 

I'll post a fixed version either tonight or tomorrow night after work.

Edited by AngryAmoeba
Link to comment
Share on other sites

Nice. And I don't know if I know what I'm doing, but I might have just made a modified version of Basic Needs that won't dick with the speed bonus, but if you drink enough caffeine you won't get tired. Does Weapon Weight do anything with that? I took out the references to Player Movement speed and it looks like solid enough coding to not crash. Gonna test in a bit. Edit2: It works, so far so good!

 

Edit: Also, if you could do it but just didn't decide to, is it a quick thing or even possible to have the AK and M4 ammo separate; same with Deagle and Glock? If that's the case then i think it'd add even more variation with this mod and Weapon Storage. I have a customized WeaponInfo.xml that I'm working on: most guns have a simulated bullet travel time, realistic rate of fire, range, ammo caps, damage and force, faster rockets, throw molotovs farther in a vehicle so you dont kill yourself on motorcycles.... With it feels like a whole new shooter IMO compared to GTA 4 vanilla. it's just a weapons.xml but I am actually pretty proud of how it's turning out. But what I'm saying is, I have my AK and M4 have different ammo caps because in reality 5.56 ammo is a lot lighter than 7.62, so the AK has like 3 mags less. If this could be actually adjusted in the weight mod, it'd be pretty legit.... Would make the AKM skin i got feel even more beefy.

Edited by NudasPriest
Link to comment
Share on other sites

@NudasPriest: No, Weapon Weight doesn't change how fast you get tired. And it's technically possible to give the AK and M4 different speed penalties, but then non-vanilla assault rifles (i.e. EFLC or custom weapons) wouldn't be detected. Right now, the mod uses two different methods to detect weapons: usually it just checks your inventory slots, which works for non-vanilla weapons, but it checks for the knife, bat, grenades, and molotovs separately. Unfortunately that means non-vanilla melee/thrown weapons aren't detected by the mod. I'll try to think of a better solution in the future.

 

Anyway, I just put the fixed version in the first post. Sorry it took longer than I said it would!

 

 

Changes in v1.2.5

- Ammo is measured per round instead of per clip.

- Fixed bug where sniper rifles and heavy weapons wouldn't give you a duffel bag.

- Fixed bug where dropped melee weapons weren't removed from your inventory.

- Minor optimization and significant cleanup.

Edited by AngryAmoeba
Link to comment
Share on other sites

Another minor update in the first post.

 

Changes in v1.2.6

- Added INI settings for bag behavior.

- Fixed incorrect setting in INI file (was RemoveArmorModifier instead of RemoveArmorModifierKey).

- Renamed AdrenRechargePerSec INI setting to AdrenRegenPerSec.

- Code cleanup.

Edited by AngryAmoeba
Link to comment
Share on other sites

Aaand a hotfix.

 

Changes in v1.2.6 hotfix

- Fixed constant player animation twitching caused by updating the bag too often.

Link to comment
Share on other sites

  • 4 weeks later...

Another hotfix! (Damn it.)

 

Changes in v1.2.6 hotfix 2

- Fixed bug where cash never gave you a bag.

- Very minor optimization when loading.

Link to comment
Share on other sites

  • 4 weeks later...

When I was on previous install of my game I'm quite sure none of the TLAD weapons counted towards weight and if I remember properly Johnny was not affected even while I had sh*tload of weapons on me + cash

 

now I just installed EFLC again so I'll test it a little bit and tell you what's wrong if it's still wrong

Link to comment
Share on other sites

I don't have EFLC to test, but with the update I just uploaded, I'm pretty sure everything should slow you down except the parachute.

 

Changes in v1.2.7

- Added support for non-vanilla thrown/melee weapons (INI settings OtherThrownPenalty, OtherMeleePenalty, OtherMeleeBag).

- Fixed bug where grenades slowed you down much more than intended.

Edited by AngryAmoeba
Link to comment
Share on other sites

Fixed the script for TLAD by disabling the bags feature, however the 'main' part of script still crashes, everything seems to be working fine. It's a real shame the pickups dissapear after you pass a mission since that completely takes away the whole purpose of this feature for me (as everytime I finish a gangwar my weapons prepared for next gangwar dissapear)

Link to comment
Share on other sites

Hey, AngryAmoeba. I was wondering if you can make armor visible when you pick it up, like the gun and money bags. It'll look resoundingly badass when combined with the Robbery Mask and Equip Weapons Mod.

Link to comment
Share on other sites

I'm gonna put my two-cents in, I think that the dufflebag/backpacks and the armor vest that you can wear take up the same clothing slot on your body, meaning unless somebody can model them in as a different clothing slot, if that would even work, they aren't compatible. Only one can be worn, or the other. Kinda disappointing, yeah.

Link to comment
Share on other sites

 

I'm gonna put my two-cents in, I think that the dufflebag/backpacks and the armor vest that you can wear take up the same clothing slot on your body, meaning unless somebody can model them in as a different clothing slot, if that would even work, they aren't compatible. Only one can be worn, or the other. Kinda disappointing, yeah.

Ah, poop. Really? Oh well. Thanks, man.

Link to comment
Share on other sites

@lolleroz

Can you post the crash info from ScriptHookDotNet.log? And yeah, it's really a pain how the pickups get deleted. Not sure how to fix it. There's the Weapon Storage mod, but that's not compatible with EFLC either.

 

@Unicell

NudasPriest is right, but you could disable the bag feature of this mod and then use Lilmcnessy's Visible Armour mod: http://www.gtaforums.com/index.php?showtopic=424749

Link to comment
Share on other sites

Error during Tick in script 'WeaponWeight.Main':

System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.

Parameter name: ModelIndex

at GTA.value.PedComponent.Change(Int32 ModelIndex, Int32 TextureIndex)

at WeaponWeight.PlayerBag.Update()

at WeaponWeight.Main.Main_Tick(Object sender, EventArgs e)

at GTA.Script.TryTick()

at GTA.Script.DoTick()

at GTA.ScriptThread.OnTick()

Link to comment
Share on other sites

Hm, well apparently the code for bags is different in EFLC. But I don't know what it's supposed to be... I'll try asking about it on IRC this weekend.

Link to comment
Share on other sites

Does Johnny Klebitz, or even Luis Lopez for that matter, ever use a bag like Niko in singleplayer? Perhaps Rockstar just coded bags in a weird way and only certain models can use certain bags or some cannot use bags at all? For instance I don't think it's possible to equip the male or female multiplayer models (the customizable ones for Free Mode and Deathmatch online) with a bag. or maybe they're linked to the model...

Link to comment
Share on other sites

I'm quite sure you can put a bag on Johnny using the simple native trainer, the problem is that the clothing ID is different than Niko's bag, also I'm not sure if Johnny player's archive has a backpack (I'm really sure there's a bag but I'm unsure about the backpack)

 

either Angry needs to change the 'ID' of the bag to suit TLAD one, or just remove instance mentioning any bags from the script (if TLAD has got no bags) another possibility however would be to just add the bag and backpack into Johnny's player archive by basically stealing the bag and backpack from Niko's player archive

Link to comment
Share on other sites

Are you sure you're using the latest scripthook? That could be an issue as well. If you try to add the bags to Johnny and Luis, let me know if it works!

 

In the next update, I'll disable any bags that aren't available. This will prevent the crash, but of course you'll also never see the unavailable bag, which is a bummer.

Link to comment
Share on other sites

Are you sure you're using the latest scripthook? That could be an issue as well. If you try to add the bags to Johnny and Luis, let me know if it works!

 

In the next update, I'll disable any bags that aren't available. This will prevent the crash, but of course you'll also never see the unavailable bag, which is a bummer.

Yeah I'm using the newest version from Hazard's topic.

 

I'm going to download SNT and Spark IV and play around and tell you the results (about the bags on Luis/Johnny)

Link to comment
Share on other sites

Changes in v1.2.8

- When bags are unavailable for the current player model, they are disabled to prevent errors.

- Fixed bug where OtherMeleeBag INI setting applied to all melee weapons.

 

 

------------------

 

 

And as usual, for those of you who are willing to try buggy features... sly.gif

 

Here's the ALTERNATE VERSION with (sometimes buggy) dropped weapons that you can pick back up.

 

- Dropping a weapon creates an orange pickup. It will disappear after 60 seconds.

- Holding the modifier key (default is PageDown) when dropping makes it permanent. It will stay there until picked up.

- Hold the modifier key and press "/" on the numpad to delete the most recently dropped weapon since loading (useful if it glitches out, spawns in a wall, etc.).

 

IMPORTANT NOTES for alternate version

- Completing a mission will delete all of your pickups, even permanent ones.

- Sometimes weapons can be dropped inside walls or other objects. Try to drop only when facing a fairly level area. Avoid dropping when facing walls.

- You can't drop weapons in some indoor locations, like subways or the safehouse near Middle Park. If you try, they will just glitch and disappear. sad.gif

- When you save the game, all your pickups are saved as well. (So if a pickup glitches out and you can't get to it, be sure to delete it with "/" before saving.)

- I still don't know how to make armor pickups. Armor is removed permanently.

 

I personally use this buggy version... I'm just careful to avoid the bugs.

 

I keep weapon stashes around the city:

user posted image

Edited by AngryAmoeba
Link to comment
Share on other sites

 

I still don't know how to make armor pickups. Armor is removed permanently.

 

Just some Idea: Create any Pickup (Money, Weapon, Object whatsoever), test if it was collected and add the armor if it was wink.gif

Link to comment
Share on other sites

  • 3 months later...

Not sure if this would be better for the Weight or Storage mod, but would it be possible to get a version with an option to always lose your weapons on death? I know Warrant does it when dieing while being chased, and Bank does it for money all the time, but I think losing your weapons all the time feels better.

Link to comment
Share on other sites

Just copy and paste this into Notepad, and save as a .cs file. It should do the trick. wink.gif

 

 

using GTA;using System;class WeaponConfiscation : Script{   private int timesDied;      public WeaponConfiscation()   {       this.Interval = 1000;       this.Tick += WeaponConfiscation_Tick;       timesDied = GetTimesDied();   }      private void WeaponConfiscation_Tick(object sender, EventArgs e)   {       if (timesDied < GetTimesDied())       {           timesDied = GetTimesDied();           Player.Character.Weapons.RemoveAll();       }   }      private int GetTimesDied()   {       return Game.GetIntegerStatistic(IntegerStatistic.TIMES_DIED);   }}

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.