Exactly how do counters work/where is information stored?

dapanda

Member
I have been looking for a while and maybe I am not just finding it, but I can't seem to determine how mafia stores counter information, such as turns left before a fight of a digitized monster. I don't see anything in the pref file and the only time I can see the counter is when I use the "counter" cli command in mafia.
 

dapanda

Member
Turning on "log pref changes" in kolmafia showed that it updated the _sourceTerminalDigitizeMonsterCount so I am guessing there is some math involved there.

Using get_counters( "", 0, 950 ).contains_text( "Digitize Monster" ) returns false even through counters returns something

Code:
> ash get_counters( "", 0, 950 ).contains_text( "Digitize Monster" )

Returned: false

> counters

Unexpired counters:
Digitize Monster (29)
 

ckb

Minion
Staff member
Hope this helps:

Code:
> counters

Unexpired counters:
Digitize Monster (82)

> ash get_property("relayCounters")

Returned: 1140:Digitize Monster loc=* type=wander:watch.gif

> ash get_counters("digitize",0,950);

Returned: Digitize Monster

> ash get_counter("Digitize Monster")

Returned: 82
 
Top