PDA

View Full Version : Help with Combat tracker



legine
March 29th, 2020, 22:28
Hello all,

I am modifying the Combat tracker from the coreRPG ruleset. I have 2 Issues. Maybe one can tell me where I can look the definitions up.
Both topics are concerning the order field.
1) 0 is not accepted for some reason. Why isnt it shown? Can I make it shown?
2) I would like to Order Ascendant not descendant. (1st Item is the lowest number not the latest.) does any one point me to the position where this is defined?

Thanks for any pointers.

All the Best
Peter

superteddy57
March 29th, 2020, 22:42
1) Some elements do have the <hideonvalue> tag and will set 0 as hidden.

2) This will require a bit of tinkering with the code as the default is set as you see. There are a few other options, but would need to be directed by the code. Check CoreRPG clientct.lua and ct.lua for CombatManager.onSortCompare. This is the function that I believe sorts the CT.

legine
March 30th, 2020, 01:15
Awesome! thanks for the quick answer. ;)

Hope I did not miss something. Sorry if I do.
Within datadesktop.lua the desktop buttons are defined.
Can I override only the section of the combat tracker or do I have to override the complete JSon Host, client?

Code I refer to is like this.
I would like to set in my extension that not the Combattracker is used instead lets say combattracker_plus is used.

Here is the code snipplet I think I have to change.

["host"] =
{
{
icon="button_ct",
icon_down="button_ct_down",
tooltipres="sidebar_tooltip_ct",
class="combattracker_host",
path="combattracker",
},

superteddy57
March 30th, 2020, 14:13
The Combat Tracker is defined within the base.xml and it's files would be located within the ct folder. For your extension, you would need to define the files you would like to override or add to the ruleset the extension is to extend. Common practice would be to copy the Combat Tracker files you wish to make changes, to your extension and either change the code or make additions. To accomplish what you were referring to in your OP, I don't believe this would be accomplished from datadesktop.lua. The code for changing your sort would be under CombatManager in the sorting section and making changes to where that is called in the Combat Tracker code.

legine
April 4th, 2020, 08:01
Yes. If I want to run a game quickly this is the way to go.
My goal is to develop a ruleset in the end. I go by feature by feature. And I want the rulset to be modular so it can be more easily changed.