Jump to content

'Manual Reload' mod not remember ammo type


ToughPuppy

Recommended Posts

Hello!

 

I've asked around and I haven't found a solution to my problem yet. I'm using a mod called 'Manual Reload' which disables automatic reloading, and remembers how many bullets are left in each weapon. This is pretty cool, but I'm having an issue where the ammo type switches back to default whenever I change weapons.

 

Say I have an AK-47 and I load AP ammo. If I unequip and re-equip, or if I change to another weapon and back again, the ammo count is remembered but it will be in standard ammunition (FMJ in this case). I've also noticed that specific ammo types are preferred; if I have no standard ammo left, then my weapons will default to AP over surplus, even if I had surplus loaded.

 

I know I'm making a bigger thing of this than is necessary, but it really irks me on a realism/immersion level. There's also the issue of wasting AP ammo when I think I'm using Surplus, or having issues fighting deathclaws because I'm using standard ammo and I forget to (re-)re-load to AP.

 

I've tried the mod on a vanilla game, but I still have the same issue, so I really don't know what to look for. I would be greatful for any and all assistance.

 

*Paw print*

Link to comment
Share on other sites

Hello again!

 

As a last resort I've tried installing the Weapon Hot Keys mod found here:

 

http://www.nexusmods.com/newvegas/mods/61525/?

 

Funnily enough, when I assign a weapon to a hotkey, I can then switch out to any other weapon and back again, and it remembers the ammo type - but only for hotkeyed weapons. I'm still trying to get my head around the script. I'll leave a copy of it here, just incase anyone wants to help me figure out what is actually go on inside the mod:

 

 

Manual Reload mod script:

 

scn ManualReloadObjectScript

short AmmoCount
short ClipSize
ref EquippedAmmo
ref EquippedWeapon
short EquippedWeaponModFlags
short ExtendedClip
short HasWeaponMod1
short HasWeaponMod2
short HasWeaponMod3
short ItemCount
ref NewEquippedWeapon
short NewEquippedWeaponModFlags
short ReloadAnim
short Reloading
float ReloadTimer
short SavedAmmo
short WeaponAmmoUse
ref WeaponMod1
ref WeaponMod2
ref WeaponMod3
short WeaponMod1Effect
short WeaponMod2Effect
short WeaponMod3Effect
short WeaponType

begin MenuMode
if EquippedWeapon
if Player.GetClipSize EquippedWeapon == 0
; Reset the magazine size
Player.SetClipSize ClipSize EquippedWeapon
if ExtendedClip
; Reset the weapon mod flags if using an extended magazine
Player.SetEquippedWeaponModFlags EquippedWeaponModFlags
endif
endif
endif
; Detect if the player is in the inventory menu
if MenuMode 1002
; Go straight to the weapon checking code in the next block
Goto 77
endif
end

begin GameMode
; Detect if the player presses the quick load button or dies
if IsControlPressed 26 || Player.GetDead
if EquippedWeapon
if Player.GetClipSize EquippedWeapon == 0
; Reset the magazine size
Player.SetClipSize ClipSize EquippedWeapon
endif
endif
endif
; Detect if the game has been restarted
if GetGameRestarted
if EquippedWeapon
if ExtendedClip
; Reset the weapon mod flags if a weapon with an extended magazine was equipped from a previous session
Player.SetEquippedWeaponModFlags EquippedWeaponModFlags
endif
endif
endif
; Detect if the game has been loaded
if GetGameLoaded
; Reset the equipped weapon so that the script can be restarted
set EquippedWeapon to 0
endif
Label 77
; Check to see if the weapon has changed so that relevant data can be updated
if EquippedWeapon != Player.GetEquippedObject 5
set EquippedWeapon to Player.GetEquippedObject 5
if EquippedWeapon
set ClipSize to Player.GetClipSize EquippedWeapon
set EquippedAmmo to GetPlayerCurrentAmmo
set EquippedWeaponModFlags to -1
set ReloadAnim to Player.GetReloadAnim EquippedWeapon
set WeaponAmmoUse to Player.GetWeaponAmmoUse EquippedWeapon
set WeaponType to Player.GetWeaponType EquippedWeapon
; Exclude melee weapons, grenades, mines, and others
if WeaponType < 3 || WeaponType > 9
set EquippedAmmo to 0
endif
if EquippedAmmo
; Exclude Microfusion breeder ammo
if EquippedAmmo == AmmoMicroBreeder
set EquippedAmmo to 0
; Exclude Archimedes II charge ammo
elseif EquippedAmmo == AmmoNVArchimedesII
set EquippedAmmo to 0
endif
endif
; Update the stored ammo count
if EquippedAmmo
set ItemCount to ManualReloadContainerRef.GetItemCount EquippedWeapon
if ItemCount
set AmmoCount to Player.GetItemCount EquippedAmmo
set ItemCount to ItemCount -1
if ItemCount <= AmmoCount
SetPlayerCurrentAmmoRounds ItemCount
endif
set ItemCount to ItemCount +1
else
ManualReloadContainerRef.AddItem EquippedWeapon 1
set ItemCount to 1
endif
endif
endif
; Reset the long reload animation check
if Reloading
set Reloading to 0
set SavedAmmo to 0
endif
endif
; Check to see if the weapon mod flags have been changed so that relevant data can be updated
if EquippedWeaponModFlags != Player.GetEquippedWeaponModFlags
if EquippedWeapon
; Make sure that this did not happen right after automatic reload cancellation
if Player.GetClipSize EquippedWeapon
set EquippedWeaponModFlags to Player.GetEquippedWeaponModFlags
set ExtendedClip to 0
set HasWeaponMod1 to 0
set HasWeaponMod2 to 0
set HasWeaponMod3 to 0
set WeaponMod1 to GetWeaponItemMod 1 EquippedWeapon
set WeaponMod2 to GetWeaponItemMod 2 EquippedWeapon
set WeaponMod3 to GetWeaponItemMod 3 EquippedWeapon
if WeaponMod1
set HasWeaponMod1 to LogicalAnd EquippedWeaponModFlags 1
set WeaponMod1Effect to GetWeaponItemModEffect 1 EquippedWeapon
if HasWeaponMod1 && WeaponMod1Effect == 2
set ExtendedClip to 1
endif
endif
if WeaponMod2
set HasWeaponMod2 to LogicalAnd EquippedWeaponModFlags 2
set WeaponMod2Effect to GetWeaponItemModEffect 2 EquippedWeapon
if HasWeaponMod2 && WeaponMod2Effect == 2
set ExtendedClip to 1
endif
endif
if WeaponMod3
set HasWeaponMod3 to LogicalAnd EquippedWeaponModFlags 4
set WeaponMod3Effect to GetWeaponItemModEffect 3 EquippedWeapon
if HasWeaponMod3 && WeaponMod3Effect == 2
set ExtendedClip to 1
endif
endif
endif
endif
endif
; Check to see if a valid weapon with valid ammo is equipped before continuing with automatic reload cancellation
if EquippedAmmo && EquippedWeapon
; Check if the player is not in a menu
if MenuMode == 0
; Check if the player is nearly out of ammo, if the player is not in VATS mode, if the player has pressed the fire button, and if the player's weapon is out
if GetPlayerCurrentAmmoRounds == WeaponAmmoUse && GetVATSMode == 0 && IsControlPressed 4 && Player.IsWeaponOut
; Set the magazine size to zero to stop automatic reloading
Player.SetClipSize 0 EquippedWeapon
; Remove the extended magazine if it exists
if ExtendedClip
if HasWeaponMod1 && WeaponMod1Effect == 2
set NewEquippedWeaponModFlags to EquippedWeaponModFlags -1
Player.SetEquippedWeaponModFlags NewEquippedWeaponModFlags
elseif HasWeaponMod2 && WeaponMod2Effect == 2
set NewEquippedWeaponModFlags to EquippedWeaponModFlags -2
Player.SetEquippedWeaponModFlags NewEquippedWeaponModFlags
elseif HasWeaponMod3 && WeaponMod3Effect == 2
set NewEquippedWeaponModFlags to EquippedWeaponModFlags -4
Player.SetEquippedWeaponModFlags NewEquippedWeaponModFlags
endif
endif
endif
; Check if the player is out of ammo, if the player has pressed the reload button, or if the player has pressed any of the hotkeys
if GetPlayerCurrentAmmoRounds == 0 || IsControlPressed 7 || IsControlPressed 17 || IsControlPressed 18 || IsControlPressed 19 || IsControlPressed 20 || IsControlPressed 21 || IsControlPressed 22 || IsControlPressed 23 || IsControlPressed 24
; Reset the magazine size
Player.SetClipSize ClipSize EquippedWeapon
if ExtendedClip
; Reset the weapon mod flags if using an extended magazine
Player.SetEquippedWeaponModFlags EquippedWeaponModFlags
endif
endif
endif
; Detect if a long reload animation has started playing so that some checks can be run later
if ReloadAnim > 19
set Reloading to 1
set SavedAmmo to 0
endif
; Update the stored ammo count
ManualReloadContainerRef.RemoveItem EquippedWeapon ItemCount
set ItemCount to GetPlayerCurrentAmmoRounds +1
ManualReloadContainerRef.AddItem EquippedWeapon ItemCount
endif
; Check if a long reload animation is currently being played
if Reloading
; Save the ammo count in case reloading is interrupted
if GetPlayerCurrentAmmoRounds != 0
set SavedAmmo to GetPlayerCurrentAmmoRounds
else
SetPlayerCurrentAmmoRounds SavedAmmo
endif
; Keep the timer running until the reload animation has stopped
if ReloadTimer < 0.25
set ReloadTimer to ReloadTimer + GetSecondsPassed
else
if Player.GetAnimAction != 17
set Reloading to 0
set SavedAmmo to 0
endif
set ReloadTimer to 0
endif
endif
end

 

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...