DICE PACKS BUNDLE
Page 2 of 3 First 123 Last
  1. #11
    Okay, thanks Zacchaeus - I figured that would be the case with my first question.

    As for my second:

    Quote Originally Posted by Zacchaeus View Post
    You can have two different borders around two columns of text or around one single text block.
    I'm I'm understanding that correctly, does this mean that I could - potentially - enclose the text in a brown border / frame that's to the left of the image? And if so, how would I do that?

    Ultimate License Holder!
    Anyone can play!
    Timzone:
    US Central (-6 GMT)

  2. #12

    Join Date
    May 2016
    Location
    Jacksonville, FL
    Posts
    2,211
    Blog Entries
    7
    As @Zacc said, basically 'no' to each question. If you have a paragraph break somewhere (as you do in your sample screenshot) only include that text in the 'image' block, then create a new 'text' block below it to continue the normal text.

    Frames are purely a background texture for the 'text' portion of a block and will not include images. That's one (of many) features I'm hoping will eventually be included in the layout functionality.

    Quote Originally Posted by Casimir View Post
    ...does this mean that I could - potentially - enclose the text in a brown border / frame that's to the left of the image? And if so, how would I do that?
    Sure, just stick the frame markup in the same block as the image+text block and the script will know how to handle it. It also works for two-column text+text.

    The main thing to watch for, especially when using the two-column layout, is readability. Each blocktype is inherently 'indented' inside the refpage borders by a few pixels (5 or 10? @Trenloe might know.) When you use a frame, the text inside that frame is further 'indented' (refer to my above comment about using this technique as a "trick") so make sure what you're trying to do actually looks good without having to enlarge the refpage. If it's questionable, then it's usually better to just keep the 'framed' text as its own separate, single-column block.
    Last edited by Talyn; November 6th, 2020 at 22:13.

  3. #13
    Quote Originally Posted by Talyn View Post
    Sure, just stick the frame markup in the same block as the image+text block and the script will know how to handle it. It also works for two-column text+text.
    Unfortunately, I don't seem to be able to get this to work. I don't know if I'm doing it right, but here's the code I'm trying to work with:

    Code:
    <id-00003>
        <align type="string">left,right</align>
        <blocktype type="string">image</blocktype>
        <image type="image">
            <bitmap>images\sideimg1.jpg</bitmap>
        </image>
        <size type="string">200,350</size>
        <frame type="string">brown</frame>
        <text type="formattedtext"><p>     Lorem ipsum dolor sit amet...</text>
    </id-00003>
    And what's happening instead is a standard text colored block:

    Attached Images Attached Images

    Ultimate License Holder!
    Anyone can play!
    Timzone:
    US Central (-6 GMT)

  4. #14

    Join Date
    May 2016
    Location
    Jacksonville, FL
    Posts
    2,211
    Blog Entries
    7
    I will correct my original statement (been awhile; I've pretty much trained myself to minimize two-column blocks whenever possible): you can only do something "fancy" (frame or image type) to one column per block. So image + frame would be two "fancy" things, which is a non-starter so the scripts will default to simply the blocktype (image in this case) and normal text.

  5. #15

  6. #16
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,291
    For a Pathfinder 2 product I have some blocks that have an image on the left and text (with a frame) on the right - see the third screenshot here: https://www.fantasygrounds.com/store...ZOSMWPZO9303FG

    This was created with the following code:

    Code:
            <blocks>
              <id-00001>
                <align type="string">right,left</align>
                <size type="string">170,350</size>
                <frame type="string">pfblue</frame>
                <image type="image">
                  <bitmap type="string">images\Abadar - Symbol.jpg</bitmap>
                </image>
                <caption type="string" />
                <text type="formattedtext"><h>Master of the First Vault</h><p>LN god of cities, law, merchants, and wealth</p><p><b>Realm</b> Aktun (Axis)</p><p><b>Allies</b> Asmodeus, Brigh, Erastil, Iomedae, Irori, Shelyn, Shizuru, Torag</p><p><b>Enemies</b> Besmara, Lamashtu, Norgorber, Rovagug</p><p><b>Temples</b> banks, cathedrals, courthouses</p><p><b>Worshippers</b> architects, bankers, lawmakers</p><p><b>Sacred Animal</b> monkey</p><p><b>Sacred Colors</b> gold and silver</p><p><b>Divine Ability</b> Constitution or Intelligence</p><p><b>Alternate Domains</b> duty</p></text>
                <imagelink type="windowreference">
                  <class>imagewindow</class>
                  <recordname>reference.imagedata.img_abadarsymboljpg</recordname>
                </imagelink>
                <blocktype type="string">imageleft</blocktype>
              </id-00001>
    Note the blocktype of imageleft - in theory, imageright should also work - which is what @damned suggested in post #3, but a while ago I had issues with getting this to work properly on imageright and only got it working on imageleft. I didn't investigate in any depth as I didn't specifically need imageright

    EDIT: I've done some further investigating now (diving into the CoreRPG ruleset code) and it will work if the frame value is provided via XML as frameleft - so try something like the following:

    Code:
    <id-00003>
        <align type="string">left,right</align>
        <blocktype type="string">imageright</blocktype>
        <image type="image">
            <bitmap>images\sideimg1.jpg</bitmap>
        </image>
        <size type="string">200,350</size>
        <frameleft type="string">brown</frameleft>
        <text type="formattedtext"><p>     Lorem ipsum dolor sit amet...</text>
    </id-00003>
    Last edited by Trenloe; November 8th, 2020 at 09:01.
    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

  7. #17

    Join Date
    May 2016
    Location
    Jacksonville, FL
    Posts
    2,211
    Blog Entries
    7
    These new tags, are they documented somewhere? They're certainly not on the Wiki page...

  8. #18
    I have a few interrelated questions.

    First: I'm struggling to get the <image type="image"> version to work. Here's what I currently have:

    Code:
    <id-00002>
    	<align type="string">center</align>
    	<blocktype type="string">image</blocktype>
    	<image type="image">
    		<bitmap>images\13ALogo.png</bitmap>
    	</image>
    	<imagelink type="windowreference">
    		<class>imagewindow</class>
    		<recordname>image.id-00098</recordname>
    	</imagelink >
    	<caption type="string" />								
            <size type="string">250,250</size>
    	<text type="formattedtext" />
    </id-00002>
    The space where the image is supposed to be is blank, but when I click on that space the linked image comes up in a new window. This would imply that the <imagelink> portion of that is working fine. I've tried both versions of slash in the path within the <bitmap> part, and that doesn't seem to make any difference.

    Second: I have a previous version of this that was using <picture> instead, and it works just fine. I also see that many of Talyn's examples use <picture> instead of <image>. What is the difference between these two, and when would I use one versus the other? Should I just go back to the <picture> version and move on?

    I just seems weird to me that there are two different way of doing (apparently) the same thing.

  9. #19

    Join Date
    May 2016
    Location
    Jacksonville, FL
    Posts
    2,211
    Blog Entries
    7
    Using <picture> was the only way to basically "fake" FG Classic into displaying a PNG with alpha by telling it that it's rendering a token (which is also why the @modulename was a requirement, since tokens can be called without having that particular module loaded).

    If you're using Unity and your <version> tag is 4.x then you'll need to adjust like so:

    Code:
    <id-00002>
    	<blocktype type="string">image</blocktype>
    	<image type="image">
    		<layers>
    			<layer>
    				<name>13ALogo.png</name>
    				<id>1</id>
    				<parentid>-1</parentid>
    				<type>image</type>
    				<bitmap>images/13ALogo.png</bitmap>
    			</layer>
    		</layers>
    	</image>
    	<imagelink type="windowreference">
    		<class>imagewindow</class>
    		<recordname>image.id-00098</recordname>
    	</imagelink >							
    	<size type="string">250,250</size>
    </id-00002>
    Note: I omitted your <align> (btw the <image> tag defaults to center anyway; the align tag only really works in a two-column scenario), <caption> and <text> tags since they were empty.

    The image renderer in Unity will display PNG with alpha channel just fine, so there's no longer a need to resort to such trickery (and @Moon Wizard waggled his fingers at us constantly to make sure we didn't abuse that trick, as it forced all the "fake tokens" to be loaded into memory, which was also more of a concern in Classic).

    On the other hand, if you're sticking with a 3.x <version> that will tell Unity to go into "Classic Compatibility Mode" for the markup, so your original markup should work just fine, at least by me giving a quick glance-over.

    <imagelink> will pop a new window no matter what; that's just an FG function. If you have the <recordname> correct then it will display the image there. In all my retail projects, I go through and rename the records so like in that FRQ1 the cover art would be <recordname>image.cover</recordname>. Just me, but I'm not crazy about having imagelinks to logos; I just do artwork that's large enough and quality enough to think someone might want to see a larger version on its own.

    EDIT: Just noticed you mentioned the slash. FG does want the forward slash in filenames so it's always / for that stuff.
    Last edited by Talyn; July 28th, 2021 at 01:43.

  10. #20
    One more question, if I have a block with two columns of text, is there any way to get the frame to apply to the left column? I've tried all four permutations of alignment and text/text2 and in all cases the frame type seems to be applied to the right column.

    EDIT: nevermind, I just scrolled up saw Trenloe's bit about frameleft. I'll give that try.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
STAR TREK 2d20

Log in

Log in