PDA

View Full Version : Frames - screenshot and code embedded in post Here - Assistance



Morbid-Don
August 14th, 2014, 21:35
Hey Everyone,

I just got FG about a week ago and am more than halfway done customizing it for Rogue Trader (using the Dark Heresy Ruleset on the posts)...
FOUND HERE: https://www.fantasygrounds.com/forums/showthread.php?20048


So I'm having difficulty adjusting my Image Frames - in that it contains a few cosmetic errors (see screenshot below)

7277

Otherwise here is a link to my screenshot: https://www.medicalrealestate.com/images/FG-Help-Screenshot.jpg

my code (snippets from 2 different xml files):

(graphics_frames.xml)

<!-- Images -->
<framedef name="imagebox">
<bitmap file="graphics/frames/imagebox.png" />
<offset>150,135,150,150</offset>
</framedef>

(template_common.xml)

<!-- Toolbar -->
<framedef name="toolbar_back">
<bitmap file="graphics/toolbar/toolbar_back.png"/>
<middle rect="0,0,128,128" />
</framedef>


I tried "playing" with the numbers in the graphics_frames file - which only resulted in that "gray" bar (brown by default) being clipped

On top of that I'd like to nudge the Drawing Tool Icons down by a few pixels so it doesnt rest on my snazzy frame LOL


Any and all help would be greatly appreciated!

Thanks Again

Keep Gaming!
Morbid-Don

krag
August 16th, 2014, 16:11
Hey! Glad you have an adequate want to work in the community!

So either one of the long-time regulars will probably respond, or one of the dev's will. However just so you know, next time you are having an issue like this, you might be able to get answers more quickly from the part of the forum labeled "The House of Healing", as it is literally a "I need help" section of the Forum. None-the-less, one of the knowledgable guys will come by soon and give you the info you will need. Just lettin' ya know.

Good luck!

Trenloe
August 16th, 2014, 17:07
The house of healing is primarily for support with issues running Fantasy Grounds - not for help with custom modifications.

But, you're right krag, this post isn't really in the right place - it should be in the workshop forum. Moving it there now...

Zeus
August 16th, 2014, 22:11
The 1st framedef you reference is for a window frame, its used by window class imagewindow (defined in CoreRPG under campaign/campaign_images.xml).
The 2nd framedef you reference is for the image toolbar which is also used by the window class imagewindow.

In the first framedef, the four <offset> numbers represent the pixel size of the left,top,right,bottom edges of the graphic. Coupled with the graphics height and width they are used to generate the 9 regions of the image (topleft, top ,topright, left, middle, right, bottomleft, bottom and bottomright) that FG uses to tile images.

The second framedef uses the <middle> region tag only to define the frame. This is a simple shorthand means of defining a frame that can be used in its entirety to be tiled.

To adjust the position of the toolbar and the border as you describe, you will need to examine and edit the imagewindow windowclass. The toolbar can be moved by simply repositioning the bounds of the subwindow "toolbar" (defined at the bottom of the windowclass sheet data . The border you reference is actually the negative space between the edge of the imagewindow frame (in this case the imagebox frame) and the imagecontrol "image" (defined at the top of the window class sheet data which is the control that displays the image/map inside the imagewindow.

Hopefully that makes sense.

Morbid-Don
August 25th, 2014, 21:37
Hey Zeus, Trenloe, and Krag!

Thank You for the support

I apologize for posting in the wrong section - moving forward I will follow your guidelines

So I tried to adjust the file "campaign_images.xml" under the Core Ruleset to start.
After adjusting the numbers from 22 to 25 for the top (normally it was by default; 21,22,-27,36) which after just changing that single value - results in software error when loading the camapaign after the change was made and the Core Ruleset was undated...

<subwindow name="toolbar">
<bounds>21,25,-27,36</bounds>

The FIRST ERROR MESSAGE: Script Error:

[string "imagewindow_toolbar:toolbar_draw"]:1: ')' expected near 'paint'

The NEXT ERROR MESSAGEs appaear when I click on Images/Maps:

Script Error: [string "toolbar_draw"]:1: ')' expected near 'paint'
Script Error: [string "campaign/scripts/image.lua"]:18: attempt to call field 'onValueChanged' (a nil value)


At this point, I'd be willing to pay a programmer here to fix this issue for me...

I can FTP my whole rules set or other files to facilitate the work.

I can pay through paypal - I have an account, otherwise I'm stumped

By trade I'm no programmer - just a clever guy is all - thus I was able to get this far LOL

Trenloe
August 25th, 2014, 22:41
Sounds like you may have introduced a minor error in your campaign_images.xml Perhaps upload that file here for us to check.

Morbid-Don
August 27th, 2014, 18:51
Hi Trenloe,

Here are my ruleset files for both the Core and my modified 40,000 RPG files - you are welcome to take what you like from it though I don't own the copyrights to the images within, once this is fixed I will have to remove the zip file off my server.

https://www.medicalrealestate.com/documents/Both-CoreRPG-plus-40kTEST-within.zip

BTW I reset the value for: (back to the default values below)

Try to change from this:
<subwindow name="toolbar">
<bounds>21,22,-27,36</bounds>

To This:
<subwindow name="toolbar">
<bounds>21,25,-27,36</bounds>



I'd like to return the favor if possible - let me know if you'd like some graphics work done for your Fantasy Grounds

I can be IMed from 10am to 6pm MON - THURS (Eastern US Time) at morbid1er on AIM or morbidoner on Google messenger or reyboogienyc on Yahoo messenger

I'm here to help

Thanks

Rey

Trenloe
August 28th, 2014, 05:48
I'm not seeing any of the errors you mention in post #5 above using those 2 rulesets. I've changed the the bounds of the toolbar in CoreRPG at it works fine (for a CoreRPG based campaign). Running a 40K campaign I've changed the bounds of the toolbar in the campaign\campaign.xml file and this works without error too.

So, not sure what is causing you the errors. I would have guessed that it was an error in the XML file and/or packaging the rulesets up into a .PAK file, but those files you provided are OK.

What issues are you still having using these files?

Morbid-Don
August 28th, 2014, 16:54
Hey Trenloe,

I figured it out! <woohoo!> lol

OK this is what happened...

Following all the guidelines everyone gave - it seems the campaign.xml found inside of my 40k Ruleset needed to be updated with more code.

Originally it was this:

<?xml version="1.0" encoding="iso-8859-1"?>

<!--
Please see the license.html file included with this distribution for
attribution and copyright information.
-->

<root>

<windowclass name="imagewindow" merge="join">
<sheetdata>

<subwindow name="toolbar">
<bounds>18,16,-27,36</bounds>
</subwindow>

</sheetdata>
</windowclass>
</root>

Now Changed to This:

<?xml version="1.0" encoding="iso-8859-1"?>

<!--
Please see the license.html file included with this distribution for
attribution and copyright information.
-->

<root>

<windowclass name="imagewindow" merge="join">
<sheetdata>

<imagecontrol name="image">
<bounds>17,51,-17,-16</bounds>
</imagecontrol>

<subwindow name="toolbar">
<bounds>18,16,-27,36</bounds>
</subwindow>

</sheetdata>
</windowclass>
</root>

This specific XML file in this case overrides the values found in the files under CORE Ruleset

SEE SCREENSHOT BELOW

https://www.medicalrealestate.com/images/Rogue-Trader-Fantasy-Grounds-Rules-Set.jpg

Granted I would have needed to look at the Core set anyways to get a genral baseline of the values and what I needed to apply from

from here: campaign/campaign_images.xml (Core Rules)
to here: campaign.xml (40kDark Heresy Rules)

I guess moving forward I will play around with apply values to the campaign.xlm file first to see what effect it has while coding.

Anyways I wanted to thank you both Trenloe & Zeus

I'm always available to talk Rogue Trader shoptalk on the IM given above in my post, take care!

Morbid-Don

damned
August 29th, 2014, 01:10
Well done Morbid-Don.