UI Help Please

Discussions on Modding of S.T.A.L.K.E.R. SoC & Clear Sky

UI Help Please

Postby EggChen on 12 May 2009 22:45

OK guys, I'm redesigning my hud to be as minimal as possible. Basically everything fits on the map bottom right, with nothing else on screen. I'm almost there, but one thing is beating the crap out of me.

I want the message text to pop up bottom left when you get a stash, mission, etc. No matter what I do, I cannot get it to work, it seems there is a no-go zone. If I move the text down it simply does not appear.

I have looked everywhere. Does anyone have an idea what is blocking this area off?

Example below :

http://www.mediafire.com/imageview.php? ... fd&thumb=6
User avatar
EggChen
Moderator
 
Posts: 1016
Joined: 13 Sep 2008 00:44
Location: Birmingham, UK

Re: UI Help Please

Postby Nightwatch on 12 May 2009 23:05

Have you checked it with Russo? He's very good in that stuff.
NEWSA.SIMBION_TWEAK 3.0
Mod Website= Features, Video, Tips & Download Link: NEWSA.SIMBION_Tweak

Watch the Trailer: http://www.youtube.com/watch?v=1Ajw_f8K ... re=channel
Please Do Not download and install any files from links other than those on the Mod's Website
User avatar
Nightwatch
Site Admin
 
Posts: 2676
Joined: 13 Apr 2007 05:42
Location: London, United Kingdom

Re: UI Help Please

Postby NatVac on 13 May 2009 10:20

I can't look at MediaFire, but it looks like -- er, appears that -- ah, sounds like it is appearing but not when you move it down, so you are using the proper static, but can't place it where you want.

I think the greater maingame hud has some clipping and stretching. And within it are sections, which contain their own subsections. Assumptions are made; the system has some engine "black box" parts that are not intuitive. Example: the ammo section is defined on the hud section, but the subsections that follow are not within the ammo section:
Code: Select all
   <static_weapon x="900" y="692" width="123" height="65" stretch="1">
      <text complex_mode="0" x="45" y="0" font="letterica16" r="255" g="255" b="255" a="130"/>
      <texture>ui_hud_frame_patron</texture>
   </static_weapon>
   
   <static_ammo x="65" y="22" width="53" height="30">
      <text align="c" complex_mode="0" font="graffiti22" r="238" g="155" b="23" a="255">Ammo</text>
   </static_ammo>

Instead of this:
Code: Select all
   <static_weapon x="900" y="692" width="123" height="65" stretch="1">
      <text complex_mode="0" x="45" y="0" font="letterica16" r="255" g="255" b="255" a="130"/>
      <texture>ui_hud_frame_patron</texture>
   
      <static_ammo x="65" y="22" width="53" height="30">
         <text align="c" complex_mode="0" font="graffiti22" r="238" g="155" b="23" a="255">Ammo</text>
      </static_ammo>
   </static_weapon>

Note that the static_ammo's x,y-coordinates are relative to the static_weapon container.

Hmm, I just saw something interesting. Since I know you are using wide-screen now, I am citing text from config\ui\maingame_16.xml. But the big window container section is given as <window x="0" y="0" w="640" h="480" r="227" g="121" b="222" texture="1"> in config\ui\maingame.xml, whereas the config\ui\maingame_16.xml wide-screen version just has a <w>.

Anyway, in the example above, the structure is assuming a small 640x480 box to hold stuff, and everything is placed on relative coordinates, as you know.

Another hmmm: I vaguely recall it being on 1024x768, so perhaps there is even more mapping going on, somewhere, via the definition of a container with the larger width/height.

Okay, back to the point: The container sets the bounds for its contents. If the static_weapon container above truly held static_ammo, then if you set static_ammo's y-coordinate to be greater than static_weapon's height, it would be off-screen, so to speak.

Find the bounds. Stretch them if they don't reach the bottom edge of your screen.* Or move the X, Y, W, H bounds of the text object to be wholly within its container.

Maybe you could try using the standard window definition, perhaps mapping it to your wide-screen? If it worked, you'd have to remap all the (sub)values to correspond... Okay, stick with the standard -- but what's up with the <w>?

____________
*Anyone remember that you couldn't click on the bottom row in wide-screen inventory? This was why.
NatVac
Resident
 
Posts: 152
Joined: 16 Sep 2008 00:13
Location: Texas

Re: UI Help Please

Postby EggChen on 13 May 2009 21:11

Hey Natvac,

Yes, sorry, I forgot you won't use mediafire, I'm hoping embedded images are ok?

Image

If you can see that, you can see the particular area I am looking at. It does appear to be some sort of window that is outside of scope for the maingame_pda_msg.xml file. The strange thing is that in vanilla the motion icon goes there and works fine, if you move the messages down they dissapear (whether I move the window, or just move the message). In my testing I see that the upper reach of this window is just above the normal pda message text as shown in this screenie. You can actually see the message being "clipped" by this invisible boundary.

I have to say the UI stuff is very unintuitive, for example both normal and widescreen ui's are based around a 1024x768 "map". You have to place things within this scale, and the game overlays this over your screen no matter what res, stretching or moving accordingly.

My current thought/complete guess is that some other ui file defines this window for some other purpose, but I cannot find it. I had considered it may be your idea about the boundarys of the "parent window", but I had not noticed the <w> issue. Thanks for your thoughts, i'll keep trying :thumbright:

Nightwatch - Thanks I'll be sure to ask him to take a look. He is working on the release of Inferno due later this month, but after that, maybe he will have time :-"
User avatar
EggChen
Moderator
 
Posts: 1016
Joined: 13 Sep 2008 00:44
Location: Birmingham, UK

Re: UI Help Please

Postby NatVac on 14 May 2009 00:09

I think the game engine has some of these items hardwired by name and layer (which is on top of what), but you can move stuff around. I'd first try moving quick_info in maingame_16.xml; it appears to be the item in that lower-left corner zone on your image.
NatVac
Resident
 
Posts: 152
Joined: 16 Sep 2008 00:13
Location: Texas

Re: UI Help Please

Postby EggChen on 14 May 2009 00:34

Thanks buddy, yes the engine was my next area of blame for my utter failure 8-[

It may be hard to see on that screenie, but I am overlaying lots of info in the map area, and certain things go "behind the map" others go in front.... so I was wondering about some invisible layer in that area I am having trouble with.

I hadn't looked at quick info, I couldn't see what it was used for and thought maybe old code. On a side note, it is interesting to see some of the old ui code present for things like "can sleep" and "psychomode"!! Anyway, back to quick info, I'll defo try that next.

Thanks again Natvac.
User avatar
EggChen
Moderator
 
Posts: 1016
Joined: 13 Sep 2008 00:44
Location: Birmingham, UK


Return to Modding Techniques

Who is online

Users browsing this forum: No registered users and 19 guests

cron