fireundubh Posted May 15, 2018 Share Posted May 15, 2018 (edited) Looking at how conversation textures are loaded: private void LoadConversationSmallTexture() { if (!string.IsNullOrEmpty(this.m_textureConversationSmallPath)) { this.m_textureConversationSmall = Portrait.LoadTexture2DFromPath(this.m_textureConversationSmallPath, 76, 96); } this.NotifyChanged(); } I'm not sure what happens when m_textureConversation[small|Large]Path is empty, but if it is empty, it would be preferable to fallback to m_texture[small|Large]Path, so that we can create large and small portraits without worrying about also creating large and small conversation portraits. In other words: private void LoadConversationSmallTexture() { string texturePath = string.IsNullOrEmpty(this.m_textureConversationSmallPath) ? this.m_textureSmallPath : this.m_textureConversationSmallPath; this.m_textureConversationSmall = Portrait.LoadTexture2DFromPath(texturePath, 76, 96); this.NotifyChanged(); } Edited May 16, 2018 by fireundubh Link to comment Share on other sites More sharing options...
Excerpt Posted May 15, 2018 Share Posted May 15, 2018 This is an unrelated note to your thread, but can you tell me what you are using to (I assume) decompile the code to take a look at behaviors? I'd like to take a look to see how specific things are being handled for modding purposes. Link to comment Share on other sites More sharing options...
fireundubh Posted May 15, 2018 Author Share Posted May 15, 2018 This is an unrelated note to your thread, but can you tell me what you are using to (I assume) decompile the code to take a look at behaviors? I'd like to take a look to see how specific things are being handled for modding purposes.dnSpy. Link to comment Share on other sites More sharing options...
BMac Posted May 16, 2018 Share Posted May 16, 2018 This is already the behavior, it's just implemented a little differently that you're expecting - Portrait.GetTexture returns the non-conversation portraits if conversation portraits aren't available. 1 Link to comment Share on other sites More sharing options...
fireundubh Posted May 16, 2018 Author Share Posted May 16, 2018 (edited) This is already the behavior, it's just implemented a little differently that you're expecting - Portrait.GetTexture returns the non-conversation portraits if conversation portraits aren't available. Awesome! Thank you for the heads-up. edit: I see it now! case Portrait.Style.ConversationLarge: return (!this.m_textureConversationLarge) ? this.m_textureLarge : this.m_textureConversationLarge; case Portrait.Style.ConversationSmall: return (!this.m_textureConversationSmall) ? this.m_textureSmall : this.m_textureConversationSmall; Edited May 16, 2018 by fireundubh Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now