Hi all,

**OS** (Windows 11)

**PsychoPy version** (v2021.2.2)

I am very new to PsychoPy and have been mostly working with the builder view inserting code components where necessary. I have managed to do everything needed with the help of posts on this forum and others. There is one thing that I just can’t get my head around as to how to even begin implementing. Below is a snapshot of my flow:

I would like the routine after before the ISI (Block_Feedback) to show accruement of points across the course of the block (in text elements), that vary according to the response type, judgement type and player type. I found the following post: Giving feedback adding points collected in every round however my response-feedback is not binary and I am struggling to even adapt the code for my needs. Here is a snapshot of my excel file to demonstrate what I am referencing:

In experimental terms I want to implement the following:

- Player 1 (Participant) - text component 1, total of the following points over the course of the 64 trials per block:

- For where $match == NOMATCH

**For correct answer, truth == 1, this trial is worth 0 points.

**For incorrect answer, truth == 0: if response == $low_lie this trial is worth +1 point WHERE $judgement == Believed, and -1 Point WHERE $judgement == Not Believed; if response == $high_lie this is worth +2 points WHERE $judgement == Believed, and -2 points WHERE judgement == Not Believed.

*For where $match == COLOURMATCH

**If correct answer, truth == 1, this trial is worth +1 point.

**If incorrect answer, truth == 0: if response == $high_lie, this is worth +2 points WHERE $judgement == Believed, and -2 points WHERE $judgement == Not Believed; where response is not the truth or high value lie, this is worth 0 points (perceived as a behavioural error).

- For where $match == SUITMATCH

**If correct answer, truth == 1, this trial is worth +2 points.

**if incorrect, truth == 0 , this is perceived as a behavioural error worth 0 points.

- Player 2 (Computer) - text component 2, total of the following points over 64 trials per block:

*For where player 1 response is correct, truth == 1, this is worth +1 point WHERE $judgement == Believed, and -1 point WHERE $judgement == Not Believed.

*For where participants report the incorrect answer, truth == 0, this is worth +1 point WHERE $judgement == Not Believed, and -1 point WHERE $judgement == Believed.

Hopefully this communicates effectively what I am trying to do, I am just so stumped how to write a loop with so many conditional statements. I am also worried that the lack of input for some of the cells in the excel files (low_lie/high_lie) may screw up the code- but not sure how to express that for these cells if they make any other response than those held within the truth, low_lie, high_lie variables then this is a behavioural error.

Thank you in advance for any aid you can give me!

Tigan