PDA

View Full Version : Newbie seeking Help please :) Bigger Portrait on Character Sheet



angelamys
May 15th, 2017, 00:33
Hi :)
Newbie here to Fantasy Grounds, and have to say what a wonderful group of people you all seem to be :)
Anyways, on with my request :)
I'm hoping to start a campaign with some friends, using the CoreRPG system, and I'm playing around with character sheets etc.
One of the friends has spent a considerable amount of time making a beautiful portrait of their character, which may not be the most important thing, however in an effort to appease them I was scouring the forum for a way to increase the Portrait size on the Character Sheet.
Sadly my knowledge of XML or Lua is non-existent, although I was hoping that it would be a relatively simple task of adjusting some of the co-ordinates in one of the graphics.xml's.
The current Portrait size on the Character sheet seems to be maybe 20x20 pixels, and I was hoping to maybe increase that to 40x40, although I realise I may then need to push the actual main blocks lower, and would need to move the Token picture as well >.>
Is this something that can be achieved via XML or is it all 'coded' into the Lua scripts?
Thanks for any help or replies/suggestions :)

Trenloe
May 15th, 2017, 00:43
Welcome to the forums angelamys

The standard portrait size is actually 63x63 pixels.

You can change the size, but you'll need to do it in a number of places - and will then also have to shift other controls around.

The portrait control is found at the highest level in the CoreRPG campaign\record_char.xml file, which uses the portrait_char template, found in campaign\template_char.xml. There are also various other places where the portrait is used (the charlist pictures of the PCs on the desktop, for example) and there are some _mask.png files that are used in the portrait display process.

So, not simple to just change the portrait size and have a uniform look throughout the interface.

angelamys
May 15th, 2017, 07:31
Wow thanks for the fast reply :)
and thank you for the welcome :)
I feared this was perhaps the case boohoo :)
I guess I will have to rely on the great things you guys invent until I have the time to delve deeper into the magical world of XML :D
Thanks again :)

Szabtom
May 15th, 2017, 07:42
You can add the image to the campaign just like any other images, and then share it with the players. They can then open it any time they want. You can also create a category called "PC portraits" for this images, and it will appear in the drop down selection at the top of the image list window.

Nylanfs
May 15th, 2017, 12:16
You can also link the portrait into the misc info on the character sheet.

angelamys
May 18th, 2017, 05:17
Thanks for the excellent suggestions Szabtom and Nylanfs :D
Both of these will work fine :)
Thanks again :D

LordEntrails
June 13th, 2017, 21:17
If the size of the window on the character sheet that shows the portrait is changed (along with the layout that would require), is that going to effect the portrait used on the desktop or the CT?

i.e. if the portrait on the charactersheet is shown at 100x100, is the image file itself sized at 63x63 and FG will just scale it in the display?

Part of this, if a larger image is used (today) does FG change the actual image or does it just scale the display?

Trenloe
June 13th, 2017, 21:25
FG scales images to fit the required size for the mask controls.

FYI - it's a token on the combat tracker, not a portrait. The token may, or may not, have been auto created from the portrait by the ruleset. But it is now a token with potentially different dimensions (based off the token masks used during the conversion process).

LordEntrails
June 14th, 2017, 00:33
Thanks Trenloe.

LordEntrails
June 15th, 2017, 01:12
I've moved the character portrait (in CoreRPG) from the record_char.xml to the record_char_main.xml file and though I should be able to resize it there.
XML;

<windowclass name="charsheet_main">
<margins control="0,0,0,2" />
<sheetdata>
<genericcontrol>
<bounds>15,10,160,160</bounds>
<icon>charlist_base</icon>
<disabled />
</genericcontrol>
<portrait_charlocal name="localportrait">
<bounds>15,10,160,160</bounds>
<invisible />
</portrait_charlocal>
<portrait_char name="portrait">
<bounds>15,10,160,160</bounds>
</portrait_char>
</sheetdata>
</windowclass>
But I only get this (i.e. the portrait is not 160x160);
19381

I think the portrait is defined by "charlist_base", and when I find in files on that I get a couple of controls that have size limits, but those don't appear to be the right controls (I think they are for PC selection and desktop display, found in campaign_chars.xml & ref_[pregen_char.xml). Am I wrong and it's one of those? Or do I need to create a new template/control to control the size separately? Or is it something else?

Thanks in Advance

Moon Wizard
June 15th, 2017, 01:33
The portraits created by the ruleset are 72x72 based on the "portrait_char" template using the portrait icon defined by the "charlist" portraitset.

When an icon is placed in a generic control, the image is centered not stretched. Even if it was stretched, it would look grainy, since you are interpolating a 72x72 image to 140x140 image.

You would need to override the portrait base and mask graphics, override the charlist portrait set, and deal with any issues in the character selection window, character sheet or the character list in the upper left tabletop. (There may be none, but those are the places that the portrait_*_charlist icons are used.) Or you could define a new portraitset to use on the PC sheet. (maybe portraitset name="charsheet", and the resulting graphics would be "portrait_*_charsheet".)

Regards,
JPG

LordEntrails
June 15th, 2017, 16:00
Thank you Moon. That actually made sense to me. Proof you can teach an old dog new tricks.

I'll will try creating a new portraitset. Thanks again.

Trenloe
June 15th, 2017, 16:30
When an icon is placed in a generic control, the image is centered not stretched.
For the portrait control (and the token image created from it), I'm seeing an image smaller than 63x63 being stretched to fill the control. Is this special just for the portrait?

Moon Wizard
June 15th, 2017, 17:21
The image selected as the portrait source is resized to fit the mask/base image defined for each portrait set. Once those portrait sets create the icons, they follow the same logic as any other icon.

Regards,
JPG

LordEntrails
June 15th, 2017, 17:35
I got intimidated when I looked at creating a new portraitset, so I went the easy way and just scaled portrait.png and portrait_mask.png. It works well on the character sheet and the portrait selection, but not on the PC icons onthe desktop. Is this the char_list you referred to? Any suggestion if it would be easier to try the new portrait set or to try and resolve the desktop issue(s)?

19391

And if you are interested, this is what the character sheet looks like so far;
19392