Bug - Not A Bug poolSkill preference is never updated

Malibu Stacey

Active member
Code:
> prefref poolskill

Name Value Default Scope
poolSkill 0 0 user

> poolskill

Pool Skill is estimated at : 15.
5 from equipment, 0 from having 0 inebriety, 0 hustling training and 10 learning from 25 sharks.

> prefref poolskill

Name Value Default Scope
poolSkill 0 0 user

Visiting the quest log doesn't update it either.
I'd prefer not to write the code needed to parse the value out of the poolskill command by wrapping it in a cli_execute_output() call just so I can use it in a choiceAdventureScript to handle the Welcome To Our ool Table NC.

Thanks.
 

fronobulax

Developer
Staff member
I'm going to say not a bug, working as expected. The preference, in spite of the name, is actually the contribution to pool skill from training. So it only changes after Welcome To Our ool Table is encountered. A somewhat superficial look at the code says to me that the preference is being incremented. That said, I did not look to see whether it is reset by Ascension.

The poolskill command returns an estimate of pool skill and the estimate is derived from equipment, training, a semirare bonus and an equipment bonus. The preference poolskill is just the training portion of that total.

My sense is that you can do what you want with the commands that are available now that we both know that the poolskill preference is merely one component of what the poolskill command returns.

If you need another command or function, perhaps a FR?
 

ckb

Minion
Staff member
poolskill is weird and Mafia's support of it is mostly an evolution of not totally understanding it then adding to it as spading happened I think.
Here is what I use:

PHP:
int PoolSkill() {
	int ps = to_int(get_property("poolSkill"));
	ps += min(10,to_int(2.0*square_root(to_float(get_property("poolSharkCount")))));
	if (my_inebriety()>=10) {
		ps += 30-(2*my_inebriety());
	} else {
		ps += my_inebriety();
	}
	if (have_equipped($item[pool cue])) { ps += 3; }
	if (have_effect($effect[Chalky Hand])>0) { ps += 3; }
	return ps;
}
 

fronobulax

Developer
Staff member
poolskill is weird and Mafia's support of it is mostly an evolution of not totally understanding it then adding to it as spading happened I think.

Your editorial comment makes me wonder if I failed to make my point :)

The preference poolSkill does exactly one thing - count the increase in Pool Skill that results from Welcome To Our ool Table.

The calculation of "effective" pool skill that mafia makes is similar to yours. It is probably the same but I have no interest, at the moment, in proving it.

I will note that the core of mafia's pool support dates to 2014 so I am not sure your model of spading driven evolution applies, unless you are referring to pre-2014 work.
 

zarqon

Well-known member
@ckb: BatMan RE's calculations are mostly the same as yours, except it uses floor() instead of to_int() and uses the Pool Skill modifier rather than hardcoded values:

PHP:
int poolishness = min(10,floor(2*square_root(to_float(get_property("poolSharkCount"))))) + (min(my_inebriety(),10) - 
               max(0,my_inebriety() - 10)*2) + to_int(numeric_modifier("Pool Skill")) + to_int(get_property("poolSkill"));
 

ckb

Minion
Staff member
Your editorial comment makes me wonder if I failed to make my point :)

The preference poolSkill does exactly one thing - count the increase in Pool Skill that results from Welcome To Our ool Table.

The calculation of "effective" pool skill that mafia makes is similar to yours. It is probably the same but I have no interest, at the moment, in proving it.

I will note that the core of mafia's pool support dates to 2014 so I am not sure your model of spading driven evolution applies, unless you are referring to pre-2014 work.

I am also not sure about all that 2014 work... I remember poolskill being a thing that took some time to totally flush out, but I'm old and my remembering things from 6 years ago might have a wide band of tolerance :)
 

Malibu Stacey

Active member
I'm going to say not a bug, working as expected. The preference, in spite of the name, is actually the contribution to pool skill from training. So it only changes after Welcome To Our ool Table is encountered. A somewhat superficial look at the code says to me that the preference is being incremented. That said, I did not look to see whether it is reset by Ascension.

The poolskill command returns an estimate of pool skill and the estimate is derived from equipment, training, a semirare bonus and an equipment bonus. The preference poolskill is just the training portion of that total.

My sense is that you can do what you want with the commands that are available now that we both know that the poolskill preference is merely one component of what the poolskill command returns.

If you need another command or function, perhaps a FR?

In that case I'd close this as not a bug. I've written a quick function to parse the return value from the poolskill cli command. While it'd be nice to have an actual ASH command that returns it as an int (I could say this about a number of cli commands actually) it's not important enough to bother.

Thanks frono.
 

lostcalpolydude

Developer
Staff member
The feature requested here isn't possible. The Quest Log shows permanent skill from the semirare plus skill from this ascension from training in the noncombat.

If you get some semirares outside of KoLmafia, then poolSharkCount will be wrong, and the total calculation will be wrong as a result. Otherwise, everything should be working. I can't think of any feature for attempting to fix tracking when stuff is done outside of KoLmafia either.
 

taltamir

Member
The feature requested here isn't possible. The Quest Log shows permanent skill from the semirare plus skill from this ascension from training in the noncombat.If you get some semirares outside of KoLmafia, then poolSharkCount will be wrong, and the total calculation will be wrong as a result. Otherwise, everything should be working. I can't think of any feature for attempting to fix tracking when stuff is done outside of KoLmafia either.
You could calculate it under the assumption that any not-in-mafia events were only in the past and that currently only mafia is used.keep track of temp poolskill gained in run via the NCcalculate poolskill from equipped itemstake the value from questlog, subtract the above 2 values, and you get the permanent poolskill.
 
Top