• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TFS 1.X+ NPC type icon

Unknown Soldier

Mapping a map
Joined
Oct 30, 2010
Messages
289
Solutions
11
Reaction score
659
Hey,

got one short question about NPCs. As we know, depending on their function, they can have different icons in a little cloud next to their name.

For example: trader NPC has pouch of gold icon next to his name, but there are more icons like three dots, or red exclamation mark, indicating quest NPCs, or storytellers.

My question is, how can we set the rest of the icons (except gold pouch ofc :) )? I think I made it once (or it was just a wet dream 😂), but I've totally forgotten how...

Thanks in advance!

qssWUQY.png
 
Solution
Hey,

got one short question about NPCs. As we know, depending on their function, they can have different icons in a little cloud next to their name.

For example: trader NPC has pouch of gold icon next to his name, but there are more icons like three dots, or red exclamation mark, indicating quest NPCs, or storytellers.

My question is, how can we set the rest of the icons (except gold pouch ofc :) )? I think I made it once (or it was just a wet dream 😂), but I've totally forgotten how...

Thanks in advance!

qssWUQY.png
You can use speechbubble in the npc xml for example:
XML:
<npc name="Andy" script="Andy.lua" walkinterval="5000" floorchange="0" speechbubble="3">

Or if you want to set it in lua you...
Hey,

got one short question about NPCs. As we know, depending on their function, they can have different icons in a little cloud next to their name.

For example: trader NPC has pouch of gold icon next to his name, but there are more icons like three dots, or red exclamation mark, indicating quest NPCs, or storytellers.

My question is, how can we set the rest of the icons (except gold pouch ofc :) )? I think I made it once (or it was just a wet dream 😂), but I've totally forgotten how...

Thanks in advance!

qssWUQY.png
You can use speechbubble in the npc xml for example:
XML:
<npc name="Andy" script="Andy.lua" walkinterval="5000" floorchange="0" speechbubble="3">

Or if you want to set it in lua you have this option:
Lua:
npc:setSpeechBubble(3)

And these are the bubbles:
C++:
enum SpeechBubble_t
{
    SPEECHBUBBLE_NONE = 0,
    SPEECHBUBBLE_NORMAL = 1,
    SPEECHBUBBLE_TRADE = 2,
    SPEECHBUBBLE_QUEST = 3,
    SPEECHBUBBLE_QUESTTRADER = 4,
};
 
Solution
Back
Top