Item list map

ckb

Minion
Staff member
I want to have a .txt file that is a list of items, like this:

Code:
A Light that Never Goes Out
Bram's choker
disassembled clover
Hairpiece On Fire
Half a Purse
portable cassette player
Vicar's Tutu

Is there a way I can get that into a script with file_to_map()?

I know I can do it by loading it into a boolean[item] aggragate, but that requires me to add a boolean entry to the file list. This is workable, but harder to enter and read. I would prefer a file like itemflags.txt
 

Winterbay

Active member
You can add a number in front of each as well and load it as a item[int]-map I guess. Meaning that $MAP[0] = $item[A Light that Never Goes Out]
 

Bale

Minion
Or you can add true after each of those items so that the item will be the key in a boolean [teim] map.

It just can't be done exactly as requested. There needs to be at least two fields on each line, separated by a tab, otherwise it wouldn't be a map.
 

ckb

Minion
Staff member
Or you can add true after each of those items so that the item will be the key in a boolean [teim] map.

Thanks. This was my conclusion, but I was hoping it was not so :(
I will add truths to each item.
 
Top