In my experiment, people are shown an ID and flag, and asked how many tokens they want to give to that person (0-10). In the data file, I can see the number of tokens they gave in each trial (their answer on my custom Likert scale) but not which ID and flag was displayed in that trial. How do I save that information in my data as well?
My script:
<text V2Instructions>
/ items = ("text.")
/ halign = center
</text>
<text SpaceToStart>
/ items = ("Press Space to start")
/ position = (50,80)
/ fontstyle = ("Calibri", 2.08%, false, true, false, false, 5, 1)
</text>
<trial V2StartingExperiment>
/stimulusframes = [1= V2Instructions, SpaceToStart]
/ validresponse = (" ")
</trial>
<values>
/ tokensGivenRound1 = 0
/ tokensGivenRound2 = 0
/ tokensGivenRound3 = 0
/ tokensGivenRound4 = 0
/ tokensGivenRound5 = 0
/ tokensGivenRound6 = 0
/ tokensGivenRound7 = 0
/ tokensGivenRound8 = 0
/ tokensGivenRound9 = 0
/ tokensGivenRound10 = 0
/ tokensGivenRound11 = 0
/ tokensGivenRound12 = 0
/ tokensGivenRound13 = 0
/ tokensGivenRound14 = 0
/ tokensGivenRound15 = 0
/ tokensGivenRound16 = 0
/ tokensGivenRound17 = 0
/ tokensGivenRound18 = 0
</values>
<item InitialsPlayerB>
/1 = "D.K."
/2 = "E.J."
/3 = "A.K."
/4 = "L.B."
/5 = "M.N."
/6 = "F.S."
/7 = "J.M."
/8 = "K.A."
/9 = "R.B."
/10 = "S.F."
/11 = "J.W."
/12 = "T.H."
/13 = "A.S."
/14 = "T.G."
/15 = "E.B."
/16 = "S.P."
/17 = "R.D."
/18 = "E.P."
</item>
<text InitialsPlayerB>
/ items = InitialsPlayerB
/ select = noreplace
/ position = (80,10)
/ font = ("Calibri", -20, 700, 0, 49)
/ fontstyle = ("Calibri", 5%)
</text>
<item FlagB>
/1 = "stimulusMaterial/Flag_of_Portugal.png"
/2= "stimulusMaterial/Flag_of_Portugal.png"
/3= "stimulusMaterial/Flag_of_Portugal.png"
/4= "stimulusMaterial/Flag_of_Portugal.png"
/5= "stimulusMaterial/Flag_of_Portugal.png"
/6= "stimulusMaterial/Flag_of_Portugal.png"
/7= "stimulusMaterial/Flag_of_Portugal.png"
/8= "stimulusMaterial/Flag_of_Portugal.png"
/9= "stimulusMaterial/Flag_of_Portugal.png"
/10 = "stimulusMaterial/Flag_of_Germany.png"
/11 = "stimulusMaterial/Flag_of_Germany.png"
/12 = "stimulusMaterial/Flag_of_Germany.png"
/13 = "stimulusMaterial/Flag_of_Germany.png"
/14 = "stimulusMaterial/Flag_of_Germany.png"
/15 = "stimulusMaterial/Flag_of_Germany.png"
/16 = "stimulusMaterial/Flag_of_Germany.png"
/17 = "stimulusMaterial/Flag_of_Germany.png"
/18 = "stimulusMaterial/Flag_of_Germany.png"
</item>
<picture FlagB>
/ items = FlagB
/ position = (80, 20)
/ size = (90,60)
/ select =noreplace
</picture>
<text tokensQuestion>
/ items = ("How many tokens do you want to give to <% text.initialsplayerb.item(text.InitialsPlayerB.nextindex) %>?")
/ position = (50,45)
</text>
<trial TokensGivenV2>
/ stimulusframes = [1=line, 00, 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, instruTokens,tokensQuestion,InitialsPlayerB,FlagB, OwnInitials, OwnFlag]
/ inputdevice = mouse
/ validresponse = (00, 01, 02, 03, 04, 05, 06, 07, 08, 09, 10)
/ ontrialend = [
if (trial.TokensGivenV2.trialcount == 1) {
values.tokensGivenRound1 = trial.TokensGivenV2.response
}
else if (trial.TokensGivenV2.trialcount == 2) {
values.tokensGivenRound2 = trial.TokensGivenV2.response
}
else if (trial.TokensGivenV2.trialcount == 3) {
values.tokensGivenRound3 = trial.TokensGivenV2.response
}
else if (trial.TokensGivenV2.trialcount == 4) {
values.tokensGivenRound4 = trial.TokensGivenV2.response
}
else if (trial.TokensGivenV2.trialcount == 5) {
values.tokensGivenRound5 = trial.TokensGivenV2.response
}
else if (trial.TokensGivenV2.trialcount == 6) {
values.tokensGivenRound6 = trial.TokensGivenV2.response
}
else if (trial.TokensGivenV2.trialcount == 7) {
values.tokensGivenRound7 = trial.TokensGivenV2.response
}
else if (trial.TokensGivenV2.trialcount == 8) {
values.tokensGivenRound8 = trial.TokensGivenV2.response
}
else if (trial.TokensGivenV2.trialcount == 9) {
values.tokensGivenRound9 = trial.TokensGivenV2.response
}
else if (trial.TokensGivenV2.trialcount == 10) {
values.tokensGivenRound10 = trial.TokensGivenV2.response
}
else if (trial.TokensGivenV2.trialcount == 11) {
values.tokensGivenRound11 = trial.TokensGivenV2.response
}
else if (trial.TokensGivenV2.trialcount == 12) {
values.tokensGivenRound12 = trial.TokensGivenV2.response
}
else if (trial.TokensGivenV2.trialcount == 13) {
values.tokensGivenRound13 = trial.TokensGivenV2.response
}
else if (trial.TokensGivenV2.trialcount == 14) {
values.tokensGivenRound14 = trial.TokensGivenV2.response
}
else if (trial.TokensGivenV2.trialcount == 15) {
values.tokensGivenRound15 = trial.TokensGivenV2.response
}
else if (trial.TokensGivenV2.trialcount == 16) {
values.tokensGivenRound16 = trial.TokensGivenV2.response
}
else if (trial.TokensGivenV2.trialcount == 17) {
values.tokensGivenRound17 = trial.TokensGivenV2.response
}
else if (trial.TokensGivenV2.trialcount == 18) {
values.tokensGivenRound18 = trial.TokensGivenV2.response
}
]
</trial>
<values>
/ B1 = 5
/ B2 = 5
/ B3 = 5
/ B4 = 5
/ B5 = 5
/ B6 = 5
/ B7 = 5
/ B8 = 5
/ B9 = 5
/ B10 = 5
/ B11 = 5
/ B12 = 5
/ B13 = 5
/ B14 = 5
/ B15 = 5
/ B16 = 5
/ B17 = 5
/ B18 = 5
/ ValueTokens = 0.003
</values>
<text ScoreSummaryText>
/items = ("This is the end of the game.
Press space to see your score and a summary of all answers.")
/ halign = center
</text>
<text EndScoreParticipant>
/items = ("Your score is <% 10- values.tokensGivenRound1 + 2*values.b1 + 10- values.tokensGivenRound2 + 2*values.b2 + 10- values.tokensGivenRound3 + 2*values.b3 + 10- values.tokensGivenRound4 + 2*values.b4 + 10- values.tokensGivenRound5 + 2*values.b5 + 10- values.tokensGivenRound6 + 2*values.b6 + 10- values.tokensGivenRound7 + 2*values.b7 + 10- values.tokensGivenRound8 + 2*values.b8 + 10- values.tokensGivenRound9 + 2*values.b9 + 10- values.tokensGivenRound10 + 2*values.b10 + 10- values.tokensGivenRound11 + 2*values.b11 + 10- values.tokensGivenRound12 + 2*values.b12 + 10- values.tokensGivenRound13 + 2*values.b13 + 10- values.tokensGivenRound14 + 2*values.b14 + 10- values.tokensGivenRound15 + 2*values.b15 + 10- values.tokensGivenRound16 + 2*values.b16 + 10- values.tokensGivenRound17 + 2*values.b17 + 10- values.tokensGivenRound18 + 2*values.b18 %> tokens.
~nAfter finishing the game, ~nyou will get a bonus payment of £<% values.ValueTokens * (10- values.tokensGivenRound1 + 2*values.b1 + 10- values.tokensGivenRound2 + 2*values.b2 + 10- values.tokensGivenRound3 + 2*values.b3 + 10- values.tokensGivenRound4 + 2*values.b4 + 10- values.tokensGivenRound5 + 2*values.b5 + 10- values.tokensGivenRound6 + 2*values.b6 + 10- values.tokensGivenRound7 + 2*values.b7 + 10- values.tokensGivenRound8 + 2*values.b8 + 10- values.tokensGivenRound9 + 2*values.b9 + 10- values.tokensGivenRound10 + 2*values.b10 + 10- values.tokensGivenRound11 + 2*values.b11 + 10- values.tokensGivenRound12 + 2*values.b12 + 10- values.tokensGivenRound13 + 2*values.b13 + 10- values.tokensGivenRound14 + 2*values.b14 + 10- values.tokensGivenRound15 + 2*values.b15 + 10- values.tokensGivenRound16 + 2*values.b16 + 10- values.tokensGivenRound17 + 2*values.b17 + 10- values.tokensGivenRound18 + 2*values.b18) %>.
~n~n~n~nPress space to continue")
/ halign = center
</text>
<trial ScoreSummary>
/stimulusframes = [1= ScoreSummaryText]
/ validresponse = (" ")
</trial>
<trial EndScoreParticipant>
/stimulusframes = [1= EndScoreParticipant]
/ validresponse = (" ")
</trial>
<block PrisonersDilemmaV2>
/ trials = [1 = V2StartingExperiment; 2-19 = TokensGivenV2; 20=ScoreSummary, EndScoreParticipant]
</block>