Images in table results?

Is there a way to show an image as a table result or within a table result? (such as a pic of a monster)

Comments

  • This is a generator that you can download by searching "Runes" here on the forum or in the NOX (NBOS Online Exchange). That's where you will get all the jpg and gif files. But the generator didn't work for me when I downloaded it from NOX. So I did a little rework with the folder mapping. And be sure to search here (maybe on runes or tarot cards) for a discussion about the "\" versus double "\" in the folder mapping syntax.

    I'd upload the image files for you, too, but I'm out of time tonight, and they're on NOX. Now, with images it's a bit more html-ish, and that's out of my league... I can't explain what it does, I only did a simple tweak to what I downloaded.

    Good luck!

    Table: MysticalText
    Maxreps: 1
    
    Prompt: Select a material {stone1|stone2|wood1|marble1|marble2|paper1|paper2|vellum1}stone2
    
    <table background="G:\OneDrive/Documents/Inspiration Pad Pro/Generators/Runes/{$Prompt1}.jpg"><tr><td>[@{2d4-1} Paragraphs]</td></tr></table>
    
    Table: Paragraphs
    [@{2d6-1} Words >> implode &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;]\n\n
    
    Table: Words
    [@Runes][@{3d4-2} Runes]
    
    Table: Runes
    <img src="G:\\OneDrive\\Documents\\Inspiration Pad Pro\\Generators\\Runes\\Isa.gif" alt="Isa (I)" title="Isa (I)">
    <img src="G:\\OneDrive\\Documents\\Inspiration Pad Pro\\Generators\\Runes\\Berkano.gif" alt="Berkano (B)" title="Berkano (B)">
    <img src="G:\\OneDrive\\Documents\\Inspiration Pad Pro\\Generators\\Runes\\Dagaz.gif" alt="Dagaz (D)" title="Dagaz (D)">
    <img src="G:\\OneDrive\\Documents\\Inspiration Pad Pro\\Generators\\Runes\\Ehwaz.gif" alt="Ehwaz (E)" title="Ehwaz (E)">
    <img src="G:\\OneDrive\\Documents\\Inspiration Pad Pro\\Generators\\Runes\\Eihwaz.gif" alt="Eihwaz (Y)" title="Eihwaz (Y)">
    <img src="G:\\OneDrive\\Documents\\Inspiration Pad Pro\\Generators\\Runes\\Ansuz.gif" alt="Ansuz (A)" title="Ansuz (A)">
    <img src="G:\\OneDrive\\Documents\\Inspiration Pad Pro\\Generators\\Runes\\Elhaz.gif" alt="Elhaz (Z)" title="Elhaz (Z)">
    <img src="G:\\OneDrive\\Documents\\Inspiration Pad Pro\\Generators\\Runes\\Fehu.gif" alt="Fehu (F)" title="Fehu (F)">
    <img src="G:\\OneDrive\\Documents\\Inspiration Pad Pro\\Generators\\Runes\\Gebo.gif" alt="Gebo (G)" title="Gebo (G)">
    <img src="G:\\OneDrive\\Documents\\Inspiration Pad Pro\\Generators\\Runes\\Hagalaz.gif" alt="Hagalaz (H)" title="Hagalaz (H)">
    <img src="G:\\OneDrive\\Documents\\Inspiration Pad Pro\\Generators\\Runes\\Ingwaz.gif" alt="Ingwaz (Q)" title="Ingwaz (Q)">
    <img src="G:\\OneDrive\\Documents\\Inspiration Pad Pro\\Generators\\Runes\\Jera.gif" alt="Jera (J)" title="Jera (J)">
    <img src="G:\\OneDrive\\Documents\\Inspiration Pad Pro\\Generators\\Runes\\Kenaz.gif" alt="Kenaz (K)" title="Kenaz (K)">
    <img src="G:\\OneDrive\\Documents\\Inspiration Pad Pro\\Generators\\Runes\\Laguz.gif" alt="Laguz (L)" title="Laguz (L)">
    <img src="G:\\OneDrive\\Documents\\Inspiration Pad Pro\\Generators\\Runes\\Mannaz.gif" alt="Mannaz (M)" title="Mannaz (M)">
    <img src="G:\\OneDrive\\Documents\\Inspiration Pad Pro\\Generators\\Runes\\Nauthiz.gif" alt="Nauthiz (N)" title="Nauthiz (N)">
    <img src="G:\\OneDrive\\Documents\\Inspiration Pad Pro\\Generators\\Runes\\Othala.gif" alt="Othala (O)" title="Othala (O)">
    <img src="G:\\OneDrive\\Documents\\Inspiration Pad Pro\\Generators\\Runes\\Perthro.gif" alt="Perthro (P)" title="Perthro (P)">
    <img src="G:\\OneDrive\\Documents\\Inspiration Pad Pro\\Generators\\Runes\\Raidho.gif" alt="Raidho (R)" title="Raidho (R)">
    <img src="G:\\OneDrive\\Documents\\Inspiration Pad Pro\\Generators\\Runes\\Sowilo.gif" alt="Sowilo (S)" title="Sowilo (S)">
    <img src="G:\\OneDrive\\Documents\\Inspiration Pad Pro\\Generators\\Runes\\Thurisaz.gif" alt="Thurisaz (X)" title="Thurisaz (X)">
    <img src="G:\\OneDrive\\Documents\\Inspiration Pad Pro\\Generators\\Runes\\Tiwaz.gif" alt="Tiwaz (T)" title="Tiwaz (T)">
    <img src="G:\\OneDrive\\Documents\\Inspiration Pad Pro\\Generators\\Runes\\Uruz.gif" alt="Uruz (U)" title="Uruz (U)">
    <img src="G:\\OneDrive\\Documents\\Inspiration Pad Pro\\Generators\\Runes\\Wunjo.gif" alt="Wunjo (W)" title="Wunjo (W)">
    
    Table: BGImage
    stone1
    stone2
    wood1
    marble1
    marble2
    paper1
    paper2
    vellum1
    
  • Oh, here's the sample output.

  • I see it how it works with absolute paths. I was hoping it would work similar to the Use: statement and be a relative path.

    Here's hoping it's a feature worthy of inclusion in the next update.

    Thank you again!

  • That is very cool, Levendor!

  • Thanks Ed, but credit goes to original creator from many years ago on NOX. I just did a tweak and repair of folder mapping.

    SmallRealities: you could take tables like Runes and BGImage and make them their own geneator with fixed paths, never to be touched. Then, call them with a Use: statement in many of your generators.

    MarkOliva: what would you think of using some jpg's from FM8 as BGImages and a library of gif (or other format) wall tiles with defined edges (like 4-way intersection, 2-way east-west hallway, etc) to generate a random instant map for a dungeon crawl? Cool and useful or lazy and uncreative? I imagine even with the tile library that the conditional coding would be quite involved.
  • I'm curious how people got this to work. I'm trying to fix the tarot.ipt that I downloaded awhile back by filling in hard coded paths to the images, but no luck so far (using similar syntax from above).

    a snippet of the code is below:
    <td><center><image src="D:\\Files\\Dropbox\\GAMESTUFFS\\Software\\NBOS\\InspirationPadPro3\\Common\\graphics\\tarot\\arcanaMagician.jpg"><br><h4>I<br>The Magician</h4><br><i>Originality, creativity, skill, will-power, self confidence, dexterity, sleight of hand</i></center></td>)

    If anybody has any tips or tricks to get this to work I'd love to hear it. Thanks for any help on this.

  • edited May 2019

    If it's a specific image in a set location (not a randomly determined image from a table roll) then try the single slash formatting like I used in "table background=" above. For that, remember that its a single backslash after drive letter, then single front slashes in the path.

    If the code you have is embedded in a table roll (which likely it is for tarot), then your syntax looks good. Maybe try to trim all the formatting away, and see it will pull the raw image for a simple code... just the stuff from <image src= to .jpg">. If that works, then you just have a bit of bad syntax somewhere in your formatting (I notice that there is not a title="The Magician"), so I can't entirely follow the formatting that follows the basic call for your image.

    Lastly, maybe make sure that there is no protection on the image folder. My Win 10 does some dumb stuff like a pop-up window asking for admin approval before opening files in seemly ordinary folders. Are the jpgs really there on the hard drive (is your D drive really a physical hard drive or partition of a physical drive), or are they just pointer links to your dropbox online. I doubt this is the problem, but it's worth looking into to debug. Maybe put a jpg in a simple place like c:\documents and see if it can grab it from there.

    Otherwise, I don't see a problem with your syntax. Maybe check your table call... maybe it's a bit of bad syntax there before it ever finds the image table.

  • I figured out what the problem was. Once I put the images in the \AppData\Roaming\NBOS\… folder and set the path it mostly worked . . . except for one little thing. the images that started with the word "arcana" wouldn't display. after much chin-rubbing, and head-scratching I finally figured out that "\a" was telling IPP that I wanted the "a or an" switch set. Changing the filenames did the trick.

    Thanks for the heads up though, I might try the other method and see if I can get that to work; it didn't seem to take the first time around.

  • Oh yeah. Previously noted here: http://forum.nbos.com/discussion/1517/fortune-teller-files/p1

    An easy workaround is that \a is case sensitive, but filenames aren't case sensitive. So if you put the filename as arcanaMagician it may not work, but ArcanaMagician will work. That's presumably why the AppData part of the path was not a problem.

Leave a Comment