Jump to content

Help updating ShowMeTheSkills to work with Long War Toolbox


hambil

Recommended Posts

Okay, this is a long and a bit complicated question so hang in there :)

 

I am helping someone revive the mod Show Me The Skills. Things got tricky when I got to the second row of soldier that toolbox provides. The Show Me The Skills information pushes the soldier slot up and it ends up obscuring the button to switch rows so no way to get to back row.

 

None of the data I need appears to be exposed but I can check the listener screen when it triggers for Name = 'UISquadSelect_LW' (basically, it's actually slightly more complicated). However, not only does this create a dependency between the two mods I don't like, but it does me no good, because I can't cast the incoming UISquadSelect class to UISquadSelect_LW without a compile time error, so I can't access the any of the extended classes unique variables, such as UpperRowDefaultY, which is hardcoded to a magic number.

 

I'm not even sure how to start on this one. Is there some kind of reflection or perhaps a different event I should be hooking into, or a way to share data between mods I'm not aware of?

 

Thanks if you've gotten this far :)

Link to comment
Share on other sites

This might not be what you're looking exactly for hambil... but i think it's somehow related nonetheless.

 

First.. look at my custom bottom buttons;

Makes_Available_GONE.png

 

The "MAKE --- AVAILABLE" strings are all simply gone from the area .. indirectly adding some spare space to the total width extent.

 

This is done by editing the corresponding localization entries from XComGame.INT file and replacing the too wide text with a single symbol ( ).

I just have to wonder if such kind of indirect tricks could be applied to your HUD obstructions problem -- somehow. :geek:

 

Secondly, i also know RoboJumper was able to turn the new SG/DLC HP bar off (( To help out SMTS with another issue as it happens! )). His code might offer you some clues to tackle gfx framework calibration of any similar UI components.

Edited by Zyxpsilon
Link to comment
Share on other sites

Sadly that won't work. Toolbox moves and treats (from our external viewpoint) the two rows as one. Anything I change will just move both rows together and the problem will still exist.

 

BTW, I love your mods. Have everyone of them going back to the first Re-CoLoRing. What you do adds a lot of value to the game.

Edited by hambil
Link to comment
Share on other sites

Oh - Gotcha.. ToolBox is such a "weird" code, IMHO. Still - good luck finding the right solution.

And thanks for your support of my Mods! ;)

Link to comment
Share on other sites

I just took a qUIck look at their UC scripts and i feel the "UISquadSelect_LW" file has the necessary calibrated Float values (completely in the end within the DefaultProperties section) you're after..

---------------------------------

ListHeight = 310.0f
MaskHeight = 460.0f
ListItemClipAmount = 211.0f
UpperRowShiftAmount = 124.0f
PromoteShiftAmount = 43.0f
HeavyWeaponShiftAmount = 46.0f
UpperRowDefaultY = -575.0f
LowerRowDefaultY = -350.0f

-----------------------------------

 

How & what to do with this info is up to you now! :smile:

Edited by Zyxpsilon
Link to comment
Share on other sites

Yes. You'll notice I called out the variable UpperRowDefaultY in my original post. You can even set a screen listener and check to see if the incoming screen is a long war screen. You can EVEN get the name of the specific inherited class (e.g. UISquadSelect_LW_0). But it's all useless because there is no introspection. All I can do is look at the base class and the base class doesn't have UpperRowDefaultY.

Link to comment
Share on other sites

Have you looked into Tuples, and/or cross-mod triggered events? I couldn't make heads or tails of how to implement any of it.

 

If you read my post in Toolbox Technical Questions Here Please (which is probably where we should be talking about this but that's beside the point) I went down a similar path trying to access SoldierSlotCount2 but ran into some of the same issues.

 

At least for my issue there supposed to be an API call to somehow change squad size, I just can't figure out how to get it to work.

Edited by sqparadox
Link to comment
Share on other sites

My data is not as fixed. You can have more than one row of perks. Add a full grown psi agent to a slot and it would create slots of different sizes (where I to place my UI elements within the slot.

 

However, I have the thought that I might be able to make it work by getting the perks to scroll on one row instead of spilling over to a second. I will think on that, as it may actually be a viable solution if it doesn't look hideous.

 

Thanks :)

Link to comment
Share on other sites

How about re-purposing the "Edit/Remove" self-opening+closing function.. wouldn't that also allow to control how any (horizontal) areas of all Panels at once?

 

I know you're getting near to Tuple/Solutions or even pushing off whatever else -- but i still feel the most rational way would be a simplistic re-location of the guilty "Button" -- only.

Link to comment
Share on other sites

Simple solutions are almost always the best solutions :) I am dissecting what LW is passing me anyway so I might as well see if I can move the button while there. :)

 

As for Tuple, that's taken a life of it's own and I'll probably be releasing a Tuple framework for everyone to mull over.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...