The forum has been set to read-only mode. For community discussion and questions, head over to our Discord: https://discord.gg/taleoftwowastelands

How to adapt mod-added ammo to the New Ammo Press

General modding guides and authoring tutorials.
Post Reply
User avatar
Puppettron
Gary
Posts: 1715
Joined: Sat Nov 23, 2013 10:47 pm

How to adapt mod-added ammo to the New Ammo Press

Post by Puppettron » Fri Oct 03, 2014 10:41 pm

ok, so you've got mods that add new ammos of different calibers that break down to non-standard parts in your LO and want to know how you can make them work with the now fully-functional-albeit-differently-functioning Ammo Press in the Pitt.  that's not a problem, i can show you how in less time than it takes to order a pizza.¹


so let's start with how it works.  The meltdown option immediately runs this script:





here's the layman's writeup:




  • store the amount of brass in that quest script by taking the amount of the following in the box:  things in the formlist AmmoMillSmallCases * 3 + formlist AmmoMillMedCases * 4 + formlist AmmoMillLargeCases * 6


  • store the amount of plastic in the same quest script by taking the amount of Hull20ga * 3 + Hull12ga * 4


  • store the amount of powder in the same quest script by taking the amount of PowderPistol * 2 + PowderRifle * Rifle


  • store the amount of lead in the quest script by counting the lead.²


  • store the amount of primer by counting PrimerSmallPistol + PrimerLargePistol * 2 + PrimerSmallRifle * 3 + PrimerLargeRifle * 3 + Primer50MG * 5


  • add to the stored value of primer the count of PrimerShotShell * 2


  • remove everything


  • add brass, plastic, lead, and primer amounts equal to the stored values


then the Ammo Press option opens up a recipeMenu of the category TTWAmmoPressRecipes, then magic happens to put everything back in the box.³


now, how do you adapt the ammo press to work with your mod-added ammos?


first, make a new .esp to do this work.  yes, make a new .esp.  you don't want to make changes to TTW.esm, and if you screw up, it's easier to junk an .esp than it is to undo your changes in the mod in question.  so go make a new .esp.


now, if all you're concerned about is cases, then all you're doing is adding the new cases to the formlists in question.  that's pretty easy, and i won't walk you through it.


hulls?  your mod adds non-standard hulls?  well, you're going to have to alter the terminal script, so open the terminal DLC01MillAmmoTerminal in GECK (yes, geck.  you're modifying scripts and Edit doesn't have a compiler).  now, you have two options here:  if your mod-added hulls are a small number, you can just add those to the end of the script like so:  + (DLC01AmmoBoxREF.getItemCount <yourhullhere> * <appropriate multiplier>)


if, however, you're adding a lot of diffferent hulls, you might want to make formlists for small and medium hulls, and slap those formlists into the spots Hull20ga and Hull12ga take in the original script.


you using new sorts of lead components?  i wouldn't mess with those in the ammo press unless you actually know what you're doing and didn't actually need anything other than me pointing where to find the stuff, in which case you're probably not reading this.


new primers?  that's really weird, you know.  but do the same stuff i said in shotshell hulls above.  only in the primer bit.


now, onto the Ammo Press part.  Like mentioned above, the Ammo Press runs entirely through the recipe system, so if you want your stuffs makable, you'll just have to make recipes for them.  just make sure they use the category TTWAmmoPressRecipes, and you can probably figure out how to balance them in line with the already-established recipes in the TTW.


et. voila, you now have an .esp that patches the ammo press to work with your calibers and cfws


¹do not order a pizza to test this.  i'm not going to care if i'm wrong about it.

²it's there because i'm lazy and didn't want to figure out how to end-run it

³it uses a trick i picked up from Jax's Anchorage Customization optional


perms:  either a full fireworks display spelling out "Puppettron Made This" anytime a user accesses my content in-game, or just give me credit somewhere.

paragonskeep
Posts: 738
Joined: Thu Oct 25, 2012 6:19 pm

Thanks Puppett for posting.

Post by paragonskeep » Sat Oct 04, 2014 2:14 pm

Thanks Puppett for posting.


If life is but a test, where's the damn answer key?!?!?

User avatar
Puppettron
Gary
Posts: 1715
Joined: Sat Nov 23, 2013 10:47 pm

yeah, for future reference,

Post by Puppettron » Sun Oct 05, 2014 8:00 am

yeah, for future reference, that term script there isn't what's currently in TTW and was one of the versions i was having tested to move to a better version, but nothing i changed in it will effect this tut


perms:  either a full fireworks display spelling out "Puppettron Made This" anytime a user accesses my content in-game, or just give me credit somewhere.

Post Reply