Save variable associated with Pawn

Started by caiotoon, April 04, 2023, 12:45:10 AM

Previous topic - Next topic

caiotoon

Suppose I want to create a mod that allows me to create nicknames for Pawns and got all the UI part figured out. Now I want to persist the given "nickname" linked to that specific Pawn and be able to restore it on load. How do I go about that?

I am thinking at the moment that I need to use TargetInfo somehow to link the "nicknames" to the "pawns", as showed in this article, but I can't figure out how exactly to do that.

Can someone clarify that for me or point me to a Mod that does that and the relevant source code bits?