-
June 1st, 2019, 06:09 #11
The processEffects() calls processEffect() for each effect. ProcessEffect runs the "DMGO" effect and because I removed the effect in the processing of the DMGO if the PC died in manager_action_damage.lua when the processEffect() continued trying to use the effect it would bomb.
I ended up not removing the effect because of all the hackery I had to do to make it work... I did get it working it just seemed a bit over the top and I really dont want to override CoreRPG unless I have to...Last edited by celestian; June 1st, 2019 at 06:15.
---
Fantasy Grounds AD&D Reference Bundle, AD&D Adventure Bundle 1, AD&D Adventure Bundle 2
Documentation for AD&D 2E ruleset.
Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)
Note: Please do not message me directly on this site, post in the forums or ping me in FG's discord.
-
June 6th, 2019, 00:17 #12
- Join Date
- Mar 2019
- Posts
- 8
Sorry if this was already addressed, but can you not do:
if not next(databasenode) then
Debug.console('Table is Empty')
else
Debug.console('Table is not Empty')
end
-
June 6th, 2019, 00:19 #13---
Fantasy Grounds AD&D Reference Bundle, AD&D Adventure Bundle 1, AD&D Adventure Bundle 2
Documentation for AD&D 2E ruleset.
Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)
Note: Please do not message me directly on this site, post in the forums or ping me in FG's discord.
-
June 6th, 2019, 00:23 #14
- Join Date
- Mar 2019
- Posts
- 8
Ah, sorry I missed the part of the next call not seeing the databasenode as a table.
-
June 6th, 2019, 00:36 #15
- Join Date
- Mar 2019
- Posts
- 8
Can you try something like:
local node = DB.findNode('Somemissingnode');
local node2 = DB.findNode('currencies.id-00001.name')
local nodeType = type(node2);
print(node2)
if type(node) == 'databasenode' then
print('Node Found')
else
print('Node Not Found')
end
if type(node2) == 'databasenode' then
print('Node2 Found')
else
print('Node2 Not Found')
end
-
June 6th, 2019, 00:42 #16
I cannot get the path string of the node without .getPath(). nodeEffect.getPath() would fail... the first post contained the only solution available to my knowledge.
Code:-- check if effect still exists. removed in fCustomOnEffectActorStartTurn() probably -- we check the .getPath() through pcall and if it fails then just end this run. if not pcall(function () nodeEffect.getPath() end) then Debug.console("manager_effect_adnd.lua","adnd_processEffect","nodeEffect removed in-line",nodeEffect); return; end
---
Fantasy Grounds AD&D Reference Bundle, AD&D Adventure Bundle 1, AD&D Adventure Bundle 2
Documentation for AD&D 2E ruleset.
Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)
Note: Please do not message me directly on this site, post in the forums or ping me in FG's discord.
-
June 6th, 2019, 00:44 #17
- Join Date
- Mar 2019
- Posts
- 8
Ok. Just trying to get a hang of coding this stuff.
Trying to learn and all.
-
June 20th, 2019, 00:36 #18
- Join Date
- Feb 2017
- Posts
- 17
I had a similar thing when deleting nodes if there was nothing in the node it would show that. What I did was check the if there were any children under the node
Code:childCount = DB.getChildCount(nodeChar,"defenses.armour"); if (childCount > 0) then
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks