Include paths and functions for external scripts

I am having a hard time understanding exactly what the problem is but two things come to mind.

  1. locate_template searches theme directories. It is not
    a general purpose file loader. I don’t know if that is relevant to
    your case. There is not enough detail in the question to work that
    out. Given that you have not mentioned themes at all and are only talking about “external scripts” and plugins, I suspect that this is the problem.
  2. You may be having scope issues with the includes.