Hi Patrick
I'm not sure if the answer below is still correct - but I've found I can only reference "first level" custom object fields through the scripting. We have a very similar situation to you, and the solution was to expose the field we want on the first level object so we can access it.
One word of warning - you will need to trick Marketo into thinking the new field has been "modified" in Salesforce in order for it to sync all the records over. Otherwise, it will only sync the new field where it sees an update to it - which will be any changes made after you create the field.
Here is some code I've had some luck with so far:
To get evaluation scores
<ul>
#foreach ($EvaluationScore in ${Tour_Evaluation__cList})
<li>${EvaluationScore.NPS_Rating__c}
</li>
#end
This returns the numbers in a list format - eg.
* 10
* 7
* 5
To return a first level object from a field
<ul>
#foreach ($srv in ${TravellerServices__cList})
<li>
${srv.ServiceTypeTS__c}
</li>
#end
</ul>
This returns ServiceTypeTS in list format - eg.
* Hotel
* Car
* Tour
To get total purchases and their codes based on an IF statement
#set ($NumberofPurchases = 0)
<ul>
#foreach ($srv in ${Purchases__cList})
#if (${srv.ServiceTypeTS__c} == "Paint")
<li>
${srv.Service_Paint_Name__c}
</li>
#set ($NumberofPurchases = $NumberofPurchases +1)
#end
#end
</ul>
Number of Purchases = $NumberofPurchases
This return a bulleted list of purchases, followed by the total number:
* Red
* Blue
* Green
Number of Purchases = 3
I hope this helps. Have a look at my question if you can, hopefully we can help each other! Velocity email scripting - sorting a list
Phil