Fallout 4
0 of 0

File information

Last updated

Original upload

Created by

trainwiz and ubuntufreakdragon

Uploaded by

ubuntufreakdragon

Virus scan

Safe to use

Tags for this mod

About this mod

Cleaned streamlined code for Alternate Ammunition by trainwiz, I got the permission via PM.

Permissions and credits
Changelogs
Now you can switch between ammo types (such as armor piercing, slug rounds, and explosive shots) for different weapons on the fly.
After El Rado (which is El Nino but radioactive because it's Fallout) returned
to the Mojave, the temperatures and climate changed drastically! All
the AP, HP, EXP, and DP ammunition rounds thusly migrated to the more
tolerable Commonwealth, where they were adopted by vendors and raiders!
Now it's your turn to give them a home. And by give them a home, I mean
fire them out of a gun.
This mod brings back the alternate ammunition mechanic from New Vegas, with a few small adjustments. With a new
[Switch Ammo] item, you can now freely turn your rounds into other
rounds with other bonuses and use them against other enemies. Hooray for
gameplay depth!

Here's a demonstration.


NEW FEATURES
_________________________________
-The ability to switch between ammo types on the fly! To do this, simply
equip the item called [Switch Ammo], which is found in the Apparel
section of your inventory. This means it can also be favorited!
-Several new ammo types to find, both in vendors, out in the world, and in
containers! This ammo is fairly rare, and comes with a variety of
benefits.
-Smart switching, with your ammo-switching system being able to detect what ammo types you have and cycle between them.
-Surplus packages: Cheap pouches full of low-grade ammunition
-A modular ammo-switching system that can work with any weapon, no plugins
needed. As long as your weapon uses one of the vanilla ammo types, it
can switch between different variations


CHANGES TO THE ORIGINAL FILE
_________________________________
The originale switch script had some oversights and massive code duplication,
I rewrote it reducing it's size from about 500lines of code to 75,
I have also added a way to register foreign ammo types and
renamed the scripts to use the namespace feature to move them inside their own folder
I've add many "const"s to used properties and scripts so the wont dig into saves.
I've removed any edit to vanilla leveled items and added them by script, to block incompatibilities to other mods.


FOR MODDERS
_________________________________
Register new ammo as soft dependency
Use RegisterForeignAmmo(Formlist ammolist, Formlist enchantlist, Formlist modlist)
You need 3 things for an new ammo set: a formlist of the ammunitions a formlist of weaponmods
 switching the ammotype to the new ammo and each weaponmod must have a unique enchantment
 to be detected by this mod so you need a formlist of enchantments
 all formlists must have same order and size.
(GetFormFromFile(0x0100083A, "AlternateAmmunition.esp")as AltAmmo:MainControlerQuest).RegisterForeignAmmo(myammolist, myenchantlist, mymodlist)
The Code contains waits so don't run from oninit directly instead use a single run timer started in oninit to fork the process


NEW AMMO TYPES
_________________________________
New ammo types for ballistic weapons:
-Armor piercing: Less damage for more armor piercing
-Hollow point: Less piercing for more damage
-Surplus: Rounds that can be bought in bulk, but do less damage
-Explosive: Explosive rounds (only for shotgun shells and .50 cal)
-Slug Rounds: Shotgun rounds that turn it into more of a rifle

New ammo types for energy weapons:
-Overcharged and Max charged: Do more damage but have WAAAAAAAAAAAAAAAAY more recoil
-Fusion Rounds: Gamma gun rounds that add energy damage

Misc ammo types:
-Zoomy Missiles and Boomy Missiles: High velocity and high explosive variants for missiles
-Explosive cannonballs: Does this need an explanation
-Frostbite Rounds: Cryocells that do fire damage. Science is still trying to figure out how they work.
-Rusty Railway Spikes: Do bleeding and poison damage

INSTALLATION AND COMPATIBILITY
_________________________________
Extract the contained zip and place the files in your data folder. In order for
your game to register that the relevant scripts exist, you'll need to
edit your Fallout4.ini so that the line bInvalidateOlderFiles=1 exists
under the [Archive] section, or that sResourceDataDirsFinal= line has
the line ", Scripts\" at the end, and will look something like
"sResourceDataDirsFinal=STRINGS\, Materials\, Textures\, Meshes\,
Interface\, Sound\, Music\, Scripts\ "
When installed and started up, you'll have a [Switch Ammo] item added under apparel, which can be
favorited. Whenever a weapon with alternate ammunition (and you have
alternate ammo in your inventory) is available, using [Switch Ammo] will
switch cycle through your ammo types. 
This mod modifies vendor lists, container lists, and a few cells. It does NOT, however, modify
weapons or weapon mods in any way, and will work with any rebalancing or
changing mod for these.