First trinitarianism did not exist at the time that modalism was popular and condemned - late second and early third centuries. Trinitarianism is a doctrine that was developed by the two Gregories and Basil in the fourth century.
With that in mind, modalism was the belief that the doctrine "God is One" must be preserved at all costs. So the modalists taught that God is one persona and three activities. He is GOD acting out in history as Father, Son and Holy Spirit. There is no difference in GOD, only that HE has different names or modes. The problem that Tertullian had with their being no individuation of any kind is that this means that the Father suffered and died too. Although this is a heresy today, this is the way that most Christians in the pews still understand the Christian God. There is GOD and he is a Father (with a white beard sitting on a throne in heaven), a Son (Jesus Christ incarnate on earth), and a Spirit (charismatic activity in the church until Jesus comes again).
The Trinity is a doctrine that took on philosophical terms to try to explain the Christian God. It was framed with the concept of the universal and particulars. The idea is that there can be three different or "particular" horses in the stable - Lightening, Blaze, and Bolt. All of them, however, are horses because they share in a universal "horseness". This concept is applied to God where God is the universal and Father and Son and Holy Spirit are the particulars. They taught that there was no difference in the divine nature or ousia, only in the relations of the particulars to each other. It is the development of the idea of Tertullian that God is one substance and three persona. The Cappadocians said that different characteristics of the three (for instance, "unbegotten," "begotten," "proceeding") were not characteristics designating the divine nature, but only of the particular mode of the divine nature. The "sameness" of nature was an equality or likeness of substance, not a unity of substance.
Of course the Trinity borders on polytheism, which the Cappadocians were accused of - in their case creating a doctrine of three, even four gods. This is still the opinion of critics of this doctrine. The Cappadocians responded by affirming that the nature was indivisible and that the category of number cannot really be applied to GOD. Only material beings can be numbered. The biggest problem with the Trinity framed in this way, however, is that the distinctions, the particulars, make no difference at the transcendent level. In the transcendent realm these differences cannot be maintained, but were only put into place to deal with the doctrine of incarnation to explain the difference between Jesus and God, and yet to allow for worship of Jesus as GOD. The Cappadocians knew this and so in the final moment say that the Trinity cannot be grasped by the intellect, but only by means of mystical participation in the liturgy, in the Eucharist on the altar.