irswat Posted November 18, 2016 Share Posted November 18, 2016 Does anyone know about arrays that can hold more than 128 that was supposedly added in last patch? where is the documentation? Link to comment Share on other sites More sharing options...
mrpwn Posted November 18, 2016 Share Posted November 18, 2016 There is not a whole lot of documentation, but the functions are in the Utility script. Link to comment Share on other sites More sharing options...
NexusComa Posted November 18, 2016 Share Posted November 18, 2016 (edited) Just posted an example on how to get past this. Edited November 18, 2016 by NexusComa Link to comment Share on other sites More sharing options...
irswat Posted November 18, 2016 Author Share Posted November 18, 2016 Does anyone know about arrays that can hold more than 128 that was supposedly added in last patch? where is the documentation?I wish I could give you guys Karma points for your helpful replies! Very useful. Never found this on the wiki before! Awesome! Also while I was laying in bed last night I realized I was approaching this all wrong! I figured out a way to implement both efficiency and performance, as well as dynamic support for third party mod. It's very simple. Currently I was planning on filling formlists: one with weapon forms, one with spells, one with shouts, one with items, etc. And then check the parser return against the form name. I got this working and when there was only 10 items in the formlist this worked wonderfully! It was able to parse and execute 4 commands in 4 ten thousandsths of a second! Then I dragged and dropped all the weapon forms that weren't ench into my formlist (with ench weapons there are about...3000 formlists!), about 300 in all. I ran into the 128 array problem. Then I figured out a few efficiency methods that I thought were novel, but the results were still not nearly fast enough. I thought the project was doomed. Then it occurred to me instead of checking the parsed command against formlists, I should fill a formlist with all weapons, armor, items, spells, shouts, etc. that are in the player container! I can then use a ref alias to keep these formlists up to date. Suddenly I don't need a tes5edit patcher to dynamically create and fill formlists based on a users load order, I don't run into the 128 array problem, and I avoid many of the performance woes! Eureka! Link to comment Share on other sites More sharing options...
NexusComa Posted November 18, 2016 Share Posted November 18, 2016 So the formlist is your array per say ... nice Link to comment Share on other sites More sharing options...
irswat Posted November 18, 2016 Author Share Posted November 18, 2016 It's complicated. I have a generic list of terms stored in various string arrays that interface with the parser: Material Type ("Ebony", "Iron", "Glass", etc); Weapon type ("sword", "battleaxe","bow","mace", etc); then there are the unique modifiers, for example: DismayCowardiceFearEmbersBurningScorchingChillsFrostIceSappingDrainingDiminishingSparksArcingShocksSoulsSoul SnaresBindingFatigueWearinessTorporBlessedSanctifiedReverentColdAegusvabeAlessandra'sAlterationAmren'sAncientAngi'sBalgruuf'sSacrificeHuntingBloodthornBolar'sOathbladeBarvir'sBoundtheHuntBriarheartGeisBrokenCeremonialChillrendConjurationAnimusAnnihilatingBanishingBlizzardsDamnationDebilitationDepletingDespairDevouringDreadEnervatingEvokingExhaustionExpellingFreezingGarneringHarvestingImmobilizingLeechingLethargyLightningMaledictionNullifyingPetrifyingStormsSunningSubsumingTerrorBlazeInfernoSorcererVampireThunderboltsWinterDawnbreakerDestructionDragonPriestDragonbaneDrainbloodDrainheartDrainspellDravin'sGleaningHarrowingReapingWinnowingDebilitationFlamesSiphoningBurningSphereEdujEyeMelkaSuppleFiriniel'sEndFroki'sGadnor'sCharmingGauldorBlackbladeBalckbowGhorbash'sGhostblade So a person speaks a command while holding the 'mic' button. Windows voice to speech translates this to text. The text is then dumped to a string in papyrus using PapyrusUtil. The string is then parsed by line, and each line constitutes a command, the command content, and a delimiter. For example: "Equip Sword of Woe Both Hands Quick". Equip is the command, Sword of Woe is the content, and quick is the delimiter. Each word of the voice command is stored in a string array. The array is then analyzed against the aforementioned lists of generic terms and a CommandStructure string array is filled. For example in the above voice command the structure would be command, weapon type, unique modifier, unique modifier, equip slot, and delimiter.I was running into the array problem because at this point I pass the Formulator string array, which contains the actual command content, and the CommandStructure string array, to a recognition function. My original design proposed, for example an equip weapon command, using a pre filled form list containing every weapon form, using a counter to go through each one, get the name, and then parse the name of each form word by word. I would search the Formulator for the first word from the weapon forms name, if it was not found, I would goto the next form, if it was found, i'd goto the next word of that forms name until I had a perfect match. It's a bit more complicated than this of course. The problem is the FormList originally had 3000 forms, until I removed all the "Ench" weapons, then it had 300 forms, which is still greater than the 128 limit. Furthermore even 300 forms was proving to be too slow to be useful as a voice command engine, which requires near instantaneous reactions.I hope this clarifies. Link to comment Share on other sites More sharing options...
Recommended Posts