I'm not 100% on this answer but this should point you in the right direction. Modafinil is considered a wakefulness promoting drug instead of a CNS stimulant however if you compare the drug to amphetamine they work extremely similar. Amphetamine as you may know works by flooding your neural synapses with dopamine; essentially tricking your brain's reward system located in the hippocampal region of your brain normally reserved for pumping out those "feel good" chemicals and endorphins when you complete something essential for either your survival, like eating and exercising, or the survival of the species, in other words sex. Modafinil does practically the same thing and i do not quite fully understand what makes it different from amphetamine just yet. However, armed with the knowledge of how both drugs work we can deduce that yes. Modafinil is more than likely going to raise your tolerance for CNS stimulants like amphetamine and possibly reduce some of the stimulating effects of MDMA. Modafinil i believe will have less of an effect on your tolerance for MDMA because it more greatly affects other areas of your brain and releases serotonin on top of the dopamine. Hope this helps. Feel free to PM me with any further questions you may have.