dizietemblesssma Posted August 27, 2020 Share Posted August 27, 2020 I'm trying to test something by manually adding something to a formlist, the formlist is an element of an array of formlists.I want the form that is added to be something fixed, that definitely exists, so I tried this: formlist_array[1].addform(00063b47)and:(formlist_array[1] as form).addform(00063b47)and:formlist_array[1].addform(gemdiamond)etc. every effort fails in compile with:extraneous input 'b47' expecting RPAREN or:gemdiamond is not defined so it seems that I misunderstand what a form is, or more accurately, how to reference one in a script:) diziet Link to comment Share on other sites More sharing options...
IsharaMeradin Posted August 28, 2020 Share Posted August 28, 2020 (edited) (FormList_Array[1] as FormList).AddForm(myObject)myObject needs to be defined either as a property or have a value passed into it such as the akBaseItem parameter in the OnItemAdded event. If you wish not to use a property and do not have access to an existing variable that contains the data you need, you may utilize GetFormFromFile. FormList ListOne = FormList_Array[1] as FormList Form myObject = Game.GetFormFromFile(0x00063b47,"Skyrim.esm") ListOne.AddForm(myObject)Please note that the ID number used in GetFormFromFile is in hex format. It will always have 0x in front and the load order position numbers (first two) will always be 00. The game engine uses the plugin name string to determine at run time what numbers to use for the load order position. The remaining 6 digits of the ID number are the same as can be found in the Creation Kit or SSEEdit. Edited for typo(s) Edited August 28, 2020 by IsharaMeradin Link to comment Share on other sites More sharing options...
dizietemblesssma Posted August 28, 2020 Author Share Posted August 28, 2020 I'm going to try this, thanks.The reason I think I might need this is that I have 6/7 arrays each with 10 elements; each element a formlist. I am having difficulty filling the formlist using AddForms() (see previous thread) when the fornmlist is not already filled and then using form_list,revert() to empty it. I can make this work by adding a property in the CK of an empty formlist, but I want to avoid 60/70 properties if I can, so I thought I would try to use a loop or two to add a diamond or something to each list, which will be 'reverted' before actual use and see if that worked! Plus it would require 60/70 dummy formlists as well:) diziet Link to comment Share on other sites More sharing options...
Recommended Posts