Well, as I created my version many years ago (still not really finished), I was not too familiar with scripting. So I created front-hood, middle-part and back-hood as three assets which could be combined by the users. In addition to this I would have created a consist-asset so that the users would not need to assemble the loco manually.
May there are now possibilities to deal with articulated locos and streetcars and so on in a more comfortable way, but I would not spend too much time to find it out, as I am quite fine with the way I described above.