PDA

View Full Version : Extension Swapping a PC's stats.



mythikwolf
April 9th, 2017, 07:51
Hello,

Is there any reason an extension couldn't lets say, replace a PC's strength with its real value with a temporary one?

Such as, a druid shifts into a saber-tooth tiger and while the druid has an 8 STR normally, when he shifts it replaces it with the tiger's 18 STR? And then vice versa when he shifts back out of the his form?

I haven't dug into anything yet, so I am just exploring what is possible with the current code.

Thanks,

M

Zacchaeus
April 9th, 2017, 09:23
I don't know the answer to your question but I take it you are aware that there are several much easier methods of doing this right?

mythikwolf
April 9th, 2017, 09:28
Well yeah. But this is more of a pet project.

Nickademus
April 9th, 2017, 10:43
It's possible. Wouldn't be that hard either if you don't add any UI to show the original score.

The ability scores all have a template that is used to make the string button. Add a variable to the template called 'originalAbil' or something. Add a function that takes the new score, saves the old score to the variable, and changes score value to the new score. You could even change the font color to green or something to show that it is temporarily changed. Then add another function that changed the value back to what is in the variable (and changes the color back). When a power is used, call the first function; when it ends, call the second.

mythikwolf
April 9th, 2017, 18:20
Perfect, this is exactly what I was hoping for. Much appreciated.