Author Topic:  Updating UI to HD  (Read 2130 times)

10 Sep 14

Read 2130 times

Offline SeanLang

  • NGNG Founder
  • Legendary
  • *

Do you know where or how the game controls the elements in the mechlab UI? I was able to update ALL of the mainscreen splash screen to the resolution 3 1280x1024 through the text files:

data/art/mainscreen
data/art/prefscreen
etc etc..

Now I want to update the elements in the mechlab, but there are no such files in data/art/ or data/art/logart that tell the position of those said elements. Is this controlled via a text file somewhere else or is it hardcodded in the .exe?

10 Sep 14

Reply #1

Offline Bestia Infernali

  • Regular
  • **

MC or MC2? I'm staying away from MC2 due to literally AWFUL, SUPER low-poly crap :puke: thus I don't know how things are handled/working over there.

Generally speaking, I'm not a fan of real-time 3d graphics in games (damn, huge FoV - how about something near orthographic projection in case of top-down view?), but I fully realize that they're far more flexible to work with than pre-rendered.

Of course, MC2 has things not implemented in MC. Not to mention about source code - I wouldn't know what to do with it though - I'm a moron when comes to coding (except some scripting).


Anyway, if MC - look in the exe. I've been fiddling around it for a moment, and changed size via simple hex-edits, but more is needed than that to get things working properly (mouse-over/clicks, etc.).

IIRC I've changed height of "main" window to 1024 (the longest slider is adjusting automatically), while width was crashing at > [some value] (don't remember what that value was).

On a side note: with the way UI is designed, changing height only makes a sense: "main" window, and "Current Inventory List" (see attachment). Otherwise you'll get lots of ugly, empty, black space. Unless you want to hack-in some extra functionality to it, i.e. longer names/descriptions, more stats, expanded Mechs' "boxes" (less scrolling through Mech's payload data), etc.

Also, if I knew how-to, I'd get rid of that Short/Medium/Light/Moderate/Heavy/whatever, and put numbers everywhere to "unify" how stats are displayed, and to make things more informative/accurate.

On a side note: to get Internal Structure description, exe makes some calculation on this (OBJECT2.PAK):

Code: [Select]
[InternalStructure]
uc Head = 3
uc CenterTorso = 11
uc LeftTorso = 8
uc RightTorso = 8
uc LeftArm = 6
uc RightArm = 6
uc LeftLeg = 8
uc RightLeg = 8

while armor is taken from here (Mech's profile):

Code: [Select]
[Armor]
uc Type = 0
f Tonnage = 18

*/

values' range:

 0.0   2.0 = Very Light
 2.5   7.0 = Light
 7.5  12.0 = Moderate
12.5  17.0 = Heavy
17.5  ??.? = Very Heavy

*/

Hit points vs. tonnage. Whole thing is misleading, unless you know what's behind the scenes. To make things even more weird:

- Armor hit points: both max and current are defined in Profile,
- Internal Structure hit points: max in OBJECT2.PAK, current in Profile.
« Last Edit: 10 Sep 14 by Bestia Infernali »

10 Sep 14

Reply #2

Offline cmunsta

  • Rookie
  • *

I'm fairly certain that the images are being held in the mechrepXX.shp files.

If you look at the ispur.fit, there are 13 IS mechs listed. In clanpur.fit we see there are 11 Clan mechs listed so a total of 24 IS+Clan mechs in the game. lo and behold, there are 24 mechrepXX.shp files (numbered 0 to 23).

Unfortunately, I still don't know how these .SHP files work.

10 Sep 14

Reply #3

Offline SeanLang

  • NGNG Founder
  • Legendary
  • *

I'm fairly certain that the images are being held in the mechrepXX.shp files.

If you look at the ispur.fit, there are 13 IS mechs listed. In clanpur.fit we see there are 11 Clan mechs listed so a total of 24 IS+Clan mechs in the game. lo and behold, there are 24 mechrepXX.shp files (numbered 0 to 23).

Unfortunately, I still don't know how these .SHP files work.

.SHP files seem to be the key in unlocking some of this...

11 Sep 14

Reply #4

Offline cmunsta

  • Rookie
  • *

Looking further into this, It does appear that the Mech Lab is only handled via the executable itself (i.e. no FIT file for that screen).

The main background screen for the Mech Lab is art\logart\lsrbk00.tga and uses art\logart\lsrbk01.tga as the logo backdrop in the main display area. I've only found references to these files in the executable itself.


11 Sep 14

Reply #5

Offline Bestia Infernali

  • Regular
  • **

Yep, only splashes are handled by external 'configuration' files. Everything else is hardcoded, and honestly I'd be surprised if it wasn't.

Anyway, this is how SHPs you were talking about look like (see attachment). I already posted link to tool (and its source code) that is able to open SHPs (except tiles, and Mechs). Check this thread for info.

In case of this particular SHPs logic says that engine draws all frames in one place, and then draws color over the mask to display various damage levels. The same SHP must be used when purchasing the Mech. When not available engine draws 20th frame (outline). The same frame probably is used for outline when looking at rear of Mech during the mission. Last frame is probably used to mask grid-ish background (during the mission too).

Speaking of UI: red, "background" color in payload bar (visible when Mech isn't fully loaded) is drawn by exe (with all shades, and stuff). Which is wierd since this is static effect, or am I missing something? The same technique is used to draw blue-ish "sliders" (pilot stats, current Mechs' payload, etc.).

ps: nice to hear/read you again, cmunsta. In case you've missed: there's an exe patcher (memory) that adds few things/moves them out of the exe to external files. Latest version. Nope, it wasn't written by me. Unfortunately StaticZ haven't provided the source thus any contributions/additions aren't possible.
« Last Edit: 11 Sep 14 by Bestia Infernali »