p4535992 / conditional-visibility

a FoundryVTT module to hide tokens from some players, but not from others
MIT License
5 stars 8 forks source link

Add PF1 compatibility #36

Open Sebmaster777 opened 2 years ago

Sebmaster777 commented 2 years ago

The new PF1 update has made it easier to differentiate between different vision abilities, which might help with being able to allow compatibility.

p4535992 commented 2 years ago

@Sebmaster777 Can you give a basic list of all the senses and conditions of that system ? so i can prepare some preset to show to you on the next release.

Sebmaster777 commented 2 years ago

image

Here is the current Interface for the vision menu. Here is rules text for all of the senses other than low-light vision and darkvision, as those are already incorporated:

Tremorsense (https://aonprd.com/UMR.aspx?ItemName=Tremorsense): The creature is sensitive to vibrations in the ground and can automatically pinpoint the location of anything that is in contact with the ground. Aquatic creatures with tremorsense can also sense the location of creatures moving through water. The ability’s range is specified in the creature’s descriptive text.

Blindsense (https://aonprd.com/UMR.aspx?ItemName=Blindsense): A creature with blindsense notices things it cannot see. The creature usually does not need to succeed at Perception checks to pinpoint the location of a creature within range of its blindsense ability, provided that it has line of effect to that creature. Any opponent the creature with blindsense cannot see still has total concealment from the creature, and the creature still has the normal miss chance when attacking foes that have concealment. Visibility still affects the movement of a creature with blindsense. A creature with blindsense is still denied its Dexterity bonus to Armor Class against attacks from creatures it cannot see.

Blindsight (https://aonprd.com/UMR.aspx?ItemName=Blindsight): Using nonvisual senses, such as sensitivity to vibrations, keen smell, acute hearing, or echolocation, a creature with blindsight can maneuver and fight as well as a sighted creature. Invisibility, darkness, and most kinds of concealment are irrelevant, though a creature with blindsight must have line of effect to an object or another creature to discern that object or creature. The ability’s range is specified in the creature’s descriptive text. The creature usually does not need to succeed at Perception checks to notice creatures within range of its blindsight ability. Unless noted otherwise, blindsight is continuous, and the creature doesn’t need to do anything to use it. Some forms of blindsight, however, must be triggered as a free action. If so, this is noted in the creature’s description. If a creature must trigger its blindsight ability, it gains the benefits of blindsight only during its turn.

Scent (https://www.aonprd.com/UMR.aspx?ItemName=Scent): This special sense allows a creature to detect approaching enemies, sniff out hidden foes, and track by sense of smell. Creatures with the scent ability can identify familiar odors just as humans do familiar sights.

The creature can detect opponents within 30 feet by sense of smell. If the opponent is upwind, the range increases to 60 feet; if downwind, it drops to 15 feet. Strong scents, such as smoke or rotting garbage, can be detected at twice the ranges noted above. Overpowering scents, such as skunk musk or troglodyte stench, can be detected at triple the normal range.

When a creature detects a scent, the exact location of the source is not revealed—only its presence somewhere within range. The creature can take a move action to note the direction of the scent. When the creature is within 5 feet of the source, it pinpoints the source’s location.

A creature with the scent ability can follow tracks by smell, attempting a Wisdom or Survival check to find or follow a track. The typical DC for a fresh trail is 10 (no matter what kind of surface holds the scent). This DC increases or decreases depending on how strong the quarry’s odor is, the number of creatures, and the age of the trail. For each hour that the trail is cold, the DC increases by 2. Creatures tracking by scent ignore the effects of surface conditions and poor visibility. The ability otherwise follows the rules for the Survival skill.

See Invisibility (https://aonprd.com/SpellDisplay.aspx?ItemName=see%20invisibility): You can see any objects or beings that are invisible within your range of vision, as well as any that are ethereal, as if they were normally visible. Such creatures are visible to you as translucent shapes, allowing you easily to discern the difference between visible, invisible, and ethereal creatures.

The spell does not reveal the method used to obtain invisibility. It does not reveal illusions or enable you to see through opaque objects. It does not reveal creatures who are simply hiding, concealed, or otherwise hard to see.

Truesight (https://aonprd.com/SpellDisplay.aspx?ItemName=true%20seeing): You confer on the subject the ability to see all things as they actually are. The subject sees through normal and magical darkness, notices secret doors hidden by magic, sees the exact locations of creatures or objects under blur or displacement effects, sees invisible creatures or objects normally, sees through illusions, and sees the true form of polymorphed, changed, or transmuted things. Further, the subject can focus its vision to see into the Ethereal Plane (but not into extradimensional spaces). The range of true seeing conferred is 120 feet.

True seeing, however, does not penetrate solid objects. It in no way confers X-ray vision or its equivalent. It does not negate concealment, including that caused by fog and the like. True seeing does not help the viewer see through mundane disguises, spot creatures who are simply hiding, or notice secret doors hidden by mundane means. In addition, the spell effects cannot be further enhanced with known magic, so one cannot use true seeing through a crystal ball or in conjunction with clairaudience/clairvoyance.

See in Darkness (https://www.aonprd.com/UMR.aspx?ItemName=See%20in%20Darkness): The creature can see perfectly in darkness of any kind, including that created by deeper darkness.

Let me know if you need any other details!

p4535992 commented 2 years ago

Auto assigned notes:

Dwarves and half-orcs have darkvision, but the other races presented in Chapter 2 need light to see by. See Table 7–10 for the radius that a light source illuminates and how long it lasts. The increased entry indicates an area outside the lit radius in which the light level is increased by one step (from darkness to dim light, for example).

In an area of bright light, all characters can see clearly. Some creatures, such as those with light sensitivity and light blindness, take penalties while in areas of bright light. A creature can’t use Stealth in an area of bright light unless it is invisible or has cover. Areas of bright light include outside in direct sunshine and inside the area of a daylight spell.

Normal light functions just like bright light, but characters with light sensitivity and light blindness do not take penalties. Areas of normal light include underneath a forest canopy during the day, within 20 feet of a torch, and inside the area of a light spell.

In an area of dim light, a character can see somewhat. Creatures within this area have concealment (20% miss chance in combat) from those without darkvision or the ability to see in darkness. A creature within an area of dim light can make a Stealth check to conceal itself. Areas of dim light include outside at night with a moon in the sky, bright starlight, and the area between 20 and 40 feet from a torch.

In areas of darkness, creatures without darkvision are effectively blinded. In addition to the obvious effects, a blinded creature has a 50% miss chance in combat (all opponents have total concealment), loses any Dexterity bonus to AC, takes a –2 penalty to AC, and takes a –4 penalty on Perception checks that rely on sight and most Strength- and Dexterity-based skill checks. Areas of darkness include an unlit dungeon chamber, most caverns, and outside on a cloudy, moonless night.

Characters with low-light vision (elves, gnomes, and half-elves) can see objects twice as far away as the given radius. Double the effective radius of bright light, normal light, and dim light for such characters.

Characters with darkvision (dwarves and half-orcs) can see lit areas normally as well as dark areas within 60 feet. A creature can’t hide within 60 feet of a character with darkvision unless it is invisible or has cover.

p4535992 commented 2 years ago

@Sebmaster777 finally added give it a try

Hanhula commented 2 years ago

Hey, been following this issue and just tested the PF integration. Invisibility seems to only work if you turn it on from the Token Config, but Pathfinder has a buff system where you turn the invisible buff on here: image

Would we be able to get CV's active effects tied to the existing PF1e buff system? It would be much easier to either use the existing invisibility buff, or to drag in some pre-made importable buffs that hook straight into CV without needing to edit the token config. It would also allow us to use ApplyBuff to apply the changes in areas!

Sebmaster777 commented 2 years ago

@Sebmaster777 finally added give it a try

Works great, though like Hanahula said, PF1 has a buff system which would be cool to integrate with CV if possible.