In-text DM only notes

NimrodYanai
NimrodYanai

Hi guys!

I have a feature request. I think this can probably be done via CSS or something, but might be a bit complicated.

Would it be possible to have DM only notes inside the text? It would be very helpful for me as a DM to have, like, my own notes next to specific parts of wiki pages or characters without having to scroll down to the bottom of the page.

Comments

  • ragnarhawk
    Posts: 168

    Yes, I have done something like this. but to restrict the text to members of the campaign.  The restricted sections are still there in the html, but are hidden by the CSS.

    Here is some CSS (for campaign members):

    .MembersOnly {display: none;}

    body.campaign-member  .MembersOnly {display: revert;}

    body.campaign-member  .PublicView {display: none;}

    and the HTML (this adds text to an existing line - the class can be applied on anything from a span to a div:

    [[Main Page | Return to Main Stage ]]<span class="MembersOnly">| [[Character Creation | Character Creation]]  </span>

     You can see it in action here:  https://thecarmensandiegooperahouse.obsidianportal.com/wikis/roles

    And it is used on divs on other pages in that wiki.

  • NimrodYanai
    NimrodYanai
    Posts: 101

    That's not really a solution, since in my campaign the players do a lot of the content editing, so they'll be able to see it in the HTML.

  • ragnarhawk
    Posts: 168

    How about footnotes to the GM only section?  You could add back links to the footnote number at the end of the footnote.  Anyone reading the main content or HTML would only see that there was a footnote - not the content.  And if you wanted, you could hide those footnotes with the above trick so they would only see it while editing

  • thaen
    thaen
    Posts: 1,064

    I think ragnarhawk's idea of jump links to the GM Only section is the best idea here.  You could even put in some fake ones to throw them off, so they don't realize which subjects actually do have secrets and which don't.  : )

    To make this a feature, I can't see how we would know where to put an inline "hidden" note, if one of the Players, that can't see the note, has deleted some text that the note would have been in.

    "This is the first part of the text that a Player wants to delete or rewrite. [This is a GM secret note.]  This is the rest of the text that a Player wants to delete or rewrite."

    I don't see how we could save that GM secret note in a way that wouldn't be somewhat hacky.

     

    Obsidian Portal Developer

  • NimrodYanai
    NimrodYanai
    Posts: 101

    Actually, I think the best solution would be the simplest one.

    You already have permissions based visibility for the GM notes.

    just add a class that uses those same permissions. So as a GM I can put a div, p, etc. with that class, and it will only be visible to someone with GM permissions.

  • GamingMegaverse
    GamingMegaverse
    Posts: 2,998

    I think that is a great solution.

    Just trying to help out.

  • thaen
    thaen
    Posts: 1,064

    @NimrodYanai, I'm not understanding how that would solve the situation where a Player that is Editing the page deletes or changes the section that had a hidden piece of HTML in it?

    Obsidian Portal Developer

  • thaen
    thaen
    Posts: 1,064

    I think you can do this with the Custom JavaScript now.  The way I might try it is to make the notes down in the GM Only section, and have some "structure" to them that pairs a "phrase" in the main body of the document with the notes you want for yourself.  So maybe ...

    In your main body of text it might say ...

    In the middle of the temple there is a glowing marble statue of the Goddess.

    Then in your GM Only section it might say ...

    [en-start]"glowing marble statue", "Remember, if the PC's touch the statue, they must Save or be paralyzed as if enthralled by it's beauty."[en-stop]

    Then your Custom JavaScript would take all of the "[en-start] ... [en-stop]" entries from the GM Only section and then insert the "note" part into the normal text of the webpage (maybe in brackets) right after the "phrase" part, so you as the GM can see the note right there next to the phrase when you visit the page. 

    So in practice it might look like this:

    In the middle of the temple there is a glowing marble statue [Remember, if the PC's touch the statue, they must Save or be paralyzed as if enthralled by it's beauty.] of the Goddess.

    When Players visit the page, the GM Only section won't exist on the page, so the Custom JavaScript wouldn't find anything to insert.

    This "match by phrase" idea would also mean that there wouldn't be any links in the text to tell the Players that something might be interesting about this thing.  And if the Players did edit the page and change the phrase or delete it from that section for some reason, then you would at least have a reminder in the GM Only section of what that note was referring to.

     

    Obsidian Portal Developer

  • NimrodYanai
    NimrodYanai
    Posts: 101

    That sounds like a very good solution!

    A small reminder (though you probably don't need it) - in the Javascript, you need to use an "if" statement instead of letting it not find anything, as that might break the Javascript read and cause other issues on the page.

  • thaen
    thaen
    Posts: 1,064

    Are you going to try coding this ... or something like it ... with the new Custom JavaScript?

    Obsidian Portal Developer

  • NimrodYanai
    NimrodYanai
    Posts: 101

    What new custom javascript? :O

  • thaen
    thaen
    Posts: 1,064

    Here's the help page:

    https://help.obsidianportal.com/article/190-custom-javascript-basics

    Here's the thread where we've been discussing it:

    https://forums.obsidianportal.com/discussion/comment/47544

    The "allow" functionality is still clunky (it's on the list to change).

    But the short answer is check out the field right under "Custom CSS" in your Campaign Settings > Advanced tab.  : )

    Obsidian Portal Developer

Sign In or Register to comment.

March 2024
Wrath of the Highborn

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