Buttons / pop-ups in Wiki pages

TheDungeoneer
TheDungeoneer
edited September 2012 in Campaign Portal Building
I've been recently using GM-only Wiki pages & Adventure logs as a sort of campaign notes / cheat-sheets for future sessions.
I complement the notes with maps, abridged NPC / monster stats and pictures that I can show my players during session.
After the session I use them as a starting point for Adventure Logs.

What I would like to do is have some links/buttons in the NPC / monster stats that can roll their attacks and damage, maybe perception checks and those sort of things. The results could show up in a simple pop-up window.

It doesn't need to be interactive/editable from the page, just as long as I can change the code when I edit the wiki, manually inserting the correct number of die and modifiers for each stat block.

I tried to cannibalize the d20srd.org dice roller script, (http://www.d20srd.org/scripts/diceRoller.js), but it seems like Obsidian Portal doesn't allow javascript.

Is there some way to do it? Or do you have other interactive code examples that I could use as a starting point?

Thanks in advance.

Comments

  • Langy
    Langy
    Posts: 364
    You could do that with a custom DST - those allow javascript and addition of buttons and all that easy enough. But it'd mean coding it all yourself, most likely.
  • gaaran
    gaaran
    Posts: 740
    You can't do anything with javascript, but you can use css to make things that "pop-up" as it were using the :hover selector.

    If you check this "map page":http://www.obsidianportal.com/campaign/melekar-test/wikis/test-location5 I made, I have an example of what you can do with the :hover feature. You could make it so that when you mouse over a particular phrase, like "perception check" a small div appears above it. I have "another example":http://www.obsidianportal.com/campaign/test-campaign-2/wikis/main-page here where I have divs appear when you mouse over an image. If either of those are helpful, i can make the code available to you.

    NOTE: Their appearance is the only thing interactive, you can't generate any dynamic content, like random numbers.
  • arsheesh
    arsheesh
    Posts: 850
    Gaaran, that's just sooo cool! You are leading the way here with your CSS magic.

    Cheers,
    -Arsheesh
  • TheDungeoneer
    TheDungeoneer
    Posts: 3
    Thanks for your tips.

    Langy, I suppose you mean a Dynamic Sheet Template.
    But can those be integrated into wiki pages? Or would I have to open the character in another tab to do it?
    Because what I really wanted is to have all the info in one page and roll from there.

    Gaaran: your map looks amazing, but unfortunately, what I really wanted was to roll on the spot.
    But keep up the good work, I look forward for seeing more from your campaign.

    Thanks for your help, I suppose there isn't an easy way of doing it right now, but I can always use the dice roller, its not exactly what I wanted, but its not a bad solution either.
Sign In or Register to comment.

May 2024
The World of Elurah

Read the feature post on the blog
Return to Obsidian Portal

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Discussions