Custom entity variables

Okay, so I may just be tired, but I’m stumped on this. I’m making an NPC, and It’s an NPC base kinda that will change titles on menus they pop up. It spawns just fine, but I need to have different titles and stuff on the derma for each npc I create with that base. How can I set the text from another lua file using a function? I’ve tried making functions with self.SetTitleText, and ENT.SetTitleText, but neither work. I hope that explains it.

So you’re making NPCs with menus, or am I wrong?

function ENT:Initialize()
self.TitleText = “Untitled”
function ENT:SetTitleText( str )
self.TitleText = str
function ENT:GetTitleText()
return self.TitleText

That should work. Call it just like entity:SetTitleText(“text”).