Without reading the whole thread in depth, this seems like an $eval issue.
Using your example as a basis:
Assume %username = abc123
If this:
$replacex(You are [username],[username],$+(%,username))
gives this:
You are %username
---
And this:
$eval([color:green]You are %username,1)[/color]
returns this:
You are abc123
---
Then why, when combined, does this:
$eval([color:red]$replacex(You are [username],[username],$+(%,username)),1)[/color]
return this:
You are %username
?????
-genius_at_work