PDA

View Full Version : Change field of template - Single instance



L3ttuce
December 18th, 2023, 21:15
Hi there. I am working on an extension for Pathfinder 2 and have a question about templates and fields. Specifically, I want to use a different field for the "frame_char" template in the "filterframe". Is there a way to do this? Thanks.

59533

Moon Wizard
December 18th, 2023, 23:10
We can definitely make some suggestions, but need to clarify what you are asking. I'm not sure what you mean by a different "field" for "frame_char" template.

Can you describe what you are trying to accomplish? That might be easier to make suggestions about.

Regards,
JPG

L3ttuce
December 19th, 2023, 02:34
Thanks! The "frame_char" template defines "fielddark.png" as the bitmap file and it is used in a lot of different locations, so if I use a join=merge it will change, well, a lot of things (I think). What I want to define is a new .png for this one instance. I have tried building a new template and using that, but because it is part of the the call to the template PFRPG ruleset the fielddark always seems to show up. It seems like I have 2 options redefine the png for this instance OR pop out the frame_char within the window class with a new template. Obviously, i am in way over my head here :).

59538
59539

Moon Wizard
December 19th, 2023, 04:36
You'd have to override in that one window class. I recommend against trying to change a templated control in only one location, as this prevents themes from being able to update the theme correctly.

If you'd still like to proceed with your own local extension where you don't have to worry about theming, it might look something like this:


<windowclass name="charsheet_activities" merge="join">
<sheetdata>
<frame_char name="activityfilterframe">
<frame>border</frame>
</frame_char>
</sheetdata>
</windowclass>


Regards,
JPG