5E Character Create Playlist
Page 7 of 11 First ... 56789 ... Last
  1. #61
    Quote Originally Posted by ShakyLuigi View Post
    Well, I am pretty sure the first error is because the T (Toughness) characteristic is empy when making a new sheet. So the code is trying to get a NIL value, which doesn't work.
    It wasn't gamebreaking error, so I haven't looked into to it yet.
    All those other yellow errors is because how I've anchored the objects and frames in the character sheet. Again, shouldn't be gamebreaking, but I think I have to have a look at it and make it a little prettier.

    I think I found the second error you mentioned. It has something to do with an idea I had about calulcationg corruption. But it isn't used at this moment, so shouldn't effect anything else.

    I just thought of something.
    I've made everything in FG Unity. Are you using Classic FG? May that have something to do with it? Can someone confirm/disconfirm this?
    Still it would be odd that everything works fine with the Charactersitcs, but not with Skills since they both go through basicaly the same process.

    Could you perhaps attach the console log after you've rolled one characteristic and one skill? It may help me in troubleshooting.
    It happens in both Classic and Unity.

    Here you have the Console Log.

    fgu_logs_20201203.zip

  2. #62
    Try this one.
    I think I kept on uploading the wrong file.

    Warhammer_4.ext

  3. #63
    Quote Originally Posted by ShakyLuigi View Post
    Try this one.
    I think I kept on uploading the wrong file.

    Warhammer_4.ext
    It does work now. Thanks!

    But, the Success Level calculation is not working as expected. For instance, if you roll a 29 against a skill of 41, the chat shows a SL 1, instead of 2. I have tried with any other rolls, and sometimes it calculates well, some other times it doesn't.

    Anyway, you have done a splendid work so far. Thanks again!

  4. #64
    Does anyone have any info about possible official ruleset? I bought foundry for it and it's uhh it's rough to transition, *very* rough. Like I'm not capable of dming there so I'm delaying the campaign rough.

    I know you folks are working on it, but I'd just like to know if there is any hope for it becoming official and paid content so I can pay you and use everything needed. Have you had any response from smiteworks? Cubicle 7?
    Last edited by MMOaddicted; December 5th, 2020 at 06:48. Reason: clarification

  5. #65
    I gotten Foundry WFRP4E as well, pretty well done and executed. Not sure what problems u facing.

    I emailed C7 on FG Offical support but the answer is nothing at the moment but things might change in the future.

  6. #66
    Quote Originally Posted by Pepor View Post
    It does work now. Thanks!

    But, the Success Level calculation is not working as expected. For instance, if you roll a 29 against a skill of 41, the chat shows a SL 1, instead of 2. I have tried with any other rolls, and sometimes it calculates well, some other times it doesn't.

    Anyway, you have done a splendid work so far. Thanks again!
    Thanks for noticing!
    It's been fixed.
    But I am in the middle of a few major changes, so I have to wait to add this bug-fix for the next update (beginning to feel like a real developer with this kind of language ).

  7. #67
    WFRP4 is the reason, why I bought foundry as well. Publisher support with ready made modules is key. That and the pricing model was the original reason for me to choose FG for DnD. Since I am originally coming from WFRP, I will run foundry a lot more in the future. Will keep using FG for DnD.

  8. #68
    I am trying to add a strength modifier to the attack roll.
    And I am trying to do use the code that I've learned so far, but I can't make it function and I don't know why.

    I have made this code to calculate the total strength (where abilities.ts is total strength).
    I can also use the same method to add the total strength to other skills.

    Code:
    function updateS(nodeWin)
    	local nIS = nodeWin.getChild("is").getValue();
    	local nAS = nodeWin.getChild("as").getValue();
    		
    	local nTS = (nIS+nAS);
    	Debug.console("nTS: ", nTS);
    	nodeWin.getChild("abilities.ts").setValue(nTS);
    	
    end

    But if I use the same method within the dice roll (as shown below), I get this error: [ERROR] Script execution error: [string "scripts/wh4_damagedr.lua"]:106: attempt to index global 'nodeWin' (a nil value)

    Code:
    function rollDamage(rollValue,successValue)
      local desc = "";
      local value = 0;
      local lSuccessValue = tonumber(successValue);
      local nStrength = nodeWin.getChild("abilities.ts").getValue();
      local lRollValue = rollValue;
     
    
      if lRollValue <= lSuccessValue then
        value = math.floor(lSuccessValue/10)-math.floor(lRollValue/10)+nStrength;
        desc = string.format("Dmg: %d", value)
      else
        desc = "";
      end
      return desc;
    end
    Why does it work fine in one LUA file, but not in another? Does it have something to do with that the roll goes through the LUA file shown below first?
    Because the roll and strength is done in two different windows? I am a bit lost here.

    Code:
    function action(draginfo)
        local rActor = ActorManager.getActor("pc", window.getDatabaseNode());
        AttackRoll.performRoll(draginfo, rActor, stat[1]);
        return true;
    end
    
    function onDragStart(button, x, y, draginfo)
        return action(draginfo);
    end
    
    function onDoubleClick(x,y)
        return action();
    end

  9. #69
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    26,638
    Blog Entries
    1
    immediately after function updateS(nodeWin)
    add the following line

    local nodeWin = window.getDatabaseNode();


    Actually - updateS is expecting you to pass nodeWin to it
    What is calling updateS? Can you post that code too?

  10. #70
    I have been using "updateS" to update a value on the character sheet.
    I've been using this solution for most values in the character sheet.
    It's the same method you've shown in your video .

    https://www.youtube.com/watch?v=RiBk...erBvW3&index=6


    Code:
    <totalchar name="ts" source="abilities.ts">
    		<anchored to="as" position="insidetopleft" offset="0,28" width="18" />
    		<tooltip text="Strength Skill" />
    		<target>ts</target>
    		<statname>Strength Skill</statname>
    		<stat>ts</stat>
    		<script>
    			function onInit()
    				local nodeWin =window.getDatabaseNode();
    				CharacterUpdate.updateS(nodeWin);
    			end
    		</script>
    	</totalchar>
    So "function:updateS" updates "abilities.ts".
    And the value in "abilities.ts" I can use to update other skills ex. Climb (which is "skills.cli" shown in the code below).

    Code:
    function updateCLIMB(nodeWin)
    	local nCLM = nodeWin.getChild("climb_adv").getValue();
    	local nS = nodeWin.getChild("abilities.ts").getValue();
    		
    	local nCLMT = (nCLM+nS);
    	Debug.console("nCLMT: ", nCLMT);
    	nodeWin.getChild("skills.cli").setValue(nCLMT);
    	
    end
    But now I want to take the "abilities.ts" and use it in the roll, and I thought I could use the same method as shown in the Climb code above.

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
  •  
STAR TREK 2d20

Log in

Log in