Nevermind, I made it! Originally, I had the same problem as described here. However, I made some changes and tried using variables. It worked perfectly!
Here's my code (I'm using the %involved people list% tag).
Criteria:
NOT involved people list MISSING
Format:
$puts(ip,%<involved people list>%)
$substr($get(ip),1,$add($strchr($get(ip),'('),-2))|$substr($get(ip),$add($strchr($get(ip),'('),1),$add($strrchr($get(ip),')'),-1))|%title%
This way, I will firstly get the involved people, then their roles as "subfolders". I've not done anything more interesting, I just wanted to get it working. Now it works, and I'll get to polish it and make it the way I want (basically adding more subfolders, like album).
The syntax I use when entering information into INVOLVED PEOPLE LIST is
name1 (role1); name2 (role2); name3 (role3)
For anyone struggling with the same problem, here's details:
First, I created this:
$substr(%<involved people list>%,1,$strchr(%<involved people list>%,''))|%title%
This was the one that didn't work. It was supposed to take all the involved persons and include the tag value up to the first parenthesis (where the role part begins). However, I just ran into the problem I mentioned earlier.
So, I went on to defining a variable:
$puts(ip,%<involved people list>%)
I didn't know what this would actually do - would it parse the whole tag and put every matching value into the variable, or would it parse the first part of the tag (the first person), finish the subfolders here and then move on to the next part (person)? Turns out it was the latter, and thank God for that. (Sorry if that was a messy description, I'm not that good with this stuff.)
So, the rest was easy. I added another line, the complete script now looked like this:
$puts(ip,%<involved people list>%)
$substr($get(ip),1,$strchr($get(ip),'('))|%title%
This would give names such as Todd Wilson (, Mark Smith ( etc. So, I just fooled around a bit with the $add() function to remove the two latter characters (the opening parenthesis and the space before that). Now it looked like this:
$puts(ip,%<involved people list>%)
$substr($get(ip),1,$add($strchr($get(ip),'('),-2))
So, for the last part, I wanted to have roles as subfolders. I did pretty much the same here - I used $strchr() and $strrchr() to get the character position for the opening and closing parentheses, used the $add() function to remove the parentheses themselves and ended up with the result at the top of this post. Hope this helps people.
Edit: The only drawback with my INVOLVED PEOPLE LIST formatting used in conjunction with my script, is that I can not have parentheses in names or in the roles themselves, parentheses can only be used for denoting a role. For example: If I enter
Mike (Michael) Smith (guitar)
it will show up as the name "Mike" and the role "Michael) Smith (guitar". This can be fixed in two ways - either by changing the whole syntax used for entering information (which might be an idea), or by making the script find the last occurence of the opening parenthesis, and not the first occurence like I have done here (however, the latter does still not allow parentheses inside the role string).