-
December 23rd, 2020, 01:53 #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)
-
December 23rd, 2020, 07:40 #52
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);
-
December 23rd, 2020, 07:43 #53
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...
-
December 23rd, 2020, 14:32 #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?
-
December 23rd, 2020, 21:52 #55
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
-
December 24th, 2020, 15:59 #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
-
December 24th, 2020, 22:37 #57
-
December 25th, 2020, 19:25 #58
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.
-
December 25th, 2020, 23:49 #59
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!
-
December 26th, 2020, 07:59 #60
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks