Advanced merging example – The Combat Tracker

One of the first things a game needs to be fully functional, after the character sheet, is a good integration with the combat tracker.

However, if modifying the Core character sheet can be a more or less simple task thanks to the wizard, modifying the combat tracker becomes one of the most difficult processes in ruleset development.

This is due to the high degree of specialization that this class has and to the great amount of interconnections that it has with the rest of classes of the ruleset, character sheet, NPCs, tokens, etc.

As recording a video explaining the process would be too complicated I want to share with you a working example of a simple combat tracker integration. You can download it and try it out. You can also make use of the new Add content from another project feature to add it to your own project:

The project consists of two windows. The first one is a simple modification of the character sheet in which we have added two typical fields, hit points and wounds. If you want to know how to get this modification you can watch my videotutorials playlist where there are many examples of it:

Ruleset Wizard tutorials playlist

The second is a complex modification of the window class ct_entry (combat tracker entry), in which we add the two new fields of the character sheet and create links to them, so that they are synchronized with the character sheet.

To achieve this we have to:

  1. Use number controls with the advanced template “number_ct_crosslink” for the new fields. We must also include and modify the size of the PC Name fields (warning! there are two overlapped!) to make room for ours.

2. Create a new function at the window level that establishes the link between the fields and their corresponding node in the database.

3. Use a custom control to do a merge join of the Core link control, to modify it and get it to call our new link function when a new element is added.

4. Finally, to achieve a perfect integration with the rest of the controls of the window, which have a relative anchoring, we must create a dummy control with Custom Anchoring that serves as a positioning reference for the rest of the controls.

It is a rather complex issue, I hope I have been helpful by the example and explanation.

Leave a Reply

Your email address will not be published. Required fields are marked *