PDA

View Full Version : How do I change the image an extention uses for its windows? (Clock Adjuster)



MeepTheChangeling
April 30th, 2023, 01:36
I'm running a hex crawl in the Fallout 2d20 ruleset. Clock Adjuster works with the ruleset with no problem, except for one MASSIVE UI issue. The font color gets set to pale-*** green, and the window graphic is the same as the chatbox graphic so it's pale-*** green on creamy-whitish-yellow. It's almost impossible to read. I want to change the background image to... anything else so I can read it. How do I do this? Even just switching to the "item box" window or whatever it's called would be prefect.

I tried poking around to see if I could find what img file the extension points to, but I couldn't.

damned
April 30th, 2023, 02:26
What did you do when you poked around?
You need to start by opening the FG-ClockAdjuster-main.ext file
It is actually a zip file.
From there you can start working your way thru the files to learn what they do.

Here is a super basic example.
But its highly unlikely (I hope) to do exactly what you want so I hope that you can look into it, and the original extension, and come up with something that does work for you and then you might even share it too!

Good luck.

MeepTheChangeling
April 30th, 2023, 03:13
I was able to look at the files and folder structure earlier. I know how to open an extension. I was able to customize the window using your modification example... But it's only changing the main window for the extension and not any of the ones that the extension opens. I may be a bit dumb, but this code is just jibberish to me (I'm a JS and BATCH girl). What I mean is, this is changing the chatbox graphic, and thus the extension's primary window's graphic, but if I open any of the menus the extension has using its primary window, those ones use the old graphic for the chat box from the vanilla theme. I don't know how to extend the code to also change them.

Its a shame the visuals aren't just CSS. Then I could do anything I wanted to.

damned
April 30th, 2023, 03:20
I dont have the ruleset you are referencing.
I changed the chatwindow because you mentioned the chatwindow.
I also (if you read the extension) created another window frame (that uses the same graphic but it doesnt have to) that many of the primary extensions windows use.

You can try typing [B]/debug on/B] in chat and then when you hover your mouse over things in FG it will provide you more information including the window and you can use the window to try and work out what frames to change.

MeepTheChangeling
April 30th, 2023, 03:40
Thanks, that will probably let me work it out. I appreciate the help.

damned
April 30th, 2023, 04:39
Can you post a pic of what you are seeing?

MeepTheChangeling
April 30th, 2023, 05:54
Sure! I have it looking like this right now (still working out how they want the graphic image to be preportioned). 57212

Here's how it looks without the tweaks. 57213

The debug command was exactly what I needed. It uses the "recordsheet" graphic. Are there any guidelines on how to set up the images for the stretching/resizing? I've been slowly dialing it in by adjusting the resolution of the image one axis at a time.

damned
April 30th, 2023, 08:27
You dont want to change the recordsheet graphic because that is used in lots of places in the ruleset.
You can find that the extension is using recordsheet by looking at the XML


<windowclass name="travelmanager">
<frame>recordsheet</frame>


You might see in my extension that I change this to use a different frame


<windowclass name="travelmanager" merge="join">
<frame>tweaker</frame>


Frames use a system called 9 slices.
You can either define each of the nine slices
top left (fixed width and height)
top (fixed height, tiles width)
top right (fixed width and height)
left (fixed width, tiles height)
middle (tiles height, tiles width)
right (fixed width, tiles height)
bottom left (fixed width and height)
bottom (fixed height, tiles width)
bottom right (fixed width and height)

or you can define an offset from left, top, right, bottom where a slice/line would be drawn
eg 8, 20, 10, 25
would use
8px for the horizontal measures of top left, left and bottom left
20px for the vertical measures of top left, top and top right
10px for the horizontal measures of top right, right and bottom right
25px for the vertical measures of bottom left, bottom and bottom right

see a slightly updated version of extension