TheBlob2 Posted January 13, 2015 Share Posted January 13, 2015 how do you add and remove ammo from ammo lists? Link to comment Share on other sites More sharing options...
Ladez Posted January 13, 2015 Share Posted January 13, 2015 There's two ways, manually and by script. To do it manually, open the ammo list in question in the GECK and simply add or remove as you see fit. When you save it, your plugin will contain a new record of the ammo list that will override any previous ones. The flipside is that any later instances of that form list in your load order will override your plugin. As you can see, this approach is prone to conflicts, unless the user makes sure to build a merged patch. That means you put part of the workload in the hands of the user, which, in my opinion, should be avoided if at all possible. To do it by script, you'll need NVSE. The vanilla AddFormToFormList function makes permanent changes to your savefile, so it should be used very sparingly. It also adds items at the 0th index, which may not be optimal for ammo lists. There's also no function to remove items from form lists in vanilla, that is only possible with NVSE. You'll need to use ListAddForm and ListRemoveForm form to add and remove items, respectively. These functions make no permanent changes, they apply only for the current game session. That means they must be called once each time the game is loaded, which is where the function GetGameLoaded comes in (also NVSE.) This is the recommended way to do it, since you'll avoid any possible conflicts (between form lists, at least.) Here's a template you can use: Begin GameMode If GetGameLoaded ListAddForm [FORM_LIST] [ITEM_TO_ADD] ListRemoveForm [FORM_LIST] [ITEM_TO_ADD] EndIf End Link to comment Share on other sites More sharing options...
TheBlob2 Posted January 14, 2015 Author Share Posted January 14, 2015 (edited) ok, i tried looking around the geck but i cant find the form lists (please be mindful that i am new to the geck) Edited January 14, 2015 by TheBlob2 Link to comment Share on other sites More sharing options...
Ladez Posted January 14, 2015 Share Posted January 14, 2015 In the object window. Miscellaneous > Form List. Link to comment Share on other sites More sharing options...
Recommended Posts