-
Extenson change tokens
Hi all!
I have some characters in my party that has "change shape" abilities, and I was searching for some extension that changes the character's token when the change shape ability is used.
I didn't found anything, and I was trying to develop my own extension, but I don't found any documentation about the code that I should override. There is some documentation repository that I could use?
Thanks a lot!
-
You don't say for what ruleset. This one handles Druid Wildshape in 5e; so it may give you some ideas https://www.fantasygrounds.com/forum...hapes-(for-5E)
-
-
Thanks a lot! I'm working on Pathfinder e2 and Pathfinder 1 rulesets.
-
Check those sub-forums. Pretty sure their is a token change extension for those rulesets somewhere, in know there are an handful or so for 5E. Typical names are things like 'polymorph', 'wildshape', 'druid'.
-
Hi all!
I'm still working on it with the chatgpt help (There is no real helpful, but whatever XD)
I have the next code:
function changeTokenTemporarily(nodeCTEntry, tokenType, nodeEffect)
local miParent = DB.getParent(nodeCTEntry)
local sCurrentToken = DB.getValue(miParent, "token", "")
Debug.console("Actual Token" .. sCurrentToken)
local sTokenName = "basic"
if (tokenType==1)
then
sTokenName = "basicHumanoid"
else
if (tokenType==2)
then
--sTokenName = "basicHybrid"
sTokenName = "tokens/B.png@Agents of Edgewatch 1 - Devil at the Dreaming Palace"
else
--sTokenName = "basicAnimal"
sTokenName = "tokens/A.png@Agents of Edgewatch 1 - Devil at the Dreaming Palace"
end
end
Debug.console("Token " .. sTokenName)
DB.setValue(miParent, "token", "token", sTokenName)
}
And it changes the token, but only in the Combat Tracker, the token in the map still being the older.
Someone could help me?