How did leaders’ (social) class background, religious and ethnic loyalties, Marxist ideas and the success of the Bolshevik Revolution interact to help shape and motivate the anti-colonial nationalist movements?
I would argue that Marxist ideas had a baneful influence on many nationalist movements, particularly in Africa but also in South America and in Southeast Asia. Countries such as Taiwan and South Korea, which adopted non-Marxist paths, achieved much more rapid growth and democratization than those such as Mainland China and North Korea. The latter country, of course, is still mired in Marxism and may presently be the worst place on the planet in which to live.
This is such a broad question given that there have been so many anti-colonial nationalist movements with different specifics. Not all of the nationalist movements were shaped by Marxism. For example, India's movement was not significantly influenced by Marxism. By contrast, Vietnam's movement was strongly influenced by the success of the Bolshevik Revolution and the Marxist ideas of people like Ho Chi Minh.