It behaves similarly to adjectives. If it's in the place of the predicate, it's pluralized. If it's in the place of a modifier of a noun, it's never plural.
To sum it up, never pluralize it if it's directly before the noun (not even an article can separate them in that case.)
Isn't "vonatokra" technically better than "vonatokat"? (We don't get that construction until later, so the accusative has to do for now, I understand.)