If you are talking about variables, I guess you are talking about my version of the discogs script /t/9226/1 ?
You are not telling much about what you've tried so far and what exactly you want as output, so I will have to start from the begin.
The settings you are looking for are in the ARTIST NAMES section.
There you have the sub-sections Extra Artist - Track Credits and Extra Artist - Album Credits. These are about all the extra artist listed on the discogs pages, not only "composed by" and "written by". The first for those which are listed within the tracklist, different for eacht track, the second for those which are listed below the tracklist, same for the entire album.
Each of those sub-sections is again splitted in ... - Primary Names and ... - Name Variations. At discogs, the Primary Name is the spelling of an artist name, wich is also used at his artist profil page. The Name Variations are different spellings or short forms, which are used at the different releases. You can write both of them or only one. The deffault settings are writting the one which is used at the release, the Name Variation.
Here is an example of the settings for Extra Artist - Album Credits - Name Variation, the other three blocks work in the same way. I added the line numbers at the begin only for explantion here.
01|Extra Artist - Album Credits - Name Variation: >UNSYNCEDLYRICS
02|- name/track n format: >name (track: n)
03|- name/role format: >name (role)
04|- combine names with same roles >no
05|
06|if more than one extra album artist:
07|- multivalue tag field >no
08|- multiline tag field >yes
09|- list of names >no
10| - seperating characters used in list >;
11|Extrafields: >
12|- delete extra fields from main section >yes
In all lines, do only edit after the > character!
In line 01 you can choose the tag field where you want that the extra artists in your files. If you don't want that in your tag fields, leave the line empty after the > character.
In line 02-04, you can choose the format which the artist names are written into your files.
In line 02, the placeholder name stands for the artist name, the placeholder n stands for restriction to certain tracks (if given at discogs). This line is only there for the album credits, as the track credits are always only for one track.
In line 03, the placeholder name stands for the artist name (with or without the track restriction as controlled in the line above), the placeholder role stands for for the role description of the artist, like "composed by" or "written by".
In line 04, you can choose with >yes or >no if artists with the same role should be combined with the role only written once for all artist (as you can see it on the discogs page) or if the role should be repeated for each artist name.
In line 07-10, you can choose how the different credits should be listed. Choose yes for one of the lines 07-09, and no for the other two.
A >yes in line 07 gives you multivalue tag fields. These are somewhat special at web sources, read here how to deal with them: [WS] Discogs (pone mod).
A >yes in line 08 gives you a tag field with one line for each credit entry.
A >yes in line 09 lists the credit entries in a standard one line tag field. If you have yes in line 09, choose the seperating characters for the different credit entries in line 10. Don't forget a trailing space after a comma or similar, e.g: ">, " or ">; ".
Line 11 is the most advanced part of the settings. There you can split certain roles from your main credits fields and write it to an seperate field. An example: if you want all credit entries with the roles "Composed By", "Written By" and "Written-By" into the COMPOSER tag field, use the following there:
Extrafields: >COMPOSER:Composed By<>COMPOSER:Written By<>COMPOSER:Written-By<
The format rule is: >YOUR TAG FIELD NAME:discogs credit role name< . You have to use the exact spelling from discogs to get the script right, see here for the different discogs credits:
http://www.discogs.com/help/creditslist
As you can see, you can combine different roles into one tag field, but you can also send them to different tag fields.
In line 12, you can choose if the roles from line 11 should be deleted form your main tag field for the credits (the one form line 01), or if they should be repeated there.
Furthermore, you can can combine track credits and album credits into one tag field or write them to different tag fields.
If you want to combine them in one field, use the same tag field name in line 01 of the different sub-sections at the ARTIST NAMES section. If you don't want to combine them in one field, use different tag field names.
In addition, you have to choose >yes for those Credits you want to combine with others and >no for thoses you don't want to combine at the CREDITS; NOTES; IDENTIFIERS; COMPANIES section. That gives you proper formated and readable tag fields with empty lines and headlines between the different logical blocks.
You can also combine the different Extra Artists Extrafields (line 11) from the Album Credits and the Track Credits. For that, simply use the same Extrafields line (line 11) for Album Credits and the Track Credits.
I hope I made everything clear. Describing that is almost as complicated as writing the script in the first place. Just ask if you have more questions.
There is also a version of the discogs script by dano, where you don't have to set up a setting file, but you can't customize the output there as you can do with my version: /t/1992/1