STAR TREK 2d20
  1. #1

    Adding NPC portraits in CoC ruleset?

    How does one go about adding a portrait to an NPC in the CoC ruleset? (Not the player characters, but the NPC sheet.) It looks like there's a spot for one to go, but danged if I can figure out how to get a picture to go in there. Does it need to be a very specific size or something?

    Thanks!

  2. #2
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,413
    The small circle to the top left of the NPC sheet is for a token - drag a token from the token bag to the circle. The, when this NPC is added to the combat tracker it will automatically use that token.
    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!

  3. #3
    Thanks Trenloe, but actually what I had in mind is an actual portrait. On the CoC NPC sheet, there is a box for a mugshot or character portrait. By default, it just has the Chaosium logo in it, but in one of the scenarios from the CoC rulebook that comes with the ruleset, there are portraits in there for some characters. I just can't figure out how to get one in there. None of the screenshots on the ruleset's store page show the NPC panel, it looks like. I meant to take a screenshot to post last night, but I wasn't able to get to it. I'll try to do so this evening. Thanks, as always, for your willingness to help a brotha out!

  4. #4
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,413
    Oh right, sorry - I've never really noticed that field, I presumed it was just a Chaosium logo.

    Looking at the code for this picture field:
    Code:
      <tokenfield name="picture">
    	<anchored>
    	  <to>picframe</to>
    	  <position>over</position>
    	</anchored>
    	<script>
    	  function onDrag()
    		return false;
    	  end
    	  
    	  function onDrop()
    		return false;
    	  end
    	</script>
      </tokenfield>
    Basically, the onDrag and onDrop functionality is being ignored because of the "return false" code. So, there is no way to add a picture to this field - without changing the base rule code... Looks like a feature that was never implemented, or perhaps was never planned as we think it.
    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!

  5. #5
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,413
    Follow up - removing the above code (the <script> tags and code in between) in adventure_npcs.xml, does allow dropping of tokens onto the Picture field in NPCs.

    I just did a quick test - downloaded an image of Cthulhu and saved it as a token (in \tokens\host) then dragged it to the picture section of the NPC - it looks like this:



    Then if the NPC sheet is shared with the players they will see this:



    NICE!
    Last edited by Trenloe; August 30th, 2013 at 18:13.
    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!

  6. #6
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,413
    Of course - there may have been a good reason why this functionality was removed/disabled...
    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. #7
    Puzzling! Here's another piece of info:
    In the scenario from the CoC rulebook, included with the ruleset, there are NPC mi-go. And they have portraits, oddly enough. Also, in the scenario included with the Secrets of NY add-on from the FG store here, there are NPCs with portraits. So, is it that the script that you pointed out prevents new portraits being added to an NPC sheet, but does not interfere with the display of portraits on NPCs that already have them?

  8. #8
    It sounds like something that was added to support the modules sold through the store, but not necessarily activated for general use.

    I'm updating the CoC ruleset for v3.0, and I had already enabled this field to be set to any token in the token bag.

    Regards,
    JPG

  9. #9
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,413
    Quote Originally Posted by cscase View Post
    So, is it that the script that you pointed out prevents new portraits being added to an NPC sheet, but does not interfere with the display of portraits on NPCs that already have them?
    Absolutely, the code that I recommended removing is just the code that stops tokens being dropped on the picture image. The underlying database structure that stores the link to the token is not affected in any way - it is obviously there and operational as just enabling drag/drop functionality stores and displays the image fine. Even with the drag/drop code disabled (as is standard in the current 2.9.4 CoC ruleset) any pictures previously added (either in a module or when drag/drop was enabled) will display fine.
    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!

  10. #10
    Interesting! Thanks for the mystery-solving, Trenloe and moonwizard!

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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
  •  
FG Spreadshirt Swag

Log in

Log in