I'm planning to travel from Budapest to Zagreb by train (IC 200 AGRAM). Should I buy a ticket advance or do they never sell out? Are there discounts for buying the ticket in advance?
If you try to book a ticket with Voyages-SNCF, you can immediately see if there are free seats in the train. You can even try to place several orders in your shopping cart (for some reason not more than 6 tickets per order) and estimate how many seats are yet available. For the next few days, the IC 200 seem to have at least 20 seats free, so I would assume that within reason, you can expect to get a ticket on short notice.
The cheapest tickets for the train seem to be the MÁV "Zagreb Special" offer for 8990 HUF or about 29€. If I understand the conditions properly, there is no contingent for the tickets and they are available for sale even on the same day. At least I am able too book a ticket now for the IC 200 departing in about six hours. You can order the ticket online and pick it up at a Hungarian railway station or buy it at the station.
My personal experience is a tad rusty, that is, a few years old.
I remember this service only runs a few times per week and, specifically in high season, fills up quickly. So, buying in advance seems the right thing to do.