nworbetan
Member
I started on a spading project not too long ago, and found myself writing some code that's just silly:
I'll give you two guesses which two lines make me feel a bit funny, and you better get both of them right. 
Seriously though, I'm probably going to end up splitting that one file I'm outputting into a separate file for each monster, because the strings could really get out of control if I were spading a zone with 5 monsters and using 6 columns per monster. (I had to add a .txt to upload the file, it looks much better if you open it with a spreadsheet.)
But to get to the point, would anyone else get any use out of array_to_file() and file_to_array() ASH functions? So far the map versions have done their job good enough to get by, and they still do, but now that I'm wanting to output data with a little more variety, array versions of those two functions would really hit the spot. I wanted to ask here before jumping straight to a feature request though, in case anyone knew of a more elegant way to get array data into a file.
PHP:
if (provisional_muscle != floor((barehanded ? .25 : 1) * my_buffedstat($stat[muscle])) || my_adventures() == 0 || error) {
string [string, string, string, string, string, string, string, string, string, string, string,string] tmp;
int i;
repeat {
i += 1;
file_to_map("mc_punchalot-" + provisional_muscle + "-" + i + ".csv", tmp);
} until (count(tmp) == 0);
for y from 0 to y_max {
tmp [data[0,y], data[1,y], data[2,y], data[3,y], data[4,y], data[5,y], data[6,y], data[7,y], data[8,y], data[9,y], data[10,y], data[11,y]] = data[12,y];
}
map_to_file(tmp, "mc_punchalot-" + provisional_muscle + "-" + i + ".csv");
print("Your " + provisional_muscle + " muscle data is waiting for you in mc_punchalot-" + provisional_muscle + "-" + i + ".csv");
for x from 0 to x_max for y from 0 to y_max data[x,y] = "";
if (error) abort();
}

Seriously though, I'm probably going to end up splitting that one file I'm outputting into a separate file for each monster, because the strings could really get out of control if I were spading a zone with 5 monsters and using 6 columns per monster. (I had to add a .txt to upload the file, it looks much better if you open it with a spreadsheet.)
But to get to the point, would anyone else get any use out of array_to_file() and file_to_array() ASH functions? So far the map versions have done their job good enough to get by, and they still do, but now that I'm wanting to output data with a little more variety, array versions of those two functions would really hit the spot. I wanted to ask here before jumping straight to a feature request though, in case anyone knew of a more elegant way to get array data into a file.