PDA

View Full Version : The mutable entry, possible?



Ken L
July 3rd, 2016, 07:39
So I've been using a custom statblock importer built in to FG, but I was curious if I could perhaps create a 'mutable' template such that depending on the statblock it imported, it could create a different layout.

Further elaborating, let us start with the 3.5/PF NPC outline.
1.- Is it possible to have a 'canvas' type of NPC template that can allow for variable field/text elements?
2.- If it is possible, then theoretically one can edit the add npc script to have a default 'NPC' entry template, as well as the possibility of variant entries where perhaps I can have a clickable dialog display customized. Where the button produces the expected default template (without presets you are left with a canvas, and we want the canvas for our extension to paint on).

This custom display's layout would latch on to 'hidden' DB values that determine the layout.

For those pondering the 'why' here, it's to present a layout that can adjust pending on the data presented within the block. The only mutable phase is when my extension imports the statistics and upon import, we can determine what the optimal layout should look like.

Moon Wizard
July 4th, 2016, 10:08
This is something that would need to be built into the ruleset.

Items use the Type field to hide/show item detail fields relevant to the item type. (I.e. Damage fir weapons, AC for armor, etc )

Regards,
JPG

Ken L
July 4th, 2016, 14:00
I can edit the PF ruleset so I'm not terribly worried. Regarding the item hide/show of specific fields; I was thinking more abstract where I could specify rows/columns/alignment to be encoded later by my extension.

Moon Wizard
July 4th, 2016, 19:25
As long as your logic in your windowclass script code can handle interpreting the data into a set of controls created and laid out in a way that the users can use, you can do whatever you like.

If your question is whether the data can inherently contain UI definition data, then the answer is no. The database only contains the raw data, and the interpretation is completely ruleset dependent.

Regards,
JPG

Ken L
July 4th, 2016, 23:20
If your question is whether the data can inherently contain UI definition data, then the answer is no. The database only contains the raw data, and the interpretation is completely ruleset dependent.


So there's no way to build a template xml that allows for the addition of variable N fields in terms of layout. layouts are fixed within the xml, and can only be hidden/shown by controllers downstream. Thanks for the heads up.