Difference between revisions of "Buffs in KCD"

From Nexus Mods Wiki
Jump to: navigation, search
(Created page with "== Buff table == Buff table is located in <code>Data\tables.pak\Libs\Tables\rpg\buff.xml</Code> {|class="wikitable" !Name !Description |-id="buff_id_column" |buff_id |GUID |-id=...")
 
Line 534: Line 534:
 
|Not available.
 
|Not available.
 
|}
 
|}
 +
 +
[[Category:Kingdom_Come_Deliverance]]

Revision as of 22:46, 27 February 2018

Buff table

Buff table is located in Data\tables.pak\Libs\Tables\rpg\buff.xml

Name Description
buff_id GUID
buff_name Internal name, not showed in UI
buff_desc Description in UI, refers to Localization\english_xml.pak\text_ui_soul.xml
buff_class_id Used for class exclusivity, refers to Data\tables.pak\Libs\Tables\rpg\buff_class.xml
icon_id Icon in UI
duration Used by some implementations like Cpp:BasicTimed and Cpp:Fading
buff_exclusivity_id
  • 0 NoExclusivity - allows multiple instances of the same buff on one target
  • 1 IdExclusive - more instances of the same buff (the same id) are now allowed on one target
  • 2 ModExclusive - more buffs with the same modifier are not allowed on one target
  • 3 ClassExclusive - more buffs belonging to the same class are not allowed
  • 4 TargetExclusive - more buffs are not allowed on one target
params

Contains a comma separated list of stat and skill modifiers. For example spc+2,str-1 means that the buff will increase Speech by 2 and decrease Strength by 1.

Available modifier operations:

  • + AddAbs: result = current + val
  • - SubAbs: result = current - val
  • = SetAbs: result = val
  • * AddBaseRel: result = current + base * (val - 1)
  • % AddCurrRel: result = current * val
  • < Min: result = min(current, val)
  • > Max: result = max(current, val)
  • ! Negation: result = val - current

Some buff implementations like Cpp:Night also support modifier groups, which are created by dividing modifiers by a semicolon.

For example in str+1,spc+1;agi+1,vit+1 the primary group is str+1,spc+1 and secondary group is agi+1,vit+1.

Up to 8 modifier groups can be created, but currently no implementation uses more than 2 groups.

implementation Buff implementation
buff_ui_name Name in UI, refers to Localization\english_xml.pak\text_ui_soul.xml
buff_ui_type_id
  • 0 Default
  • 1 Buff
  • 2 Debuff
  • 3 InjuryDebuff
  • 4 Perk
buff_ai_tag_id
  • 0 alcohol_mood
  • 1 alcohol_drunk
  • 2 alcohol_blackout
  • 3 poison
  • 4 bleed
  • 5 sleep
  • 6 overeat
  • 7 injury
  • 8 savegame
buff_ui_order Order in which buffs appear in UI
is_persistent Persistent buffs are saved
visual_effect Sets material effect, refers to Data\gamedata.pak\Libs\MaterialEffects\FXLibs\player_fx.xml
slot_icon_id Icon for item buffs (e.g. poisoning)
slot_buff_ui_name Name for item buffs
buff_lifetime_id
  • 0 ShortTerm (potions, poisons, ...)
  • 1 LongTerm (perks)
buff_ui_visibility_id
  • 0: None
  • 1: HUD
  • 2: Inventory
  • 3: All

Buff implementation

Common implementations

Implementation Description
Cpp:Constant Buff is constantly active.
Cpp:BasicTimed Timed buff, which gets removed after it expires. Duration controls the expiration time in GameTime seconds. Modifier intensity does not change over time.
Cpp:WorldTimeTimed Similar to Cpp:BasicTimed, but uses WorldTime.
Cpp:Fading Timed buff, which gets removed after it expires. Duration controls the expiration time in GameTime seconds. Modifier intensity linearly decreases over time.
Cpp:WorldTimeFading Similar to Cpp:Fading, but uses WorldTime.
Cpp:Instant Applies its modifiers and then it gets removed. Useful in buff class exlusivity, to kick out other buffs in the same class.
Cpp:Void Does nothing, useful for buff overrides.

Location buffs

These buffs activate when you enter a location with the specified category and deactivate when you leave. Location categories are assigned in tables.pak\Libs\Tables\rpg\location.xml.

Available location categories:

  • 1: Village
  • 2: Town
  • 3: Forest
Implementation Location category
Cpp:ForestLocation Forest
Cpp:SettlementLocation Village or Town
Cpp:CountrysideLocation not Village and not Town

Mannequin tag buffs

These buffs add mannequin tags used by animations.

Implementation Added tag
Cpp:Alerted "alerted"
Cpp:Curious "Curious"
Cpp:Drunk "Drunk"
Cpp:InjuredTag "Injured"
Cpp:Monk "Monk"
Cpp:Sick "Sick"
Cpp:StomachPain "Shitty"

Context checking buffs

These buffs are applied in specific situations depending on the context.

Implementation Context
Cpp:CombatContextBuff Applied in combat
Cpp:DialogSkillCheck Applied in dialog
Cpp:Haggle Applied when haggling
Cpp:DocumentItemBuff Applied when dealing with items in category "document"
Cpp:HerbItemBuff Applied when dealing with items in category "herb"
Cpp:ShieldAndArmorBuff Applied when dealing with items in category "armor" or in category "weapon" with class "shield"
Cpp:Educated Applied against souls in social_class "nobleman", "monk" and "circator".
Cpp:Lowborn Applied against souls in social_class with wealth < HighbornWealthThreshold
Cpp:Highborn Applied against souls in social_class with wealth >= HighbornWealthThreshold
Cpp:VersusSoldier Applied against souls in social_class with soul_crime_role "soldier"
Cpp:VersusCuman Applied against souls in faction with superfaction "Cumans"
Cpp:VersusEnemy Applied against souls with relationship < 0
Cpp:VersusAnimal Applied against souls in soul_archetype with race not "human"
Cpp:VersusDog Applied against souls in soul_archetype with race "dog"
Cpp:VersusWoman Applied against souls in soul_archetype with race "human" and gender "female"
Cpp:VersusWomanDialogSkillCheck Combination of Cpp:VersusWoman and Cpp:DialogSkillCheck
Cpp:ManlyOdourWoman Similar to Cpp:VersusWoman, but applied only when Dirtiness derived stat > PerkManlyOdourDirtinessThreshold

Two state buffs

These implementations have two states and use buff modifier groups. When the buff is active, the primary mod group is enabled, otherwise the secondary mod group is enabled.

Implementation State
Cpp:Night Active when the time is between DuskTime and DawnTime
Cpp:DrunkChecking Active when Drunkenness derived stat > 0
Cpp:LocalHero Active when reputation in current location > LocalHeroInfamousReputationThreshold
Cpp:Infamous Active when reputation in current location < LocalHeroInfamousReputationThreshold
Cpp:Wanted Active when wanted level in any location >= PerkDaringDebonairWantedLevel
Cpp:Still Activates when not moving for StillBuffDuration WorldTime seconds
Cpp:StillAndHidden Activates when crouching and not moving for StillAndHiddenHysteresis GameTime seconds
Cpp:DuringFader Active during fader. Deactivates DuringFaderHysteresis GameTime seconds after fader ends
Cpp:Thunderstorm Active when rain intensity > ThunderstormBuffRainIntensity
Cpp:WithPlatingArmor Active when PlatingRatio derived stat > 0
Cpp:WithoutPlatingArmor Active when PlatingRatio derived stat <= 0
Cpp:ManlyOdourStealth Active when Dirtiness derived stat > PerkManlyOdourDirtinessThreshold
Cpp:PerkFlowerPower Active when number of herbs in inventory >= HerbsInInventoryForFlowerPowerPerk
Cpp:PerkHorsenip Active when number of herbs in inventory >= HerbsInHorseInventoryForHorsenipPerk
Cpp:Sadist Active when opponent is bleeding

Specialized buffs

Special implementations mostly for perks.

Implementation Description
Cpp:AdditionalAttackerCountFading Activates when outnumbered in combat. Modifier intensity depends on number of opponent: no effect against 1 opponent, max effect against AdditionalAttackerCountForMaxFadingBuff opponents.
Cpp:AgilityWeaponBuff Activates when a weapon with higher agility requirement than strength requirement is equipped.
Cpp:Berserk Activates when health falls below PerkBerserkHealthThreshold. After activation lasts for PerkBerserkDuration in GameTime seconds, then it gets deactivated.
Cpp:BloodRush Activates when an enemy in PerkBloodRushDistance meter radius is killed. After activation lasts for PerkBloodRushDuration in GameTime seconds, then it gets deactivated.
Cpp:ChainStrike Stacks for each added buff, up to PerkChainStrikeMaxChain. Each stack lasts for Duration in GameTime second. Modifier intensity depends on number of stacks.
Cpp:HealthFadingFromLimit Modifier intensity depends on Health: no effect when Health = HealthFadingFromLimitValue, max effect when Health = 0.
Cpp:HealthinessFading Modifier intensity depends on Healthiness derived stat: no effect when Healthiness = 1, max effect when Healthiness = 0.
Cpp:Horseman Combination of Cpp:BasicTimed and Cpp:VersusDog. Primary modifier group is always enabled, but secondary group is enabled only against dogs.
Cpp:KnightInAShiningArmor Active when the time is between DawnTime and DuskTime, and CloudAverage <= MaxCloudAverageForShiningArmor. Modifier intensity depends on PlatingRatio derived stat.
Cpp:ProperDiet Activates when CurrentProperDietTime statistic > PerkProperDietActivationTime.
Cpp:ReadingCartographer Reveals all locations on the map.
Cpp:Respec Not available.
Cpp:StrengthWeaponBuff Activates when a weapon with higher strength requirement than agility requirement is equipped.
Cpp:TipplerPotion Similar to Cpp:WorldTimeTimed. On activation removes some other buffs.
Cpp:WeaponHealthIntensity Modifier intensity depends on item health.

System buffs

These implementations are used for various gameplay mechanics, and shouldn't be used in mods because they can't be properly initialized from script.

Implementation Description
Cpp:AdditionalWeight Modifies CarriedWeight derived stat. Available since version 1.3
Cpp:Bleeding Used for showing the value of BleedingTotal derived stat in UI. Adding this buff will not cause bleeding!
Cpp:Caffeine Modifies Caffeine derived stat.
Cpp:CarryingBody

Modifies CarriedWeight and StaminaDerivation derived stats. Depends on CarriedBodyWeightCoef, CarriedCarriedWeightCoef, CarriedBodyMaxStamConsumption and the carried body's BodyWeight and CarriedWeight derived stats.

Cpp:CarryingBodyGravedigger

Similar to Cpp:CarryingBody, but CarriedWeight mod is multiplied by PerkCarriedBodyGravediggerWeightMul and StaminaDerivation mod is 0.

Cpp:Drunkenness

Modifies Strength, Agility, Vitality, Speech, Charisma, Conspicuousness, Drunkenness, Exhaust and Sprint.

Depends on AlcoholMoodThreshold, AlcoholDrunkThreshold, AlcoholMaxSTREffect, AlcoholMaxAGIEffect, AlcoholMaxVITEffect, AlcoholMaxSPCEffect, AlcoholMaxCHAEffect, AlcoholMaxCONEffect, AlcoholMoodMaxExhaustPossitiveEffect, AlcoholDrunkMaxExhaustNegativeEffect, AlcoholBlackoutDuration, AlcoholBaseHangoverDuration, AlcoholMaxDrinkingSkillHangoverDurationModifier, AlcoholDigestSpeedModfifOnEmptyStomache, AlcoholDigestSpeedModfifOnFullStomache, AlcoholPerkDrunkMoodRangeMod, AlcoholPerkDrunkHangoverDurationMod, AlcoholPerkTrueSlavMaxAlcoholMod, AlcoholPerkTrueSlavHangoverDurationMod, AlcoholPerkLooseTongueSpcChaModif and FoodOverEat.

Similarly to Cpp:Drunk it adds "Drunk" mannequin tag.

Cpp:Encumbered Sets primary mod group intensity to Encumberance derived stat and enables secondary mod group when Encumberance > EncumberanceForSecondaryModifiers
Cpp:EquippableItemWeighted Sets mod intensity to equipped item's rpg_buff_weight.
Cpp:Exhausted

Modifies Speech and Charisma. Depends on SpeechMulOnExtremeExhaustion, CharismaMulOnExtremeExhaustion, ExhaustedThreshold, ExhaustedPlayerEffectMinMin, ExhaustedPlayerEffectMaxMin, ExhaustedPlayerEffectMinMax, ExhaustedPlayerEffectMaxMax and ExtremeExhaustionFaintAveragePeriod.

Cpp:FoodHealth

Modifies Health and FoodPoisoningAntidote. Depends on PerkWaterOfLifeHealthMultiplier.

Cpp:FoodPoisoning

Modifies Health, Strength, Vitality, Agility and Charisma. Depends on FoodPoisoningMaxValue, FoodPoisoningThreshold, FoodPoisoningMinHealthEffectSpeed, FoodPoisoningMaxHealthEffectSpeed, FoodPoisoningMaxStatPenalty, MetabolismDigestSpeedMultiplier and MetabolismAbsorbSpeed.

Cpp:Hangover

Modifies Strength, Agility, Vitality, Speech, Charisma and Conspicuousness. Depends on AlcoholMaxSTREffect, AlcoholMaxAGIEffect, AlcoholMaxVITEffect, AlcoholMaxSPCEffect, AlcoholMaxCHAEffect, AlcoholMaxCONEffect, AlcoholHangoverOffsetModif, AlcoholPerkBacchusHangoverEffectMod and AlcoholPerkLooseTongueSpcChaModif.

Cpp:Injured Uses a special Bleeding modifier. Depends on InjuryLowThreshold, InjuryHighThreshold, InjuryRegenInterval and HealthFull.
Cpp:ItemHealthChecking Activates when the item's health >= threshold.
Cpp:ItemHealthMyItemChecking Context checking version of Cpp:ItemHealthChecking.
Cpp:JailRecovery Modifier intensity depends on time spent in jail. Depends on JailRecoveryDebuffDurationMultiplier and JailRecoveryDebuffMaxHours.
Cpp:LastGasp Activates when health after combat hit would be smaller than 1. Depends on PerkLastGaspCooldown.
Cpp:LowHealth Not implemented.
Cpp:MoraleContext Modifies Morale derived stat. Depends on MoraleContextFadingSpeed and MoraleContextFadingMod derived stat.
Cpp:Overeat Modifies RelativeStaminaMax intermediate stat. Depends on FoodFull, FoodOverEat and Hunger.
Cpp:Overread Modifies Overreadness derived stat. Depends on OverreadnessFillTime and OverreadnessEmptyTime.
Cpp:Oversleep Modifies Oversleepness derived stat. Depends on OversleepnessFillTime, OversleepnessEmptyTime and InactiveTimeToDestroyOversleep.
Cpp:PotionHealth Changes Health modifier. Depends on PerkWaterOfLifeHealthMultiplier and WaterOfLife ability.
Cpp:ReadingQuality Modifies ReadingQuality derived stat.
Cpp:RiddenHorse Modifies StaminaConsumption, Courage, Morale and HorseDash. Depends on RiderThreatToHorseMorale.
Cpp:SharpeningPressure Modifier intensity depends on pressure.
Cpp:ShortTermFood Modifies Hunger. Depends on DigestionSpeed and ShortTermNutritionDigestionSpeedMultiplier.
Cpp:Sleep Modifies Health and Exhaust. Depends on SleepHealthRegenBaseSpeed.
Cpp:SleepImproved Similar to Cpp:Sleep. Depends on ImprovedSleepMultiplier.
Cpp:Starvation Modifies Health. Depends on StarvationHealthLossSpeed.
Cpp:TestRealSpeed Testing implementation.
Cpp:Unconscious Depending on input parameters it starts a fader or skiptime.
Cpp:WellWorn Modifies EquippedWeight and CarriedWeight. Depends on EquippedWeightSubWithWellWornPerk.
Script:BasicBuff.lua Not available.