FOnline Development > Questions and Answers

Using Avatars on NPC dialogs

(1/1)

Grey:
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: ---#define STR_NPC_AVATAR                       # (dlg)     ( ( dlg ) != 0 ? 100000 + ( dlg ) * 1000 + 110 : 0 )
--- End code ---
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

fonliner:
Desert Europe has dialog avatars, check sdk if it is still available.

Wipe:
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 ;)

Grey:

--- Quote from: Wipe 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 ;)

--- End quote ---

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

Navigation

[0] Message Index

Go to full version