Starbound

Starbound

59 arvostelua
Portrait restorer - Consistently displays NPC portraits
   
Palkinto
Lisää suosikkeihin
Lisätty suosikkeihin
Poista suosikeista
Tiedostokoko
Julkaistu
Päivitetty
356.247 KB
19.9.2016 klo 10.55
14.6.2019 klo 10.05
3 muutosilmoitusta ( näytä )

Tilaa ladataksesi
Portrait restorer - Consistently displays NPC portraits

Kuvaus
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 kommenttia
small avali 15.10.2020 klo 22.07 
Breaks the avian priest's portrait. (I forget his name)
VOSA 14.7.2019 klo 6.27 
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  [tekijä] 12.7.2019 klo 11.18 
@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.7.2019 klo 7.11 
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.4.2019 klo 21.39 
ok much reasons to like dis, gud work meng!
Un petit chou-fleur  [tekijä] 28.12.2018 klo 1.55 
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  [tekijä] 28.12.2018 klo 1.53 
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.12.2018 klo 12.03 
this doesn't seem to work for me. any incompatible mods you know of?

Monolith 21.8.2018 klo 3.11 
Tenant responds: Is... this something other than a hole in the ground? ;)

(Couldn't help meself, sorry!)
warmainiac 7.5.2017 klo 15.01 
The inkling race mod affects diolog for florans