Update Combat Tracker walkthrough

Due to the changes that the CoreRPG Combat Tracker has undergone in recent months, there are some aspects of the Combat Tracker template that have become outdated.

You can always download the latest updated version of any template from the examples library.

However those projects that are already using an older template will most likely be giving deprecated content warning messages and therefore need to be updated. To fix these messages and have the combat tracker up to date I have created the following 2-step walkthrough:

Step 1: Check if ct_targets exists

Check the folder where you have the Combat Tracker window classes and verify that the ct_targets window exists. If it does not, you must create it.

To do this import in your project the file ct_targets.rwf. You can download from the following link (right-click and save link as)

https://www.rulesetwizard.com/wp-content/uploads/examples/ct_targets.rwf

To import it press the Import content button in your project:

In the file type dropdown select the option Ruleset Wizard Source files (*.rwf), and choose the file you just downloaded:

The importer will add the new window class in the root of your project, just move it to the folder where you have the rest of the Combat Tracker classes and that’s it.

Step 2: Change references to CombatManager.onDrop

The CombatManager.onDrop function has been deprecated and should be replaced by CombatDropManager.handleAnyDrop. To do this you must find all references to CombatManager.onDrop in your project, for this you can use the Code Inspector:

The only references you should have will be in the combattracker_client and combattracker_host windowlist scripts.

Wherever you find it you should change:

return CombatManager.onDrop("ct", nodeWin.getPath(), draginfo);

by:

return CombatDropManager.handleAnyDrop(draginfo, nodeWin.getPath());

And that’s it, with these steps your combat tracker should work correctly and without warnings.