Starbound

Starbound

59 ratings
Portrait restorer - Consistently displays NPC portraits
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
356.247 KB
19 Sep, 2016 @ 10:55am
14 Jun, 2019 @ 10:05am
3 Change Notes ( view )

Subscribe to download
Portrait restorer - Consistently displays NPC portraits

Description
Now compatible with Starbound 1.4!

Through some programming oddity, the portrait of an NPC isn't displayed in the sayToEntity function of dialog.lua.

This mod fixes that. The implication is that you can give your mod's tenants a portrait, by messing with their .npctype file:

"scriptConfig" : {
"chatPortrait" : "/interface/chatbubbles/PUTPORTRAITHERE.png:<frame>",
...

If the chatPortrait line isn't there, the speech bubble will just be normal, small, portrait-less, as it is in vanilla.
Special thanks to Kawa for figuring this out, uploaded with his permission.
27 Comments
Leezpunk 15 Oct, 2020 @ 10:07pm 
Breaks the avian priest's portrait. (I forget his name)
VOSA 14 Jul, 2019 @ 6:27am 
After a few days testing my codes.I find that it is the "behavior" that determine whether npcs display their chatPortrait in chatbubble.
For example,npc will show the portrait by the code:

/spawnnpc human tutorial 1 1 '{"scriptConfig" : {"behavior" : "tutorial","chatPortrait" : "/interface/chatbubbles/grandprotector.png:talk.<frame>"}}

whereas won't show the portrait by the code:

/spawnnpc human tutorial 1 1 '{"scriptConfig" : {"behavior" : "villager","chatPortrait" : "/interface/chatbubbles/grandprotector.png:talk.<frame>"}}

The only difference is behavior.I found that behavior of "tutorial" and "base" allow npcs display their chatPortrait and others don't allow. Nuru,Baron,Koichi and Lana do not show their chatPortrait in outpost because their behavior turned into ""villager" in outpost rather than "base" in their mission.
I hope that will be helpful.
Un petit chou-fleur  [author] 12 Jul, 2019 @ 11:18am 
@1941302614: Can you post a link to the whole .npctype file, by putting it on pastebin? I may be able to pinpoint the problem.
VOSA 11 Jul, 2019 @ 7:11am 
Why the NPCs I spawned with codes" "scriptConfig" : {
"chatPortrait" : "/interface/chatbubbles/<portrait>.png:<frame>"} " do not display portraits when they talking please?Is this related to the code "behavior'?
I found that it is the npcs who have chatPortrait inherent in game,such as Koichi and Baron, that can code and display their chatPortrait. Other npcs,without chatPortrait in the intact game,will not have chatPortrait even though I code their chatPortrait.
Looking forward your receive,thank you very much!
shardinhand 1 Apr, 2019 @ 9:39pm 
ok much reasons to like dis, gud work meng!
Un petit chou-fleur  [author] 28 Dec, 2018 @ 1:55am 
Oh, and obviously, it only works if the NPC you're talking to actually has a portrait, so a custom NPC programmed with this mod in mind. It won't work with Starbound's standard NPCs!
Un petit chou-fleur  [author] 28 Dec, 2018 @ 1:53am 
It only modifies dialog.lua, so it's incompatible with anything else that alters dialog.lua. I don't know any mods that do that, so your guess is as good as mine.
Lemon Drops 27 Dec, 2018 @ 12:03pm 
this doesn't seem to work for me. any incompatible mods you know of?

Monolith 21 Aug, 2018 @ 3:11am 
Tenant responds: Is... this something other than a hole in the ground? ;)

(Couldn't help meself, sorry!)
warmainiac 7 May, 2017 @ 3:01pm 
The inkling race mod affects diolog for florans