Ellone

Override Alt+L UI default positions (Client side)

Recommended Posts

Hello MxC,

 

I have one question regarding the UI :

 

If I edit my interface.xdat in order to set the windows positions to my conveniance, I have the new positions I've set when I start the game.

 

However, the Alt+L command (ShowWindow Name=FN_UILocReset) will reset the UI to the default one.

Is there a way to change this behavior in order to make it reset the positions to the ones I've set in my interface.xdat ?

 

Regards.

 

 

EDIT : StatusWnd and TargetStatusWnd are actually the only windows that I can't reset properly via alt+L, they get there for a second but they instantly move back to their default positions.

 

 

Edited by Ellone

Share this post


Link to post
Share on other sites

 

3 minutes ago, Sindelia said:

You need to modify the default positions under the 'wndDefPos' tab.

 

I know that, and it works, the position are set when you start the game.

 

But my concern is that Alt+L will not reset the positions to these ones. But to the default one (I'm guessing it's stored server side.)

 

And since there is often some quick UI glitch that require us to press Alt+L ...

Edited by Ellone

Share this post


Link to post
Share on other sites

That's weird. I've never had any issues assigning different default window positions. 

 

Can you give me the name of one of the windows so I can check? 

Share this post


Link to post
Share on other sites

Ok, so I did a bit more tests and it looks like you were right, sorry about that :

 

Indeed, it doesn't occur on every windows. I guess I was unlucky and tried these ones first...

 

For example :

 

StatusWnd and TargetStatusWnd are coming to my positions for a short moment when I press Alt+L, but then, they instantly go back to their default ones.

Share this post


Link to post
Share on other sites

This is because the default positions of these two windows are hardcoded into the interface script file.

 

OptionWnd.uc, OnTimer function. You have to decompile, modify and recompile interface.u.

  • Upvote 1

Share this post


Link to post
Share on other sites

Oh, nevermind then :/


I did that once, I remember the hexadecimal edit etc.

But I failed at recompiling it afterwise, so, I won't try it for now :c.

But it's weird, because I managed to change the StatusWnd y position, but the x sticks to 0.

I guess, the hardcoded part is "it has to stay on the left".

 

Anyway, thanks a lot for the informations :).

 

Also, since I don't wanna create a topic just for that, do you know how to hide a window by default ?

I tried to set the hidden property of the PCCafeEventWnd, but no effect.

 

Share this post


Link to post
Share on other sites

The PCCafeEventWnd is toggled by a server packet.

 

What you can do is change the name of the script associated with it to 'undefined'. Some random name should work too, but I am not sure whether that would cause the crash the client as the window will probably by trying to attach itself to a non-existent script. You can try both solutions though.

 

This is what you need to change:

image.png.d6e842db1a9aa09ebb916c67d68bb8f9.png

 

Share this post


Link to post
Share on other sites

Hmm, weird, for me, this window doesn't have any unk property.

It just has unk24 in DefaultProperty.

 

Anyway it's ok, that's not really important.  I got everything I wanted except :

- The StatusWnd and TargetStatusWnd position (maybe later)

- The hidden PC Bang Points by default

- The Alliance chat at another position as the other chats (I don't think that's possible so...)

 

 

Thank you again, you were very helpful, I will focus on some other client edit now :)

Share this post


Link to post
Share on other sites
23 hours ago, Ellone said:

Hmm, weird, for me, this window doesn't have any unk property.

 

unk stands for unknown, people had to figure out whats the actual purpose of each property - you are using latest release which comes with most of them being described properly - anyway... just look at the order of values on his screenshot so you know what to edit

  • Upvote 1

Share this post


Link to post
Share on other sites

Thanks, 

so indeed, it works, the window is not shown by default, but the problem is it never is, the button doesn't have any effect if I remove  the script.

I only wanted the window to be hidden by default, not completly removed.

 

BUt anyway, that's no big deal..

Share this post


Link to post
Share on other sites
On 27.02.2018 at 11:23 PM, Ellone said:

I only wanted the window to be hidden by default

 

well, you should be easily able to do that by setting unk 107 (eighth value from the top) to 1 - guess i should consider downloading latest schemes for property names ... :x

Edited by UgliBiBagli

Share this post


Link to post
Share on other sites
On 25.02.2018 at 12:12 AM, Sindelia said:

This is because the default positions of these two windows are hardcoded into the interface script file.

 

OptionWnd.uc, OnTimer function. You have to decompile, modify and recompile interface.u.

Can you tell me witch program i need for decompile , modify and recompile interface ? for high five please ?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.