Evangela Posted March 22, 2019 Share Posted March 22, 2019 There's several approaches to any coding problem, no way is exactly the wrong way, but one way might be easier to implement than another way. Link to comment Share on other sites More sharing options...
NexusComa Posted March 22, 2019 Share Posted March 22, 2019 There's several approaches to any coding problem, no way is exactly the wrong way, but one way might be easier to implement than another way.I totally agree. Didn't set out to offend anyone ... Link to comment Share on other sites More sharing options...
Evangela Posted March 24, 2019 Share Posted March 24, 2019 I didn't aim that at anyone in particular, although there was obvious tension between the two of you, I cannot say which side started it. I just know that such things can occur between coders. Link to comment Share on other sites More sharing options...
TobiaszPL Posted March 24, 2019 Author Share Posted March 24, 2019 FormList have any Size limits? cause if i learn correct you have Functions to Add and Remove objects from FormList so there is no reason to use Arrays if we can use FormLists...1) FormList can store InGame objects2) FormList can store ObjectsForms3) FormList can be change InGame4) FormList can be used by many Scripts in same timeand many many more reason to use FormLists i see no reason to use Arrays... it there anything that Arrays can do what FormList can't?is there any reason to no use FormLists ? cause Arrays in compare to FormLists looks very bad Link to comment Share on other sites More sharing options...
ReDragon2013 Posted March 24, 2019 Share Posted March 24, 2019 (edited) Formlist handling can be extremly slow, does not have any size limit.Look at next threads to learn more about the topic! https://forums.nexusmods.com/index.php?/topic/5511977-running-a-script-on-a-formlist-of-actors-question/https://forums.nexusmods.com/index.php?/topic/4762520-is-there-any-performance-issue-when-dealing-with-extremely-large-formlists/ cdCooley has written good explanation herehttps://forums.nexusmods.com/index.php?/topic/6031618-vmad-or-form-list-which-is-quicker/ Edited March 24, 2019 by ReDragon2013 Link to comment Share on other sites More sharing options...
NexusComa Posted March 25, 2019 Share Posted March 25, 2019 @TobiaszPL Arrays are a common part of programming in most languages. Skyrim papyrus has a limited form of arrayswith a limit on size and no support for multidimensional arrays. Arrays and forms are both good and both have a variety of uses. In my case with my example I just needed to store all the objects I was using and be able to flush them to do it again and again.I also used two arrays "chains" to create a type of multidimensional array that I used to build a maze generator with. All this neededto be built and flushed on the fly so arrays for me worked out well. I started out with forms but in the end the constant referencing made the buildfar to slow. Form approach took 10 to 15 min to build a maze as the arrays did it in less than 1 min. But first I had to over come the array limit ... Link to comment Share on other sites More sharing options...
foamyesque Posted March 25, 2019 Share Posted March 25, 2019 FormList have any Size limits? cause if i learn correct you have Functions to Add and Remove objects from FormList so there is no reason to use Arrays if we can use FormLists...1) FormList can store InGame objects2) FormList can store ObjectsForms3) FormList can be change InGame4) FormList can be used by many Scripts in same timeand many many more reason to use FormLists i see no reason to use Arrays... it there anything that Arrays can do what FormList can't?is there any reason to no use FormLists ? cause Arrays in compare to FormLists looks very bad There are a few advantages to arrays over FormLists: 1. They can store things a FormList cannot (because they aren't forms): Numbers, strings, Aliases, and ActiveMagicEffects.2. Arrays can be generated at runtime, as many as needed, and be (by default) independent for each instance of the script. FormLists need to be saved into an *.esp file, an approach that doesn't scale well if you need an arbitrary or large number of lists.3. FormList retrieval and search is frame-rate-linked; array manipulation is not. Arrays are much faster as a result.4. Arrays allow you full control of order within the array, so you can do things like sort it.5. Arrays can store the NONE null value for objects. FormLists can't. The primary advantages FormLists have over arrays are that they can talk to game systems and are size unlimited. Link to comment Share on other sites More sharing options...
Recommended Posts