PDA

View Full Version : Core RPG Background Changer



StoryWeaver
July 5th, 2019, 04:31
This is a Fantasy Grounds extension that allows you to easily change the whole background of the application by changing a filename in the code.

An example image that was downloaded as a free background is included as a sample, called 1.jpg.


Sample images of the extension in action:
27782
27783
27784


If you like the project feel free to give it a star on GitHub, it helps a lot. :)


# How to install?

(https://github.com/StyrmirThorarins/FG-Core-RPG-Background-Changer)https://github.com/StyrmirThorarins/FG-Core-RPG-Background-Changer


1) Create a new folder in "Fantasy Grounds/Data/extensions" to hold the files.
2) Download all the files from the GitHub page for the project and place them inside.
3) When you start your campaign, select the 'FG Core RPG - Background Changer' extension.
Hint: Duplicate the folder and rename the extension name in "extension.xml" to something else for each of your campaigns. That way you can have different backgrounds for all your games.

# Why did I choose not to add the files into an .ext file?

Because the extension is made to be updated by yourself frequently as your campaign moves along. So it is easier to work with the files outside a compressed file.

# How to add a new background image?

Find an image you would like to use as a background, it should be of at least 2048 x 1080 pixels in size.
You can manually crop the image down to those pixels, or you can open up the included Photoshop file which is saved to those dimensions, and save your image from there.


# How to change the background image?

1) Open the "graphics/graphics_frames.xml" file.
2) Inside edit the name of the bitmap file to whatever you want. Change the filename to the new image you want.
3) Reload the campaign, or type in "/reload" in the FG chat as the GM and press enter. This will reload your campaign with the new image.
Hint: I've found it convenient to name images from 1 and upwards as I add new backgrounds to reflect what the group is up to or where they're at.

<!-- Desktop background -->
<framedef name="desktop">
<bitmap file="graphics/backgrounds/1.jpg" />
<right rect="0,0,0,0" />
<middle rect="0,0,2048,1080" />
</framedef>



# Changelog / Added / Modified:
Versioning: v(Major.Minor.Patch) https://en.wikipedia.org/wiki/Software_versioning

v1.0.0 (July 5th, 2019)
* All core functionality and files created and prepared for sharing.
- Created extension.xml
- Created graphphics_frames_xml
- Created Backgrounds.xml
- Created example images.

kalmarjan
July 5th, 2019, 04:56
great work! I can totally see using this to update the next session, or something like it.

LordEntrails
July 5th, 2019, 06:48
Does this tile or stretch to fill the background? Specifically, how does it behave when different clients have different screen resolutions?

damned
July 5th, 2019, 08:19
Does this tile or stretch to fill the background? Specifically, how does it behave when different clients have different screen resolutions?

FG cant stretch - it only tiles.
As this is using only
<middle rect="0,0,2048,1080" />
it tiles on screens greater than 2048*1080 and displays as much image as it can on smaller screens

StoryWeaver
July 5th, 2019, 15:24
Indeed. It is not perfect, but has worked well in my groups so far. It should work well for 70+% of users. Tile for those above the set size and cut off at those underneath. But overall from the screenshots taken at 1920x1080 you can see that looks good.

Most common screen resolutions: https://www.w3schools.com/browsers/browsers_display.asp

If you're using a larger screens still you can change the middle rect numbers and use even larger images.

I thought I'd share as my players have been loving it and being able to change FG's background in-game was something I had wanted for my games. So surely there would be other GM's out there hoping to do the same. :)

damned
July 6th, 2019, 05:16
You cant specify sizes greater than 2048... just a FYI :)

StoryWeaver
July 6th, 2019, 14:43
Ah... well then lol. It's a while since I put this together. I guess it's as good as it's going to get until possibly some new magic arrives with Unity then. :)

Kalafax
February 2nd, 2021, 21:29
Nice work Stymir! Easy to use. Now I have a dozen hand picked uber high rez pics assembled for different sessions queued up and ready to go. Easy Peasy!

Cheers