STAR TREK 2d20
Page 6 of 12 First ... 45678 ... Last
  1. #51

    Join Date
    Nov 2017
    Location
    North Carolina, USA
    Posts
    266
    Working on NPC sheets now. Still having a similar problem as with CS. When I input the below script for a Number Field box, I get a nil error, even though I have entered a Default Value "0"

    function onValueChanged()
    local nodeWin = window.getDatabaseNode();
    local nInjury = nodeWin.getChild("injury_level").getValue();
    local nFatigue = nodeWin.getChild("fatigue_level").getValue();
    local nUniversal = math.ceil(nInjury+nFatigue);

    nodeWin.getChild("universal_penalty").setValue(nUn iversal);

    end


    You sent a line of script earlier, but I am not sure where to put it or if there is an easier solution.

    local sMCInitBonus = DB.getValue(nodeChar,"initbonus",0)

  2. #52
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    26,685
    Blog Entries
    1
    So the line I posted is the easier solution

    it would go something like this for you -

    local nodeWin = window.getDatabaseNode();
    local nInjury = DB.getValue(nodeWin,"injury_level",0);
    local nFatigue = DB.getValue(nodeWin,"fatigue_level",0);

  3. #53
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    26,685
    Blog Entries
    1
    Quote Originally Posted by damned View Post
    So the line I posted is the easier solution

    it would go something like this for you -

    local nodeWin = window.getDatabaseNode();
    local nInjury = DB.getValue(nodeWin,"injury_level",0);
    local nFatigue = DB.getValue(nodeWin,"fatigue_level",0);
    Another variation if that doesnt work is:

    local nodeWin = window.getDatabaseNode();
    local nInjury = DB.getValue(nodeWin .. ".injury_level","number",0);
    local nFatigue = DB.getValue(nodeWin .. ".fatigue_level","number",0);


    Dont ask me why sometimes one works and the other doesnt...

  4. #54

    Join Date
    Nov 2017
    Location
    North Carolina, USA
    Posts
    266
    OK, got that. Does that bit of script get inserted as part of the "valuechanged" function or is it separate? In other words, how does it fit in with the script quoted above?

  5. #55
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    26,685
    Blog Entries
    1
    local nInjury = xxxxx
    is setting a variable called nInjury and assigning it a value
    so my examples would replace the lines that match the
    local xxxxx

  6. #56

    Join Date
    Nov 2017
    Location
    North Carolina, USA
    Posts
    266
    HarnMaster NPC sheet with integrated rolls complete! Now on to the Combat Tracker...
    NPC sheet.png

  7. #57

  8. #58
    Valyar's Avatar
    Join Date
    Mar 2018
    Location
    Europe
    Posts
    2,117
    damned, do you plan to release this ruleset officially and if yes (I sorry to ask that) in what timeframe? I am soon going to wrap up the current campaign and wonder what to start next.
    The past is a rudder to guide us, not an anchor to hold us back.

  9. #59
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    26,685
    Blog Entries
    1
    Quote Originally Posted by Valyar View Post
    damned, do you plan to release this ruleset officially and if yes (I sorry to ask that) in what timeframe? I am soon going to wrap up the current campaign and wonder what to start next.
    Valyar one way or another it will get released.

    possible scenarios...
    * RTalsorian come back to me with some interest in a commercial ruleset
    * I release a close to fully functional community ruleset
    * I release a functional community character/npc sheet and combat tracker that covers most use cases

    will see where I get to before other priorities re-assert themselves

    If its option 2 or 3 it will be before the end of January. Its consuming too much of my time for me to maintain it for longer than that!

  10. #60
    Valyar's Avatar
    Join Date
    Mar 2018
    Location
    Europe
    Posts
    2,117
    Quote Originally Posted by damned View Post
    Valyar one way or another it will get released.

    possible scenarios...
    * RTalsorian come back to me with some interest in a commercial ruleset
    * I release a close to fully functional community ruleset
    * I release a functional community character/npc sheet and combat tracker that covers most use cases

    will see where I get to before other priorities re-assert themselves

    If its option 2 or 3 it will be before the end of January. Its consuming too much of my time for me to maintain it for longer than that!
    Let's hope it is option 1
    The past is a rudder to guide us, not an anchor to hold us back.

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
  •  
Starfinder Playlist

Log in

Log in