I have a text file (Types.txt) that controls which 'AI' is used by a specific mob. It would look somthing like this


I am trying to seperate this into these variables:
Index,Comment,Option1,Option2,Option3,Option4,Option5,Option 6

EG: Calling line 3
textfile = 'Types.txt'
line = 3
I would get:
Index = AI3
Comment = WanderAndAttack
Option1 = 1
Option2 = 1
Option3 = 1
Option4 = 1
Option5 = 1
Option6 = 1

I am not sure how I would going about doing this

If this helps, The AI may be a DANTOM on its own or an OBJ, but probbably a Datom
You could use something like the text2list proc from hub://Deadron.Texthandling to separate each line (\n) and then do the same with commas.

However, it may be easier to use the format that a savefile produces with ExportText and then just use ImportText to convert it to a save file for easy reading and writing.
It's datum, not dantom <.<