forgetandeatcake978 Posted November 1, 2020 Share Posted November 1, 2020 I have an array that I want to put into the creation kit. It is saved on a txt file, it's entries look like this: 001100101000 001000111000 000011101000 000101100010 100100100010They are all the size length, and there is a lot more of them (I will have to test how many I can fit and how the script handles it, ideally I would put 10,000 entries into this array but I don't know how much skyrim can handle) How do I do this? I don't need it to read it from a file, I can copy and paste the values into the creation kit script. I think I should also be saving each entry as a string, because I plan to randomly select one of the elements, then use Skse's GetNthChar function to get every number. Thank you for any help Link to comment Share on other sites More sharing options...
dylbill Posted November 2, 2020 Share Posted November 2, 2020 Hey, unfortunately Arrays in papyrus can only hold 128 entries. You can set up a multi dimensional array though to hold more entries which I've explained here: https://forums.nexusmods.com/index.php?/topic/9192568-a-few-questions-about-arrays/page-3 It's a thread for Fallout 4 but it works in Skyrim too. Let me know if you have any questions. Link to comment Share on other sites More sharing options...
IsharaMeradin Posted November 2, 2020 Share Posted November 2, 2020 Slight correction: Arrays defined completely within papyrus script can only have 128 entries max.Arrays defined as a property stored on an object holding the papyrus script can exceed the otherwise standard 128 entry limit. 10,000 seems to be rather excessive and may hit unknown limits both within the Creation Kit and the game. If you don't mind me asking, what exactly is it that you are wanting to accomplish with these numbers? Link to comment Share on other sites More sharing options...
forgetandeatcake978 Posted November 2, 2020 Author Share Posted November 2, 2020 Hey, unfortunately Arrays in papyrus can only hold 128 entries. You can set up a multi dimensional array though to hold more entries which I've explained here: https://forums.nexusmods.com/index.php?/topic/9192568-a-few-questions-about-arrays/page-3 It's a thread for Fallout 4 but it works in Skyrim too. Let me know if you have any questions.Thank you, although 128 entries should be enough. Slight correction: Arrays defined completely within papyrus script can only have 128 entries max.Arrays defined as a property stored on an object holding the papyrus script can exceed the otherwise standard 128 entry limit. 10,000 seems to be rather excessive and may hit unknown limits both within the Creation Kit and the game. If you don't mind me asking, what exactly is it that you are wanting to accomplish with these numbers?Each string represents a unique maze. By feeding the string into a function (that exams each character in turn) it will enable or disable referenced walls to create the maze. Still need to write that function but it should be simple enough, I make an array of these strings, get a random one and then using a for loop or something use skse getnthcharacter function to look at each character. That way I can randomise the area each time. 10,000 would be bragging rights, but 128 unique mazes should be enough that a player will never come across the same one twice Link to comment Share on other sites More sharing options...
dylbill Posted November 2, 2020 Share Posted November 2, 2020 Ah, well as IsHaraMeradin said, there's two ways to fill arrays. One is with the script itself and the other is doing it manually in the Creation Kit. For the script method: String[] Property MazeArray Auto Event OnInit() MazeArray = New String[128] ;change 128 to the size you desire MazeArray[0] = "001100101000" MazeArray[1] = "001000111000" MazeArray[2] = "000011101000" MazeArray[3] = "000101100010" MazeArray[4] = "100100100010" EndEventThe other way, just compile the script with the array property in it, go to the creation kit, click on the script and properties, click on the property and Edit Value and add the entries manually. Link to comment Share on other sites More sharing options...
Recommended Posts