STAR TREK 2d20
  1. #1

    senses field in NPC and CHARACTER

    I added the senses field to both my NPC and CHARASHEET.

    Darkvision 60 works in the NPC field but it does not work for the CHARSHEET. I can manually add the effect with VISION: darkvision to the Character. I tried it on several maps. Always the same.


    I have no extensions. Anybody have any insights as to why? I have spent a bit trying to get it to work, including the suggestings on this web site. This is my own Ruleset I am working on and it is used with Corerpg.


    Code:
    Charsheet
    <stringfield name="senses">
    	<frame name="fieldlight" offset="10,5,5,10" />
    	<bounds>125,545,467,13</bounds>
    	<controlline />
    	<lineoffset>-40</lineoffset>
    </stringfield>		
    
    
    
    NPC
    <stringfield name="senses">
    	<frame name="fieldlight" offset="10,5,5,10" />
    	<bounds>356,453,249,15</bounds>
    	<controlline />
    	<lineoffset>-40</lineoffset>
    </stringfield>
    Daniel A George

  2. #2
    LordEntrails's Avatar
    Join Date
    May 2015
    Location
    -7 UTC
    Posts
    17,374
    Blog Entries
    9
    I am pretty sure it already worked in the 5E character sheet and I assume all CoreRPG rulesets. Before you wrote the extension, did you try it per the wiki?
    Player and NPC Token Vision on Maps - Fantasy Grounds Customer Portal - Confluence (atlassian.net)

    Problems? See; How to Report Issues, Bugs & Problems
    On Licensing & Distributing Community Content
    Community Contributions: Gemstones, 5E Quick Ref Decal, Adventure Module Creation, Dungeon Trinkets, Balance Disturbed, Dungeon Room Descriptions
    Note, I am not a SmiteWorks employee or representative, I'm just a user like you.

  3. #3
    Yes. It's built on top of CoreRPG. I acutally made a copy of CoreRpg and renamed it and use that. I did make a few changes to the combat tracker. Not many though. hummmm.
    Daniel A George

  4. #4
    LordEntrails's Avatar
    Join Date
    May 2015
    Location
    -7 UTC
    Posts
    17,374
    Blog Entries
    9
    Instead of making a whole copy of CoreRPG, I suggest you looking into the Merge and join commands so you can just alter what you need and then when Core updates you'll get those updates automatically. Not sure how to do it myself, just familiar enough with all the developer talk. The other thing to do is to out comments and log outputs to you code so you can trace what is happening easier.

    Problems? See; How to Report Issues, Bugs & Problems
    On Licensing & Distributing Community Content
    Community Contributions: Gemstones, 5E Quick Ref Decal, Adventure Module Creation, Dungeon Trinkets, Balance Disturbed, Dungeon Room Descriptions
    Note, I am not a SmiteWorks employee or representative, I'm just a user like you.

  5. #5
    Interesting. I will check it out.
    Daniel A George

  6. #6
    The existing 3.5E, 4E, 5E and other rulesets that are included with the standard install use this approach.

    Regards,
    JPG

  7. #7
    Ok, I figured it out. I noticed there were a bunch of Ruleset cases in the lua scripts so on a hunch I combed through the ct_entry.lua code. My Rulset name was not "CoreRPG" I updated this to my ruleset and it worked!
    Code:
    function linkPCFields()
    	local nodeChar = link.getTargetDatabaseNode();
    	if nodeChar then
    		name.setLink(DB.createChild(nodeChar, "name", "string"), true);
    		token.setLink(DB.createChild(nodeChar, "token", "token"));
    		token3Dflat.setLink(DB.createChild(nodeChar, "token3Dflat", "token"));
    
    		if Session.RulesetName == "CoreRPG" then
    			senses.setLink(DB.createChild(nodeChar, "senses", "string"), true);
    		end
    	end
    end
    Daniel A George

Thread Information

Users Browsing this Thread

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

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
  •  
DICE PACKS BUNDLE

Log in

Log in