Author Topic: Using Avatars on NPC dialogs  (Read 2437 times)

Using Avatars on NPC dialogs
« on: February 17, 2016, 04:28:46 pm »
Hello, I wanted to know if anyone knows how to implement this feature ingame. I'm talking about TLA engine, but think 2238 might be compatible aswell.
I almost get it working. I say almost because it should be working but it isn't. Somehow.

There is a script "_msgstr.fos" who has this line
Code: [Select]
#define STR_NPC_AVATAR                       # (dlg)     ( ( dlg ) != 0 ? 100000 + ( dlg ) * 1000 + 110 : 0 )Then, you've to type the name of your desired avatar in the dialog editor. The avatar must be in "data\art\intrface" or "data\art\critters" and must be a .png. Not sure if it has to be inside intrface or critters directory. I have the avatar in both.

It's supposed to be working now. But it isn't. Maybe someone knows how to enable this feature?

I think- it must be defined somewhere else. text folder maybe? a .MSG file? anyway, I would be pleased if anyone knows how to implement this feature and post it here :)

Thanks

Re: Using Avatars on NPC dialogs
« Reply #1 on: February 18, 2016, 01:05:47 pm »
Desert Europe has dialog avatars, check sdk if it is still available.

Offline Wipe

  • Rotator
  • Random is god
Re: Using Avatars on NPC dialogs
« Reply #2 on: February 19, 2016, 04:06:48 am »
You are on right track - filename in dialog editor, saved in art/intrface/, no other place to define it... these things worked randomly, on one client version it was ok, on another it just didn't work. And we never changed it since 2009 or so :D

Few things i'd recheck:
  • make sure you have it set for all languages (IIRC it was saved in language section of .fodlg file)
  • make sure interface have DlgAvatar set (saw few where it was zeroed)
  • make sure .png can be loaded correctly (temporary use it for something what's always visible)
  • paranoic mode:
    • make sure filename have no weird (non-english) letters
    • make sure avatar size is exactly what's defined by DlgAvatar - client may skip too big/small avatars
    • make sure .png is not transparent; you can test it later when you get avatars working

Obviously, paranoic mode is a last resort and you should start with that when nothing else works ;)
Games are meant to be created, not played...

Re: Using Avatars on NPC dialogs
« Reply #3 on: February 28, 2016, 05:59:10 pm »
You are on right track - filename in dialog editor, saved in art/intrface/, no other place to define it... these things worked randomly, on one client version it was ok, on another it just didn't work. And we never changed it since 2009 or so :D

Few things i'd recheck:
  • make sure you have it set for all languages (IIRC it was saved in language section of .fodlg file)
  • make sure interface have DlgAvatar set (saw few where it was zeroed)
  • make sure .png can be loaded correctly (temporary use it for something what's always visible)
  • paranoic mode:
    • make sure filename have no weird (non-english) letters
    • make sure avatar size is exactly what's defined by DlgAvatar - client may skip too big/small avatars
    • make sure .png is not transparent; you can test it later when you get avatars working

Obviously, paranoic mode is a last resort and you should start with that when nothing else works ;)

EDITED for 2nd time.

I made it work. Everything I said, everything you said, it was all fine. I only made work opening "avatar_kipelov.png" in photoshop and pasting another image on it. Then save it back to the same name. Other name WONT work.
Is it hardcoded maybe? I really don't know why it doesn't work. It doesn't makes any sense.

Thanks a lot for answering
« Last Edit: February 28, 2016, 11:11:45 pm by Grey »