PRESKILL trigger on Conditional skills prevents removal of base skill


The Conditional Skills are made possible by use of PRESKILL, however, this prevents the removal of the skill ranks if it would stop triggering conditional skill. This prevents fixing of any mistakes or user wanting to change things. This is improper behavior. PRESKILL should not prevent the removal of ranks in a base skill.




Tom Parker
December 14, 2011, 10:26 PM

Aha. So here are the possible situations:
(1) Skill B prereqs Skill A (e.g. A must be at least rank 5 to have B). Add 5 ranks to A, add ranks to B, remove ranks from A should be impossible [This is what we are enforcing today - this is GOOD behavior]
(2) Skill B prereqs Skill A (e.g. A must be at least rank 5 to have B), AND Skill B is awarded ranks by Skill A (or is generally USEUNTRAINED). Add 5 ranks to A, add no ranks to B, remove ranks from A [This is "okay" because we have not added anything manually to B, so removal of ranks from A should be legal]. <- This #2 is the bug, so pcgen.gui.tabs.InfoSkills.prereqSkillsInvalid needs to do some form of check to see if skill B is rank 0 and allow its removal if so.

[Note that rank 0 may not be the exact proper test - since there are a few ways to add ranks (by the player, BONUS:SKILLRANK, etc.. In general, we just need to make sure there isn't situation #1 above occurring]

An interesting corner case to test that I don't know how we would handle today would be an indirect add, e.g.:
Template B prereqs 5 ranks of Skill A, then Template B grants ranks in Skill C.
Remove ranks of Skill A, not sure what would happen to Template B...

Andrew Maitland
December 15, 2011, 12:14 AM

CONDITIONAL Skills are set to get the same Skill Ranks and Bonuses as the parent. Testing for RANK 0 would fail, since there is a BONUS:SKILLRANK involved to match the parent skill. Though for VISIBLE:EXPORT there shouldn't be any way for the player to manually add skills unless they're using work around hacks.

here is the code we are using:
BONUS:SKILL|Deception (Act in character)|SKILL.Deception.MISC
BONUS:SKILLRANK|Deception (Act in character)|skillinfo("TOTALRANK","Deception")|TYPE=SkillGranted|PREVARNEQ:var("SKILL.Deception (Act in character).MISC"),SKILL.Deception.MISC

Tom Parker
January 13, 2012, 9:10 PM

Yea, that's nasty. The PRE being used as a visibility control makes this really hard to work with.

The only thing I can think of is to allow PRE changes to alter skills that are VISIBLE:EXPORT... but we need to think through if that can cause any problems...

Tom Parker
June 30, 2014, 1:44 PM

Can we close as moot now that we have situations?

Andrew Maitland
June 30, 2014, 10:48 PM

Yeah, likelihood of this happening now as it stands should eliminate this issue.



Andrew Maitland


Andrew Maitland







Pending User Input


Affects versions