Forum Announcement, Click Here to Read More From EA_Cade.

MotiveUIStyle and ui_render_style commands.. question

TriplisTriplis Posts: 3,048 Member
edited March 5 in Nominated Threads
I'm wondering if there's a C++ brick wall on this one. As in, if it's done in C++ and I can't do a thing with it for that reason?

The long and short of it is, I wanted to figure out if there's a way to add more than just the two MotiveUIStyles, the default and the long one for the Vampires Power bar. I found MotiveUIStyle in commodity.py and it seems plausible enough to inject in another variable to it with a new name.

But I can't find any place that actually references how that variable gets defined in terms of how long the bar is. In other words, LONG for the Powers bar is obviously defined as a variable under MotiveUIStyle, but I can't find anything that tells LONG to change the size of the bar. So without being able to reference that part of it, it seems like I'd be adding a value that either has no length definition at all, or is stuck as the default length.

So my question comes down to, am I missing something that I can edit / add to, or am I wasting my time on this one?
Mods moved from MTS, now hosted at: https://triplis.github.io
Post edited by EA_Cade on

Comments

  • TriplisTriplis Posts: 3,048 Member
    Any chance you could provide insight on this @SimGuruModSquad @SimGuruEugi

    I just want to ascertain if it's even possible to do with modding. Cause from what I understand, there's no way to mod on the C++ end, so if something is done there, then it's beyond modding access. But I'm not 100% sure whether this is done in C++ or not to begin with. Every effort made to find where the length itself is defined in Python or XML turned up nada, but it's possible I missed something somehow. Or maybe it's some resource other than Python, XML, or C++ that I'm not thinking of. I mean, maybe it's not a hard-coded value, but an image resource or something? But it seems like if that were the case, there wouldn't be the need for the hard-coded stuff about default size and long size.
    Mods moved from MTS, now hosted at: https://triplis.github.io
  • NeiaNeia Posts: 4,190 Member
    There's probably something in the UI ressources. I'm personally using JPEXS to open them, in the widgets section, there are constants defined like margin, padding, colors and the like. I haven't found the one for the size of the need bar, but it may be in there somewhere too.
  • SimGuruModSquadSimGuruModSquad Posts: 597 Member
    Hey @Triplis,

    @Neia is correct - the visual look of the two styles are defined in UI data. I don't see anything in C++ that limits this, the style is just passed through from gameplay to the UI.

    So in theory it is possible to add styles, but it might require modding the UI beyond what community tools are capable of.

    -SGMS
  • TriplisTriplis Posts: 3,048 Member
    @Neia @SimGuruModSquad Thanks guys! Really appreciate it.

    Neia, when you say UI resources, are you saying using JPEXs to open GFX files from UI.package in the /Data/Client files or something else?
    Mods moved from MTS, now hosted at: https://triplis.github.io
  • NeiaNeia Posts: 4,190 Member
    Yes, that's the GFX in UI.package. You can directly open and edit values in them with JPEXS, but I haven't done major modifications, so I'm not sure if it would work.

    UI is a pain to mod sadly :/
  • TriplisTriplis Posts: 3,048 Member
    edited April 2017
    Neia wrote: »
    Yes, that's the GFX in UI.package. You can directly open and edit values in them with JPEXS, but I haven't done major modifications, so I'm not sure if it would work.

    UI is a pain to mod sadly :/
    Thanks.

    Well on the bright side, I did find something referencing Motive Panel in: S4_62ECC59A_00000000_5FFB8AE26BC11E96.gfx

    I just found it a minute or two ago, so I don't know yet for sure if it has potential, but I ain't giving up yet. :smile:


    Edit: Found something pertaining to ui_render_style. Hmm.
    this.mRenderStyle = param1.ui_render_style;
                _loc2_ = param1.ui_render_style == CommodityStaticData.MOTIVE_UI_STYLE_DEFAULT?Number(0.07):Number(0.025);
                this.mcBar.SetRange(param1.min_value_tuning,param1.max_value_tuning,_loc2_);
    

    Seems like it explains how DEFAULT is defined for MotiveUIStyle (the numbers are probably width and height values). But doesn't explain how the LONG style gets defined. My first instinct was that maybe 0.07 is for default and 0.025 is for long, but on further examination, this doesn't make sense; for one thing, 0.025 is a smaller value than 0.07 and LONG is longer in width.

    So for the moment, it looks like I'm back to square one.

    I mean, there is stuff like this:
    if(this.mRenderStyle == CommodityStaticData.MOTIVE_UI_STYLE_LONG)
                {
                   this.mcArrows.gotoAndStop("long_positive_triple");
                }
                else
                {
                   this.mcArrows.gotoAndStop("positive_triple");
                }
    

    But this appears to be for defining the little arrows that show when a need goes up or down, not to do with the length of the bar itself.

    Also, I'm looking under widgets > Gameplay > SimInfoHUD > Motive Panel > Commodity Container

    Maybe it's not there that LONG gets defined in its length.

    (Just sharing my thought process/discovery)
    Post edited by Triplis on
    Mods moved from MTS, now hosted at: https://triplis.github.io

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file
Return to top