WASTED
context tags, hideInConditionsList, nonSerialized, buffPriority, 4th field for ConditionEffect
1. contextTags 2. buff.hideInConditionsList 3. buff.nonSerialized 4. buff.buffPriority 5. ConditionEffect.Create("", {}, "", false),

Hello again! With context tags, I've discovered what I feel like is the majority of the useful ones (like sneaking, or aiming) but I've been unable to guess the actual tags of some of the more basic ones, like jumping. I also couldn't alter "victim_hit_back" to work with some directions or body parts I felt like it should have, so I'm probably just guessing wrong. Would you be willing to dump a list of basic context tags?

With the other 4, I haven't really been able to discern what they actually do through any of my tests/guesses.
Last edited by king bore haha; Jun 21, 2017 @ 12:42pm
< >
Showing 1-10 of 10 comments
king bore haha Jun 22, 2017 @ 1:43pm 
Well I found out what #3 is thanks to a bug report. For the record, It affects whether or not the buff is saved after the player quits the game. false to keep, true to kill.

Is there an equivalent for conditions? I discovered a problem where modded weapons are unequipped when restarting the game, which lets the player keep whatever conditions it granted when they had it equipped before they quit. I thought it might have been #5, but that didn't work.
Mr. Podunkian Jun 22, 2017 @ 2:21pm 
Context tags are a little bit trickier to enumerate because a lot of them (the majority, maybe) are generated programmatically -- for instance "victim_*" are generated via taking all of the context tags on an attack's victim, and pre-pending "victim_" on them -- for instance, a human with "race_human" would grant the attacker "attacker_race_human" to its attack buff calculations.

For a start, though, here's how the base set of context tags for a character as generated (with some irrelevant parts of the code removed):

if (female) { AddContextTag("gender_female"); } else { AddContextTag("gender_male"); } AddContextTag("race_" + characterRace.raceName); AddContextTag("faction_" + faction.factionName); AddContextTags(characterRace.contextTags); AddContextTags(faction.contextTags); if (GetHealthRatio() < 1f) { AddContextTag("hurt"); } if (GetHealthRatio() < 0.5f) { AddContextTag("badly_hurt"); } if (GetHealthRatio() < 0.25f) { AddContextTag("near_death"); } if (!IsAlive()) { AddContextTag("dead"); } if (_grounded) { AddContextTag("grounded"); } if (_sneaking) { AddContextTag("sneaking"); } if (GetEquippedWeapon() != null) { if (GetEquippedWeapon().NeedsReload()) { AddContextTag("needs_reload"); } } (all equipped item context tags added here) foreach (LimbState limb_state in limbStates) { if (limb_state.broken) { AddContextTag("broke_" + limb_state.limbDefinition.limbName); } else { AddContextTag("has_" + limb_state.limbDefinition.limbName); } } (all of the buffs are then iterated, and their context tags are added) if (has_buzz) { AddContextTag("buzzed"); } if (has_hangover) { AddContextTag("boozed"); } if (has_cocktail) { AddContextTag("cocktailed"); } if (_equippedWeapon != null && _equippedWeapon.ammo != null) { AddContextTag("ammo_" + _equippedWeapon.currentAmmo); } (this one is weird -- if any weapon/buff needs to detect if a character is moving, it has the detect_movement context tag which enables that behavior. It's selectively turned off because detecting movement is sort of an expensive procedure.) if (HasContextTag("detect_movement")) { if (_moving) { AddContextTag("moving"); } }
Last edited by Mr. Podunkian; Jun 22, 2017 @ 2:24pm
Mr. Podunkian Jun 22, 2017 @ 2:33pm 
During attack the following context tags are also added (not a comprehensive list!):

critical_hit, attacker_critical_hit: The attack was a critical hit (the second tag is applied when the damage is received by the victim) victim_hit_front, hit_front: The attack hit the front of the victim. (The second tag is applied when the damage is received by the victim) victim_hit_back, hit_back: Similar to above, but on the back. victim_hit_(limbname), hit_(limb name): The attack hit the limb named limb name (the second tag is applied to the victim as usual)

Not really sure why the "victim_"/"attacker_" convention isn't consistent above, but that's how the code is written, so there ya go.
Mr. Podunkian Jun 22, 2017 @ 2:37pm 
The last flag on ConditionEffect.Create seems to be apply_after_damage. From what it looks like, a ConditionEffect with it set off will apply the condition before evaluating and applying damage to the victim. Otherwise, it'll apply the condition afterward applying damage.
king bore haha Jun 22, 2017 @ 3:13pm 
Ok, that context information is pretty helpful. Health ratios being specifically programmed context tags was something I was wondering about. It's also very helpful to see that all tags are contexually (ha) generated. Very useful to know. Thanks.

Any information about deserializing conditions? Perhaps another disabled variable like with hiding conditions?
Mr. Podunkian Jun 23, 2017 @ 10:59am 
I think you might be right about deserializing conditions being hidden.
king bore haha Jun 23, 2017 @ 11:39am 
Originally posted by Mr. Podunkian:
I think you might be right about deserializing conditions being hidden.

oh, oops. I read the bug report comment first. Yeah if that is an available option it would basically solve the problem (probably).
Last edited by king bore haha; Jun 23, 2017 @ 12:53pm
Mr. Podunkian Jun 28, 2017 @ 1:19am 
Just a heads up, I've done the work to expose most of this stuff in the upcoming patch which should be coming up sometime this week or next!
king bore haha Jun 28, 2017 @ 11:24am 
That's awesome news! Thanks!
king bore haha Jul 13, 2017 @ 11:19pm 
For anybody reading about context tags, I discovered a fairly important prefix. Attaching ! to any context tags makes any context tags check if that tag is absent. Example: !grounded would mean the player is in the air.
< >
Showing 1-10 of 10 comments
Per page: 1530 50