According to Jainism, Shalakpurushas (शलाकपुरूष) are the 63 distinguished souls who appear during each half of the life cycles (kalpa). The deeds of these illustrious beings serve as guide in how to conduct oneself. A single set of Shalakpurushas comprise the following:
I. 24 Tirthankaras (forth finders)
II.12 Chakravartin (great monarchs)
III. 9 balabhadras or Baladevas (non-violent heroes)
IV. 9 Narayanas or Vasudevas (violent heroes)
V. 9 Prati- Vasudevas (anti-heroes).
These beings establish or restore a realm of non-violence in the world. Rama is one such non-violent hero while Lakshmana is a Vasudeva and Ravana a Prati-Vasudeva. In Jainism re-telling of Ramayana, Rama (also known as Padma), a gentle hero, is not the one who kills Ravana. Instead, his younger brother Lakshmana kills Ravana, the king of Rakshasas, who are otherwise a civilized and vegetarian people. Both Lakshmana and Ravana go to hell* for indulging in violence. Rama and Sita become Jain monk and nun respectively, and attain keval jnana (omniscience). Deepawali too holds a different significance for Jains. Diwali is not the day of return of Lord Rama to Ayodhya after serving 14 years in exile as Hindus believe. It is the day when Mahavira, the 24th Tirthankar, attained keval jnana.
The general outline of Jaina ramayana is largely co-terminous with Valmiki’s Ramayana with major deviations in details. There are many variations of this story among Jain texts too, however, the non-violent credential of Rama is intact across such re-tellings. The most popular version is Paumachariya (‘the life of Padma/Rama’) which is written in Prakrit by Jain monk Vimalsuri. Interestingly, Vimalsuri has also penned first Jain Mahabharata Harivamschariya (‘Life and Lineage of Hari’) which primarily focuses on battle between Krishna and Jarasandha rather than that between Pandavas and Kauravas. Krishna is also a hero, albeit a violent one (Vasudeva).
Thus, Jain re-telling of Ramayana is consistent with their world-view and eschatology which gives highest preferemce to ahimsa or non-violence.
* The concept of hell and heaven in Indic religions is considerably different from those of Abrahamic religions. As per Jainism, Ravana will be one of the 24 Tirthankaras in the next kalpa, despite having served hell.