• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

{bmp xxx} not working?

TCArknight

Well-known member
Is there anything special you need to do in order to get bmp images showing inline in a text field?

I try having a label with labeltext like:
Code:
var myString as string
myString &= “{bmp d8_screen}” & “{bmp d4_screen}”
@text = myString

But the field displays as “{bmp d8_screen}{bmp d4_screen}” instead of the expected symbols.

Any suggestions or thoughts?
 
Did you ever get this fixed? my gut impulse would be that you might have a case where either d8_screen.bmp doesn't exist, or the system couldn't decode it. There's a line in the documentation which suggests it would just print the name.

If the bitmap is not found or the output doesn't support encoding, the "name" is inserted as text.
 
Did you ever get this fixed? my gut impulse would be that you might have a case where either d8_screen.bmp doesn't exist, or the system couldn't decode it. There's a line in the documentation which suggests it would just print the name.
No, I haven’t. :(

The d8_screen.bmp is in the game folder, so that’s not an issue. I don’t know if maybe there is something with the bmp encoding that I need to pay attention to or what...
 
No, I haven’t. :(

The d8_screen.bmp is in the game folder, so that’s not an issue. I don’t know if maybe there is something with the bmp encoding that I need to pay attention to or what...

My experience from creating the game logo on my system is that I needed to turn off the alpha channel and the embedding of the color space in the image.
 
Hmmmm.... I tried that, but no luck...

I'll play around and try a couple of different things. I'm trying to store this in a text field if that makes a difference..
 
No luck with any of my experiments so far. :(

Is there maybe a particular label style or such that need to be used to translate the {bmp portion?
 
Here is a finalize script that I know works:

Code:
      <finalize><![CDATA[
        if (@value <= 0) then
          @text = chr(150)
        else
          @text = "{meta bmpfull}" & @value & "{horz 2}{bmp dicepool}"
          endif
        ]]></finalize>

bmpfull adjusts the vertical position of the bitmap, relative to the text. All of the bitmaps we use in Shadowrun are designed to make use of that setting, so anywhere in Shadowrun that we use a bitmap, we also use meta bmpfull.
 
Nope, no luck. :(

procedure said:
<procedure id="BldDiceStr" scripttype="eval"><![CDATA[
~declare variables that are used to communicate with our caller
var prof as number
var abil as number
var setback as number
var boost as number
var myText as string

while (prof > 0)
myText &= "{bmp d8_screen}"
prof -= 1
loop
while (abil > 0)
myText &= "{bmp dicepool}"
abil -= 1
loop]]></procedure>
eval script on Skill trait said:
<eval index="7" phase="Render" priority="5000"><![CDATA[
~only access the linkage if the skill is directly on the hero; if not, it is
~likely within an advancement gizmo and no linkage will exist there
var prof as number
var abil as number
var setback as number
var boost as number
var advant as number
var myText as string

if (container.ishero <> 0) then
prof = minimum(field[trtFinal].value,linkage[attribute].field[trtFinal].value)
abil = maximum(field[trtFinal].value,linkage[attribute].field[trtFinal].value) - prof
setback = field[trtSetback].value
boost = field[trtBoost].value
advant = field[trtAdvant].value
myText = ""

Call BldDiceStr
field[sklPoolBas].text = myText

Call DicePoolEx
field[sklPool].text = myText
endif
]]></eval>
field on Skill trait said:
<!-- Skill pool includes Base + any Boosts, setbacks, etc. -->
<field
id="sklPool"
name="Skill Pool"
type="derived"
maxlength="10">
</field>
Could it be the timing?
 
Last edited:
You saw the maxlength 10 on your field? {bmp dicepool} is 14 characters, so you're already 4 characters over.
 
I realized that after I posted. :(

Now, the length is fine, but I just get the name of the bmp as the text displayed when doing the statblock. I read on the wiki that if the file is not found, or if the encoding is not supported, then that's when the name is substituted.

THe d8_screen.bmp and dicepool.bmp (I copied from the sr5 data folder) are present in the game system folder, but I get this in the statblock output on the statblock summary tab:
<!-- smStatbl portal - statblock label

-->
<portal
id="smStatbl"
style="lblSummLf">
<label
dossier="statblock"
ismultiline="yes">
</label>
<mouseinfo/>
</portal>
Skills: Athletics d8_screendicepool, Perception d8_screendicepool, Ranged (Heavy) d8_screendicepool, Survival d8_screendicepool

Now though, I do see the bmps displayed on the standard character sheet output...
 
Debug the text of that field - make sure the {} are there in the debug.

Yes sir, they are there.
Code:
**********  Start Evaluation Cycle  **********
{bmp green2}{bmp green2}
{bmp green2}{bmp green2}
<snip>

The different Portal styles are:
Code:
  <!-- left-aligned version of the 'summary' label -->
  <style
    id="lblSummLf">
    <style_label
      textcolorid="clrsummtxt"
      font="fntsummary"
      alignment="left">
      </style_label>
    </style>

  <resource
    id="fntsummary">
    <font
      face="Arial"
      size="40">
      </font>
    </resource>

  <!-- simple text for output -->
  <style
    id="outNormal">
    <style_output
      textcolor="000000"
      font="ofntnormal"
      alignment="center">
      </style_output>
    </style>

  <!-- font used on normal text -->
  <resource
    id="ofntnormal">
    <font
      face="Arial"
      size="40"
      style="bold">
      </font>
    </resource>
I don't see anything that would make the difference between the bmp showing or not. :(
 
I just took another look at that portal you posted in post #11 - are you trying to create a summary panel that shows the character's statblock? If so, then you need to use the statblock mechanisms for special displays, not the standard portal mechanisms. I'm not even sure if statblocks can use images. I know we don't use any images in Pathfinder, d20 or Shadowrun statblocks, so I'm not sure how to support them if there is a mechanism to do so.
 
That's probably what it is then. :(

I am indeed using the Statblock in a summary tab. I didn't think anything of it because the Statblock seemed one big text block (but I understand it's more a output than anything.

Which is a thought, would maybe copying the statblock info into some kind of text field work? If not, then I can adjust the Skills summary to display as I'd like...
 
Back
Top