PDA

View Full Version : 20+ Columns Tables



fabiocm
October 12th, 2020, 18:47
Is there a way to create a table with more than 20 columns? I'm needing to create one with 28 columns, but it is impossible, at least in the CoreRPG and MoreCore.

Nylanfs
October 12th, 2020, 19:14
Yes, yes there is. :D (https://www.fantasygrounds.com/forums/showthread.php?40812-5E-Table-Importer&highlight=table+creator)

fabiocm
October 12th, 2020, 19:33
Hello. This extension allow the creation of tables with any number of rows, but with only one column, or am I wrong?

mattekure
October 12th, 2020, 19:33
Is there a way to create a table with more than 20 columns? I'm needing to create one with 28 columns, but it is impossible, at least in the CoreRPG and MoreCore.

No, 20 is a limit coded into CoreRPG. You would have to create an extension to add more. The code is in the CoreRPG/campaign/scripts/table_main.lua file, in the setColumns() function. Looks like this.



function setColumns(nColumns)
local nCurrentColumns = getColumns();
if nColumns < 1 then
nColumns = 1;
elseif nColumns > 20 then
nColumns = 20;
end
if nColumns ~= nCurrentColumns then
resultscols.setValue(nColumns);
end
end

fabiocm
October 12th, 2020, 19:38
Thanks!

fabiocm
October 12th, 2020, 19:47
Would this extension be hard to write? Maybe I try to learn the basics for this.

mattekure
October 12th, 2020, 19:56
Would this extension be hard to write? Maybe I try to learn the basics for this.

Only one way to find out.

Its really hard to say, what might be super simple for one of the FG developers to write, could be nearly impossible for someone who has never worked with lua/xml/fg API before. At first glance, this does seem like a nice, small, first project, but there certainly could be any number of roadblocks that I am unaware of.