Rechambering weapons

Post » Mon Feb 15, 2016 9:48 am

I've been working on a mod for the past week which changes all the ammo conversion receivers into their own separate category, so that it's not necessary to give up an automatic receiver in order to switch your combat rifle over to .38 rounds. I've added rechamber options to every ballistic weapon that didn't already have them, as well as some other miscellaneous changes, but i've hit a serious stumbling block;


Namely, the game appears to have no multiplication function. In its present form, Multiply simply adds a % of the base on top; all further multiplications stack additively. Add resolves after multiply (as you would expect), but Set acts like an add for which you specify the output rather than the input.


To put it another way; if i want to change the 10mm pistol so that when you rechamber it to .44 rounds, its ammo capacity falls to 7 and its base damage increases by 4, i can do that.

What seemingly cannot be done is to then make it so that the large magazine increases its capacity to 14 (it adds 12, or 100% of the base magazine).

Regardless of what receiver you use, the final damage will always only be 4 points higher than it would be with standard ammo, because setting the base damage to a value 4 points higher only adds on 4 damage, at the end of the calculation.


Anybody have any ideas how i could get around this without making a different magazine and a different receiver for every weapon/ammo combination i want to implement?

User avatar
Eileen Collinson
 
Posts: 3208
Joined: Thu Dec 28, 2006 2:42 am

Return to Fallout 4