Vaisaius8 Posted November 28, 2021 Share Posted November 28, 2021 Hey all, For my first foray into mod making, I'm trying to create a mod that adds more small-scale chemistry-related recipes based on larger-scale industrial processes to the game. As an example, this mod would add a recipe that allows the player to mix together bone, purified water, and acid to produce a larger quantity of acid and cement:The problem I'm running into is that the CNAM (Created Object) entry for my COBJ (Constructable Object) form only seems to be able to reference one formID (and therefore one product) at a time. Is there a way to enter a list into the CNAM field and have the game give the player every item on that list when the recipe is used? Thanks in advance for your time! Link to comment Share on other sites More sharing options...
Tlam99 Posted November 28, 2021 Share Posted November 28, 2021 The amount of items created can be any number.It's defined by, well, number of items created :) Link to comment Share on other sites More sharing options...
Vaisaius8 Posted November 28, 2021 Author Share Posted November 28, 2021 That's just it though: you can have multiple items as a product, but unless I'm missing something, they all have to be the same type of product. As an example, let's say I created a COBJ that called for 2 bone, 1 purified water, and 1 acid in order to kick out a number of whatever is listed under CNAM equal to INTV --> Created Object Count. I could set CNAM to acid and INTV --> Created Object Count to 15 and get 15 acid for 2 bone, 1 purified water, and 1 acid Or, I could set CNAM to concrete and INTV --> Created Object Count to 5000 and get 5000 concrete for the same ingredients. However, in both instances, I can only choose 1 type of product to enter into CNAM; I can't enter both acid and concrete. What I'm asking for is if there's some sort of workaround for this limitation, like a form list that allows me to specify both of these products and that will still be accepted as a CNAM entry. Link to comment Share on other sites More sharing options...
SKKmods Posted November 28, 2021 Share Posted November 28, 2021 You apply a script to the player that AddInventoryEventFilter(MyProxyObject). The recipe creates MyProxyObject When Event OnItemAdded fires, the script RemoveItem(MyProxyObject) and AddItem(ReplacementItems) Use multple ReplacementItems with individual forms, or just once with a FormList of items or a LevelList of items. Link to comment Share on other sites More sharing options...
Vaisaius8 Posted November 29, 2021 Author Share Posted November 29, 2021 You apply a script to the player that AddInventoryEventFilter(MyProxyObject). The recipe creates MyProxyObject When Event OnItemAdded fires, the script RemoveItem(MyProxyObject) and AddItem(ReplacementItems) Use multple ReplacementItems with individual forms, or just once with a FormList of items or a LevelList of items. Actually, that gives me a sort of roundabout idea: use the ingredients to make an intermediate product (e.g. 3 bone + 1 purified water + 5 acid --(COBJ)--> 1 bone slurry (some sort of custom item I'd make)), then give the intermediate product a series of CVPA component entries for the intended products (e.g. 1 bone slurry --(scrap)-->1 concrete + 10 acid). It wouldn't be as fast as I had planned, but chemistry never is. Besides, if I'm going to be modding more in the future, I should really get the basics of FO4Edit down before I jump into scripts. Any good tutorials out there? I found Elianora's tutorial on Youtube, but when I tried copying over a miscellaneous item's mesh entry from the Fallout4.esm into my new item like she demonstrates, the game CTD'd when I tried opening the menu. That tells me the mesh didn't import properly. Link to comment Share on other sites More sharing options...
Recommended Posts